@uniai-fe/uds-primitives 0.0.19 → 0.0.21
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/README.md +9 -5
- package/dist/styles.css +10 -973
- package/package.json +1 -6
- package/src/components/alternate/styles/index.scss +0 -2
- package/src/components/badge/styles/index.scss +1 -3
- package/src/components/button/styles/button.scss +0 -1
- package/src/components/button/styles/round-button.scss +0 -2
- package/src/components/button/styles/text-button.scss +0 -2
- package/src/components/calendar/styles/index.scss +0 -2
- package/src/components/checkbox/styles/index.scss +1 -3
- package/src/components/chip/styles/index.scss +1 -3
- package/src/components/drawer/styles/index.scss +1 -3
- package/src/components/dropdown/styles/index.scss +0 -2
- package/src/components/input/styles/index.scss +2 -3
- package/src/components/label/styles/index.scss +0 -2
- package/src/components/navigation/styles/index.scss +1 -3
- package/src/components/pagination/styles/index.scss +0 -2
- package/src/components/radio/styles/index.scss +1 -3
- package/src/components/scrollbar/styles/index.scss +0 -2
- package/src/components/segmented-control/styles/index.scss +0 -2
- package/src/components/segmented-control/types/index.ts +9 -9
- package/src/components/select/styles/index.scss +0 -2
- package/src/components/spinner/styles/index.scss +0 -2
- package/src/components/tab/styles/index.scss +0 -2
- package/src/components/table/styles/index.scss +0 -2
- package/src/index.scss +2 -4
- package/src/index.tsx +1 -2
- package/src/components/dialog/hooks/index.ts +0 -4
- package/src/components/dialog/img/.gitkeep +0 -0
- package/src/components/dialog/index.scss +0 -1
- package/src/components/dialog/index.tsx +0 -6
- package/src/components/dialog/markup/ConfirmDialog.tsx +0 -339
- package/src/components/dialog/markup/NoticeDialog.tsx +0 -209
- package/src/components/dialog/markup/index.tsx +0 -4
- package/src/components/dialog/styles/base.scss +0 -153
- package/src/components/dialog/styles/confirm.scss +0 -58
- package/src/components/dialog/styles/index.scss +0 -3
- package/src/components/dialog/styles/notice.scss +0 -65
- package/src/components/dialog/types/index.ts +0 -113
- package/src/components/dialog/utils/index.ts +0 -4
- package/src/theme/ThemeProvider.tsx +0 -27
- package/src/theme/config.ts +0 -29
- package/src/theme/index.ts +0 -3
- package/src/theme/overrides.scss +0 -215
package/README.md
CHANGED
|
@@ -104,15 +104,17 @@ function Templates() {
|
|
|
104
104
|
|
|
105
105
|
## 스타일 내보내기
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
foundation CSS는 앱 루트에서 한 번만 직접 import해야 한다. primitives `styles/css` 엔트리는 **컴포넌트 SCSS만** 포함하며 foundation 토큰을 다시 로드하지 않는다.
|
|
108
108
|
|
|
109
109
|
```scss
|
|
110
|
+
@use "@uniai-fe/uds-foundation/css";
|
|
110
111
|
@use "@uniai-fe/uds-primitives/styles";
|
|
111
112
|
```
|
|
112
113
|
|
|
113
|
-
Next.js/webpack 환경에서 Sass를 사용하지 않는 경우에는
|
|
114
|
+
Next.js/webpack 환경에서 Sass를 사용하지 않는 경우에는 아래처럼 CSS를 순서대로 import한다.
|
|
114
115
|
|
|
115
116
|
```ts
|
|
117
|
+
import "@uniai-fe/uds-foundation/css";
|
|
116
118
|
import "@uniai-fe/uds-primitives/css";
|
|
117
119
|
```
|
|
118
120
|
|
|
@@ -123,7 +125,7 @@ import "@uniai-fe/uds-primitives/css";
|
|
|
123
125
|
@use "@uniai-fe/uds-primitives/navigation/index.scss";
|
|
124
126
|
```
|
|
125
127
|
|
|
126
|
-
ThemeProvider는 CSS를 import하지 않으므로
|
|
128
|
+
ThemeProvider는 CSS를 import하지 않으므로 foundation/primitives styles를 앱 루트에서 1회만 로드하면 중복 없이 토큰 매핑이 적용된다. Provider 자체는 foundation 패키지(`@uniai-fe/uds-foundation/provider`)에서만 export된다(one-source 규칙).
|
|
127
129
|
|
|
128
130
|
## Next.js 통합 예시
|
|
129
131
|
|
|
@@ -144,14 +146,16 @@ export default nextConfig;
|
|
|
144
146
|
|
|
145
147
|
```scss
|
|
146
148
|
/* app/globals.scss */
|
|
149
|
+
@use "@uniai-fe/uds-foundation/css";
|
|
147
150
|
@use "@uniai-fe/uds-primitives/styles";
|
|
148
151
|
```
|
|
149
152
|
|
|
150
153
|
```tsx
|
|
151
154
|
// app/layout.tsx
|
|
152
155
|
import type { ReactNode } from "react";
|
|
156
|
+
import "@uniai-fe/uds-foundation/css";
|
|
153
157
|
import "@uniai-fe/uds-primitives/styles";
|
|
154
|
-
import { ThemeProvider } from "@uniai-fe/uds-
|
|
158
|
+
import { ThemeProvider } from "@uniai-fe/uds-foundation/provider";
|
|
155
159
|
|
|
156
160
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
157
161
|
return (
|
|
@@ -164,7 +168,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
|
|
164
168
|
}
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
위 예시는 ThemeProvider가 CSS를
|
|
171
|
+
위 예시는 ThemeProvider가 foundation 패키지에서만 export되고 CSS를 재import하지 않는 현재 구조를 기준으로 하므로, `globals.scss` 또는 루트에서 foundation/primitives styles를 반드시 각각 한 번 로드해야 한다. Sass 기반 프로젝트는 `@use "@uniai-fe/uds-foundation/css"; @use "@uniai-fe/uds-primitives/styles";`, CSS-only 프로젝트는 `import "@uniai-fe/uds-foundation/css"; import "@uniai-fe/uds-primitives/css";`를 사용한다.
|
|
168
172
|
|
|
169
173
|
모든 컴포넌트는 `.component` 클래스 + CSS 변수 기반으로 override가 가능하며, 버튼처럼 Slot(left/right/icon 등)을 제공하는 항목은 `CONTEXT-*.md` 문서에 상세 API를 기록했습니다. 불필요한 `data-*` attribute는 제거했고, 상태 표시는 `:disabled`, `[aria-busy="true"]` 같은 표준 attribute만 사용합니다.
|
|
170
174
|
|