@bigtablet/design-system 4.9.1 → 4.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +34 -22
  2. package/dist/esm/index.js +1 -0
  3. package/dist/esm/styles/colors/index.js +1 -1
  4. package/dist/esm/styles/skeleton/index.js +1 -1
  5. package/dist/esm/styles/theme.css +1 -1
  6. package/dist/esm/text/balanced.js +1 -0
  7. package/dist/esm/text/core.js +1 -0
  8. package/dist/esm/text/dom.js +1 -0
  9. package/dist/esm/text/index.js +1 -0
  10. package/dist/esm/text/layout.js +1 -0
  11. package/dist/esm/text/measure.js +1 -0
  12. package/dist/esm/text/prehydrate-script.js +1 -0
  13. package/dist/esm/text/prehydrate.js +1 -0
  14. package/dist/esm/text/react.js +1 -0
  15. package/dist/esm/text/text.css +4 -0
  16. package/dist/esm/ui/display/accordion/style.css +1 -1
  17. package/dist/esm/ui/display/badge/index.js +1 -1
  18. package/dist/esm/ui/display/card/style.css +1 -1
  19. package/dist/esm/ui/display/hero/index.js +1 -1
  20. package/dist/esm/ui/display/hero/style.css +1 -1
  21. package/dist/esm/ui/display/list-item/style.css +1 -1
  22. package/dist/esm/ui/display/media-card/index.js +1 -1
  23. package/dist/esm/ui/display/media-card/style.css +1 -1
  24. package/dist/esm/ui/display/prose/style.css +1 -1
  25. package/dist/esm/ui/display/stat/style.css +1 -1
  26. package/dist/esm/ui/feedback/alert/index.js +1 -1
  27. package/dist/esm/ui/feedback/alert/style.css +1 -1
  28. package/dist/esm/ui/feedback/empty-state/index.js +1 -1
  29. package/dist/esm/ui/feedback/empty-state/style.css +1 -1
  30. package/dist/esm/ui/feedback/error-state/index.js +1 -1
  31. package/dist/esm/ui/feedback/error-state/style.css +1 -1
  32. package/dist/esm/ui/feedback/inline-alert/index.js +1 -1
  33. package/dist/esm/ui/feedback/skeleton/style.css +1 -1
  34. package/dist/esm/ui/feedback/toast/index.js +1 -1
  35. package/dist/esm/ui/feedback/toast/style.css +1 -1
  36. package/dist/esm/ui/forms/checkbox/style.css +1 -1
  37. package/dist/esm/ui/forms/field/style.css +1 -1
  38. package/dist/esm/ui/forms/file/index.js +1 -1
  39. package/dist/esm/ui/forms/file/style.css +1 -1
  40. package/dist/esm/ui/forms/image-cropper/style.css +1 -1
  41. package/dist/esm/ui/forms/otp-input/index.js +1 -1
  42. package/dist/esm/ui/forms/otp-input/style.css +1 -1
  43. package/dist/esm/ui/forms/radio/style.css +1 -1
  44. package/dist/esm/ui/forms/radio-group/style.css +1 -1
  45. package/dist/esm/ui/forms/segmented-control/style.css +1 -1
  46. package/dist/esm/ui/forms/textarea/index.js +1 -1
  47. package/dist/esm/ui/forms/textarea/style.css +1 -1
  48. package/dist/esm/ui/forms/textfield/index.js +1 -1
  49. package/dist/esm/ui/forms/textfield/style.css +1 -1
  50. package/dist/esm/ui/forms/toggle/style.css +1 -1
  51. package/dist/esm/ui/layout/app-shell/style.css +1 -1
  52. package/dist/esm/ui/layout/page-header/index.js +1 -1
  53. package/dist/esm/ui/layout/page-header/style.css +1 -1
  54. package/dist/esm/ui/navigation/menu/index.js +1 -1
  55. package/dist/esm/ui/navigation/nav-bar/index.js +1 -1
  56. package/dist/esm/ui/navigation/nav-bar/style.css +1 -1
  57. package/dist/esm/ui/navigation/sidebar/index.js +1 -1
  58. package/dist/esm/ui/navigation/sidebar/style.css +1 -1
  59. package/dist/esm/ui/navigation/stepper/index.js +1 -1
  60. package/dist/esm/ui/navigation/stepper/style.css +1 -1
  61. package/dist/esm/ui/navigation/tabs/style.css +1 -1
  62. package/dist/esm/ui/overlay/drawer/style.css +1 -1
  63. package/dist/esm/ui/overlay/modal/index.js +1 -1
  64. package/dist/esm/ui/overlay/modal/style.css +1 -1
  65. package/dist/esm/ui/overlay/popover/style.css +1 -1
  66. package/dist/esm/utils/index.js +1 -1
  67. package/dist/esm/utils/reveal-inline.js +1 -0
  68. package/dist/esm/utils/scroll-lock.js +1 -1
  69. package/dist/index.css +1 -1
  70. package/dist/index.d.ts +21 -14
  71. package/dist/llms/avoid.md +20 -0
  72. package/dist/llms/components/accordion.md +58 -0
  73. package/dist/llms/components/alert.md +131 -0
  74. package/dist/llms/components/app-shell.md +77 -0
  75. package/dist/llms/components/avatar.md +42 -0
  76. package/dist/llms/components/badge.md +47 -0
  77. package/dist/llms/components/bottom-nav.md +74 -0
  78. package/dist/llms/components/breadcrumb.md +48 -0
  79. package/dist/llms/components/button.md +91 -0
  80. package/dist/llms/components/card.md +49 -0
  81. package/dist/llms/components/checkbox.md +45 -0
  82. package/dist/llms/components/chip.md +68 -0
  83. package/dist/llms/components/combobox.md +98 -0
  84. package/dist/llms/components/container.md +44 -0
  85. package/dist/llms/components/copy-button.md +73 -0
  86. package/dist/llms/components/data-view.md +168 -0
  87. package/dist/llms/components/date-calendar.md +60 -0
  88. package/dist/llms/components/date-picker.md +82 -0
  89. package/dist/llms/components/date-range-picker.md +77 -0
  90. package/dist/llms/components/description-list.md +49 -0
  91. package/dist/llms/components/divider.md +34 -0
  92. package/dist/llms/components/drawer.md +64 -0
  93. package/dist/llms/components/dropdown.md +143 -0
  94. package/dist/llms/components/empty-state.md +38 -0
  95. package/dist/llms/components/error-state.md +38 -0
  96. package/dist/llms/components/field.md +110 -0
  97. package/dist/llms/components/file-input.md +47 -0
  98. package/dist/llms/components/filter-bar.md +90 -0
  99. package/dist/llms/components/grid.md +68 -0
  100. package/dist/llms/components/hero.md +58 -0
  101. package/dist/llms/components/icon-button.md +67 -0
  102. package/dist/llms/components/icon.md +41 -0
  103. package/dist/llms/components/image-cropper.md +77 -0
  104. package/dist/llms/components/inline-alert.md +46 -0
  105. package/dist/llms/components/linear-progress.md +29 -0
  106. package/dist/llms/components/list-item.md +51 -0
  107. package/dist/llms/components/locale-provider.md +77 -0
  108. package/dist/llms/components/media-card.md +56 -0
  109. package/dist/llms/components/menu.md +52 -0
  110. package/dist/llms/components/modal.md +108 -0
  111. package/dist/llms/components/nav-bar.md +91 -0
  112. package/dist/llms/components/otp-input.md +44 -0
  113. package/dist/llms/components/page-header.md +71 -0
  114. package/dist/llms/components/pagination.md +37 -0
  115. package/dist/llms/components/popover.md +48 -0
  116. package/dist/llms/components/prose.md +42 -0
  117. package/dist/llms/components/radio-group.md +93 -0
  118. package/dist/llms/components/section.md +40 -0
  119. package/dist/llms/components/segmented-control.md +86 -0
  120. package/dist/llms/components/sidebar.md +79 -0
  121. package/dist/llms/components/skeleton.md +42 -0
  122. package/dist/llms/components/spinner.md +37 -0
  123. package/dist/llms/components/stack.md +49 -0
  124. package/dist/llms/components/stat.md +41 -0
  125. package/dist/llms/components/stepper.md +104 -0
  126. package/dist/llms/components/table.md +136 -0
  127. package/dist/llms/components/tabs.md +146 -0
  128. package/dist/llms/components/tag-input.md +64 -0
  129. package/dist/llms/components/text-field.md +76 -0
  130. package/dist/llms/components/textarea.md +60 -0
  131. package/dist/llms/components/theme-provider.md +54 -0
  132. package/dist/llms/components/time-picker.md +59 -0
  133. package/dist/llms/components/timeline.md +54 -0
  134. package/dist/llms/components/toast.md +81 -0
  135. package/dist/llms/components/toggle.md +39 -0
  136. package/dist/llms/components/tooltip.md +40 -0
  137. package/dist/llms/components/top-loading.md +50 -0
  138. package/dist/llms/full.md +5416 -0
  139. package/dist/llms/index.md +132 -0
  140. package/dist/llms/recipes.md +228 -0
  141. package/dist/llms/text.md +58 -0
  142. package/dist/llms/tokens.md +330 -0
  143. package/dist/llms/vanilla.md +1647 -0
  144. package/dist/react-2EHR6KYq.d.ts +48 -0
  145. package/dist/styles/colors/_tokens.scss +4 -4
  146. package/dist/styles/layout/_index.scss +9 -1
  147. package/dist/styles/skeleton/_tokens.scss +4 -4
  148. package/dist/styles/typography/_index.scss +8 -3
  149. package/dist/text.d.ts +99 -0
  150. package/dist/vanilla/bigtablet.min.css +1 -1
  151. package/dist/vanilla/bigtablet.min.js +6 -6
  152. package/docs/AGENT_GUIDE.md +50 -41
  153. package/package.json +16 -15
  154. package/dist/esm/utils/sentences.css +0 -4
  155. package/dist/esm/utils/sentences.js +0 -1
@@ -21,8 +21,8 @@
21
21
 
22
22
  | Surface | Stable? | Notes |
23
23
  | --- | --- | --- |
24
- | Exported components and their props | **Yes** | TypeScript types are the contract. A removed or renamed prop is a major |
25
- | SCSS tokens (`@bigtablet/design-system/scss/token`) | **Yes** | Added in minors, removed only in majors |
24
+ | Exported components and their props | **Yes** | TypeScript types are the contract. A prop can be removed or renamed in a minor — only after a `@deprecated` period or when passing it already broke a rule — with a [MIGRATION.md](https://github.com/Bigtablet/bigtablet-design-system/blob/main/docs/MIGRATION.md) section giving the replacement |
25
+ | SCSS tokens (`@bigtablet/design-system/scss/token`) | **Yes** | Added in minors. A removal can also ship in a minor, with a MIGRATION.md section |
26
26
  | CSS variables (`--bt-*`) from `style.css` | **Yes** | The Vanilla bundle defines a subset — see the Spacing section |
27
27
  | Vanilla `bt-*` classes (`/vanilla`) | **Yes** | That bundle's whole API is its classes |
28
28
  | **React DOM structure and `component_part` classes** | **No** | `.modal_panel`, `.textarea_container`, `.text_field_input` … internal. They move in patches |
@@ -46,7 +46,8 @@ grep -A30 "interface TextareaProps" node_modules/@bigtablet/design-system/dist/i
46
46
 
47
47
  # what changed, and which lines need a visual check
48
48
  # entries starting with "(렌더 변경)" alter rendering with no API change
49
- cat node_modules/@bigtablet/design-system/CHANGELOG.md # or the GitHub releases page
49
+ # CHANGELOG is not in the npm package - read it on GitHub:
50
+ # https://github.com/Bigtablet/bigtablet-design-system/blob/main/CHANGELOG.md (or the releases page)
50
51
  ```
51
52
 
52
53
  ---
@@ -80,7 +81,7 @@ export default function RootLayout({ children }) {
80
81
  Providers needed:
81
82
  - `ThemeProvider` - required for runtime dark mode toggle via `useTheme()`. If you only need OS-preference-based dark mode, you can omit it (CSS handles it).
82
83
  - `AlertProvider` - required for `useAlert()` confirmation dialogs.
83
- - `ToastProvider` - required for `useToast()` snackbar notifications. `placement="bottom-right"` (default `"top-right"`) when toasts would cover a header's primary action.
84
+ - `ToastProvider` - required for `useToast()` snackbar notifications. Toasts sit bottom-right by default; pass `placement="top-right"` when a fixed bottom UI (cookie banner, chat button) would cover them.
84
85
 
85
86
  ---
86
87
 
@@ -89,8 +90,8 @@ Providers needed:
89
90
  Always reference tokens - never inline a hex value.
90
91
 
91
92
  Two surfaces, and they are **not** interchangeable:
92
- - **SCSS tokens** (`@use "src/styles/token" as token;` → `token.$spacing_16`) - the full set. Use these in component `style.scss`.
93
- - **CSS custom properties** - read them with `var()` in consumer CSS. `--bt-radius-*` / `--bt-spacing-*` / `--bt-font-family` are emitted by both bundles and can be overridden on `:root`; font-size / line-height CSS vars exist only in the Vanilla bundle. Full contract incl. runtime behaviour: [THEMING.md](./THEMING.md#레이아웃런타임-계약-변수).
93
+ - **SCSS tokens** (`@use "@bigtablet/design-system/scss/token" as token;` → `token.$spacing_16`) - the full set. Use these in your SCSS.
94
+ - **CSS custom properties** - read them with `var()` in consumer CSS. `--bt-radius-*` / `--bt-spacing-*` / `--bt-font-family` are emitted by both bundles and can be overridden on `:root`; font-size / line-height CSS vars exist only in the Vanilla bundle. Full contract incl. runtime behaviour: [THEMING.md](https://github.com/Bigtablet/bigtablet-design-system/blob/main/docs/THEMING.md#레이아웃런타임-계약-변수).
94
95
 
95
96
  <!-- css-var-claim: 아래 한 줄이 React entry 의 변수 계열 전부를 주장한다. scripts/check-css-vars.sh 가 이 줄만 검사하므로 예시 변수명을 이 줄에 두지 말 것 - 예시가 계열을 채워 검사가 무력화된다. -->
96
97
  The React entry's `style.css` emits only `--bt-color-*`, `--bt-elevation-*`, `--bt-focus-*`, `--bt-sidebar-*`, `--bt-bottom-nav-*`, `--bt-bottom-inset*`, `--bt-scrollbar-width`, `--bt-z-*`, `--bt-radius-*`, `--bt-spacing-*`, `--bt-font-family`.
@@ -99,16 +100,16 @@ The React entry's `style.css` emits only `--bt-color-*`, `--bt-elevation-*`, `--
99
100
 
100
101
  | Token | Light | Dark | When to use |
101
102
  |-------|-------|------|-------------|
102
- | `--bt-color-bg-solid` | white | navy_900 | Page/card background |
103
- | `--bt-color-bg-solid-dim` | neutral_50 | navy_800 | Elevated surface (panels, dimmed sections) |
104
- | `--bt-color-text-heading` | neutral_900 | white | Primary headings, body emphasis |
105
- | `--bt-color-text-body` | neutral_700 | navy_200 | Body text, descriptions |
106
- | `--bt-color-text-caption` | neutral_500 | neutral_400 | Captions, helper text, placeholders |
107
- | `--bt-color-border-default` | neutral_200 | navy_700 | Card borders, dividers |
108
- | `--bt-color-border-hover` | neutral_400 | navy_400 | Hover state borders |
103
+ | `--bt-color-bg-solid` | #FFFFFF | #0A0A0A | Page/card background |
104
+ | `--bt-color-bg-solid-dim` | #F4F4F4 | #141414 | Elevated surface (panels, dimmed sections) |
105
+ | `--bt-color-text-heading` | #121212 | white 95% | Primary headings, body emphasis |
106
+ | `--bt-color-text-body` | #666666 | #B3B3B3 | Body text, descriptions |
107
+ | `--bt-color-text-caption` | #6F6F6F | #808080 | Captions, helper text, placeholders |
108
+ | `--bt-color-border-default` | #E5E5E5 | #333333 | Card borders, dividers |
109
+ | `--bt-color-border-hover` | #B3B3B3 | #777777 | Hover state borders |
109
110
  | `--bt-color-brand-primary` | #121212 | #121212 (same) | Button "filled" bg (intentional, both themes) |
110
111
  | `--bt-color-brand-on-primary` | white | white (same) | Text on `brand-primary` |
111
- | `--bt-color-accent-default` | #121212 | white | Indicators that flip in dark (checked checkboxes, active progress) |
112
+ | `--bt-color-accent-default` | #121212 | #FFFFFF | Indicators that flip in dark (checked checkboxes, active progress) |
112
113
  | `--bt-color-accent-on-surface` | white | #121212 | Text/icon on top of `accent-default` |
113
114
  | `--bt-color-status-success` | green | green (same) | Success states |
114
115
  | `--bt-color-status-warning` | amber | amber (same) | Warning states |
@@ -136,7 +137,7 @@ Every step has a CSS var (`--bt-radius-none` … `--bt-radius-full`) in both bun
136
137
 
137
138
  ### Elevation
138
139
 
139
- `--bt-elevation-level1` through `-level5`. Light = subtle dark drops. Dark = stronger blacks with larger spread for visibility on navy.
140
+ `--bt-elevation-level1` through `-level5`. Light = subtle dark drops. Dark = stronger blacks with larger spread for visibility on the near-black canvas.
140
141
 
141
142
  ### Motion
142
143
 
@@ -197,7 +198,7 @@ Reach for an inline style only when the value is genuinely dynamic (computed at
197
198
  - Pair `accent-default` with `accent-on-surface` for the foreground (auto-inverts)
198
199
 
199
200
  4. **Panel elevation in dark mode:**
200
- - Page bg: `bg-solid` (navy_900)
201
+ - Page bg: `bg-solid` (#0A0A0A)
201
202
  - Elevated panel (dropdown, menu, modal): use the conditional pattern below
202
203
 
203
204
  ```scss
@@ -205,7 +206,7 @@ Reach for an inline style only when the value is genuinely dynamic (computed at
205
206
  background: var(--bt-color-bg-solid); // white in light
206
207
 
207
208
  [data-theme="dark"] & {
208
- background: var(--bt-color-bg-solid-dim); // navy_800 (lighter than canvas)
209
+ background: var(--bt-color-bg-solid-dim); // #141414 (lighter than canvas)
209
210
  }
210
211
  @media (prefers-color-scheme: dark) {
211
212
  :root:not([data-theme]) & {
@@ -216,8 +217,7 @@ Reach for an inline style only when the value is genuinely dynamic (computed at
216
217
  ```
217
218
 
218
219
  5. **Hardcoded whites/darks are allowed for intentional fixed surfaces:**
219
- - Navy gradient avatars (decorative, brand-colored)
220
- - Hero `_overlay_navy` (always dark gradient)
220
+ - Hero `overlay="dark"` (always dark gradient)
221
221
  - Tooltip body (`accent-strong` token already handles theme)
222
222
  - Destructive red modal buttons
223
223
 
@@ -229,7 +229,7 @@ Reach for an inline style only when the value is genuinely dynamic (computed at
229
229
 
230
230
  ## Component Catalog
231
231
 
232
- Organized by category. **Always** import from the package root (`@bigtablet/design-system`), never deep paths.
232
+ Organized by category. **Always** import from the package root (`@bigtablet/design-system`). The only other React entry is `@bigtablet/design-system/text` (`BalancedText` and the other line-breaking exports). Non-React pages use the Vanilla entries `@bigtablet/design-system/vanilla` (`/vanilla/bigtablet.min.js`, `/vanilla/style.min.css`) - see [Vanilla JS Bundle](#vanilla-js-bundle). Never deep paths into `dist/`.
233
233
 
234
234
  ### Forms
235
235
 
@@ -260,7 +260,7 @@ Organized by category. **Always** import from the package root (`@bigtablet/desi
260
260
  |-----------|---------|-----------|
261
261
  | `Card` | Generic container (header/body/footer composition). | `heading`, `variant` (default/accent/glass/outline - glass=frosted blur over colored bg, outline=transparent+border), `interactive` (hover-lift for clickable cards), `footer` + `footerAlign` (start/between/end), `bordered`, `shadow` (none/sm/md/lg), `padding` (none/sm/md/lg) |
262
262
  | `MediaCard` | Image + content card. | `image` (`{ src, alt }`, required), `imagePosition`, `aspectRatio`, `heading`, `eyebrow`, `meta`, `children` (body), `clickable`, `shadow`, `bordered` |
263
- | `Hero` | Page-top hero section. | `title`, `subtitle`, `eyebrow`, `backgroundImage`, `overlay` (dark/light/navy), `height` (sm/md/lg/full), `align`, `textColor` (auto/inverse/default), `primaryAction`, `secondaryAction` |
263
+ | `Hero` | Page-top hero section. | `title`, `subtitle`, `eyebrow`, `backgroundImage`, `overlay` (`true`/`dark`/`light`), `height` (sm/md/lg/full), `align`, `textColor` (auto/inverse/default), `primaryAction`, `secondaryAction` |
264
264
  | `Avatar` | User profile circle. | `name` (initials fallback), `src`, `size` (sm/md/lg), `shape` (circle/square) |
265
265
  | `Badge` | Number/status pill. | `shape` (dot/count/label), `tone` (accent/neutral/info/success/warning/error), `appearance` (solid/soft - soft = tint bg + dark text, both WCAG AA), `count` |
266
266
  | `Chip` | Tag/category pill. | `type` (interactive/static), `tone` (neutral/accent/info/success/warning/error - static only), `size` (sm/md), `selected`, `removable`, `leadingIcon` |
@@ -289,7 +289,7 @@ Organized by category. **Always** import from the package root (`@bigtablet/desi
289
289
 
290
290
  | Component | Purpose | Key props |
291
291
  |-----------|---------|-----------|
292
- | `Tabs` | Compound tab pattern. | Wrap `Tab` items in `TabList`; render content via `TabPanel`. `defaultValue` (uncontrolled), `value`/`onValueChange` (controlled). `variant` (line default / fills). |
292
+ | `Tabs` | Compound tab pattern. | Wrap `Tab` items in `TabList`; render content via `TabPanel`. `defaultValue` (uncontrolled), `value`/`onValueChange` (controlled). `variant` (line; `fills` is deprecated - it looks like SegmentedControl). |
293
293
  | `Sidebar` | Admin left nav. | `header`, `headerCollapsed` (collapse crossfade), `footer`, `collapsed`, `collapsible`, `collapsedWidth`, `mode` (auto/static - auto transforms to bottom bar <600px). Children = `SidebarSection` + `SidebarItem`. |
294
294
  | `BottomNav` | Mobile bottom nav bar. | 2-5 `BottomNavItem` (`icon`, `label`, `active`, `badge`, `as`/`href`). `position: fixed; bottom: 0` + iOS safe-area. Use `BottomNavSpacer` at page end to avoid content overlap. mobile-first flat nav. |
295
295
  | `NavBar` | Top nav. | `brand`, `actions`, `variant` (default/transparent/accent), `layout` (contained/fluid). Children = `NavLink`. Sliding active indicator built in. |
@@ -310,14 +310,20 @@ Organized by category. **Always** import from the package root (`@bigtablet/desi
310
310
  | Component | Purpose | Key props |
311
311
  |-----------|---------|-----------|
312
312
  | `Container` | Centered max-width wrapper. | `size` (sm/md/lg/xl/full, default xl), `center` (default true) |
313
- | `Section` | Page section with vertical rhythm. | `spacing` (xs/sm/md/lg/xl), `bg` (default/dim/accent/navy/transparent) |
313
+ | `Section` | Page section with vertical rhythm. | `spacing` (xs/sm/md/lg/xl), `bg` (default/dim/accent/inverted/transparent) |
314
314
  | `Stack` | 1D flex layout. | `direction` (horizontal/vertical), `gap`, `align`, `justify`, `wrap` |
315
315
  | `Grid` | CSS Grid layout. | `cols` (number or "auto"), `gap`, `minColWidth` (when `cols="auto"`) |
316
316
 
317
317
  ### Foundation
318
318
 
319
319
  - `ThemeProvider` - wraps app for runtime theme control. `defaultMode` (light/dark/system).
320
- - `useTheme()` - returns `{ mode, setMode, resolvedMode }`.
320
+ - `useTheme()` - returns `{ mode, resolved, setMode }` (`resolved` = the applied `"light" | "dark"`).
321
+
322
+ ### Text
323
+
324
+ - `<Sentences text="..." />` - wraps each sentence in an `inline-block` span so lines break between sentences (same rule Toast/Alert/`supportingText` use). Use it for app-drawn paragraphs instead of your own splitter. In tests, find split text with `getByText(sentenceText("full text"))`. The same rules (sentence split, keeping `~의` modifiers and determiners with the next word) are also exported from `@bigtablet/design-system/text`, including React-free `splitSentences` and `phraseRanges`.
325
+ - `<BalancedText as="h1">...</BalancedText>` (`@bigtablet/design-system/text`) - for headings, hero copy, lead text and short paragraphs: measures the real width and picks breaks at sentence ends and commas within the same line count. Children may mix text and inline elements (`<code>`, `<strong>`, links). `as` must be block-level. Not for long body text (cost grows with the square of the word count).
326
+ - `<BalancedTextScript />` (`@bigtablet/design-system/text`) - SSR apps only: put it once at the end of `<body>` (after the `BalancedText`s) so server HTML shows the same lines before hydration. Pass your CSP `nonce`. CSR apps do not need it.
321
327
 
322
328
  ---
323
329
 
@@ -353,7 +359,7 @@ For your own overlay, use the SCSS mixin. It uses the same curve as the componen
353
359
  // Enter + exit: keep it mounted with data-state="closed" until el.getAnimations() settle, then unmount.
354
360
  ```
355
361
 
356
- Hover lift (what `useSpringHover` used to do) is plain CSS: `transform` on `:hover` / `:focus-visible` with `token.$duration_presence token.$easing_presence`. See `docs/MIGRATION.md`.
362
+ Hover lift (what `useSpringHover` used to do) is plain CSS: `transform` on `:hover` / `:focus-visible` with `token.$duration_presence token.$easing_presence`. See [MIGRATION.md](https://github.com/Bigtablet/bigtablet-design-system/blob/main/docs/MIGRATION.md).
357
363
 
358
364
  **Reduced motion:** every component respects `prefers-reduced-motion: reduce`. `token.presence` turns its transition off there.
359
365
 
@@ -494,18 +500,21 @@ toast.error("Network error", 6000); // custom 6s duration
494
500
 
495
501
  ---
496
502
 
497
- ## Storybook Reference
503
+ ## Docs Site Reference
504
+
505
+ The docs site (`site/`, published at https://bigtablet.github.io/bigtablet-design-system/) has:
506
+ - **Components** - one page per component: examples, when to use, props table, and an "adjust" toggle on the first example
507
+ - **Tokens** - colors, spacing, typography, breakpoints and the other domains
508
+ - **AI Agents** - setup files for Claude Code, Codex and Cursor
498
509
 
499
- Stories are organized:
500
- - **Getting Started** - Installation, Introduction
501
- - **Cookbook** - Composition recipes (Form / Layout / Feedback / Data patterns)
502
- - **Examples** - Full page patterns (Admin Dashboard, Marketing landing)
503
- - **Foundation** - Token visualization (colors, spacing, typography, etc.)
504
- - **Components/{Category}/{Component}** - Each component's variants
510
+ Agent-readable docs ship in the package at `node_modules/@bigtablet/design-system/dist/llms/` (same source as the site, same version as the install):
511
+ - `index.md` - rules before writing UI + the component list; `components/*.md` - one file per component
512
+ - `tokens.md` - every token name and value (use only these), `recipes.md` - admin list / form / landing screens, `avoid.md` - removed props and deprecated names with replacements
513
+ - `text.md` - the `/text` subpath, `vanilla.md` - the Vanilla bundle, `full.md` - everything except Vanilla in one file
505
514
 
506
- Run locally: `pnpm storybook` (port 6006).
515
+ The docs site serves the same set from `main` as `llms.txt` (index) and `llms-full.txt` (one file).
507
516
 
508
- **Note on Storybook Docs view:** Interactive states (hover, focus, animations) only show in Canvas view (individual story). Docs view renders static snapshots, so Spinner shows frozen, Tooltip won't appear, etc.
517
+ Run locally: `pnpm site` (port 6007).
509
518
 
510
519
  ---
511
520
 
@@ -514,8 +523,8 @@ Run locally: `pnpm storybook` (port 6006).
514
523
  For non-React contexts (Thymeleaf, JSP, PHP, Django):
515
524
 
516
525
  ```html
517
- <link rel="stylesheet" href="https://unpkg.com/@bigtablet/design-system/dist/vanilla/bigtablet.min.css">
518
- <script src="https://unpkg.com/@bigtablet/design-system/dist/vanilla/bigtablet.min.js"></script>
526
+ <link rel="stylesheet" href="https://unpkg.com/@bigtablet/design-system@4/dist/vanilla/bigtablet.min.css">
527
+ <script src="https://unpkg.com/@bigtablet/design-system@4/dist/vanilla/bigtablet.min.js"></script>
519
528
 
520
529
  <button class="bt-button bt-button--md bt-button--filled">Filled</button>
521
530
  ```
@@ -524,7 +533,7 @@ Class naming: `.bt-{component}` + `--{modifier}` + `.is-{state}` (BEM-like).
524
533
 
525
534
  Components available: Button, TextField, Checkbox, Radio, Toggle, Dropdown, Modal, Alert, Toast, InlineAlert (CSS only), Badge (CSS only), Table (CSS only), CopyButton, Card, Spinner, Pagination, DatePicker, FileInput.
526
535
 
527
- Class names and JS option names mirror the React API exactly - there are no deprecated aliases. See [MIGRATION.md](./MIGRATION.md#v380-vanilla-패키지-정리) for the v3.8.0 old → new map.
536
+ Class names and JS option names mirror the React API exactly - there are no deprecated aliases. See [MIGRATION.md](https://github.com/Bigtablet/bigtablet-design-system/blob/main/docs/MIGRATION.md#v380-vanilla-패키지-정리) for the v3.8.0 old → new map.
528
537
 
529
538
  JS API (auto-init on DOMContentLoaded, or manual):
530
539
  ```js
@@ -546,14 +555,14 @@ Dark mode: same `[data-theme="dark"]` attribute works. CSS custom properties exp
546
555
  When asked to generate UI:
547
556
 
548
557
  1. **Always** wrap your output in the appropriate provider chain if the app entry isn't shown.
549
- 2. **Always** import components from `@bigtablet/design-system` root.
558
+ 2. **Always** import components from the `@bigtablet/design-system` root (line-breaking exports such as `BalancedText` from `@bigtablet/design-system/text`). Never deep paths into `dist/`.
550
559
  3. **Always** use tokens (`var(--bt-color-*)`) for any inline style or custom SCSS.
551
560
  4. **Always** check both light and dark modes in your mental model. If a color choice fails in either theme, swap to a flipping token.
552
561
  5. **Never** generate a custom Button/Modal/Dropdown/Tooltip when the DS provides one.
553
562
  6. **Never** use `useLayoutEffect` for non-DOM-measurement work (Next.js SSR warning). Default to `useEffect`.
554
563
  7. **For interactive content**, ensure: `aria-label`/`aria-labelledby`, keyboard support (Enter/Space for buttons, Arrow keys for menus), and `:focus-visible` styling.
555
564
  8. **For images**, set `alt` (empty `""` if purely decorative).
556
- 9. **Korean / English text**: both supported. Use `word-break: keep-all` if you set custom long-text styles in Korean contexts.
565
+ 9. **Korean / English text**: both supported. Use `@include token.wrap_keep_all;` (`word-break: keep-all` + `overflow-wrap: anywhere`) if you set custom long-text styles in Korean contexts.
557
566
 
558
567
  ---
559
568
 
@@ -600,7 +609,7 @@ When asked to generate UI:
600
609
 
601
610
  ## Final Reminders
602
611
 
603
- - Read the [Components](./COMPONENTS.md) doc for full props API per component.
604
- - Storybook is the source of truth for visual behavior - `pnpm storybook` and explore.
612
+ - Read the [Components](https://github.com/Bigtablet/bigtablet-design-system/blob/main/docs/COMPONENTS.md) doc for full props API per component.
613
+ - The docs site examples are the source of truth for visual behavior - `pnpm site` and explore.
605
614
  - When in doubt, **use tokens, use components, use providers**. Don't reinvent.
606
615
  - Dark mode bugs are the most common failure mode - test both themes mentally before shipping code.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigtablet/design-system",
3
- "version": "4.9.1",
3
+ "version": "4.10.1",
4
4
  "description": "Bigtablet Design System UI Components",
5
5
  "type": "module",
6
6
  "types": "dist/index.d.ts",
@@ -14,6 +14,10 @@
14
14
  "types": "./dist/index.d.ts",
15
15
  "import": "./dist/esm/index.js"
16
16
  },
17
+ "./text": {
18
+ "types": "./dist/text.d.ts",
19
+ "import": "./dist/esm/text/index.js"
20
+ },
17
21
  "./style.css": "./dist/index.css",
18
22
  "./tailwind.css": "./dist/tailwind.css",
19
23
  "./scss/token": "./dist/styles/token.scss",
@@ -38,32 +42,35 @@
38
42
  "**/*.scss"
39
43
  ],
40
44
  "scripts": {
41
- "build": "tsup && pnpm run copy:scss && pnpm run build:vanilla && pnpm run build:tailwind",
45
+ "build": "tsup && pnpm run copy:scss && pnpm run build:vanilla && pnpm run build:tailwind && pnpm run build:llms",
46
+ "build:llms": "tsx site/gen-props.ts && tsx site/gen-llms.ts",
42
47
  "build:tailwind": "node scripts/build-tailwind.mjs",
43
48
  "tokens": "node scripts/build-tokens.mjs",
44
49
  "check:tokens": "node scripts/build-tokens.mjs --check",
50
+ "prehydrate": "node scripts/build-prehydrate.mjs",
51
+ "check:prehydrate": "node scripts/build-prehydrate.mjs --check",
45
52
  "build:vanilla": "sh scripts/build-vanilla.sh",
46
53
  "copy:scss": "sh scripts/copy-scss.sh",
47
54
  "dev": "tsup --watch",
48
- "storybook": "storybook dev -p 6006",
49
- "build:sb": "storybook build",
55
+ "site": "vite --config site/vite.config.ts",
56
+ "build:site": "tsx site/gen-props.ts && vite build --config site/vite.config.ts && tsx site/gen-llms.ts --site site-dist",
50
57
  "test": "vitest run --project unit",
51
58
  "test:watch": "vitest --project unit",
52
59
  "test:coverage": "vitest run --project unit --coverage",
53
60
  "coverage:docs": "vitest run --project unit --coverage --reporter=default --reporter=json --outputFile.json=coverage/test-results.json && python3 scripts/update-coverage-docs.py",
54
61
  "coverage:docs:check": "vitest run --project unit --coverage --reporter=default --reporter=json --outputFile.json=coverage/test-results.json && python3 scripts/update-coverage-docs.py --check",
55
- "test:storybook": "vitest run --project storybook",
56
62
  "test:browser": "vitest run --project browser",
57
63
  "test:visual": "vitest run --project visual",
58
64
  "visual:accept": "scripts/accept-visual.sh",
59
- "test:mutation": "pnpm --dir tools/mutation install --frozen-lockfile && tools/mutation/node_modules/.bin/stryker run",
65
+ "test:mutation": "pnpm --dir tools/mutation install --frozen-lockfile && tools/mutation/node_modules/.bin/stryker run tools/mutation/stryker.config.mjs",
60
66
  "lint:css": "stylelint 'src/ui/**/*.scss' 'src/styles/**/*.scss' 'src/vanilla/**/*.scss'",
61
67
  "check:css-vars": "scripts/check-css-vars.sh",
62
68
  "check:defaults": "python3 scripts/check-prop-defaults.py",
63
69
  "check:geometry": "python3 scripts/check-overlay-geometry.py",
64
70
  "check:dark-text": "python3 scripts/check-dark-text-tokens.py",
65
- "check:deprecated": "python3 scripts/check-deprecated-in-stories.py",
66
- "check:filenames": "python3 scripts/check-story-test-filenames.py",
71
+ "check:deprecated": "python3 scripts/check-deprecated-in-examples.py",
72
+ "check:filenames": "python3 scripts/check-test-filenames.py",
73
+ "check:props": "tsx site/gen-props.ts && git diff --exit-code site/props.json",
67
74
  "check:agent-guide": "python3 scripts/check-agent-guide.py",
68
75
  "size": "size-limit",
69
76
  "prepare": "husky"
@@ -71,7 +78,6 @@
71
78
  "keywords": [
72
79
  "design-system",
73
80
  "react",
74
- "storybook",
75
81
  "ui",
76
82
  "vanilla",
77
83
  "thymeleaf",
@@ -97,11 +103,6 @@
97
103
  "@commitlint/cli": "^21.1.0",
98
104
  "@commitlint/core": "^21.1.0",
99
105
  "@size-limit/preset-small-lib": "^12.1.0",
100
- "@storybook/addon-a11y": "^10.4.6",
101
- "@storybook/addon-docs": "^10.4.6",
102
- "@storybook/addon-vitest": "^10.4.6",
103
- "@storybook/react": "^10.4.6",
104
- "@storybook/react-vite": "^10.4.6",
105
106
  "@testing-library/dom": "^10.4.1",
106
107
  "@testing-library/jest-dom": "^6.9.1",
107
108
  "@testing-library/react": "^16.3.2",
@@ -110,6 +111,7 @@
110
111
  "@types/react-dom": "^19.2.4",
111
112
  "@vitest/browser-playwright": "^4.1.10",
112
113
  "@vitest/coverage-v8": "^4.1.10",
114
+ "axe-core": "4.14.1",
113
115
  "esbuild-sass-plugin": "^3.7.0",
114
116
  "husky": "^9.1.7",
115
117
  "jsdom": "^29.1.1",
@@ -121,7 +123,6 @@
121
123
  "react-dom": "^19.2.8",
122
124
  "sass-embedded": "^1.99.0",
123
125
  "size-limit": "^12.1.0",
124
- "storybook": "^10.4.6",
125
126
  "stylelint": "^17.14.0",
126
127
  "tsup": "^8.5.1",
127
128
  "tsx": "^4.23.12",
@@ -1,4 +0,0 @@
1
- @charset "UTF-8";
2
- @layer theme, base, reset, bigtablet, components, utilities;
3
- @layer bigtablet {
4
- .sentences_item{display:inline-block}}
@@ -1 +0,0 @@
1
- import "../styles/theme.css";import "../styles/autofill.css";import "../styles/link.css";import{jsx,jsxs}from"react/jsx-runtime";import*as React from"react";import"./sentences.css";const SENTENCE_END=/(?:[^\d]\.|[!?])["')\]”’」』]*$/;const splitSentences=text=>{const sentences=[];let start=-1;let end=0;for(const match of text.matchAll(/\S+/g)){const index=match.index??0;if(start<0)start=index;end=index+match[0].length;if(SENTENCE_END.test(match[0])){sentences.push({text:text.slice(start,end),start,end});start=-1}}if(start>=0)sentences.push({text:text.slice(start,end),start,end});return sentences};const renderSentences=content=>{if(typeof content!=="string")return content;const sentences=splitSentences(content);if(sentences.length<2)return content;const last=sentences[sentences.length-1]?.end??content.length;return[...sentences.map((sentence,index)=>jsxs(React.Fragment,{children:[content.slice(index>0?sentences[index-1]?.end??0:0,sentence.start),jsx("span",{className:"sentences_item",children:sentence.text})]},sentence.start)),content.slice(last)]};export{renderSentences,splitSentences};