@brandup/ui-dom 1.0.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.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # brandup-ui-dom
2
+
3
+ [![Build Status](https://dev.azure.com/brandup/BrandUp%20Core/_apis/build/status%2FBrandUp%2Fbrandup-ui?branchName=master)]()
4
+
5
+ ## Installation
6
+
7
+ Install NPM package [@brandup/ui-dom](https://www.npmjs.com/package/@brandup/ui-dom).
8
+
9
+ ```
10
+ npm i @brandup/ui-dom@latest
11
+ ```
12
+
13
+ ## DOM helper
14
+
15
+ Методы для простой работы с DOM моделью.
16
+
17
+ ```
18
+ class DOM {
19
+ static getElementById(id: string): HTMLElement | null;
20
+ static getElementByClass(parentElement: Element, className: string): HTMLElement | null;
21
+ static getElementByName(name: string): HTMLElement | null;
22
+ static getElementByTagName(parentElement: Element, tagName: string): HTMLElement | null;
23
+ static getElementsByTagName(parentElement: Element, tagName: string);
24
+ static queryElement(parentElement: Element, query: string): HTMLElement | null;
25
+ static queryElements(parentElement: Element, query: string): NodeListOf<HTMLElement>;
26
+ static nextElementByClass(currentElement: Element, className: string): HTMLElement | null;
27
+ static prevElementByClass(currentElement: Element, className: string): HTMLElement | null;
28
+ static prevElement(currentElement: Element): HTMLElement | null;
29
+ static nextElement(currentElement: Element): HTMLElement | null;
30
+
31
+ static tag(tagName: string, options?: ElementOptions | string, children?: ((elem: Element) => void) | Element | string | Array<Element | string | ((parent: Element) => Element)>): HTMLElement
32
+
33
+ static addClass(container: Element, selectors: string, className: string)
34
+ static removeClass(container: Element, selectors: string, className: string);
35
+
36
+ static empty(element: Element);
37
+ }
38
+ ```
39
+
40
+ ### Creation HTML elements
41
+
42
+ ```
43
+ DOM.tag("div", "css class name")
44
+ DOM.tag("div", "css class name", "<p>test</p>")
45
+ DOM.tag("div", "css class name", DOM.tag("p", null, "test"))
46
+ DOM.tag("div", {
47
+ id?: string,
48
+ dataset?: ElementData;
49
+ styles?: ElementStyles;
50
+ class?: string | Array<string>;
51
+ events?: { [name: string]: EventListenerOrEventListenerObject };
52
+ command?: string;
53
+ [name: string]: string | number | boolean | object;
54
+ })
55
+ ```
@@ -0,0 +1,196 @@
1
+ 'use strict';
2
+
3
+ class DOM {
4
+ static getElementById(id) {
5
+ return document.getElementById(id);
6
+ }
7
+ static getElementByClass(parentElement, className) {
8
+ const elements = parentElement.getElementsByClassName(className);
9
+ if (elements.length === 0)
10
+ return null;
11
+ return elements.item(0);
12
+ }
13
+ static getElementByName(name) {
14
+ const elements = document.getElementsByName(name);
15
+ if (elements.length === 0)
16
+ return null;
17
+ return elements.item(0);
18
+ }
19
+ static getElementByTagName(parentElement, tagName) {
20
+ const elements = parentElement.getElementsByTagName(tagName);
21
+ if (elements.length === 0)
22
+ return null;
23
+ return elements.item(0);
24
+ }
25
+ static getElementsByTagName(parentElement, tagName) {
26
+ return parentElement.getElementsByTagName(tagName);
27
+ }
28
+ static queryElement(parentElement, query) {
29
+ return parentElement.querySelector(query);
30
+ }
31
+ static queryElements(parentElement, query) {
32
+ return parentElement.querySelectorAll(query);
33
+ }
34
+ static nextElementByClass(currentElement, className) {
35
+ let n = currentElement.nextSibling;
36
+ while (n) {
37
+ if (n.nodeType === 1) {
38
+ if (n.classList.contains(className))
39
+ return n;
40
+ }
41
+ n = n.nextSibling;
42
+ }
43
+ return null;
44
+ }
45
+ static prevElementByClass(currentElement, className) {
46
+ let n = currentElement.previousSibling;
47
+ while (n) {
48
+ if (n.nodeType === 1) {
49
+ if (n.classList.contains(className))
50
+ return n;
51
+ }
52
+ n = n.previousSibling;
53
+ }
54
+ return null;
55
+ }
56
+ static prevElement(currentElement) {
57
+ let n = currentElement.previousSibling;
58
+ while (n) {
59
+ if (n.nodeType === 1) {
60
+ return n;
61
+ }
62
+ n = n.previousSibling;
63
+ }
64
+ return null;
65
+ }
66
+ static nextElement(currentElement) {
67
+ let n = currentElement.nextSibling;
68
+ while (n) {
69
+ if (n.nodeType === 1) {
70
+ return n;
71
+ }
72
+ n = n.nextSibling;
73
+ }
74
+ return null;
75
+ }
76
+ static tag(tagName, options, children) {
77
+ const elem = document.createElement(tagName);
78
+ if (options) {
79
+ if (typeof options === "string") {
80
+ elem.className = options;
81
+ }
82
+ else {
83
+ for (let key in options) {
84
+ const value = options[key];
85
+ if (value === undefined)
86
+ continue;
87
+ switch (key) {
88
+ case "id": {
89
+ elem.id = value;
90
+ break;
91
+ }
92
+ case "styles": {
93
+ if (value) {
94
+ for (const sKey in value)
95
+ elem.style[sKey] = value[sKey];
96
+ }
97
+ break;
98
+ }
99
+ case "class": {
100
+ if (typeof value === "string")
101
+ elem.className = value;
102
+ else if (value instanceof Array) {
103
+ for (let iClass = 0; iClass < value.length; iClass++) {
104
+ elem.classList.add(value[iClass]);
105
+ }
106
+ }
107
+ else
108
+ throw "Invalid element class value.";
109
+ break;
110
+ }
111
+ case "command": {
112
+ elem.dataset["command"] = value;
113
+ break;
114
+ }
115
+ case "dataset": {
116
+ if (value) {
117
+ for (const dataName in value)
118
+ elem.dataset[dataName] = value[dataName];
119
+ }
120
+ break;
121
+ }
122
+ case "events": {
123
+ if (value) {
124
+ for (const eventName in value)
125
+ elem.addEventListener(eventName, value[eventName]);
126
+ }
127
+ break;
128
+ }
129
+ default: {
130
+ if (typeof value === "object") {
131
+ elem.setAttribute(key, value !== null ? JSON.stringify(value) : "");
132
+ }
133
+ else if (typeof value === "string") {
134
+ elem.setAttribute(key, value ? value : "");
135
+ }
136
+ else {
137
+ elem.setAttribute(key, value ? value.toString() : "");
138
+ }
139
+ break;
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ if (children) {
146
+ if (children instanceof Element) {
147
+ elem.insertAdjacentElement("beforeend", children);
148
+ }
149
+ else if (children instanceof Array) {
150
+ for (let i = 0; i < children.length; i++) {
151
+ const chd = children[i];
152
+ if (chd instanceof Element)
153
+ elem.insertAdjacentElement("beforeend", chd);
154
+ else if (typeof chd === "function") {
155
+ const chdElem = chd(elem);
156
+ if (chdElem)
157
+ elem.insertAdjacentElement("beforeend", chdElem);
158
+ }
159
+ else if (typeof chd === "string") {
160
+ elem.insertAdjacentHTML("beforeend", chd);
161
+ }
162
+ }
163
+ }
164
+ else if (typeof children === "string") {
165
+ elem.innerHTML = children;
166
+ }
167
+ else if (typeof children === "function") {
168
+ children(elem);
169
+ }
170
+ else
171
+ throw new Error();
172
+ }
173
+ return elem;
174
+ }
175
+ static addClass(container, selectors, className) {
176
+ const nodes = container.querySelectorAll(selectors);
177
+ for (let i = 0; i < nodes.length; i++) {
178
+ nodes.item(i).classList.add(className);
179
+ }
180
+ }
181
+ static removeClass(container, selectors, className) {
182
+ const nodes = container.querySelectorAll(selectors);
183
+ for (let i = 0; i < nodes.length; i++) {
184
+ nodes.item(i).classList.remove(className);
185
+ }
186
+ }
187
+ static empty(element) {
188
+ while (element.hasChildNodes()) {
189
+ if (element.firstChild)
190
+ element.removeChild(element.firstChild);
191
+ }
192
+ }
193
+ }
194
+
195
+ exports.DOM = DOM;
196
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,194 @@
1
+ class DOM {
2
+ static getElementById(id) {
3
+ return document.getElementById(id);
4
+ }
5
+ static getElementByClass(parentElement, className) {
6
+ const elements = parentElement.getElementsByClassName(className);
7
+ if (elements.length === 0)
8
+ return null;
9
+ return elements.item(0);
10
+ }
11
+ static getElementByName(name) {
12
+ const elements = document.getElementsByName(name);
13
+ if (elements.length === 0)
14
+ return null;
15
+ return elements.item(0);
16
+ }
17
+ static getElementByTagName(parentElement, tagName) {
18
+ const elements = parentElement.getElementsByTagName(tagName);
19
+ if (elements.length === 0)
20
+ return null;
21
+ return elements.item(0);
22
+ }
23
+ static getElementsByTagName(parentElement, tagName) {
24
+ return parentElement.getElementsByTagName(tagName);
25
+ }
26
+ static queryElement(parentElement, query) {
27
+ return parentElement.querySelector(query);
28
+ }
29
+ static queryElements(parentElement, query) {
30
+ return parentElement.querySelectorAll(query);
31
+ }
32
+ static nextElementByClass(currentElement, className) {
33
+ let n = currentElement.nextSibling;
34
+ while (n) {
35
+ if (n.nodeType === 1) {
36
+ if (n.classList.contains(className))
37
+ return n;
38
+ }
39
+ n = n.nextSibling;
40
+ }
41
+ return null;
42
+ }
43
+ static prevElementByClass(currentElement, className) {
44
+ let n = currentElement.previousSibling;
45
+ while (n) {
46
+ if (n.nodeType === 1) {
47
+ if (n.classList.contains(className))
48
+ return n;
49
+ }
50
+ n = n.previousSibling;
51
+ }
52
+ return null;
53
+ }
54
+ static prevElement(currentElement) {
55
+ let n = currentElement.previousSibling;
56
+ while (n) {
57
+ if (n.nodeType === 1) {
58
+ return n;
59
+ }
60
+ n = n.previousSibling;
61
+ }
62
+ return null;
63
+ }
64
+ static nextElement(currentElement) {
65
+ let n = currentElement.nextSibling;
66
+ while (n) {
67
+ if (n.nodeType === 1) {
68
+ return n;
69
+ }
70
+ n = n.nextSibling;
71
+ }
72
+ return null;
73
+ }
74
+ static tag(tagName, options, children) {
75
+ const elem = document.createElement(tagName);
76
+ if (options) {
77
+ if (typeof options === "string") {
78
+ elem.className = options;
79
+ }
80
+ else {
81
+ for (let key in options) {
82
+ const value = options[key];
83
+ if (value === undefined)
84
+ continue;
85
+ switch (key) {
86
+ case "id": {
87
+ elem.id = value;
88
+ break;
89
+ }
90
+ case "styles": {
91
+ if (value) {
92
+ for (const sKey in value)
93
+ elem.style[sKey] = value[sKey];
94
+ }
95
+ break;
96
+ }
97
+ case "class": {
98
+ if (typeof value === "string")
99
+ elem.className = value;
100
+ else if (value instanceof Array) {
101
+ for (let iClass = 0; iClass < value.length; iClass++) {
102
+ elem.classList.add(value[iClass]);
103
+ }
104
+ }
105
+ else
106
+ throw "Invalid element class value.";
107
+ break;
108
+ }
109
+ case "command": {
110
+ elem.dataset["command"] = value;
111
+ break;
112
+ }
113
+ case "dataset": {
114
+ if (value) {
115
+ for (const dataName in value)
116
+ elem.dataset[dataName] = value[dataName];
117
+ }
118
+ break;
119
+ }
120
+ case "events": {
121
+ if (value) {
122
+ for (const eventName in value)
123
+ elem.addEventListener(eventName, value[eventName]);
124
+ }
125
+ break;
126
+ }
127
+ default: {
128
+ if (typeof value === "object") {
129
+ elem.setAttribute(key, value !== null ? JSON.stringify(value) : "");
130
+ }
131
+ else if (typeof value === "string") {
132
+ elem.setAttribute(key, value ? value : "");
133
+ }
134
+ else {
135
+ elem.setAttribute(key, value ? value.toString() : "");
136
+ }
137
+ break;
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ if (children) {
144
+ if (children instanceof Element) {
145
+ elem.insertAdjacentElement("beforeend", children);
146
+ }
147
+ else if (children instanceof Array) {
148
+ for (let i = 0; i < children.length; i++) {
149
+ const chd = children[i];
150
+ if (chd instanceof Element)
151
+ elem.insertAdjacentElement("beforeend", chd);
152
+ else if (typeof chd === "function") {
153
+ const chdElem = chd(elem);
154
+ if (chdElem)
155
+ elem.insertAdjacentElement("beforeend", chdElem);
156
+ }
157
+ else if (typeof chd === "string") {
158
+ elem.insertAdjacentHTML("beforeend", chd);
159
+ }
160
+ }
161
+ }
162
+ else if (typeof children === "string") {
163
+ elem.innerHTML = children;
164
+ }
165
+ else if (typeof children === "function") {
166
+ children(elem);
167
+ }
168
+ else
169
+ throw new Error();
170
+ }
171
+ return elem;
172
+ }
173
+ static addClass(container, selectors, className) {
174
+ const nodes = container.querySelectorAll(selectors);
175
+ for (let i = 0; i < nodes.length; i++) {
176
+ nodes.item(i).classList.add(className);
177
+ }
178
+ }
179
+ static removeClass(container, selectors, className) {
180
+ const nodes = container.querySelectorAll(selectors);
181
+ for (let i = 0; i < nodes.length; i++) {
182
+ nodes.item(i).classList.remove(className);
183
+ }
184
+ }
185
+ static empty(element) {
186
+ while (element.hasChildNodes()) {
187
+ if (element.firstChild)
188
+ element.removeChild(element.firstChild);
189
+ }
190
+ }
191
+ }
192
+
193
+ export { DOM };
194
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,345 @@
1
+ declare class DOM {
2
+ static getElementById(id: string): HTMLElement | null;
3
+ static getElementByClass(parentElement: Element, className: string): HTMLElement | null;
4
+ static getElementByName(name: string): HTMLElement | null;
5
+ static getElementByTagName(parentElement: Element, tagName: string): HTMLElement | null;
6
+ static getElementsByTagName(parentElement: Element, tagName: string): HTMLCollectionOf<Element>;
7
+ static queryElement(parentElement: Element, query: string): HTMLElement | null;
8
+ static queryElements(parentElement: Element, query: string): NodeListOf<HTMLElement>;
9
+ static nextElementByClass(currentElement: Element, className: string): HTMLElement | null;
10
+ static prevElementByClass(currentElement: Element, className: string): HTMLElement | null;
11
+ static prevElement(currentElement: Element): HTMLElement | null;
12
+ static nextElement(currentElement: Element): HTMLElement | null;
13
+ static tag(tagName: string, options?: ElementOptions | string | null, children?: ((elem: Element) => void) | Element | string | Array<Element | string | ((parent: Element) => Element)>): HTMLElement;
14
+ static addClass(container: Element, selectors: string, className: string): void;
15
+ static removeClass(container: Element, selectors: string, className: string): void;
16
+ static empty(element: Element): void;
17
+ }
18
+ interface ElementOptions {
19
+ id?: string;
20
+ dataset?: ElementData;
21
+ styles?: ElementStyles;
22
+ class?: string | string[];
23
+ events?: {
24
+ [name: string]: EventListenerOrEventListenerObject;
25
+ };
26
+ command?: string;
27
+ [name: string]: string | number | boolean | object | null | undefined;
28
+ }
29
+ interface ElementData {
30
+ [name: string]: string | undefined;
31
+ }
32
+ interface ElementStyles {
33
+ alignContent?: string;
34
+ alignItems?: string;
35
+ alignSelf?: string;
36
+ alignmentBaseline?: string;
37
+ all?: string;
38
+ animation?: string;
39
+ animationDelay?: string;
40
+ animationDirection?: string;
41
+ animationDuration?: string;
42
+ animationFillMode?: string;
43
+ animationIterationCount?: string;
44
+ animationName?: string;
45
+ animationPlayState?: string;
46
+ animationTimingFunction?: string;
47
+ backfaceVisibility?: string;
48
+ background?: string;
49
+ backgroundAttachment?: string;
50
+ backgroundClip?: string;
51
+ backgroundColor?: string;
52
+ backgroundImage?: string;
53
+ backgroundOrigin?: string;
54
+ backgroundPosition?: string;
55
+ backgroundPositionX?: string;
56
+ backgroundPositionY?: string;
57
+ backgroundRepeat?: string;
58
+ backgroundSize?: string;
59
+ baselineShift?: string;
60
+ blockSize?: string;
61
+ border?: string;
62
+ borderBlockEnd?: string;
63
+ borderBlockEndColor?: string;
64
+ borderBlockEndStyle?: string;
65
+ borderBlockEndWidth?: string;
66
+ borderBlockStart?: string;
67
+ borderBlockStartColor?: string;
68
+ borderBlockStartStyle?: string;
69
+ borderBlockStartWidth?: string;
70
+ borderBottom?: string;
71
+ borderBottomColor?: string;
72
+ borderBottomLeftRadius?: string;
73
+ borderBottomRightRadius?: string;
74
+ borderBottomStyle?: string;
75
+ borderBottomWidth?: string;
76
+ borderCollapse?: string;
77
+ borderColor?: string;
78
+ borderImage?: string;
79
+ borderImageOutset?: string;
80
+ borderImageRepeat?: string;
81
+ borderImageSlice?: string;
82
+ borderImageSource?: string;
83
+ borderImageWidth?: string;
84
+ borderInlineEnd?: string;
85
+ borderInlineEndColor?: string;
86
+ borderInlineEndStyle?: string;
87
+ borderInlineEndWidth?: string;
88
+ borderInlineStart?: string;
89
+ borderInlineStartColor?: string;
90
+ borderInlineStartStyle?: string;
91
+ borderInlineStartWidth?: string;
92
+ borderLeft?: string;
93
+ borderLeftColor?: string;
94
+ borderLeftStyle?: string;
95
+ borderLeftWidth?: string;
96
+ borderRadius?: string;
97
+ borderRight?: string;
98
+ borderRightColor?: string;
99
+ borderRightStyle?: string;
100
+ borderRightWidth?: string;
101
+ borderSpacing?: string;
102
+ borderStyle?: string;
103
+ borderTop?: string;
104
+ borderTopColor?: string;
105
+ borderTopLeftRadius?: string;
106
+ borderTopRightRadius?: string;
107
+ borderTopStyle?: string;
108
+ borderTopWidth?: string;
109
+ borderWidth?: string;
110
+ bottom?: string;
111
+ boxShadow?: string;
112
+ boxSizing?: string;
113
+ breakAfter?: string;
114
+ breakBefore?: string;
115
+ breakInside?: string;
116
+ captionSide?: string;
117
+ caretColor?: string;
118
+ clear?: string;
119
+ clip?: string;
120
+ clipPath?: string;
121
+ clipRule?: string;
122
+ color?: string;
123
+ colorInterpolation?: string;
124
+ colorInterpolationFilters?: string;
125
+ columnCount?: string;
126
+ columnFill?: string;
127
+ columnGap?: string;
128
+ columnRule?: string;
129
+ columnRuleColor?: string;
130
+ columnRuleStyle?: string;
131
+ columnRuleWidth?: string;
132
+ columnSpan?: string;
133
+ columnWidth?: string;
134
+ columns?: string;
135
+ content?: string;
136
+ counterIncrement?: string;
137
+ counterReset?: string;
138
+ cssFloat?: string;
139
+ cssText?: string;
140
+ cursor?: string;
141
+ direction?: string;
142
+ display?: string;
143
+ dominantBaseline?: string;
144
+ emptyCells?: string;
145
+ fill?: string;
146
+ fillOpacity?: string;
147
+ fillRule?: string;
148
+ filter?: string;
149
+ flex?: string;
150
+ flexBasis?: string;
151
+ flexDirection?: string;
152
+ flexFlow?: string;
153
+ flexGrow?: string;
154
+ flexShrink?: string;
155
+ flexWrap?: string;
156
+ float?: string;
157
+ floodColor?: string;
158
+ floodOpacity?: string;
159
+ font?: string;
160
+ fontFamily?: string;
161
+ fontFeatureSettings?: string;
162
+ fontKerning?: string;
163
+ fontSize?: string;
164
+ fontSizeAdjust?: string;
165
+ fontStretch?: string;
166
+ fontStyle?: string;
167
+ fontSynthesis?: string;
168
+ fontVariant?: string;
169
+ fontVariantCaps?: string;
170
+ fontVariantEastAsian?: string;
171
+ fontVariantLigatures?: string;
172
+ fontVariantNumeric?: string;
173
+ fontVariantPosition?: string;
174
+ fontWeight?: string;
175
+ gap?: string;
176
+ glyphOrientationVertical?: string;
177
+ grid?: string;
178
+ gridArea?: string;
179
+ gridAutoColumns?: string;
180
+ gridAutoFlow?: string;
181
+ gridAutoRows?: string;
182
+ gridColumn?: string;
183
+ gridColumnEnd?: string;
184
+ gridColumnGap?: string;
185
+ gridColumnStart?: string;
186
+ gridGap?: string;
187
+ gridRow?: string;
188
+ gridRowEnd?: string;
189
+ gridRowGap?: string;
190
+ gridRowStart?: string;
191
+ gridTemplate?: string;
192
+ gridTemplateAreas?: string;
193
+ gridTemplateColumns?: string;
194
+ gridTemplateRows?: string;
195
+ height?: string;
196
+ hyphens?: string;
197
+ imageOrientation?: string;
198
+ imageRendering?: string;
199
+ inlineSize?: string;
200
+ justifyContent?: string;
201
+ justifyItems?: string;
202
+ justifySelf?: string;
203
+ left?: string;
204
+ letterSpacing?: string;
205
+ lightingColor?: string;
206
+ lineBreak?: string;
207
+ lineHeight?: string;
208
+ listStyle?: string;
209
+ listStyleImage?: string;
210
+ listStylePosition?: string;
211
+ listStyleType?: string;
212
+ margin?: string;
213
+ marginBlockEnd?: string;
214
+ marginBlockStart?: string;
215
+ marginBottom?: string;
216
+ marginInlineEnd?: string;
217
+ marginInlineStart?: string;
218
+ marginLeft?: string;
219
+ marginRight?: string;
220
+ marginTop?: string;
221
+ marker?: string;
222
+ markerEnd?: string;
223
+ markerMid?: string;
224
+ markerStart?: string;
225
+ mask?: string;
226
+ maskComposite?: string;
227
+ maskImage?: string;
228
+ maskPosition?: string;
229
+ maskRepeat?: string;
230
+ maskSize?: string;
231
+ maskType?: string;
232
+ maxBlockSize?: string;
233
+ maxHeight?: string;
234
+ maxInlineSize?: string;
235
+ maxWidth?: string;
236
+ minBlockSize?: string;
237
+ minHeight?: string;
238
+ minInlineSize?: string;
239
+ minWidth?: string;
240
+ objectFit?: string;
241
+ objectPosition?: string;
242
+ opacity?: string;
243
+ order?: string;
244
+ orphans?: string;
245
+ outline?: string;
246
+ outlineColor?: string;
247
+ outlineOffset?: string;
248
+ outlineStyle?: string;
249
+ outlineWidth?: string;
250
+ overflow?: string;
251
+ overflowAnchor?: string;
252
+ overflowWrap?: string;
253
+ overflowX?: string;
254
+ overflowY?: string;
255
+ padding?: string;
256
+ paddingBlockEnd?: string;
257
+ paddingBlockStart?: string;
258
+ paddingBottom?: string;
259
+ paddingInlineEnd?: string;
260
+ paddingInlineStart?: string;
261
+ paddingLeft?: string;
262
+ paddingRight?: string;
263
+ paddingTop?: string;
264
+ pageBreakAfter?: string;
265
+ pageBreakBefore?: string;
266
+ pageBreakInside?: string;
267
+ paintOrder?: string;
268
+ perspective?: string;
269
+ perspectiveOrigin?: string;
270
+ placeContent?: string;
271
+ placeItems?: string;
272
+ placeSelf?: string;
273
+ pointerEvents?: string;
274
+ position?: string;
275
+ quotes?: string;
276
+ resize?: string;
277
+ right?: string;
278
+ rotate?: string;
279
+ rowGap?: string;
280
+ rubyAlign?: string;
281
+ rubyPosition?: string;
282
+ scale?: string;
283
+ scrollBehavior?: string;
284
+ shapeRendering?: string;
285
+ stopColor?: string;
286
+ stopOpacity?: string;
287
+ stroke?: string;
288
+ strokeDasharray?: string;
289
+ strokeDashoffset?: string;
290
+ strokeLinecap?: string;
291
+ strokeLinejoin?: string;
292
+ strokeMiterlimit?: string;
293
+ strokeOpacity?: string;
294
+ strokeWidth?: string;
295
+ tabSize?: string;
296
+ tableLayout?: string;
297
+ textAlign?: string;
298
+ textAlignLast?: string;
299
+ textAnchor?: string;
300
+ textCombineUpright?: string;
301
+ textDecoration?: string;
302
+ textDecorationColor?: string;
303
+ textDecorationLine?: string;
304
+ textDecorationStyle?: string;
305
+ textEmphasis?: string;
306
+ textEmphasisColor?: string;
307
+ textEmphasisPosition?: string;
308
+ textEmphasisStyle?: string;
309
+ textIndent?: string;
310
+ textJustify?: string;
311
+ textOrientation?: string;
312
+ textOverflow?: string;
313
+ textRendering?: string;
314
+ textShadow?: string;
315
+ textTransform?: string;
316
+ textUnderlinePosition?: string;
317
+ top?: string;
318
+ touchAction?: string;
319
+ transform?: string;
320
+ transformBox?: string;
321
+ transformOrigin?: string;
322
+ transformStyle?: string;
323
+ transition?: string;
324
+ transitionDelay?: string;
325
+ transitionDuration?: string;
326
+ transitionProperty?: string;
327
+ transitionTimingFunction?: string;
328
+ translate?: string;
329
+ unicodeBidi?: string;
330
+ userSelect?: string;
331
+ verticalAlign?: string;
332
+ visibility?: string;
333
+ webkitTapHighlightColor?: string;
334
+ whiteSpace?: string;
335
+ widows?: string;
336
+ width?: string;
337
+ willChange?: string;
338
+ wordBreak?: string;
339
+ wordSpacing?: string;
340
+ wordWrap?: string;
341
+ writingMode?: string;
342
+ zIndex?: string;
343
+ }
344
+
345
+ export { DOM, type ElementData, type ElementOptions, type ElementStyles };
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@brandup/ui-dom",
3
+ "description": "Basic DOM framework.",
4
+ "keywords": [
5
+ "brandup",
6
+ "typescript",
7
+ "ui",
8
+ "dom"
9
+ ],
10
+ "author": {
11
+ "name": "Dmitry Kovyazin",
12
+ "email": "it@brandup.online"
13
+ },
14
+ "homepage": "https://github.com/brandup-online/brandup-ui/npm/brandup-ui-dom",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/brandup-online/brandup-ui.git"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/brandup-online/brandup-ui/issues",
21
+ "email": "it@brandup.online"
22
+ },
23
+ "license": "Apache-2.0",
24
+ "version": "1.0.1",
25
+ "main": "dist/cjs/index.js",
26
+ "module": "dist/mjs/index.js",
27
+ "types": "dist/types.d.ts",
28
+ "devDependencies": {
29
+ "@rollup/plugin-commonjs": "^25.0.8",
30
+ "@rollup/plugin-node-resolve": "^15.2.3",
31
+ "@rollup/plugin-terser": "^0.4.4",
32
+ "rollup": "^4.19.0",
33
+ "rollup-plugin-dts": "^6.1.1",
34
+ "rollup-plugin-peer-deps-external": "^2.2.4",
35
+ "rollup-plugin-typescript2": "^0.36.0",
36
+ "tslib": "^2.6.3",
37
+ "typescript": "^5.5.3"
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "README.md"
42
+ ],
43
+ "scripts": {
44
+ "build": "rollup -c --bundleConfigAsCjs",
45
+ "watch": "rollup -c -w --bundleConfigAsCjs"
46
+ }
47
+ }