@designbasekorea/wordpress-ui 0.1.7 → 0.1.8

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  이 문서는 `@designbasekorea/wordpress-ui`를 WordPress 플러그인과 테마의 관리자 화면에 적용하는 표준 가이드입니다.
4
4
 
5
- 이 가이드의 기준 배포 버전은 `0.1.7`입니다. `@designbasekorea/ui-wc@0.8.7`과
5
+ 이 가이드의 기준 배포 버전은 `0.1.8`입니다. `@designbasekorea/ui-wc@0.8.8`과
6
6
  같은 세트를 사용하세요. 플러그인 또는 테마의 lockfile과
7
7
  vendor 산출물도 같은 버전으로 맞추고, 버전을 올릴 때마다 아래 검증 명령을 다시
8
8
  실행합니다.
@@ -63,7 +63,7 @@ WordPress plugin/theme
63
63
  ### 2.1 Node 프로젝트에 설치
64
64
 
65
65
  ```bash
66
- npm install @designbasekorea/wordpress-ui@0.1.7
66
+ npm install @designbasekorea/wordpress-ui@0.1.8
67
67
  ```
68
68
 
69
69
  WordPress 서버가 npm을 실행하는 것이 아닙니다. 라이브러리를 설치한 뒤 플러그인 또는 테마 빌드 과정에서 배포에 필요한 파일을 포함해야 합니다.
@@ -144,7 +144,7 @@ require_once __DIR__ . '/vendor/wordpress-ui/wordpress-ui.php';
144
144
 
145
145
  final class MyPlugin_Admin_Assets
146
146
  {
147
- private const UI_VERSION = '0.1.7';
147
+ private const UI_VERSION = '0.1.8';
148
148
 
149
149
  public static function init(): void
150
150
  {
@@ -454,7 +454,7 @@ select?.addEventListener('db-change', (event) => {
454
454
  React는 선택 사항입니다. Gutenberg나 기존 React 앱과 연결해야 하는 화면에서만 사용하고, 일반적인 PHP admin page에는 vanilla entry를 권장합니다.
455
455
 
456
456
  ```bash
457
- npm install @designbasekorea/wordpress-ui@0.1.7 react react-dom
457
+ npm install @designbasekorea/wordpress-ui@0.1.8 react react-dom
458
458
  ```
459
459
 
460
460
  ```tsx
@@ -532,7 +532,7 @@ React adapter의 책임은 관리자 shell과 ui-wc primitives 조합입니다.
532
532
 
533
533
  - `AdminShell`: `sidebarTitle`(사이드바 로고)과 `sidebarItems`(메뉴). 내부에서 `.designbase-wp-admin` root를 만듭니다.
534
534
  - `AdminPage`, `AdminPageContent`: 페이지 폭과 밀도
535
- - `AdminPageHeader`: title, description, breadcrumb, action. 모바일에서는 메뉴 버튼을 붙입니다.
535
+ - `AdminPageHeader`: title, description, breadcrumb, action. 태블릿 이하에서는 제목 왼쪽에 사이드바 열기/닫기 버튼을 붙입니다. 기본값은 닫힘입니다.
536
536
  - `Section`, `Table`, `SearchBar`, `Select`, `Tabs`, `EmptyState`, `Modal` 등: 같은 패키지의 React primitives. `AdminSection` / `AdminDataTable` / `AdminFilterBar` 같은 별도 래퍼는 없습니다.
537
537
 
538
538
  이 컴포넌트들은 REST 요청, 페이지네이션 API, nonce 갱신, capability 검사를 대신하지 않습니다. React state와 서버 데이터의 생명주기는 플러그인/테마 앱이 소유합니다.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designbasekorea/wordpress-ui",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "WordPress 관리자용 Designbase UI primitives와 plugin shell patterns",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -74,7 +74,7 @@
74
74
  "build-storybook": "storybook build"
75
75
  },
76
76
  "dependencies": {
77
- "@designbasekorea/ui-wc": "0.8.7"
77
+ "@designbasekorea/ui-wc": "0.8.8"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "react": ">=18.0.0 <20.0.0",
package/wordpress-ui.php CHANGED
@@ -62,6 +62,12 @@ if (!function_exists('designbase_wordpress_ui_enqueue')) {
62
62
  }
63
63
 
64
64
  wp_enqueue_style($handle, $base_url . '/dist/styles.css', [], $version);
65
+ // Unscoped on purpose: the bundled CSS cannot target `body.wp-toolbar`
66
+ // after it is prefixed with `.designbase-wp-admin`.
67
+ wp_add_inline_style(
68
+ $handle,
69
+ '.wp-toolbar .designbase-wp-admin{--dbwp-chrome-offset:32px}@media screen and (max-width:782px){.wp-toolbar .designbase-wp-admin{--dbwp-chrome-offset:46px}}'
70
+ );
65
71
  wp_enqueue_script(
66
72
  $handle . '-browser',
67
73
  $base_url . '/dist/browser.iife.js',