@componyx/ui 0.0.0-stage → 1.0.3

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.
Files changed (169) hide show
  1. package/AppSkin/AppSkin.css +1268 -0
  2. package/AppSkin/AppSkin.js +2748 -0
  3. package/AppSkin/Themes/Default.css +241 -0
  4. package/Base/Base.js +3407 -0
  5. package/Base/ComponentIcons.css +66 -0
  6. package/Base/Font/ComponentIcons.woff +0 -0
  7. package/Base/Font/UI.woff +0 -0
  8. package/Base/Library.js +8432 -0
  9. package/Base/NavigationManager.js +462 -0
  10. package/Base/ResponsiveTemplates.js +371 -0
  11. package/Base/Sanitizer.js +288 -0
  12. package/Base/Themes/Default.css +255 -0
  13. package/Base/UI.css +618 -0
  14. package/Base/UIResourcePath.js +6 -0
  15. package/Bindary/Bindary.js +2011 -0
  16. package/Bindary/Modules/Connection.js +216 -0
  17. package/Bindary/Modules/Core.js +854 -0
  18. package/Bindary/Modules/DataUpdater.js +351 -0
  19. package/Bindary/Modules/ExpressionEngine.js +347 -0
  20. package/Bindary/Modules/ProxyManager.js +482 -0
  21. package/Bindary/Modules/Renderer.js +605 -0
  22. package/Bindary/Modules/Router.js +291 -0
  23. package/Bindary/Modules/Scroller.js +89 -0
  24. package/Bindary/Modules/Template.js +1273 -0
  25. package/BookmarkSpy/BookmarkSpy.js +430 -0
  26. package/Box/Box.css +36 -0
  27. package/Box/Box.js +1685 -0
  28. package/Button/Button.css +470 -0
  29. package/Button/Button.js +1398 -0
  30. package/Button/Themes/Default.css +200 -0
  31. package/Carousel/Carousel.css +273 -0
  32. package/Carousel/Carousel.js +607 -0
  33. package/ColorButton/ColorButton.css +39 -0
  34. package/ColorButton/ColorButton.js +336 -0
  35. package/ColorPicker/ColorPicker.css +359 -0
  36. package/ColorPicker/ColorPicker.js +972 -0
  37. package/ComboBox/ComboBox.css +357 -0
  38. package/ComboBox/ComboBox.js +2342 -0
  39. package/ComboBox/Themes/Default.css +23 -0
  40. package/DataPager/DataPager.css +72 -0
  41. package/DataPager/DataPager.js +674 -0
  42. package/DatePicker/DatePicker.css +227 -0
  43. package/DatePicker/DatePicker.js +1531 -0
  44. package/DatePicker/Themes/Default.css +26 -0
  45. package/Dialog/Dialog.css +106 -0
  46. package/Dialog/Dialog.js +572 -0
  47. package/Dialog/Themes/Default.css +10 -0
  48. package/Editor/Data/Emoji.json +8285 -0
  49. package/Editor/Data/Special.json +1042 -0
  50. package/Editor/Editor.css +1562 -0
  51. package/Editor/Editor.js +4058 -0
  52. package/Editor/Font/Editor.woff +0 -0
  53. package/Editor/Modules/ComponentFactory.js +565 -0
  54. package/Editor/Modules/ContentManager.js +748 -0
  55. package/Editor/Modules/DialogManager.js +1234 -0
  56. package/Editor/Modules/EventManager.js +458 -0
  57. package/Editor/Modules/Format.js +950 -0
  58. package/Editor/Modules/History.js +191 -0
  59. package/Editor/Modules/LayoutState.js +379 -0
  60. package/Editor/Modules/ListManager.js +296 -0
  61. package/Editor/Modules/MenuManager.js +388 -0
  62. package/Editor/Modules/NodeManager.js +681 -0
  63. package/Editor/Modules/ParagraphButtons.js +122 -0
  64. package/Editor/Modules/Resizer.js +176 -0
  65. package/Editor/Modules/SelectionRange.js +564 -0
  66. package/Editor/Modules/SourceViewBuilder.js +212 -0
  67. package/Editor/Modules/SymbolPicker.js +208 -0
  68. package/Editor/Modules/Table.js +2327 -0
  69. package/Editor/Modules/TableDialog.js +757 -0
  70. package/Editor/Modules/Toolbar.js +375 -0
  71. package/Editor/Modules/TooltipMenu.js +125 -0
  72. package/Editor/Modules/Utility.js +131 -0
  73. package/Editor/Themes/Default.css +204 -0
  74. package/FileUpload/FileUpload.css +156 -0
  75. package/FileUpload/FileUpload.js +898 -0
  76. package/FileUpload/Themes/Default.css +17 -0
  77. package/Form/Form.css +1934 -0
  78. package/Form/Form.js +4943 -0
  79. package/Form/Modules/ActionManager.js +368 -0
  80. package/Form/Modules/BuildPanelManager.js +319 -0
  81. package/Form/Modules/ComponentFactory.js +468 -0
  82. package/Form/Modules/ComponentPanel.js +265 -0
  83. package/Form/Modules/ConfigPanelManager.js +685 -0
  84. package/Form/Modules/DataObserver.js +717 -0
  85. package/Form/Modules/Databinder.js +602 -0
  86. package/Form/Modules/Draggable.js +756 -0
  87. package/Form/Modules/OptionsPanel.js +342 -0
  88. package/Form/Modules/Renderer.js +1889 -0
  89. package/Form/Modules/RuleEngine.js +585 -0
  90. package/Form/Modules/RulesPanel.js +1158 -0
  91. package/Form/Modules/Types.js +1709 -0
  92. package/Form/Modules/ValidationManager.js +194 -0
  93. package/Form/Themes/Default.css +216 -0
  94. package/FormField/FormField.css +468 -0
  95. package/FormField/FormField.js +576 -0
  96. package/FormField/Themes/Default.css +99 -0
  97. package/Grid/Grid.css +544 -0
  98. package/Grid/Grid.js +3761 -0
  99. package/Grid/Themes/Default.css +43 -0
  100. package/LICENSE +126 -0
  101. package/MaskedTextBox/MaskedTextBox.css +28 -0
  102. package/MaskedTextBox/MaskedTextBox.js +642 -0
  103. package/MaskedTextBox/Themes/Default.css +6 -0
  104. package/Menu/Menu.css +328 -0
  105. package/Menu/Menu.js +2386 -0
  106. package/Menu/Themes/Default.css +24 -0
  107. package/NumericBox/NumericBox.css +120 -0
  108. package/NumericBox/NumericBox.js +984 -0
  109. package/PanelBar/PanelBar.css +123 -0
  110. package/PanelBar/PanelBar.js +505 -0
  111. package/PanelBar/Themes/Default.css +51 -0
  112. package/PieChart/PieChart.css +95 -0
  113. package/PieChart/PieChart.js +820 -0
  114. package/PieChart/Themes/Default.css +9 -0
  115. package/README.md +178 -3
  116. package/Slider/Slider.css +348 -0
  117. package/Slider/Slider.js +1306 -0
  118. package/Slider/Themes/Default.css +44 -0
  119. package/TabStrip/TabStrip.css +52 -0
  120. package/TabStrip/TabStrip.js +362 -0
  121. package/TabStrip/Themes/Default.css +35 -0
  122. package/TimePicker/Themes/Default.css +30 -0
  123. package/TimePicker/TimePicker.css +253 -0
  124. package/TimePicker/TimePicker.js +1485 -0
  125. package/TooltipManager/Themes/Default.css +21 -0
  126. package/TooltipManager/TooltipManager.css +227 -0
  127. package/TooltipManager/TooltipManager.js +791 -0
  128. package/Validator/Validator.css +54 -0
  129. package/Validator/Validator.js +2508 -0
  130. package/componyx.html-data.json +619 -0
  131. package/index.js +27 -0
  132. package/package.json +43 -4
  133. package/types/AppSkin.d.ts +842 -0
  134. package/types/Base.d.ts +1034 -0
  135. package/types/Bindary.d.ts +1196 -0
  136. package/types/BookmarkSpy.d.ts +112 -0
  137. package/types/Box.d.ts +374 -0
  138. package/types/Button.d.ts +455 -0
  139. package/types/Carousel.d.ts +136 -0
  140. package/types/ColorButton.d.ts +120 -0
  141. package/types/ColorPicker.d.ts +225 -0
  142. package/types/ComboBox.d.ts +507 -0
  143. package/types/DataPager.d.ts +152 -0
  144. package/types/DatePicker.d.ts +354 -0
  145. package/types/Dialog.d.ts +160 -0
  146. package/types/Editor.d.ts +1289 -0
  147. package/types/FileUpload.d.ts +206 -0
  148. package/types/Form.d.ts +3078 -0
  149. package/types/FormField.d.ts +204 -0
  150. package/types/Grid.d.ts +911 -0
  151. package/types/Library.d.ts +1899 -0
  152. package/types/MaskedTextBox.d.ts +91 -0
  153. package/types/Menu.d.ts +577 -0
  154. package/types/NumericBox.d.ts +310 -0
  155. package/types/PanelBar.d.ts +223 -0
  156. package/types/PieChart.d.ts +224 -0
  157. package/types/ResponsiveTemplates.d.ts +108 -0
  158. package/types/Slider.d.ts +227 -0
  159. package/types/TabStrip.d.ts +185 -0
  160. package/types/TimePicker.d.ts +265 -0
  161. package/types/TooltipManager.d.ts +178 -0
  162. package/types/UI.d.ts +29 -0
  163. package/types/Validator.d.ts +653 -0
  164. package/types/index.d.ts +59 -0
  165. package/ui.css +11783 -0
  166. package/ui.js +79477 -0
  167. package/ui.min.css +138 -0
  168. package/ui.min.js +264 -0
  169. package/ui.min.js.map +1 -0
@@ -0,0 +1,336 @@
1
+ /*! Componyx.UI | (c) E.H. Daanen / Componyx | BUSL-1.1 | componyx.com/license */
2
+ import '../Base/Base.js';
3
+ import '../Base/Library.js';
4
+ import '../Button/Button.js';
5
+
6
+ (function (window)
7
+ {
8
+ /**
9
+ * ColorButton class.
10
+ * @class
11
+ * @memberof componyx.UI
12
+ * @augments componyx.UI.base.Component
13
+ * @mixes componyx.UI.base.methods
14
+ * @param {String} id The id of the component.
15
+ * @param {Object|HTMLElement} properties The properties used to initialize the component or the container element.
16
+ * @returns {Object} An instance of the component.
17
+ */
18
+ componyx.UI.ColorButton = function ColorButton(id, properties)
19
+ {
20
+ // define private properties
21
+ var _instance = this, _button;
22
+ $base.static.ThemeOption; var _colorPicker, _rgba,
23
+ _hidden,
24
+ _classOption =
25
+ {
26
+ COLORBOX: 'color-box'
27
+ };
28
+
29
+ // define public properties
30
+ /**
31
+ * Gets or sets the css class of the color box.
32
+ * @type {String}
33
+ */
34
+ this.cssClassColorBox = '';
35
+
36
+ /**
37
+ * Gets or sets the color in the format Hue, Saturation, Brightness, Alpha.
38
+ * @type {String|null}
39
+ */
40
+ this.hsba = null;
41
+
42
+ /**
43
+ * Gets or sets the color in the format Red, Green, Blue, Alpha.
44
+ * @type {String|null}
45
+ */
46
+ this.rgba = null;
47
+
48
+ /**
49
+ * Gets or sets the color in the hexadecimal format.
50
+ * @type {String}
51
+ */
52
+ this.hex = '';
53
+
54
+ /**
55
+ * Gets or sets the color in either hexadecimal or RGBA format.
56
+ * @type {String}
57
+ */
58
+ this.value = '';
59
+
60
+ /**
61
+ * Gets or sets the clientid of the button.
62
+ * @type {String|null}
63
+ */
64
+ this.buttonId = null;
65
+
66
+ /**
67
+ * Gets or sets the id of the corresponding colorpicker.
68
+ * @type {String|null}
69
+ */
70
+ this.colorPickerId = null;
71
+
72
+ /**
73
+ * Gets or sets the id of the hidden input from which the settings are cloned.
74
+ * @type {String|null}
75
+ */
76
+ this.hiddenInputId = null;
77
+
78
+
79
+ /**
80
+ * @class
81
+ * @augments componyx.UI.base.Events
82
+ * @memberof componyx.UI.ColorButton
83
+ * @property {componyx.UI.base.Event} onConfirm - Event which fires on a color change confirmation. @see {@link componyx.UI.ColorButton.ConfirmEventArgs}
84
+ * @see {@link componyx.UI.base.Events}
85
+ */
86
+ function ColorButtonEvents(events)
87
+ {
88
+ Object.assign(this, events);
89
+
90
+ this.onConfirm = $base.static.createEvent('onConfirm');
91
+ }
92
+ /**
93
+ * ColorButton events
94
+ * @type {componyx.UI.ColorButton.ColorButtonEvents}
95
+ */
96
+ this.events = new ColorButtonEvents(this.events);
97
+
98
+ /**
99
+ * ColorButton confirm event arguments.
100
+ * @typedef {Object} ConfirmEventArgs
101
+ * @memberof componyx.UI.ColorButton
102
+ * @property {Number[]} rgba - The confirmed RGBA color value as [r, g, b, a].
103
+ */
104
+
105
+ // inherit base instance members
106
+ $base.Component.apply(this, [id, properties]);
107
+
108
+ /**
109
+ * Gets the RGBA color value.
110
+ * @returns {String} The RGBA string value as in 'r,g,b,a' or '' if no color was set.
111
+ */
112
+ this.getValue = function ()
113
+ {
114
+ return _hidden.value;
115
+ };
116
+
117
+ /**
118
+ * Sets the RGBA color value.
119
+ * @param {String} rgbaValue The RGBA string value as in 'r,g,b,a'
120
+ */
121
+ this.setValue = function (rgbaValue)
122
+ {
123
+ this.setRGBA.apply(this, rgbaValue.split(','));
124
+ };
125
+
126
+ /**
127
+ * Gets the RGBA color value
128
+ * @returns {Array<Number>} The RGBA color value as array of numbers.
129
+ */
130
+ this.getRGBA = function ()
131
+ {
132
+ return _rgba.slice();
133
+ };
134
+
135
+ /**
136
+ * Sets the selected color to the specified RGBA color value.
137
+ * @param {String} r Red value (0-255).
138
+ * @param {String} g Green value (0-255).
139
+ * @param {String} b Blue value (0-255).
140
+ * @param {String} a=1 Alpha value (0-1).
141
+ */
142
+ this.setRGBA = function (r, g, b, a = 1)
143
+ {
144
+ _rgba = [r, g, b, a].map((v) => parseFloat(v));
145
+ setColor.apply(_instance, _rgba);
146
+ };
147
+
148
+ /**
149
+ * Returns the current selected hex color value.
150
+ */
151
+ this.getHex = function ()
152
+ {
153
+ return $lib.rgbToHex.apply(_instance, _rgba);
154
+ };
155
+
156
+ /**
157
+ * Sets the selected color to the specified hex color value.
158
+ * @param {String} value Hex color value.
159
+ */
160
+ this.setHex = function (value)
161
+ {
162
+ _rgba = $lib.hexToRgb(value);
163
+ setColor.apply(_instance, _rgba);
164
+ };
165
+
166
+ /**
167
+ * Returns the underlying Button component instance.
168
+ * @returns {componyx.UI.Button}
169
+ */
170
+ this.getButton = function() { return _button; };
171
+
172
+ /**
173
+ * Renders the component
174
+ */
175
+ this.render = function ()
176
+ {
177
+ if (_instance.renderState != $base.static.RenderState.RENDERING)
178
+ {
179
+ // call base render and return
180
+ $base.methods.render.call(_instance, preRender, 'color-button', false);
181
+ return;
182
+ }
183
+
184
+ // render logic after loading resources
185
+ draw();
186
+ };
187
+
188
+ /**
189
+ * Handles the post render procedure.
190
+ */
191
+ this.postRender = function ()
192
+ {
193
+ if (_instance.renderState != $base.static.RenderState.RENDERING) // extra safety to never execute a postRender when the component state is incorrect
194
+ return;
195
+
196
+ postRender();
197
+ };
198
+
199
+ function preRender()
200
+ {
201
+ // initialize script and css
202
+ return ['ColorButton', ['Button']];
203
+ }
204
+
205
+ function postRender()
206
+ {
207
+ var hsba;
208
+
209
+ if (_instance.value)
210
+ {
211
+ if (_instance.value.startsWith('#')) // hex value
212
+ _rgba = $lib.hexToRgb(_instance.value.replace('#', ''));
213
+ else
214
+ _rgba = _instance.value.split(',').map(v => parseFloat(v));
215
+ }
216
+ else if (_instance.rgba)
217
+ {
218
+ _rgba = _instance.rgba.split(',');
219
+ $lib.each(_rgba, function (item, index)
220
+ {
221
+ _rgba[index] = (index == 3) ? parseFloat(item) : parseInt(item, 10);
222
+ });
223
+ }
224
+ else if (_instance.hsba)
225
+ {
226
+ hsba = _instance.hsba.split(',').map(v => parseFloat(v));
227
+ _rgba = componyx.UI.ColorPicker.hsvToRgb.apply(_instance, hsba);
228
+ _rgba[3] = hsba[3];
229
+ }
230
+ else
231
+ {
232
+ _rgba = [255, 0, 0, 0]; // red, but alpha level zero so no (real) color set
233
+ }
234
+
235
+ setColor.apply(_instance, _rgba);
236
+ $base.methods.postRender.call(_instance);
237
+ }
238
+
239
+ function draw()
240
+ {
241
+ _hidden = _instance.createSyncedInput(_instance.hiddenInputId, function ()
242
+ {
243
+ _instance.setValue(this.value);
244
+ });
245
+
246
+ createButton(_instance.buttonId, _instance.element);
247
+
248
+ if (_instance.colorPickerId)
249
+ {
250
+ _colorPicker = $UI.store[_instance.colorPickerId];
251
+
252
+ if (_colorPicker.renderState == $base.static.RenderState.RENDERED)
253
+ {
254
+ _instance.renderChildren();
255
+ }
256
+ else
257
+ {
258
+ _colorPicker.events.onPostRender.priorityAdd(function ()
259
+ {
260
+ _instance.renderChildren();
261
+ });
262
+ }
263
+ }
264
+ else
265
+ _instance.renderChildren();
266
+ }
267
+
268
+ function createButton(cloneId, container)
269
+ {
270
+ var id = _instance.id + '_' + (cloneId || $lib.guid());
271
+ _button = $UI.createComponent(componyx.UI.Button, { id: id, containerElement: container });
272
+
273
+ _button.primary = _button.transparentBorder = false;
274
+ _button.transparent = true;
275
+ _button.clone($UI.store[cloneId], _instance);
276
+ _button.command = _button.command || expand;
277
+ _button.events.onPostRender.priorityAdd(function () { _instance.isReady.apply(_instance); }, null);
278
+ _button.showing = true;
279
+ _button.setContentTemplate(createColorBox());
280
+ }
281
+
282
+ function createColorBox()
283
+ {
284
+ var div = document.createElement('div');
285
+ div.appendChild(document.createElement('div'));
286
+ div.className = _instance.cssClassColorBox || _classOption.COLORBOX;
287
+ return div;
288
+ }
289
+
290
+ function expand()
291
+ {
292
+ if (!_colorPicker)
293
+ return;
294
+
295
+ const color = _rgba.slice();
296
+
297
+ if (color[3] == 0)
298
+ color[3] = 1;
299
+
300
+ _colorPicker.expand(_button.element, color, confirm);
301
+ }
302
+
303
+ function confirm(colorPicker, args)
304
+ {
305
+ _rgba = args.rgba;
306
+ setColor.apply(_instance, _rgba);
307
+ _instance.events.onConfirm.fire(_instance, args);
308
+ }
309
+
310
+ function setColor(r, g, b, a)
311
+ {
312
+ if (a == undefined)
313
+ a = 1;
314
+
315
+ const value = [r, g, b, a].join(',');
316
+ getColorBox().firstChild.style.backgroundColor = `rgba(${value})`;
317
+ _hidden.__setValue(_instance.getRGBA()[3] === 0 ? '' : value); // not a real color if alpha is zero
318
+ }
319
+
320
+ function getColorBox()
321
+ {
322
+ return $lib(_instance.cssClassColorBox || _classOption.COLORBOX, _button.element, '', true);
323
+ }
324
+ };
325
+
326
+ /**
327
+ * @see {@link componyx.UI.base.methods}
328
+ */
329
+ componyx.UI.ColorButton.prototype = Object.create($base.methods);
330
+ componyx.UI.ColorButton.prototype.constructor = componyx.UI.ColorButton;
331
+
332
+ })();
333
+
334
+ const ColorButton = componyx.UI.ColorButton;
335
+
336
+ export { ColorButton };
@@ -0,0 +1,359 @@
1
+ /*! Componyx.UI | (c) E.H. Daanen / Componyx | BUSL-1.1 | componyx.com/license */
2
+ .color-picker.theme
3
+ {
4
+ line-height: 0px;
5
+ }
6
+
7
+ .color-picker.theme div.saturation, .color-picker.theme div.hue, .color-picker.theme div.input-container
8
+ {
9
+ display: inline-block;
10
+ }
11
+
12
+ .color-picker.theme .content > div
13
+ {
14
+ white-space: nowrap;
15
+ overflow-x: visible;
16
+ overflow-y: visible;
17
+ }
18
+
19
+ .color-picker.theme div.saturation
20
+ {
21
+ position: relative;
22
+ width: 256px;
23
+ height: 256px;
24
+ background-color: red;
25
+ overflow: hidden;
26
+ cursor: default;
27
+ border-style: solid;
28
+ }
29
+
30
+ .color-picker.theme div.saturation::before
31
+ {
32
+ content: '';
33
+ display: block;
34
+ position: absolute;
35
+ left: 0px;
36
+ right: 0px;
37
+ top: 0px;
38
+ bottom: 0px;
39
+ background: linear-gradient(to right, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
40
+ }
41
+
42
+ .color-picker.theme div.saturation::after
43
+ {
44
+ content: '';
45
+ display: block;
46
+ position: absolute;
47
+ left: 0px;
48
+ right: 0px;
49
+ top: 0px;
50
+ bottom: 0px;
51
+ background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
52
+ }
53
+
54
+ .color-picker.theme div.hue
55
+ {
56
+ position: relative;
57
+ cursor: default;
58
+ width: 20px;
59
+ height: 256px;
60
+ margin-left: 5px;
61
+ margin-right: 15px;
62
+ border-style: solid;
63
+ background: linear-gradient(to bottom, rgba(255,0,0,1) 0%,rgba(255,0,255,1) 16%,rgba(0,0,255,1) 33%,rgba(0,255,255,1) 50%,rgba(0,255,0,1) 67%,rgba(255,255,0,1) 84%,rgba(255,0,0,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
64
+ }
65
+
66
+ .color-picker.theme div.hue::before
67
+ {
68
+ content: '';
69
+ display: block;
70
+ position: absolute;
71
+ left: 0px;
72
+ right: 0px;
73
+ top: 0px;
74
+ bottom: 0px;
75
+ background: linear-gradient(to right, rgba(255,255,255,0.25) 0%,rgba(255,255,255,0) 50%,rgba(255,255,255,0.25) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
76
+ }
77
+
78
+
79
+ /* color boxes */
80
+ .color-picker.theme div.preview
81
+ {
82
+ position: relative;
83
+ width: 16px;
84
+ height: 16px;
85
+ border-style: none;
86
+ border-radius: 2px;
87
+ border-color: black;
88
+ background: linear-gradient(45deg, rgba(0,0,0,0.0980392) 25%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 75%, rgba(0,0,0,0.0980392) 75%, rgba(0,0,0,0.0980392) 0),
89
+ linear-gradient(45deg, rgba(0,0,0,0.0980392) 25%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 75%, rgba(0,0,0,0.0980392) 75%, rgba(0,0,0,0.0980392) 0), rgb(255, 255, 255);
90
+
91
+ background-position: 0 0, 5px 5px;
92
+ background-size: 10px 10px;
93
+ }
94
+
95
+ .color-picker.theme div.preview > div
96
+ {
97
+ position: absolute;
98
+ top: 0px;
99
+ right: 0px;
100
+ bottom: 0px;
101
+ left: 0px;
102
+ border-style: none;
103
+ border-radius: 2px;
104
+ border-color: #fff;
105
+ }
106
+
107
+ .color-picker.theme div.preview
108
+ {
109
+ width: 40px;
110
+ height: 40px;
111
+ margin-left: auto;
112
+ margin-right: auto;
113
+ border-style: solid;
114
+ }
115
+
116
+ .color-picker.theme div.preview > div
117
+ {
118
+ border-style: solid;
119
+ }
120
+
121
+
122
+ /* inputs */
123
+ .color-picker.theme div.input-container
124
+ {
125
+ vertical-align: top;
126
+ }
127
+
128
+ .color-picker.theme div.input-container > div.hsb
129
+ {
130
+ margin-top: 12px;
131
+ }
132
+
133
+ .color-picker.theme div.input-container > div.rgb,
134
+ .color-picker.theme div.input-container > div.alpha,
135
+ .color-picker.theme div.input-container > div.hex
136
+ {
137
+ margin-top: 8px;
138
+ }
139
+
140
+ .color-picker.theme div.input-container > div.hsb > *,
141
+ .color-picker.theme div.input-container > div.rgb > *,
142
+ .color-picker.theme div.input-container > div.alpha > *,
143
+ .color-picker.theme div.input-container > div.hex > *
144
+ {
145
+ display: block;
146
+ margin-top: 1px;
147
+ }
148
+
149
+ .color-picker.theme div.input-container .numeric-box.theme input
150
+ {
151
+ height: 20px;
152
+ line-height: 20px;
153
+ }
154
+
155
+ .color-picker.theme div.input-container .numeric-box.theme > div.button-holder > .button.theme.plus,
156
+ .color-picker.theme div.input-container .numeric-box.theme > div.button-holder > .button.theme.minus
157
+ {
158
+ height: 10px;
159
+ }
160
+
161
+ .color-picker.theme div.input-container input
162
+ {
163
+ font-size: 11px;
164
+ width: 31px;
165
+ }
166
+
167
+ .color-picker.theme div.input-container > div.hex input
168
+ {
169
+ width: 50px;
170
+ min-width: 0;
171
+ height: 20px;
172
+ padding: 0px;
173
+ padding-left: 4px;
174
+ padding-right: 4px;
175
+ border-style: solid;
176
+ }
177
+
178
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(1)::before,
179
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(2)::before,
180
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(3)::before,
181
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(1)::before,
182
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(2)::before,
183
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(3)::before,
184
+ .color-picker.theme div.input-container > div.alpha > *::before,
185
+ .color-picker.theme div.input-container > div.hex > *::before,
186
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(1)::after,
187
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(2)::after,
188
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(3)::after,
189
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(1)::after,
190
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(2)::after,
191
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(3)::after,
192
+ .color-picker.theme div.input-container > div.alpha > *::after,
193
+ .color-picker.theme div.input-container > div.hex > *::after
194
+ {
195
+ content: '';
196
+ display: inline-block;
197
+ vertical-align: middle;
198
+ text-align: left;
199
+ font-size: 11px;
200
+ width: 14px;
201
+ line-height: 20px;
202
+ }
203
+
204
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(1)::before
205
+ {
206
+ content: 'H';
207
+ }
208
+
209
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(2)::before
210
+ {
211
+ content: 'S';
212
+ }
213
+
214
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(3)::before
215
+ {
216
+ content: 'B';
217
+ }
218
+
219
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(1)::after
220
+ {
221
+ content: '°';
222
+ text-align: center;
223
+ }
224
+
225
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(2)::after
226
+ {
227
+ content: '%';
228
+ text-align: center;
229
+ }
230
+
231
+ .color-picker.theme div.input-container > div.hsb > *:nth-child(3)::after
232
+ {
233
+ content: '%';
234
+ text-align: center;
235
+ }
236
+
237
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(1)::before
238
+ {
239
+ content: 'R';
240
+ }
241
+
242
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(2)::before
243
+ {
244
+ content: 'G';
245
+ }
246
+
247
+ .color-picker.theme div.input-container > div.rgb > *:nth-child(3)::before
248
+ {
249
+ content: 'B';
250
+ }
251
+
252
+ .color-picker.theme div.input-container > div.alpha > *::before
253
+ {
254
+ content: 'A';
255
+ }
256
+
257
+ .color-picker.theme div.input-container > div.alpha > *::after
258
+ {
259
+ content: '%';
260
+ text-align: center;
261
+ }
262
+
263
+ .color-picker.theme div.input-container > div.hex > *::before
264
+ {
265
+ content: '#';
266
+ }
267
+
268
+ /* pickers */
269
+ .color-picker.theme div.saturation > div.picker
270
+ {
271
+ cursor: default;
272
+ position: absolute;
273
+ border-style: solid;
274
+ border-width: 1px;
275
+ top: -5px;
276
+ left: -5px;
277
+ z-index: 1;
278
+ width: 9px;
279
+ height: 9px;
280
+ border-radius: 100%;
281
+ border-color: #000;
282
+ }
283
+
284
+ .color-picker.theme div.saturation > div.picker::after
285
+ {
286
+ content: '';
287
+ position: absolute;
288
+ top: 0px;
289
+ bottom: 0px;
290
+ left: 0px;
291
+ right: 0px;
292
+ border-style: solid;
293
+ border-radius: 100%;
294
+ border-width: 1px;
295
+ border-color: #fff;
296
+ }
297
+
298
+ .color-picker.theme div.hue > div.picker
299
+ {
300
+ cursor: default;
301
+ position: absolute;
302
+ top: -5px;
303
+ left: -5px;
304
+ width: 28px;
305
+ height: 9px;
306
+ border-style: solid;
307
+ background-color: transparent;
308
+ border-color: black;
309
+ }
310
+
311
+ .color-picker.theme div.hue > div.picker::before
312
+ {
313
+ position: absolute;
314
+ content: '';
315
+ top: 0px;
316
+ bottom: 0px;
317
+ left: 0px;
318
+ right: 0px;
319
+ border-width: 4px;
320
+ border-style: solid;
321
+ background-color: transparent;
322
+ border-color: white;
323
+ }
324
+
325
+ .color-picker.theme div.hue > div.picker::after
326
+ {
327
+ position: absolute;
328
+ content: '';
329
+ top: 3px;
330
+ bottom: 3px;
331
+ left: 3px;
332
+ right: 3px;
333
+ border-width: 1px;
334
+ border-style: solid;
335
+ background-color: transparent;
336
+ border-color: black;
337
+ }
338
+
339
+ /* popup box */
340
+ .color-picker.theme div.box
341
+ {
342
+ border-style: solid;
343
+ border-radius: 2px;
344
+ }
345
+
346
+ .color-picker.theme .box div.content
347
+ {
348
+ padding: 5px;
349
+ }
350
+
351
+ .color-picker.theme .box div.content > div > div
352
+ {
353
+ margin-top: 5px;
354
+ }
355
+
356
+ .color-picker.theme .box div.content > div > div > .button.theme
357
+ {
358
+ margin-right: 4px;
359
+ }