@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.
@@ -1,3 +1,4 @@
1
+ import "@daracl/ui-style/theme-vars.css";
1
2
  import "../style/daracl.form.scss";
2
3
  import "@daracl/datetimepicker/dist/daracl.datetimepicker.min.css";
3
4
  declare global {
@@ -1,21 +1,9 @@
1
- import { FormField } from "@t/FormField";
2
- export declare const replaceXss: (inputText: string) => string;
3
- export declare const hasOwnProp: (obj: any, key: string) => boolean;
4
- export declare const unReplace: (inputText: string) => string;
1
+ import type { FormField } from "@t/FormField";
2
+ import { xss as replaceXss, unXss as unReplace } from "@daracl/core/utils";
3
+ export { isArray, isBlank, isFunction, isString, isUndefined, isPlainObject, isNil as isEmpty, hasProperty as hasOwnProp, getHashCode, templateToElement } from "@daracl/core/utils";
4
+ export { replaceXss, unReplace };
5
5
  export declare const unFieldName: (fieldName: string) => string;
6
- export declare const isBlank: (value: any) => boolean;
7
- export declare const isUndefined: (value: any) => value is undefined;
8
- export declare const isFunction: (value: any) => boolean;
9
- export declare const isString: (value: any) => value is string;
10
6
  export declare const isNumber: (value: any) => value is number;
11
- export declare const isArray: (value: any) => value is any[];
12
- /**
13
- * 값있는지 여부 체크.
14
- *
15
- * @param {*} value
16
- * @returns {boolean}
17
- */
18
- export declare const isEmpty: (value: any) => boolean;
19
7
  /**
20
8
  * tab render type check
21
9
  *
@@ -45,18 +33,8 @@ export declare const ignoreValueField: (field: FormField) => boolean;
45
33
  * @returns {string} replace 된 field name
46
34
  */
47
35
  export declare const getXssFieldName: (field: FormField) => string;
48
- export declare const getHashCode: (str: string) => string | number;
49
- export declare const isHiddenField: (field: FormField) => boolean;
50
- export declare const templateToElement: (htmlTemplate: string) => Element | null;
51
- export declare function isPlainObject(obj: any): boolean;
52
- /**
53
- * object merge
54
- *
55
- * @example
56
- ```
57
- merge({},{aaa:'bbb',ccc:'ddd'},{bbb:'bbb','aaa':'aaa'})) -> {"aaa": "aaa", "bbb": "bbb", "ccc": "ddd"}
58
- ```
59
- * @param {...any[]} value
60
- * @returns {object}
36
+ export declare const isHiddenField: (field: FormField | null | undefined) => boolean;
37
+ /** Merge form options using the shared core implementation.
38
+ * Keep the legacy non-object first argument behavior.
61
39
  */
62
- export declare const merge: (...value: any[]) => any;
40
+ export declare const merge: (...values: any[]) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daracl/form",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "sideEffects": false,
5
5
  "description": "Daracl form validation ",
6
6
  "author": {
@@ -60,70 +60,58 @@
60
60
  "editor.formatOnSave": false
61
61
  },
62
62
  "peerDependencies": {
63
- "@daracl/core": "^0.0.3",
63
+ "@daracl/core": "^0.0.10",
64
64
  "@daracl/toast": "^0.0.10",
65
65
  "@daracl/datetimepicker": "^0.0.13"
66
66
  },
67
67
  "dependencies": {
68
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
69
- "init": "^0.1.2",
70
- "ink-docstrap": "^1.3.2",
71
- "preact": "^10.13.2",
72
- "tslint": "^6.1.3",
73
- "tslint-config-prettier": "^1.18.0"
68
+ "@daracl/ui-style": "^0.0.1",
69
+ "tslib": "^2.8.1"
74
70
  },
75
71
  "devDependencies": {
76
- "@daracl/core": "^0.0.5",
72
+ "@daracl/core": "0.0.10",
77
73
  "@daracl/toast": "^0.0.10",
78
74
  "@daracl/datetimepicker": "^0.0.13",
79
- "@mxssfd/typedoc-theme": "^1.1.1",
80
- "@types/jest": "^29.5.1",
81
75
  "@playwright/test": "^1.55.1",
82
- "@types/node": "^20.1.0",
83
- "@typescript-eslint/eslint-plugin": "^5.59.5",
84
- "@typescript-eslint/parser": "^5.59.5",
85
- "cpx": "^1.5.0",
86
- "eslint": "^8.40.0",
87
- "eslint-config-airbnb": "^19.0.4",
88
- "eslint-config-prettier": "^8.8.0",
89
- "eslint-plugin-import": "^2.27.5",
90
- "eslint-plugin-prettier": "^4.2.1",
91
- "eslint-plugin-react": "^7.32.2",
92
- "file-loader": "^6.2.0",
93
- "rimraf": "^6.0.1",
94
- "rollup-plugin-visualizer": "^6.0.3",
95
- "jest": "^29.0.0",
96
- "material-icons": "^1.13.8",
97
- "mini-css-extract-plugin": "^2.7.6",
76
+ "@types/node": "^24.0.0",
77
+ "esbuild": "^0.28.2",
98
78
  "prettier": "^2.8.8",
99
- "rollup-plugin-postcss": "^4.0.2",
100
- "sass": "^1.80.2",
101
- "sass-loader": "^16.0.2",
102
- "style-loader": "^3.3.3",
103
- "ts-jest": "^29.1.0",
104
- "ts-loader": "^9.4.2",
105
- "typedoc": "^0.26.7",
106
- "typescript": "^5.1.6",
107
- "url-loader": "^4.1.1",
108
- "vite": "^5.4.0",
109
- "vite-plugin-banner": "^0.7.1"
79
+ "sass": "^1.107.0",
80
+ "typedoc": "^0.28.20",
81
+ "typescript": "~5.9.3",
82
+ "vite": "~7.3.7",
83
+ "rollup": "^4.66.0"
110
84
  },
111
85
  "scripts": {
112
- "build": "yarn build:escjs && yarn build:umd && yarn mergenclean",
113
- "build:umd": "vite build --config vite.config.umd.js --mode production && vite build --config vite.config.umd.js --mode development",
114
- "build:escjs": "vite build --config vite.config.js --mode production && vite build --config vite.config.js --mode development",
115
- "mergenclean": "yarn copy-dts && yarn build:tsc && yarn copy-unmin && yarn clean:unmin && yarn copy-html",
86
+ "build": "node scripts/build.mjs",
87
+ "build:umd": "node scripts/build.mjs umd",
88
+ "build:escjs": "node scripts/build.mjs es",
89
+ "mergenclean": "npm run copy-dts && npm run build:tsc && npm run copy-unmin && npm run clean:unmin && npm run copy-html",
116
90
  "build:tsc": "tsc --emitDeclarationOnly",
117
91
  "dev": "vite",
118
92
  "preview": "vite preview",
119
93
  "docs:gen": "typedoc --tsconfig tsconfig.doc.json",
120
- "dts:gen": "npx -p typescript tsc src/index.js --declaration --allowJs --emitDeclarationOnly --outDir dist",
121
- "test": "jest",
94
+ "dts:gen": "npm run build:tsc",
95
+ "test": "node --test test/*.test.cjs",
122
96
  "pwtest": "playwright test",
123
- "clean:unmin": "rimraf dist/unmin",
124
- "copy-html": "cpx \"public/index.html\" dist",
125
- "copy-unmin": "cpx \"dist/unmin/**.*\" dist",
126
- "copy-dts": "cpx \"src/**/*.d.ts\" dist",
127
- "prepublishOnly": "npm run build"
97
+ "clean:unmin": "node scripts/build-files.mjs clean-unmin",
98
+ "copy-html": "node scripts/build-files.mjs html",
99
+ "copy-unmin": "node scripts/build-files.mjs unmin",
100
+ "copy-dts": "node scripts/build-files.mjs dts",
101
+ "prepublishOnly": "npm run build",
102
+ "start": "npm run dev",
103
+ "typecheck": "tsc --noEmit",
104
+ "verify": "npm run typecheck && npm test && npm run build && npm run test:package",
105
+ "test:package": "node scripts/package-smoke.mjs",
106
+ "audit:security": "npm audit --omit=dev",
107
+ "audit:security:all": "npm audit"
108
+ },
109
+ "engines": {
110
+ "node": ">=22.12.0",
111
+ "npm": ">=10"
112
+ },
113
+ "overrides": {
114
+ "@daracl/core": "$@daracl/core",
115
+ "esbuild": "$esbuild"
128
116
  }
129
117
  }
@@ -1,15 +1,16 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-base {
2
3
  padding: 0px;
3
4
  margin-top: 8px;
4
- color: var(--font-color);
5
+ color: themes.themed(font-color);
5
6
 
6
7
  *,
7
8
  ::after,
8
9
  ::before {
9
10
  box-sizing: border-box;
10
- line-height: var(--line-height);
11
- font-size: var(--font-size);
12
- color: var(--font-color);
11
+ line-height: var(--df-line-height);
12
+ font-size: var(--df-font-size);
13
+ color: themes.themed(font-color);
13
14
  }
14
15
 
15
16
  .df-txt {
@@ -59,9 +60,9 @@
59
60
  select,
60
61
  textarea {
61
62
  background-color: transparent;
62
- color: var(--font-color);
63
+ color: themes.themed(font-color);
63
64
  &[disabled] {
64
- background-color: var(--input-disabled-bg);
65
+ background-color: themes.themed(input-disabled-bg);
65
66
  opacity: 0.8;
66
67
  }
67
68
  }
@@ -1,16 +1,17 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-button {
2
3
  .df-btn {
3
4
  padding: 5px 10px;
4
5
  border-radius: calc(0.45rem - 1px);
5
- border: 1px solid var(--border-color);
6
- background-color: var(--button-bg);
6
+ border: 1px solid themes.themed(input-border-color);
7
+ background-color: themes.themed(button-bg);
7
8
 
8
9
  cursor: pointer;
9
10
  transition: background-color 0.3s;
10
11
 
11
12
  &:hover {
12
- color: var(--font-hover-color);
13
- background-color: var(--button-bg-hover);
13
+ color: themes.themed(font-hover-color);
14
+ background-color: themes.themed(button-hover-bg);
14
15
  }
15
16
  }
16
17
  }
@@ -1,3 +1,4 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-field-container {
2
3
  .df-field-container {
3
4
  overflow: initial;
@@ -21,13 +22,13 @@
21
22
  }
22
23
 
23
24
  .df-file-wrapper {
24
- border: 1px solid var(--border-color);
25
+ border: 1px solid themes.themed(input-border-color);
25
26
  text-align: center;
26
27
  display: block;
27
28
  width: 100%;
28
29
  padding: 0.375rem 0.75rem;
29
30
  font-weight: 400;
30
- line-height: var(--line-height-lg);
31
+ line-height: var(--df-line-height-lg);
31
32
  background-clip: padding-box;
32
33
  border-radius: 4px;
33
34
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
@@ -36,7 +37,7 @@
36
37
 
37
38
  .df-description {
38
39
  padding: 3px 0px 0px;
39
- font-size: var(--font-size-sm);
40
+ font-size: var(--df-font-size-sm);
40
41
  }
41
42
  }
42
43
  }
@@ -4,7 +4,7 @@
4
4
  align-items: center;
5
5
 
6
6
  .df-field-item {
7
- padding-top: var(--field-padding-top);
7
+ padding-top: var(--df-field-padding-top);
8
8
  padding-right: 8px;
9
9
  &.df-vertical {
10
10
  > * {
@@ -1,3 +1,4 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-file-list {
2
3
  .df-file-list {
3
4
  .df-file-item {
@@ -11,7 +12,7 @@
11
12
  cursor: pointer;
12
13
 
13
14
  &:hover {
14
- background-color: var(--button-bg-hover);
15
+ background-color: themes.themed(button-hover-bg);
15
16
  }
16
17
 
17
18
  // 아이콘 색은 mask 로 잘라내고 --icon-color 테마 변수로 채운다.
@@ -20,7 +21,7 @@
20
21
  display: block;
21
22
  width: 100%;
22
23
  height: 100%;
23
- background-color: var(--icon-color);
24
+ background-color: themes.themed(icon-stroke-color);
24
25
  -webkit-mask-repeat: no-repeat;
25
26
  mask-repeat: no-repeat;
26
27
  }
@@ -1,17 +1,18 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-form-field {
2
3
  .df-form-field {
3
- border: 1px solid var(--border-color);
4
+ border: 1px solid themes.themed(input-border-color);
4
5
  display: block;
5
6
  width: 100%;
6
7
  padding: 0px 0.75rem;
7
8
  font-weight: 400;
8
- line-height: var(--line-height);
9
+ line-height: var(--df-line-height);
9
10
  height: 30px;
10
11
  border-radius: 4px;
11
12
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
12
- background-color: var(--input-bg);
13
+ background-color: themes.themed(input-bg);
13
14
  background-clip: padding-box;
14
- color: var(--input-color);
15
+ color: themes.themed(input-color);
15
16
 
16
17
  &[type="radio"],
17
18
  &[type="checkbox"] {
@@ -27,6 +28,11 @@
27
28
  appearance: none;
28
29
  -webkit-appearance: none;
29
30
  -moz-appearance: none;
31
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
32
+ background-repeat: no-repeat;
33
+ background-position: right 7px center;
34
+ background-size: 12px;
35
+ padding-right: 20px;
30
36
  }
31
37
 
32
38
  &.df-textarea {
@@ -1,3 +1,4 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @use "../abstracts" as *;
2
3
 
3
4
  @mixin df-form-group {
@@ -11,7 +12,7 @@
11
12
  flex-direction: row;
12
13
  -ms-flex-wrap: wrap;
13
14
  flex-wrap: wrap;
14
- margin-top: var(--field-margin-top);
15
+ margin-top: var(--df-field-margin-top);
15
16
  margin-bottom: 0px;
16
17
  margin-right: 0px !important;
17
18
  margin-left: 0px !important;
@@ -48,8 +49,8 @@
48
49
 
49
50
  &.invalid {
50
51
  .df-form-field {
51
- border-color: var(--invalid-border-color);
52
- outline-color: var(--invalid-border-color);
52
+ border-color: themes.themed(invalid-border-color);
53
+ outline-color: themes.themed(invalid-border-color);
53
54
  }
54
55
 
55
56
  > .df-field-container.required > .df-field .df-help-icon {
@@ -60,8 +61,8 @@
60
61
  .df-help-message {
61
62
  display: block;
62
63
  > * {
63
- color: var(--invalid-font-color);
64
- font-size: var(--font-size-sm);
64
+ color: themes.themed(invalid-font-color);
65
+ font-size: var(--df-font-size-sm);
65
66
  padding: 3px 0px;
66
67
  }
67
68
  }
@@ -77,7 +78,7 @@
77
78
  }
78
79
 
79
80
  .df-file-label {
80
- border: 1px solid var(--border-color);
81
+ border: 1px solid themes.themed(input-border-color);
81
82
  display: inline;
82
83
  width: 100%;
83
84
  padding: 3px 15px;
@@ -87,7 +88,7 @@
87
88
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
88
89
 
89
90
  &:hover {
90
- background-color: var(--button-bg-hover);
91
+ background-color: themes.themed(button-hover-bg);
91
92
  }
92
93
  }
93
94
  }
@@ -1,7 +1,8 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-grid-field {
2
3
  .df-grid-field {
3
4
  .df-grid-btn-area {
4
- border: 1px solid var(--border-color);
5
+ border: 1px solid themes.themed(border-color);
5
6
  padding: 3px;
6
7
  }
7
8
 
@@ -9,7 +10,7 @@
9
10
  width: 100%;
10
11
  height: auto;
11
12
  overflow-y: auto;
12
- border: 1px solid var(--border-color);
13
+ border: 1px solid themes.themed(border-color);
13
14
 
14
15
  .df-btn {
15
16
  padding: 3px 5px;
@@ -25,8 +26,8 @@
25
26
  position: sticky;
26
27
  top: 0px;
27
28
  z-index: 10;
28
- border-bottom: 1px solid var(--border-color);
29
- background-color: var(--bg-grid-header);
29
+ border-bottom: 1px solid themes.themed(border-color);
30
+ background-color: themes.themed(panel-header-bg);
30
31
  text-align: center;
31
32
  }
32
33
  }
@@ -66,8 +67,8 @@
66
67
 
67
68
  .invalid {
68
69
  .df-form-field {
69
- border-color: var(--invalid-border-color);
70
- outline-color: var(--invalid-border-color);
70
+ border-color: themes.themed(invalid-border-color);
71
+ outline-color: themes.themed(invalid-border-color);
71
72
  }
72
73
 
73
74
  > .df-grid-column.required .df-field .df-help-icon {
@@ -78,8 +79,8 @@
78
79
  .df-help-message {
79
80
  display: block;
80
81
  position: absolute;
81
- border: 1px solid var(--invalid-border-color);
82
- border-color: var(--invalid-border-color) transparent transparent transparent;
82
+ border: 1px solid themes.themed(invalid-border-color);
83
+ border-color: themes.themed(invalid-border-color) transparent transparent transparent;
83
84
  top: calc(100% + 6px);
84
85
  left: 50%;
85
86
  transform: translateX(-50%);
@@ -87,8 +88,8 @@
87
88
  padding: 5px 5px;
88
89
  border-radius: 0.4rem;
89
90
  z-index: 2;
90
- background-color: var(--invalid-background-color);
91
- color: var(--invalid-font-color);
91
+ background-color: themes.themed(invalid-bg);
92
+ color: themes.themed(invalid-font-color);
92
93
  &::after {
93
94
  content: "";
94
95
  position: absolute;
@@ -97,7 +98,7 @@
97
98
  width: 0;
98
99
  height: 0;
99
100
  border: 7px solid transparent;
100
- border-bottom-color: var(--invalid-border-color);
101
+ border-bottom-color: themes.themed(invalid-border-color);
101
102
  border-top: 0;
102
103
  border-left: 0;
103
104
  margin-left: -3.5px;
@@ -1,3 +1,4 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-icon {
2
3
  .df-icon {
3
4
  display: inline-block;
@@ -9,7 +10,7 @@
9
10
  // 아이콘 색은 mask 로 잘라내고 --icon-color 테마 변수로 채운다.
10
11
  .df-add-icon,
11
12
  .df-remove-icon {
12
- background-color: var(--icon-color);
13
+ background-color: themes.themed(icon-stroke-color);
13
14
  -webkit-mask-repeat: no-repeat;
14
15
  mask-repeat: no-repeat;
15
16
  }
@@ -1,18 +1,19 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-label {
2
3
  .df-label {
3
4
  position: relative;
4
5
  vertical-align: top;
5
- padding-right: var(--field-padding-right);
6
+ padding-right: var(--df-field-padding-right);
6
7
  display: flex;
7
8
  align-items: flex-start;
8
9
 
9
10
  .required {
10
- color: var(--color-danger);
11
+ color: themes.themed(error-color);
11
12
  display: inline-block;
12
13
  vertical-align: middle;
13
14
 
14
15
  &::after {
15
- color: var(--color-danger);
16
+ color: themes.themed(error-color);
16
17
  content: "*";
17
18
  vertical-align: middle;
18
19
  }
@@ -28,13 +29,13 @@
28
29
 
29
30
  .df-tooltip {
30
31
  visibility: visible;
31
- color: var(--tooltip-color);
32
- background: var(--tooltip-background);
32
+ color: themes.themed(tooltip-color);
33
+ background: themes.themed(tooltip-bg);
33
34
  width: 16px;
34
35
  height: 16px;
35
36
  border-radius: 8px;
36
37
  text-align: center;
37
- line-height: var(--line-height-lg);
38
+ line-height: var(--df-line-height-lg);
38
39
  margin: 0 5px;
39
40
  font-size: 12px;
40
41
  cursor: help;
@@ -45,9 +46,9 @@
45
46
  .df-tooltip-text {
46
47
  display: none;
47
48
  text-align: initial;
48
- background: var(--tooltip-background);
49
+ background: themes.themed(tooltip-bg);
49
50
  border-radius: 5px;
50
- color: var(--tooltip-color);
51
+ color: themes.themed(tooltip-color);
51
52
  padding: 10px 5px;
52
53
  position: absolute;
53
54
  z-index: 2;
@@ -1,3 +1,4 @@
1
+ @use "@daracl/ui-style/themes" as themes;
1
2
  @mixin df-tab {
2
3
  .df-tab-header {
3
4
  list-style: none;
@@ -5,9 +6,9 @@
5
6
  padding: 0px;
6
7
 
7
8
  display: flex;
8
- line-height: var(--line-height);
9
+ line-height: var(--df-line-height);
9
10
  width: 100%;
10
- border-bottom: 1px solid var(--border-color);
11
+ border-bottom: 1px solid themes.themed(border-color);
11
12
 
12
13
  &.df-tab-al {
13
14
  &-left {
@@ -32,8 +33,8 @@
32
33
 
33
34
  &.active {
34
35
  a {
35
- color: var(--font-hover-color);
36
- background-color: var(--tab-bg);
36
+ color: themes.themed(font-hover-color);
37
+ background-color: themes.themed(tab-bg);
37
38
  }
38
39
  }
39
40
 
@@ -45,12 +46,12 @@
45
46
  float: left;
46
47
  padding: 0.5em 1em;
47
48
  text-decoration: none;
48
- color: var(--font-color);
49
+ color: themes.themed(font-color);
49
50
  height: 30px;
50
51
 
51
52
  &:hover {
52
- background-color: var(--tab-bg-hover);
53
- border: 1px solid var(--border-color);
53
+ background-color: themes.themed(tab-bg-hover);
54
+ border: 1px solid themes.themed(border-color);
54
55
  border-bottom-width: 0;
55
56
  }
56
57
  }
@@ -1,22 +1,29 @@
1
1
  // Entry point: 각 파일은 mixin 만 정의하고, .daracl-form 스코프는 여기서 한 번만 감싼다.
2
- // 출력 순서가 기존 CSS 와 동일하도록 theme -> base -> components 순으로 include 한다.
3
- @use "sass:map";
4
- @use "themes";
2
+ //
3
+ // 색상 / 테두리 같은 공통 값은 @daracl/ui-style 의 테마 변수(--dui-*)를 사용한다.
4
+ // light 값이 fallback 으로 들어 있어 단독으로도 표시된다.
5
+ // dark 등 다른 테마는 앱이 '@daracl/ui-style/theme-vars.css' 를 로드하고
6
+ // <html data-daracl-theme="dark"> 로 전환한다. (body.dark / .dark 클래스 방식은 지원하지 않는다.)
7
+ @use "@daracl/ui-style/abstracts" as style;
8
+ @use "@daracl/ui-style/themes" as themes;
5
9
  @use "base" as *;
6
10
  @use "components" as *;
7
11
 
8
- /* ==========================================================================
9
- Theme
10
- ========================================================================== */
11
- $default-theme: themes.$default-theme;
12
-
13
12
  /* ==========================================================================
14
13
  Common
15
14
  ========================================================================== */
16
15
  .daracl-form {
17
- background: var(--body-bg);
16
+ // form 전용 변수. 간격 / 글꼴 크기는 ui-style 토큰 값이며, 필요하면 앱에서 덮어쓸 수 있다.
17
+ --df-field-margin-top: #{style.$field-margin-top};
18
+ --df-field-padding-top: #{style.$field-padding-top};
19
+ --df-field-padding-right: #{style.$field-padding-right};
20
+ --df-line-height: 1.2em;
21
+ --df-line-height-lg: 1.5em;
22
+ --df-font-size-sm: #{style.$font-size-xs};
23
+ --df-font-size: #{style.$font-size-md};
24
+
25
+ background: themes.themed(body-bg);
18
26
 
19
- @include themes.theme(map.get(themes.$themes, $default-theme));
20
27
  @include df-base;
21
28
  @include df-label;
22
29
  @include df-form-field;
@@ -30,24 +37,3 @@ $default-theme: themes.$default-theme;
30
37
  @include df-form-group;
31
38
  @include df-grid-field;
32
39
  }
33
-
34
- // Global theme
35
- @each $name, $theme-value in themes.$themes {
36
- @if $name != $default-theme {
37
- [data-daracl-theme="#{$name}"] {
38
- .daracl-form {
39
- @include themes.theme($theme-value);
40
- }
41
- }
42
- }
43
- }
44
-
45
- // 그 외 테마: body.<name> 또는 .daracl-form.<name>
46
- @each $name, $theme-value in themes.$themes {
47
- @if $name != $default-theme {
48
- body.#{$name} .daracl-form,
49
- .daracl-form.#{$name} {
50
- @include themes.theme($theme-value);
51
- }
52
- }
53
- }
@@ -1,18 +0,0 @@
1
- // 모든 테마에서 값이 같은 변수. 테마별 값이 필요하면 각 테마 파일에서 override 한다.
2
- $theme-common: (
3
- color-danger: #d9534f,
4
- background-danger: #d9534f,
5
- invalid-font-color: #ff4136,
6
- invalid-border-color: #ffb6b4,
7
- invalid-background-color: #fdd,
8
- tooltip-background: #3e3e3e,
9
- tooltip-color: #fff,
10
- field-margin-top: 10px,
11
- field-padding-top: 3px,
12
- field-padding-right: 15px,
13
- line-height: 1.2em,
14
- line-height-lg: 1.5em,
15
- font-size-sm: 12px,
16
- font-size: 14px,
17
- font-size-lg: 16px,
18
- );