@daracl/form 0.0.20 → 0.0.22
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 +51 -18
- package/dist/daracl.form.css +308 -159
- package/dist/daracl.form.min.css +1 -10
- package/dist/daracl.form.min.umd.js +36 -41
- package/dist/daracl.form.min.umd.js.map +1 -1
- package/dist/daracl.form.umd.js +221 -226
- package/dist/daracl.form.umd.js.map +1 -1
- package/dist/defaultOption.d.ts +3 -0
- package/dist/index.cjs +104 -1537
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +58 -1491
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +33 -98
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +471 -1384
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.d.ts +1 -0
- package/dist/util/utils.d.ts +8 -30
- package/package.json +37 -49
- package/style/base/_base.scss +7 -6
- package/style/components/_button.scss +5 -4
- package/style/components/_field-container.scss +4 -3
- package/style/components/_field-group.scss +1 -1
- package/style/components/_file-list.scss +3 -2
- package/style/components/_form-field.scss +10 -4
- package/style/components/_form-group.scss +8 -7
- package/style/components/_grid-field.scss +12 -11
- package/style/components/_icon.scss +2 -1
- package/style/components/_label.scss +9 -8
- package/style/components/_tab.scss +8 -7
- package/style/daracl.form.scss +17 -31
- package/style/themes/_common.scss +0 -18
- package/style/themes/_dark.scss +0 -32
- package/style/themes/_index.scss +0 -14
- package/style/themes/_light.scss +0 -26
- package/style/themes/_mixin.scss +0 -6
package/README.md
CHANGED
|
@@ -20,23 +20,41 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ |
|
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
npm start
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
## Development
|
|
24
|
+
|
|
25
|
+
Install Node.js 24 LTS and npm. With nvm, run `nvm use` first.
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
git clone https://github.com/daracl/ui-form.git
|
|
29
|
+
cd ui-form
|
|
30
|
+
npm ci
|
|
31
|
+
npm run dev
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Open the address printed by Vite at `/uitest/index.html`. `npm start` starts the same server.
|
|
35
|
+
|
|
36
|
+
- `npm run typecheck`: TypeScript checks
|
|
37
|
+
- `npm test`: shared utility regression tests
|
|
38
|
+
- `npm run build`: ES/CJS, UMD, CSS and declarations
|
|
39
|
+
- `npm run verify`: type checks, Node tests, builds and package smoke tests
|
|
40
|
+
|
|
41
|
+
Browser regression tests cover the six examples and form interactions. Run `npx playwright install chromium` once, then `npm run verify` followed by `npm run pwtest` (the browser suite also checks the generated dist bundles). To use an already installed Edge instead, set `PLAYWRIGHT_CHANNEL=msedge` in your shell. CI runs both `verify` and browser tests. Browser tests start and stop their own server; no manually running dev server is needed.
|
|
42
|
+
|
|
43
|
+
Build configuration is ESM (`vite.config.mjs`). `npm run build` uses one Node process for Vite, generates declarations in parallel, cleans `dist` once and copies public assets once. ES/CJS, UMD, CSS and sourcemap filenames stay unchanged. `npm run build:escjs` and `npm run build:umd` only refresh their own bundles; use the full build for packaging.
|
|
44
|
+
|
|
45
|
+
The dev/preview server binds to the local machine by default and restricts file access to this checkout. Use `npm run dev -- --host` only when LAN access is intentional. Host validation and Vite's default CORS restrictions remain enabled.
|
|
46
|
+
|
|
47
|
+
`npm run audit:security` checks production dependencies; `npm run audit:security:all` includes development tools. esbuild is overridden to the patched version for toast's unused build-tool dependency too. Removed unused Webpack loaders, cpx, TSLint, Jest and legacy documentation dependencies. Tests use Node's built-in test runner; file operations use Node's filesystem APIs.
|
|
48
|
+
|
|
49
|
+
See [build verification results](BUILD.md) for timing, security checks and compatibility limits.
|
|
50
|
+
|
|
51
|
+
Shared utilities use the public npm package `@daracl/core@0.0.10`. No sibling corejs checkout, absolute path, npm link or private server is required. Commit package.json and package-lock.json together; teammates install with `npm ci`. Publish corejs changes before updating this dependency. Utilities import the public `@daracl/core/utils` entry point, which avoids loading the core root module and its styles.
|
|
52
|
+
|
|
53
|
+
The npm override unifies core at 0.0.10 because the current toast and datetimepicker packages declare older core peer ranges. Recheck their compatibility when upgrading. Overrides apply to this repository; consumers of the published form package may need the same override until those peer ranges are updated upstream.
|
|
54
|
+
|
|
55
|
+
Type checks, blank checks, own-property checks, deep merges, HTML escaping, template-to-element conversion and CSS class whitespace normalization delegate to core. `replaceXss` and `unReplace` alias core's `xss` and `unXss`; form-specific field-name transformations stay here. `isEmpty` still means null/undefined only; numeric checks preserve existing coercion. Merge returns a new object and follows core array merging rules while excluding prototype pollution keys.
|
|
56
|
+
|
|
57
|
+
|
|
40
58
|
# 사용방법
|
|
41
59
|
```
|
|
42
60
|
const form = new DaraForm("#loginForm", {
|
|
@@ -142,5 +160,20 @@ type: {
|
|
|
142
160
|
| identical | field 값이 같은지 비교 | field: field name <br> message: 메시지 | |
|
|
143
161
|
|
|
144
162
|
|
|
163
|
+
# 테마
|
|
164
|
+
|
|
165
|
+
색상 값은 [`@daracl/ui-style`](https://www.npmjs.com/package/@daracl/ui-style) 의 테마 변수(`--dui-*`)를 사용합니다.
|
|
166
|
+
light 값이 기본값으로 들어 있어 별도 설정 없이도 표시되지만, **dark 테마를 쓰려면 테마 변수 CSS 를 함께 로드**해야 합니다.
|
|
167
|
+
(`daracl.form.umd` 와 함께 쓰는 CSS 에는 이미 포함되어 있습니다.)
|
|
168
|
+
|
|
169
|
+
```js
|
|
170
|
+
import '@daracl/ui-style/theme-vars.css';
|
|
171
|
+
|
|
172
|
+
// dark 로 전환
|
|
173
|
+
document.documentElement.setAttribute('data-daracl-theme', 'dark');
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
> 이전 버전의 `body.dark` / `.daracl-form.dark` 클래스 방식은 지원하지 않습니다. `data-daracl-theme` 속성만 사용합니다.
|
|
177
|
+
|
|
145
178
|
## License
|
|
146
|
-
Darainfo is under [MIT License](./LICENSE).
|
|
179
|
+
Darainfo is under [MIT License](./LICENSE).
|