ozdenui 0.1.0

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 (149) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +14 -0
  3. data/NOTICE +5 -0
  4. data/README.md +242 -0
  5. data/exe/ozdenui +17 -0
  6. data/lib/ozdenui/AGENTS.md +210 -0
  7. data/lib/ozdenui/COMPONENTS.md +3017 -0
  8. data/lib/ozdenui/app.rb +749 -0
  9. data/lib/ozdenui/command.rb +107 -0
  10. data/lib/ozdenui/components.rb +368 -0
  11. data/lib/ozdenui/dialogs.rb +212 -0
  12. data/lib/ozdenui/files.rb +124 -0
  13. data/lib/ozdenui/icon.png +0 -0
  14. data/lib/ozdenui/kit.json +1 -0
  15. data/lib/ozdenui/kit.rb +115 -0
  16. data/lib/ozdenui/look.rb +229 -0
  17. data/lib/ozdenui/objects.rb +652 -0
  18. data/lib/ozdenui/server.rb +270 -0
  19. data/lib/ozdenui/values.rb +273 -0
  20. data/lib/ozdenui/version.rb +15 -0
  21. data/lib/ozdenui/web/basic/LICENSE +14 -0
  22. data/lib/ozdenui/web/basic/basic.min.css +1 -0
  23. data/lib/ozdenui/web/basic/basic.min.js +78 -0
  24. data/lib/ozdenui/web/basic/font/open-sans/LICENSE.txt +206 -0
  25. data/lib/ozdenui/web/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
  26. data/lib/ozdenui/web/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
  27. data/lib/ozdenui/web/basic/scroll-bar.min.js +3 -0
  28. data/lib/ozdenui/web/bridge.js +584 -0
  29. data/lib/ozdenui/web/comp/accordion.js +659 -0
  30. data/lib/ozdenui/web/comp/action-button/add.png +0 -0
  31. data/lib/ozdenui/web/comp/action-button.js +521 -0
  32. data/lib/ozdenui/web/comp/action-tab-bar.js +383 -0
  33. data/lib/ozdenui/web/comp/app-bar.js +237 -0
  34. data/lib/ozdenui/web/comp/badge.js +292 -0
  35. data/lib/ozdenui/web/comp/bottom-bar.js +555 -0
  36. data/lib/ozdenui/web/comp/breadcrumbs.js +524 -0
  37. data/lib/ozdenui/web/comp/canvas.js +652 -0
  38. data/lib/ozdenui/web/comp/chat-view.js +827 -0
  39. data/lib/ozdenui/web/comp/check-box.js +490 -0
  40. data/lib/ozdenui/web/comp/code-editor.js +965 -0
  41. data/lib/ozdenui/web/comp/color-picker.js +636 -0
  42. data/lib/ozdenui/web/comp/context-menu.js +951 -0
  43. data/lib/ozdenui/web/comp/currency-field.js +209 -0
  44. data/lib/ozdenui/web/comp/data-table/arrow.svg +2 -0
  45. data/lib/ozdenui/web/comp/data-table.js +937 -0
  46. data/lib/ozdenui/web/comp/date-picker.js +1055 -0
  47. data/lib/ozdenui/web/comp/dialog.js +992 -0
  48. data/lib/ozdenui/web/comp/email-field.js +65 -0
  49. data/lib/ozdenui/web/comp/file-picker.js +920 -0
  50. data/lib/ozdenui/web/comp/filters.js +807 -0
  51. data/lib/ozdenui/web/comp/form.js +602 -0
  52. data/lib/ozdenui/web/comp/full-screen-select/arrow.svg +2 -0
  53. data/lib/ozdenui/web/comp/full-screen-select/cancel.svg +2 -0
  54. data/lib/ozdenui/web/comp/full-screen-select.js +614 -0
  55. data/lib/ozdenui/web/comp/gauge.js +439 -0
  56. data/lib/ozdenui/web/comp/graph-box.js +3911 -0
  57. data/lib/ozdenui/web/comp/grid-group.js +185 -0
  58. data/lib/ozdenui/web/comp/hold-to-confirm-button/trash-red.png +0 -0
  59. data/lib/ozdenui/web/comp/hold-to-confirm-button/trash.png +0 -0
  60. data/lib/ozdenui/web/comp/hold-to-confirm-button.js +289 -0
  61. data/lib/ozdenui/web/comp/image-view.js +598 -0
  62. data/lib/ozdenui/web/comp/item-list.js +1740 -0
  63. data/lib/ozdenui/web/comp/json-editor.js +3221 -0
  64. data/lib/ozdenui/web/comp/json-view.js +597 -0
  65. data/lib/ozdenui/web/comp/label-editor.js +1140 -0
  66. data/lib/ozdenui/web/comp/left-menu/data-table.png +0 -0
  67. data/lib/ozdenui/web/comp/left-menu/home.png +0 -0
  68. data/lib/ozdenui/web/comp/left-menu/reports.png +0 -0
  69. data/lib/ozdenui/web/comp/left-menu/setting.png +0 -0
  70. data/lib/ozdenui/web/comp/left-menu.js +548 -0
  71. data/lib/ozdenui/web/comp/line-progress-bar.js +343 -0
  72. data/lib/ozdenui/web/comp/loading-screen.js +413 -0
  73. data/lib/ozdenui/web/comp/log-view.js +530 -0
  74. data/lib/ozdenui/web/comp/login-page.js +685 -0
  75. data/lib/ozdenui/web/comp/markdown-view.js +1045 -0
  76. data/lib/ozdenui/web/comp/menu-bar.js +624 -0
  77. data/lib/ozdenui/web/comp/mini-graph-box.js +492 -0
  78. data/lib/ozdenui/web/comp/minimal-accent.js +208 -0
  79. data/lib/ozdenui/web/comp/notice.js +229 -0
  80. data/lib/ozdenui/web/comp/number-field.js +128 -0
  81. data/lib/ozdenui/web/comp/numeric-keyboard.js +298 -0
  82. data/lib/ozdenui/web/comp/page-control.js +762 -0
  83. data/lib/ozdenui/web/comp/page-header.js +191 -0
  84. data/lib/ozdenui/web/comp/password-field/hide-btn.png +0 -0
  85. data/lib/ozdenui/web/comp/password-field/hide-btn2.png +0 -0
  86. data/lib/ozdenui/web/comp/password-field/show-btn.png +0 -0
  87. data/lib/ozdenui/web/comp/password-field/show-btn2.png +0 -0
  88. data/lib/ozdenui/web/comp/password-field.js +192 -0
  89. data/lib/ozdenui/web/comp/period-bar.js +436 -0
  90. data/lib/ozdenui/web/comp/phone-field.js +322 -0
  91. data/lib/ozdenui/web/comp/progress-bar.js +992 -0
  92. data/lib/ozdenui/web/comp/property-panel.js +3639 -0
  93. data/lib/ozdenui/web/comp/radio-button.js +527 -0
  94. data/lib/ozdenui/web/comp/range-slider.js +569 -0
  95. data/lib/ozdenui/web/comp/rich-text-editor.js +1064 -0
  96. data/lib/ozdenui/web/comp/scroll-area.js +308 -0
  97. data/lib/ozdenui/web/comp/scrolling-text.js +297 -0
  98. data/lib/ozdenui/web/comp/search-input/clear-round.svg +1 -0
  99. data/lib/ozdenui/web/comp/search-input/clear.svg +1 -0
  100. data/lib/ozdenui/web/comp/search-input/filter.png +0 -0
  101. data/lib/ozdenui/web/comp/search-input/filter.svg +1 -0
  102. data/lib/ozdenui/web/comp/search-input/search.svg +1 -0
  103. data/lib/ozdenui/web/comp/search-input.js +725 -0
  104. data/lib/ozdenui/web/comp/search-results.js +596 -0
  105. data/lib/ozdenui/web/comp/select-box.js +1862 -0
  106. data/lib/ozdenui/web/comp/settings-row.js +299 -0
  107. data/lib/ozdenui/web/comp/side-panel.js +616 -0
  108. data/lib/ozdenui/web/comp/slider-field.js +952 -0
  109. data/lib/ozdenui/web/comp/slider.js +838 -0
  110. data/lib/ozdenui/web/comp/smart-button/alert-black.png +0 -0
  111. data/lib/ozdenui/web/comp/smart-button/clock.png +0 -0
  112. data/lib/ozdenui/web/comp/smart-button.js +981 -0
  113. data/lib/ozdenui/web/comp/smart-table/clock.png +0 -0
  114. data/lib/ozdenui/web/comp/smart-table/down.png +0 -0
  115. data/lib/ozdenui/web/comp/smart-table/scroll.png +0 -0
  116. data/lib/ozdenui/web/comp/smart-table/sort.png +0 -0
  117. data/lib/ozdenui/web/comp/smart-table/up.png +0 -0
  118. data/lib/ozdenui/web/comp/smart-table.js +1883 -0
  119. data/lib/ozdenui/web/comp/sortable-list.js +1181 -0
  120. data/lib/ozdenui/web/comp/spark-line-box.js +738 -0
  121. data/lib/ozdenui/web/comp/splitter.js +411 -0
  122. data/lib/ozdenui/web/comp/status-bar.js +408 -0
  123. data/lib/ozdenui/web/comp/step-bar.js +345 -0
  124. data/lib/ozdenui/web/comp/stepper.js +753 -0
  125. data/lib/ozdenui/web/comp/tabs.js +1366 -0
  126. data/lib/ozdenui/web/comp/tag-input.js +1107 -0
  127. data/lib/ozdenui/web/comp/tap-effect.js +170 -0
  128. data/lib/ozdenui/web/comp/text-area-field.js +233 -0
  129. data/lib/ozdenui/web/comp/text-field.js +1006 -0
  130. data/lib/ozdenui/web/comp/time-line.js +398 -0
  131. data/lib/ozdenui/web/comp/time-picker.js +1032 -0
  132. data/lib/ozdenui/web/comp/tiny-select/arrow.svg +1 -0
  133. data/lib/ozdenui/web/comp/tiny-select.js +322 -0
  134. data/lib/ozdenui/web/comp/tiny-table.js +283 -0
  135. data/lib/ozdenui/web/comp/toast.js +891 -0
  136. data/lib/ozdenui/web/comp/toggle.js +757 -0
  137. data/lib/ozdenui/web/comp/tool-bar.js +760 -0
  138. data/lib/ozdenui/web/comp/tooltip.js +534 -0
  139. data/lib/ozdenui/web/comp/tree-view.js +1179 -0
  140. data/lib/ozdenui/web/comp/ui-effects.js +1097 -0
  141. data/lib/ozdenui/web/comp/ui-standards.js +403 -0
  142. data/lib/ozdenui/web/comp/url-field.js +190 -0
  143. data/lib/ozdenui/web/comp/web-view.js +588 -0
  144. data/lib/ozdenui/web/components.js +123 -0
  145. data/lib/ozdenui/web/index.html +39 -0
  146. data/lib/ozdenui/window.rb +188 -0
  147. data/lib/ozdenui/window_cocoa.rb +221 -0
  148. data/lib/ozdenui.rb +32 -0
  149. metadata +200 -0
@@ -0,0 +1,3017 @@
1
+ # The components of OzdenUI for Ruby
2
+
3
+ Made by `tools/gen.rb` from the kit (basic.js v26.11.10); do not edit. Every component is a method of `OzdenUI`
4
+ (`SelectBox(options: [...])`); its params are the params of the kit in snake_case, each with the default of the kit
5
+ and the comment of the kit (written for JavaScript: a `1 / 0` flag also takes `true / false`, `function (self) {}`
6
+ is a block or a lambda that gets the object). Every component also takes `left:`, `top:`, `width:`, `height:`,
7
+ `style_name:`, `style:`, `visible:`, `opacity:`, `fill:` and `unframed:`. In a terminal: `ozdenui doc SelectBox`.
8
+
9
+ ## Accordion
10
+
11
+ `Accordion(...)` makes the Accordion of the kit (comp/accordion.js).
12
+
13
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
14
+
15
+ A dark window gives it its dark look.
16
+
17
+ Read without a question to the page: `obj.open_keys`.
18
+
19
+ Objects go into it with `accordion.section(key) { ... }`.
20
+
21
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_section`, `close`, `close_all`, `end_section`, `focus`, `get_content`, `get_open_keys`, `get_section`, `is_open`, `open`, `open_all`, `remove_section`, `set_animated`, `set_enabled`, `set_section_description`, `set_section_enabled`, `set_section_text`, `set_sections`, `set_theme`, `start_section`, `toggle`.
22
+
23
+ | Param | Default | The kit says |
24
+ |---|---|---|
25
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
26
+ | `left:` | `0` | |
27
+ | `top:` | `0` | |
28
+ | `width:` | `"100%"` | |
29
+ | `height:` | `"auto"` | "auto": it grows with its open sections. A number or "100%": the sections scroll inside it. |
30
+ | `sections:` | `[]` | [SECTION] (See A SECTION above) |
31
+ | `multiple:` | `1` | 1: more than one section can be open. 0: a section that opens closes the others. |
32
+ | `arrow_side:` | `"right"` | "right", "left": where the arrow of a row is |
33
+ | `enabled:` | `1` | |
34
+ | `animated:` | `0` | 1: the arrow turns, the objects of a section fade in. setAnimated() |
35
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js (when it is loaded), with a height that is not "auto". 0: the scrollbar of the browser. |
36
+ | `on_toggle:` | `a block` | section.key, section.opened. (Not at create time, not with silent: 1) |
37
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to Accordion.styles |
38
+ | `style:` | `{...}` | Light style package (default) |
39
+
40
+ ## ActionButton
41
+
42
+ `ActionButton(...)` makes the ActionButton of the kit (comp/action-button.js).
43
+
44
+ `style_name:` `"classic"`, `"ozden"`.
45
+
46
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close_menu`, `open_menu`, `press`, `set_animated`, `set_button_color`, `set_items`, `toggle_menu`.
47
+
48
+ | Param | Default | The kit says |
49
+ |---|---|---|
50
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
51
+ | `left:` | `0` | |
52
+ | `top:` | `0` | |
53
+ | `width:` | `"100%"` | |
54
+ | `height:` | `"100%"` | |
55
+ | `items:` | `[]` | [{ key, text }] or ["text"] |
56
+ | `icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | a plus (a page can give its own picture) |
57
+ | `open_icon_file:` | `""` | "": iconFile. The icon while the menu is open. |
58
+ | `icon_size:` | `30` | |
59
+ | `icon_rotate:` | `0` | deg |
60
+ | `open_icon_rotate:` | `45` | deg: the + turns into × |
61
+ | `right_space:` | `40` | The button from the right side of the container |
62
+ | `bottom_space:` | `40` | The button from the bottom of the container |
63
+ | `menu_width:` | `280` | |
64
+ | `menu_gap:` | `20` | Between the menu and the button |
65
+ | `animated:` | `0` | 1: small hover / press / open motions (context/basic-js-animated-rules.md). (box.setAnimated(0/1)) |
66
+ | `on_action:` | `a block` | An action was chosen (no items: key is "", one item: its key) |
67
+ | `on_menu_toggle:` | `a block` | The menu opened / closed: self.menuOpened |
68
+ | `style_name:` | `"classic"` | "classic", "ozden" or a name added to ActionButton.styles |
69
+ | `style:` | `{...}` | Classic style package (default) |
70
+
71
+ ## ActionTabBar
72
+
73
+ `ActionTabBar(...)` makes the ActionTabBar of the kit (comp/action-tab-bar.js).
74
+
75
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_index`, `set_value`.
76
+
77
+ | Param | Default | The kit says |
78
+ |---|---|---|
79
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
80
+ | `width:` | `600` | |
81
+ | `height:` | `150` | |
82
+ | `items:` | `[]` | [{ key, text, iconFile }] (Only at create time) |
83
+ | `value:` | `null` | The key of the selected tab. null: the first tab |
84
+ | `aria_label:` | `"Tabs"` | The name of the tab list for a screen reader |
85
+ | `action_aria_label:` | `"Add"` | The name of the "+" button for a screen reader |
86
+ | `on_change:` | `a block` | self.value, self.previousValue, self.getIndex() |
87
+ | `on_action:` | `a block` | The "+" button |
88
+ | `style:` | `{...}` | |
89
+
90
+ ## AppBar
91
+
92
+ `AppBar(...)` makes the AppBar of the kit (comp/app-bar.js).
93
+
94
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_back_visible`, `set_line`, `set_menu_visible`, `set_title_align`, `set_title_text`.
95
+
96
+ | Param | Default | The kit says |
97
+ |---|---|---|
98
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
99
+ | `left:` | `0` | The bar stands at the top of its container (a page) |
100
+ | `top:` | `0` | |
101
+ | `width:` | `"100%"` | |
102
+ | `height:` | `105` | |
103
+ | `color:` | `"white"` | The background of the bar |
104
+ | `title_text:` | `""` | |
105
+ | `title_align:` | `"center"` | "center" or "left" (set later with setTitleAlign) |
106
+ | `line:` | `0` | 1: a soft line at the bottom (setLine) |
107
+ | `show_back:` | `0` | 1: the back button at the left (setBackVisible) |
108
+ | `show_menu:` | `1` | 1: the menu button at the right (setMenuVisible) |
109
+ | `back_icon_file:` | `""` | "": a back arrow drawn in SVG (Ex: "assets/icons/back.svg") |
110
+ | `menu_icon_file:` | `""` | "": three dots drawn in SVG |
111
+ | `icon_color:` | `Black(0.8)` | The color of the drawn icons (a file keeps its own colors) |
112
+ | `back_aria_label:` | `"Back"` | What a screen reader says for the buttons |
113
+ | `menu_aria_label:` | `"Menu"` | |
114
+ | `on_back:` | `a block` | |
115
+ | `on_menu:` | `a block` | |
116
+ | `style:` | `{...}` | |
117
+
118
+ ## Badge
119
+
120
+ `Badge(...)` makes the Badge of the kit (comp/badge.js).
121
+
122
+ `style_name:` `"dark"`, `"light"`, `"ozden"`.
123
+
124
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_state`, `get_value`, `hide`, `is_visible`, `set_state`, `set_value`, `show`.
125
+
126
+ | Param | Default | The kit says |
127
+ |---|---|---|
128
+ | `key:` | `"0"` | |
129
+ | `value:` | `0` | |
130
+ | `max_value:` | `99` | |
131
+ | `show_plus:` | `1` | 1: over maxValue -> "99+" |
132
+ | `show_zero:` | `0` | 1: 0 is shown as "0" (0: hidden) |
133
+ | `dot_for_one:` | `1` | 1: a dot for 1, 0: the number "1" |
134
+ | `dot_size:` | `10` | |
135
+ | `badge_style:` | `{...}` | The dot and the number (Ex: a white ring: border: 3, borderColor: "white") |
136
+ | `dot_style:` | `{}` | Only the dot, over badgeStyle: top, right... |
137
+ | `number_style:` | `{}` | Only the number, over badgeStyle: fontSize, bold, padding, round, top, right... |
138
+ | `style_name:` | `"ozden"` | "ozden", "light", "dark" or a name added to Badge.styles |
139
+ | `style:` | `{}` | WHY: the look is in the params above; the packages are packages of params (see Badge.styles). |
140
+
141
+ ## BottomBar
142
+
143
+ `BottomBar(...)` makes the BottomBar of the kit (comp/bottom-bar.js).
144
+
145
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `select_by_index`, `select_none`, `set_badge`, `set_label_mode`.
146
+
147
+ | Param | Default | The kit says |
148
+ |---|---|---|
149
+ | `selected_index:` | `0` | |
150
+ | `left:` | `0` | |
151
+ | `width:` | `"100%"` | |
152
+ | `height:` | `100` | |
153
+ | `items:` | `[]` | [{ iconFile: "home.png", selectedIconFile: "homes.png", text: "Home", color: "#5ABB9F" }] (selectedIconFile, color: optional) |
154
+ | `on_item_click:` | `a block` | |
155
+ | `hover_effect:` | `true` | For desktop usage |
156
+ | `label_mode:` | `"inline"` | "inline": the name next to the selected icon, "float": over it for a moment, "none": no names |
157
+ | `allow_html:` | `0` | 1: the names of the items are HTML (only for your own texts) |
158
+ | `float_label_time:` | `600` | ms: from the moment the name shows over the selected item to its fade out ("float") |
159
+ | `badge:` | `{...}` | The params of the Badge of every item (comp/badge.js) |
160
+ | `style:` | `{...}` | |
161
+
162
+ ## Breadcrumbs
163
+
164
+ `Breadcrumbs(...)` makes the Breadcrumbs of the kit (comp/breadcrumbs.js).
165
+
166
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_item`, `back`, `click_item`, `collapse`, `expand`, `get_current_item`, `get_items`, `go_to`, `set_enabled`, `set_items`, `set_max_items`, `set_separator`.
167
+
168
+ | Param | Default | The kit says |
169
+ |---|---|---|
170
+ | `key:` | `"0"` | |
171
+ | `width:` | `"auto"` | "auto": Wraps the items. A number or "100%": Fixed width. |
172
+ | `height:` | `"auto"` | |
173
+ | `items:` | `[]` | [{ text, key, url, iconFile, data }] or ["Home", "Products"] |
174
+ | `separator:` | `"chevron"` | "chevron" or a text. (Ex: "/", "›", "•") |
175
+ | `max_items:` | `0` | 0: No collapse. Ex: 4 -> Home / … / Laptops / Lenovo |
176
+ | `items_before_collapse:` | `1` | |
177
+ | `items_after_collapse:` | `2` | |
178
+ | `max_item_width:` | `180` | Long texts are cut with "...". 0: No limit. |
179
+ | `wrap:` | `0` | 1: Items move to the next line when there is no space. |
180
+ | `trim_on_click:` | `0` | 1: Clicking an item removes the items after it. (In-app navigation) |
181
+ | `current_clickable:` | `0` | 1: The last item can be clicked too. |
182
+ | `enabled:` | `1` | |
183
+ | `aria_label:` | `"Breadcrumb"` | |
184
+ | `on_click:` | `a block` | return false: Do not go to item.url |
185
+ | `on_change:` | `a block` | When items change with code or trimOnClick. |
186
+ | `style:` | `{...}` | |
187
+
188
+ ## Canvas
189
+
190
+ `Canvas(...)` makes the Canvas of the kit (comp/canvas.js).
191
+
192
+ `style_name:` `"dark"`, `"light"`.
193
+
194
+ A dark window gives it its dark look.
195
+
196
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_circle`, `add_ellipse`, `add_image`, `add_line`, `add_polygon`, `add_polyline`, `add_rect`, `add_shape`, `add_text`, `bring_to_front`, `clear`, `get_image`, `get_shape`, `get_shapes`, `move_shape`, `remove_shape`, `set_drawing`, `set_pen`, `set_shapes`, `set_theme`.
197
+
198
+ | Param | Default | The kit says |
199
+ |---|---|---|
200
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
201
+ | `left:` | `0` | |
202
+ | `top:` | `0` | |
203
+ | `width:` | `400` | |
204
+ | `height:` | `300` | |
205
+ | `shapes:` | `[]` | [SHAPE]: the first shapes. Later: addShape(), setShapes() |
206
+ | `drawing:` | `0` | 1: the mouse draws free lines with the pen |
207
+ | `pen_color:` | `""` | "": the pen color of the style |
208
+ | `pen_width:` | `3` | |
209
+ | `aria_label:` | `"A drawing"` | |
210
+ | `on_click:` | `a block` | shape: the shape at that place (the top one), or null |
211
+ | `on_shape_move:` | `a block` | A draggable shape was put down at its new place. |
212
+ | `on_draw_end:` | `a block` | A free line is finished: it is in the list (shape.key). |
213
+ | `style_name:` | `"light"` | "light", "dark" or a name added to Canvas.styles |
214
+ | `style:` | `{...}` | Light style package (default) |
215
+
216
+ ## ChatView
217
+
218
+ `ChatView(...)` makes the ChatView of the kit (comp/chat-view.js).
219
+
220
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
221
+
222
+ A dark window gives it its dark look.
223
+
224
+ Read without a question to the page: `obj.busy`.
225
+
226
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_message`, `append_text`, `clear`, `focus`, `get_input_text`, `get_message_text`, `get_messages`, `remove_message`, `scroll_to_end`, `scroll_to_top`, `send`, `set_busy`, `set_empty_text`, `set_input_text`, `set_message_text`, `set_messages`, `set_placeholder`, `set_show_input`, `set_theme`, `stop`.
227
+
228
+ | Param | Default | The kit says |
229
+ |---|---|---|
230
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
231
+ | `width:` | `480` | |
232
+ | `height:` | `560` | A number or "100%". (Not "auto": the messages scroll above the field.) |
233
+ | `messages:` | `[]` | [{ key, role: "user" \| "assistant" \| "system", text }]: the messages at the start (a text: an answer) |
234
+ | `placeholder:` | `"Write a message"` | |
235
+ | `empty_text:` | `""` | Shown while there is no message (Ex: "Ask something") |
236
+ | `send_text:` | `"Send"` | The name of the button: a screen reader says it, the mouse shows it |
237
+ | `stop_text:` | `"Stop"` | |
238
+ | `show_input:` | `1` | 0: only the messages (the page has a field of its own) |
239
+ | `send_on_enter:` | `1` | 1: Enter sends, Shift+Enter makes a new line. 0: Enter makes a new line, Ctrl / Cmd + Enter sends. |
240
+ | `max_input_lines:` | `6` | The field grows up to this many lines, then it scrolls |
241
+ | `busy:` | `0` | 1: an answer is coming: the dots, and Stop in the place of Send. setBusy() |
242
+ | `auto_scroll:` | `1` | 1: the view follows a new message and an answer that comes, until the reader scrolls up |
243
+ | `remote_pictures:` | `0` | 1: a picture of an answer with an http address is drawn (See the note of MarkdownView) |
244
+ | `aria_label:` | `"Conversation"` | |
245
+ | `copy_text:` | `"Copy"` | The button of a code in an answer |
246
+ | `copied_text:` | `"Copied"` | |
247
+ | `on_send:` | `a block` | The user sent a text: its message (key) is on the view, the field is empty again |
248
+ | `on_stop:` | `a block` | Stop was pressed (busy is 0 already) |
249
+ | `on_link_click:` | `a block` | function (self, address) {}: a link of an answer comes to you. null: it opens in a new tab. |
250
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to ChatView.styles |
251
+ | `style:` | `{...}` | Light style package (default) |
252
+
253
+ ## CheckBox
254
+
255
+ `CheckBox(...)` makes the CheckBox of the kit (comp/check-box.js).
256
+
257
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`.
258
+
259
+ A dark window gives it its dark look.
260
+
261
+ Read without a question to the page: `obj.checked`.
262
+
263
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_animated`, `set_checked`, `set_enabled`, `set_label_text`, `toggle`.
264
+
265
+ | Param | Default | The kit says |
266
+ |---|---|---|
267
+ | `key:` | `"0"` | |
268
+ | `width:` | `"auto"` | |
269
+ | `height:` | `"auto"` | |
270
+ | `checked:` | `0` | 0, 1 |
271
+ | `enabled:` | `1` | 0, 1 |
272
+ | `label_text:` | `""` | |
273
+ | `allow_html:` | `0` | 1: labelText is HTML (only for your own texts) |
274
+ | `label_position:` | `"right"` | "right", "left" |
275
+ | `wrap_label:` | `0` | 1: a long label wraps (the check box needs a width); 0: one line |
276
+ | `animated:` | `0` | 1: the square grows a little under the mouse, the tick draws in (box.setAnimated(0/1)) |
277
+ | `on_change:` | `a block` | self.checked |
278
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark", "minimal", "minimalDark" or a name added to CheckBox.styles |
279
+ | `style:` | `{...}` | Light style package (default) |
280
+
281
+ ## CodeEditor
282
+
283
+ `CodeEditor(...)` makes the CodeEditor of the kit (comp/code-editor.js).
284
+
285
+ `style_name:` `"dark"`, `"light"`.
286
+
287
+ A dark window gives it its dark look.
288
+
289
+ Read without a question to the page: `obj.cursor_column`, `obj.cursor_line`.
290
+
291
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `focus_editor`, `get_selected_text`, `get_value`, `go_to_line`, `insert_text`, `set_language`, `set_read_only`, `set_show_line_numbers`, `set_tab_size`, `set_theme`, `set_value`.
292
+
293
+ | Param | Default | The kit says |
294
+ |---|---|---|
295
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
296
+ | `left:` | `0` | |
297
+ | `top:` | `0` | |
298
+ | `width:` | `"100%"` | |
299
+ | `height:` | `320` | |
300
+ | `value:` | `""` | The text |
301
+ | `language:` | `"text"` | A name of CodeEditor.languages |
302
+ | `tab_size:` | `4` | The spaces of one level |
303
+ | `read_only:` | `0` | |
304
+ | `show_line_numbers:` | `1` | |
305
+ | `placeholder:` | `""` | |
306
+ | `change_delay:` | `0` | ms: onChange waits for the typing to rest |
307
+ | `aria_label:` | `"Code"` | |
308
+ | `on_change:` | `a block` | self.value changed. (Not at create time, not with silent: 1) |
309
+ | `on_cursor_change:` | `a block` | self.cursorLine, self.cursorColumn (from 1) |
310
+ | `style_name:` | `"light"` | "light", "dark" or a name added to CodeEditor.styles |
311
+ | `style:` | `{...}` | Light style package (default) |
312
+
313
+ ## ColorPicker
314
+
315
+ `ColorPicker(...)` makes the ColorPicker of the kit (comp/color-picker.js).
316
+
317
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
318
+
319
+ A dark window gives it its dark look.
320
+
321
+ Read without a question to the page: `obj.value`.
322
+
323
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `get_color`, `is_open`, `open`, `set_color`, `set_colors`, `set_enabled`, `toggle`.
324
+
325
+ | Param | Default | The kit says |
326
+ |---|---|---|
327
+ | `key:` | `"0"` | |
328
+ | `width:` | `170` | Field width (not used if inline: 1) |
329
+ | `height:` | `44` | Field height (not used if inline: 1) |
330
+ | `selected_color:` | `""` | "#3871E0" or "" (nothing is selected). WHY: not "color", Box.color is the background. |
331
+ | `colors:` | `[...]` | The palette. Any CSS color text is accepted. ("red", "rgb(0, 0, 0)"...) |
332
+ | `columns:` | `5` | |
333
+ | `show_text:` | `1` | 1: The color text is written in the field. |
334
+ | `placeholder:` | `"Select color"` | |
335
+ | `inline:` | `0` | 1: The palette is always visible, no field. |
336
+ | `enabled:` | `1` | |
337
+ | `close_on_select:` | `1` | |
338
+ | `on_change:` | `a block` | self.value ("#3871E0" or "") |
339
+ | `on_open:` | `a block` | |
340
+ | `on_close:` | `a block` | |
341
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "minimal", "minimalDark" or a name added to ColorPicker.styles |
342
+ | `style:` | `{...}` | Light style package (default) |
343
+
344
+ ## ContextMenu
345
+
346
+ `ContextMenu(...)` makes the ContextMenu of the kit (comp/context-menu.js).
347
+
348
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
349
+
350
+ A dark window gives it its dark look.
351
+
352
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `activate_first`, `attach_to`, `click_item`, `close`, `close_submenu`, `detach`, `get_item_by_key`, `get_items`, `has_active`, `is_open`, `open_at`, `open_below`, `open_beside`, `open_with_event`, `remove`, `set_enabled`, `set_item_checked`, `set_item_enabled`, `set_items`.
353
+
354
+ | Param | Default | The kit says |
355
+ |---|---|---|
356
+ | `key:` | `"0"` | |
357
+ | `items:` | `[]` | [{ text, key, iconFile, enabled, data, onClick }, "-", "Text"] |
358
+ | `target:` | `null` | An object (or a list of objects). The menu opens on it with the trigger. One object: the menu is removed with it. |
359
+ | `trigger:` | `"contextmenu"` | "contextmenu": Right click, "click": Left click |
360
+ | `min_width:` | `180` | |
361
+ | `max_width:` | `320` | Long texts are cut with "...". 0: No limit. |
362
+ | `enabled:` | `1` | |
363
+ | `aria_label:` | `"Menu"` | |
364
+ | `on_click:` | `a block` | self.source: The object that opened the menu. |
365
+ | `on_open:` | `a block` | |
366
+ | `on_close:` | `a block` | |
367
+ | `on_side_key:` | `a block` | ArrowRight (1) / ArrowLeft (-1) that no submenu takes (MenuBar: the next menu) |
368
+ | `parent_menu:` | `null` | (inside) The menu of a submenu: it handles the keys and the clicks outside for it. |
369
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "minimal", "minimalDark" or a name added to ContextMenu.styles |
370
+ | `style:` | `{...}` | Light style package (default) |
371
+
372
+ ## CurrencyField
373
+
374
+ `CurrencyField(...)` makes the CurrencyField of the kit (comp/currency-field.js).
375
+
376
+ A dark window gives it its dark look.
377
+
378
+ Read without a question to the page: `obj.text`.
379
+
380
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `focus_func`, `get_value`, `get_value_as_number`, `input_func`, `is_valid`, `set_background_color`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
381
+
382
+ | Param | Default | The kit says |
383
+ |---|---|---|
384
+ | `required:` | `0 (the kit alone: 0)` | |
385
+ | `title_text:` | `"" (the kit alone: "CURRENCY")` | |
386
+ | `placeholder:` | `"" (the kit alone: "(auto)")` | |
387
+ | `max_length:` | `35` | |
388
+ | `allow_negative:` | `1` | |
389
+ | `allow_decimal:` | `1` | |
390
+ | `decimal_separator:` | `"."` | or "," |
391
+ | `max_decimal_digits:` | `2` | |
392
+ | `group_separator:` | `","` | for thousands grouping |
393
+ | `unit_text:` | `"TL"` | |
394
+ | `key:` | `"0"` | |
395
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
396
+ | `type:` | `"text"` | |
397
+ | `width:` | `350` | |
398
+ | `height:` | `"auto"` | |
399
+ | `left_padding:` | `20` | |
400
+ | `right_padding:` | `60` | |
401
+ | `title_font_size:` | `16` | |
402
+ | `input_font_size:` | `20` | |
403
+ | `input_height:` | `40` | px: the row of the text |
404
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
405
+ | `description_font_size:` | `14` | |
406
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
407
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
408
+ | `value:` | `""` | |
409
+ | `show_description:` | `0` | |
410
+ | `description_text:` | `""` | |
411
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
412
+ | `background_color:` | `"#F6F6F6"` | |
413
+ | `focus_background_color:` | `"#F3F4E0"` | |
414
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
415
+ | `line_color:` | `"#373836"` | |
416
+ | `focus_line_color:` | `"#65A293"` | |
417
+ | `back_border_color:` | `Black(0)` | |
418
+ | `focus_back_border_color:` | `Black(0)` | |
419
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
420
+ | `back_border_top_round:` | `2` | |
421
+ | `back_border_bottom_round:` | `0` | |
422
+ | `title_text_color:` | `"#555555"` | |
423
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
424
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
425
+ | `input_text_color:` | `"#373836"` | |
426
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
427
+ | `placeholder_color:` | `""` | "": the color of the browser |
428
+ | `description_text_color:` | `"#999999"` | |
429
+ | `warning_ball_border_color:` | `"#373836"` | |
430
+ | `required_text:` | `"Required"` | |
431
+ | `required_color:` | `"white"` | |
432
+ | `warning_text:` | `"Invalid value format"` | |
433
+ | `warning_color:` | `"#E5885E"` | |
434
+ | `animated_warning_ball:` | `1` | |
435
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
436
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
437
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
438
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
439
+ | `warning_icon_size:` | `20` | |
440
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
441
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
442
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
443
+ | `tooltip_style:` | `{...}` | |
444
+ | `select_style:` | `{...}` | |
445
+ | `show_left_box:` | `0` | |
446
+ | `show_right_box:` | `0` | |
447
+ | `show_unit:` | `0` | |
448
+ | `create_input:` | `1` | |
449
+ | `unit_style:` | `{...}` | |
450
+ | `on_focus:` | `a block` | |
451
+ | `on_blur:` | `a block` | |
452
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
453
+ | `on_enter:` | | the Enter key: a block or a lambda that gets the field |
454
+
455
+ ## DataTable
456
+
457
+ `DataTable(...)` makes the DataTable of the kit (comp/data-table.js).
458
+
459
+ When to use it: the better looking table (style packages, sorting, search, selection, your own cells), but the data it can hold has a limit: every row is a basic.js object (about 9 DOM nodes), all made at once.
460
+
461
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"plain"`.
462
+
463
+ A dark window gives it its dark look.
464
+
465
+ Read without a question to the page: `obj.selected_row`.
466
+
467
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_row`, `clear_rows`, `clear_selection`, `clear_sort`, `get_biggest_id`, `get_row`, `get_rows`, `get_selected_data`, `get_selected_id`, `remove_row`, `search`, `select`, `set_rows`, `set_title_text`, `sort_by`.
468
+
469
+ | Param | Default | The kit says |
470
+ |---|---|---|
471
+ | `width:` | `600` | |
472
+ | `height:` | `400` | |
473
+ | `columns:` | `[]` | See "A COLUMN" above. |
474
+ | `rows:` | `[]` | [[1, "John", "Paris"], ...] or [{ id: 1, name: "John", city: "Paris" }, ...] |
475
+ | `id_index:` | `0` | The id of a row array: row[idIndex] |
476
+ | `id_key:` | `"id"` | The id of a row object: row[idKey] |
477
+ | `sort_key:` | `""` | "": the order of the data |
478
+ | `sort_direction:` | `"asc"` | "asc" or "desc" |
479
+ | `can_select:` | `1` | 0: a click runs onRowClick, no row is selected |
480
+ | `row_height:` | `"auto"` | "auto": as high as its text (more lines); a number: one line, cut with "..." |
481
+ | `title_text:` | `""` | "": no title in the header |
482
+ | `show_search:` | `0` | 1: a search box in the header (comp/search-input.js SearchInput must be loaded) |
483
+ | `search_params:` | `{}` | More params of the SearchInput. Ex: { placeholder: "Ara" } |
484
+ | `empty_text:` | `"There are no records."` | |
485
+ | `no_result_text:` | `"No records found."` | |
486
+ | `sort_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<?xml ve...` | |
487
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js ScrollBar |
488
+ | `on_row_click:` | `a block` | A click on a row, or Enter on the selected row |
489
+ | `on_select:` | `a block` | The selected row changed (row: null when nothing is selected). Not with silent: 1 |
490
+ | `on_sort:` | `a block` | self.sortKey, self.sortDirection |
491
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "plain", "dark", "minimal", "minimalDark" or a name added to DataTable.styles |
492
+ | `style:` | `{...}` | Light style package (default) |
493
+
494
+ ## DatePicker
495
+
496
+ `DatePicker(...)` makes the DatePicker of the kit (comp/date-picker.js).
497
+
498
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
499
+
500
+ A dark window gives it its dark look.
501
+
502
+ Read without a question to the page: `obj.value`.
503
+
504
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `get_date`, `is_open`, `open`, `set_date`, `set_enabled`, `set_max_date`, `set_min_date`, `toggle`.
505
+
506
+ | Param | Default | The kit says |
507
+ |---|---|---|
508
+ | `key:` | `"0"` | |
509
+ | `width:` | `220` | Field width (not used if inline: 1) |
510
+ | `height:` | `44` | Field height (not used if inline: 1) |
511
+ | `date:` | `null` | Date, "YYYY-MM-DD" or null |
512
+ | `min_date:` | `null` | Date, "YYYY-MM-DD" or null |
513
+ | `max_date:` | `null` | Date, "YYYY-MM-DD" or null |
514
+ | `format:` | `"DD.MM.YYYY"` | Tokens: YYYY, MMMM, MMM, MM, M, DD, D, dddd, ddd |
515
+ | `language:` | `"en"` | "en", "tr" |
516
+ | `first_day_of_week:` | `1` | 0: Sunday, 1: Monday |
517
+ | `placeholder:` | `""` | Empty: uses the language text |
518
+ | `inline:` | `0` | 1: Calendar is always visible, no field. |
519
+ | `scale:` | `null` | Multiplies every size. null: basic.uiScale (1, or 1 / page.zoom on a fitted page). (Only at create time) |
520
+ | `enabled:` | `1` | |
521
+ | `close_on_select:` | `1` | |
522
+ | `show_today_button:` | `1` | |
523
+ | `show_clear_button:` | `1` | |
524
+ | `on_change:` | `a block` | self.date (Date or null), self.value ("YYYY-MM-DD"), self.dateText |
525
+ | `on_open:` | `a block` | |
526
+ | `on_close:` | `a block` | |
527
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "minimal", "minimalDark" or a name added to DatePicker.styles |
528
+ | `style:` | `{...}` | Light style package (default) |
529
+
530
+ ## Dialog
531
+
532
+ `Dialog(...)` makes the Dialog of the kit (comp/dialog.js).
533
+
534
+ `style_name:` `"minimal"`, `"minimalDark"`, `"ozden"`, `"ozdenDark"`.
535
+
536
+ A dark window gives it its dark look.
537
+
538
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `get_button`, `get_values`, `is_busy`, `is_open`, `open`, `remove`, `set_busy`, `set_message_text`, `set_status`, `set_title_text`.
539
+
540
+ | Param | Default | The kit says |
541
+ |---|---|---|
542
+ | `key:` | `"0"` | |
543
+ | `width:` | `460` | the card (a number); a small screen: as wide as the screen |
544
+ | `title_text:` | `""` | |
545
+ | `message_text:` | `""` | |
546
+ | `allow_html:` | `0` | 1: the title and the message are HTML (only for your own texts) |
547
+ | `fields:` | `[]` | [{ key, titleText, placeholder, value, required, validate }] |
548
+ | `content:` | `null` | function (dialog) {}: objects in the body |
549
+ | `buttons:` | `[]` | [{ text, type, key, iconFile, align, ask, ariaLabel, onClick }] |
550
+ | `close_on_cover:` | `1` | a click on the cover closes it |
551
+ | `close_on_escape:` | `1` | |
552
+ | `auto_open:` | `1` | |
553
+ | `remove_on_close:` | `1` | 0: close() only hides it; open() shows it again |
554
+ | `aria_label:` | `""` | when there is no title |
555
+ | `variant:` | `""` | "": the buttons in a row at the bottom; "centered": the texts in the middle, the buttons one under the other |
556
+ | `top_icon_file:` | `""` | "centered": the icon at the top (a file, or an "<svg" text drawn with currentColor or LIGHT / STRONG) |
557
+ | `top_icon_tone:` | `""` | "centered": "cyan", "orange", "yellow", "green", "blue": the circle and the icon in its tones; "": gray |
558
+ | `scale:` | `null` | every size multiplied (Ex: 1.5). null: basic.uiScale (1 / page.zoom on a page fitted with page.fit()) |
559
+ | `on_open:` | `a block` | |
560
+ | `on_close:` | `a block` | reason: "button", "escape", "cover", "api" |
561
+ | `style_name:` | `"ozden"` | "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to Dialog.styles |
562
+ | `style:` | `{...}` | The ozden style package (default): the first dialog of smart-button-3-ozden.htm |
563
+
564
+ ## EmailField
565
+
566
+ `EmailField(...)` makes the EmailField of the kit (comp/email-field.js).
567
+
568
+ A dark window gives it its dark look.
569
+
570
+ Read without a question to the page: `obj.text`.
571
+
572
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `focus_func`, `get_value`, `input_func`, `is_valid`, `set_background_color`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
573
+
574
+ | Param | Default | The kit says |
575
+ |---|---|---|
576
+ | `required:` | `0 (the kit alone: 1)` | |
577
+ | `type:` | `"email"` | |
578
+ | `title_text:` | `"" (the kit alone: "EMAIL")` | |
579
+ | `placeholder:` | `"example@site.com"` | |
580
+ | `warning_text:` | `"Invalid email format"` | |
581
+ | `warning_color:` | `"#E5885E"` | |
582
+ | `max_length:` | `254 (the kit alone: 40)` | |
583
+ | `key:` | `"0"` | |
584
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
585
+ | `width:` | `350` | |
586
+ | `height:` | `"auto"` | |
587
+ | `left_padding:` | `20` | |
588
+ | `right_padding:` | `60` | |
589
+ | `title_font_size:` | `16` | |
590
+ | `input_font_size:` | `20` | |
591
+ | `input_height:` | `40` | px: the row of the text |
592
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
593
+ | `description_font_size:` | `14` | |
594
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
595
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
596
+ | `value:` | `""` | |
597
+ | `show_description:` | `0` | |
598
+ | `description_text:` | `""` | |
599
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
600
+ | `background_color:` | `"#F6F6F6"` | |
601
+ | `focus_background_color:` | `"#F3F4E0"` | |
602
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
603
+ | `line_color:` | `"#373836"` | |
604
+ | `focus_line_color:` | `"#65A293"` | |
605
+ | `back_border_color:` | `Black(0)` | |
606
+ | `focus_back_border_color:` | `Black(0)` | |
607
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
608
+ | `back_border_top_round:` | `2` | |
609
+ | `back_border_bottom_round:` | `0` | |
610
+ | `title_text_color:` | `"#555555"` | |
611
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
612
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
613
+ | `input_text_color:` | `"#373836"` | |
614
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
615
+ | `placeholder_color:` | `""` | "": the color of the browser |
616
+ | `description_text_color:` | `"#999999"` | |
617
+ | `warning_ball_border_color:` | `"#373836"` | |
618
+ | `required_text:` | `"Required"` | |
619
+ | `required_color:` | `"white"` | |
620
+ | `animated_warning_ball:` | `1` | |
621
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
622
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
623
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
624
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
625
+ | `warning_icon_size:` | `20` | |
626
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
627
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
628
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
629
+ | `tooltip_style:` | `{...}` | |
630
+ | `select_style:` | `{...}` | |
631
+ | `show_left_box:` | `0` | |
632
+ | `show_right_box:` | `0` | |
633
+ | `show_unit:` | `0` | |
634
+ | `create_input:` | `1` | |
635
+ | `unit_text:` | `""` | |
636
+ | `unit_style:` | `{...}` | |
637
+ | `on_focus:` | `a block` | |
638
+ | `on_blur:` | `a block` | |
639
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
640
+ | `on_enter:` | | the Enter key: a block or a lambda that gets the field |
641
+
642
+ ## FilePicker
643
+
644
+ `FilePicker(...)` makes the FilePicker of the kit (comp/file-picker.js).
645
+
646
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
647
+
648
+ A dark window gives it its dark look.
649
+
650
+ Read without a question to the page: `obj.files`.
651
+
652
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_files`, `clear`, `get_file_details`, `get_files`, `open`, `remove`, `remove_file`, `set_animated`, `set_description_text`, `set_enabled`, `set_icon`, `set_icon_svg`, `set_title_text`.
653
+
654
+ | Param | Default | The kit says |
655
+ |---|---|---|
656
+ | `key:` | `"0"` | |
657
+ | `width:` | `360` | |
658
+ | `height:` | `"auto"` | |
659
+ | `zone_height:` | `170` | |
660
+ | `multiple:` | `0` | 1: Select more than one file. New files are added to the list. |
661
+ | `directory:` | `0` | 1: Select a folder (all files in it). Click only, not drag. |
662
+ | `accept:` | `""` | Ex: "image/*", ".pdf,.docx", "image/png,image/jpeg" |
663
+ | `max_size:` | `0` | Bytes. 0: No limit. Ex: 5 * 1024 * 1024 (5 MB) |
664
+ | `max_files:` | `0` | 0: No limit (only for multiple: 1) |
665
+ | `enabled:` | `1` | |
666
+ | `show_icon:` | `1` | 0: Hide the upload icon. (A zone too low for it hides it by itself.) |
667
+ | `icon_svg:` | `""` | An "<svg" text of your own, drawn with currentColor. Empty: the icon of the style (box.setIconSvg()) |
668
+ | `icon_file:` | `""` | A picture of your own (a path or a data: address) in the place of the icon, with its own colors (box.setIcon()) |
669
+ | `animated:` | `0` | 1: the icon lifts under the mouse, and more while a file is dragged over. (box.setAnimated(0/1)) |
670
+ | `show_list:` | `1` | |
671
+ | `show_preview:` | `1` | Image thumbnails in the list. |
672
+ | `prevent_page_drop:` | `1` | 1: A file dropped outside the zone does not open in the browser tab. |
673
+ | `title_text:` | `"Drag and drop a file here"` | |
674
+ | `description_text:` | `"or click to select"` | |
675
+ | `hint_text:` | `""` | Empty: created from accept and maxSize |
676
+ | `drop_text:` | `"Drop to add"` | |
677
+ | `allow_html:` | `0` | 1: titleText, descriptionText and dropText are HTML (only for your own texts) |
678
+ | `on_change:` | `a block` | self.files: [{ file, name, displayName, path, size, sizeText, type, extension, lastModified }] |
679
+ | `on_error:` | `a block` | errors: [{ type: "accept" \| "maxSize" \| "maxFiles", name, message }] |
680
+ | `on_open_dialog:` | `a block` | function (self): the dialog of a program, in the place of the dialog of the page (see above) |
681
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "minimal", "minimalDark" or a name added to FilePicker.styles |
682
+ | `style:` | `{...}` | |
683
+
684
+ ## Filters
685
+
686
+ `Filters(...)` makes the Filters of the kit (comp/filters.js).
687
+
688
+ `style_name:` `"light"`.
689
+
690
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `clear_all`, `close_panel`, `get_selected`, `get_selected_count`, `open_panel`, `search`, `set_animated`, `set_button_text`, `set_panel_opened`, `set_section_opened`, `set_sections`, `set_selected`, `toggle_panel`.
691
+
692
+ | Param | Default | The kit says |
693
+ |---|---|---|
694
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
695
+ | `width:` | `380` | The width of the panel (the button stands at its right) |
696
+ | `height:` | `"auto"` | The button and the panel |
697
+ | `panel_height:` | `620` | |
698
+ | `panel_opened:` | `1` | 0: only the button; a click opens the panel |
699
+ | `panel_mode:` | `"inline"` | |
700
+ | `button_text:` | `"Filters"` | |
701
+ | `search_placeholder:` | `"Search"` | |
702
+ | `selected_text:` | `"Selected"` | |
703
+ | `clear_text:` | `"Clear all"` | |
704
+ | `no_result_text:` | `"No results"` | |
705
+ | `sections:` | `[]` | |
706
+ | `animated:` | `0` | 1: the panel and an opened section come in, the arrows turn (box.setAnimated(0/1)) |
707
+ | `search_input_params:` | `{ styleName: "ozden", width: "100%", height: 50, fontSize...` | |
708
+ | `check_box_params:` | `{ styleName: "light", style: {} }` | |
709
+ | `on_change:` | `a block` | The selection changed: self.getSelected(). (Not at create time, not with silent: 1) |
710
+ | `on_panel_toggle:` | `a block` | The panel opened / closed: self.panelOpened |
711
+ | `style_name:` | `"light"` | "light" or a name added to Filters.styles |
712
+ | `style:` | `{...}` | Light style package (default) |
713
+
714
+ ## Form
715
+
716
+ `Form(...)` makes the Form of the kit (comp/form.js).
717
+
718
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_double_input`, `add_input`, `add_title`, `remove`, `set_passive_button_hint_text`, `show_message`.
719
+
720
+ | Param | Default | The kit says |
721
+ |---|---|---|
722
+ | `min_width:` | `500` | |
723
+ | `max_width:` | `700` | |
724
+ | `button_color:` | `"#65A293"` | |
725
+ | `button_text:` | `"SEND"` | |
726
+ | `allow_html:` | `0` | 1: buttonText and the texts of showMessage() are HTML (only for your own texts) |
727
+ | `show_detail_warning:` | `1` | |
728
+ | `missing_entry_text:` | `"{{count}} missing entry"` | |
729
+ | `missing_entries_text:` | `"{{count}} missing entries"` | |
730
+ | `warning_text:` | `"<b>{{name}}</b> can't be empty"` | HTML of the page; {{name}}: the title of the field, as it is written |
731
+ | `error_text:` | `"<b>{{name}}</b> is not valid"` | HTML of the page, as warningText |
732
+ | `minimal_button:` | `0` | |
733
+ | `double_input_always_horizontal:` | `0` | |
734
+ | `show_passive_button_hint:` | `1` | 1: A hint is shown when the mouse is over the passive send button. |
735
+ | `passive_button_hint_text:` | `"Please fill in the missing fields to send the form."` | |
736
+ | `hint_round:` | `4` | |
737
+ | `on_change:` | `a block` | the user changed an input of the form |
738
+ | `on_send_click:` | `a block` | |
739
+
740
+ ## FullScreenSelect
741
+
742
+ `FullScreenSelect(...)` makes the FullScreenSelect of the kit (comp/full-screen-select.js).
743
+
744
+ `style_name:` `"classic"`, `"dark"`, `"light"`.
745
+
746
+ A dark window gives it its dark look.
747
+
748
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `get_selected_index`, `get_selected_item`, `open`, `remove`, `set_items`, `set_selected_index`, `set_selected_key`.
749
+
750
+ | Param | Default | The kit says |
751
+ |---|---|---|
752
+ | `width:` | `200` | |
753
+ | `height:` | `50` | |
754
+ | `items:` | `[]` | [{ key, text }] or ["Text"] (the text is its key) |
755
+ | `selected_key:` | `null` | null: the first item |
756
+ | `placeholder:` | `"Search"` | |
757
+ | `empty_text:` | `"No results"` | |
758
+ | `auto_width:` | `0` | 1: the field is as wide as the text of the selected item |
759
+ | `show_search:` | `1` | 0: no search box (a short list) |
760
+ | `arrow_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<?xml ve...` | |
761
+ | `close_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<?xml ve...` | |
762
+ | `search_icon_file:` | `""` | The icons of the search box. "": the files of SearchInput (or of its style package) |
763
+ | `clear_icon_file:` | `""` | |
764
+ | `aria_label:` | `""` | "": the text of the selected item is read |
765
+ | `on_change:` | `a block` | self.selectedKey changed (not at create time, not with silent: 1) |
766
+ | `on_open:` | `a block` | |
767
+ | `on_close:` | `a block` | |
768
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark" or a name added to FullScreenSelect.styles |
769
+ | `style:` | `{...}` | Light style package (default) |
770
+
771
+ ## Gauge
772
+
773
+ `Gauge(...)` makes the Gauge of the kit (comp/gauge.js).
774
+
775
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"modern"`.
776
+
777
+ A dark window gives it its dark look.
778
+
779
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_bar_color`, `set_marker_value`, `set_range`, `set_sub_text`, `set_title_text`, `set_value`, `set_value_suffix`, `set_value_text`.
780
+
781
+ | Param | Default | The kit says |
782
+ |---|---|---|
783
+ | `key:` | `"0"` | |
784
+ | `width:` | `180` | |
785
+ | `height:` | `180` | |
786
+ | `value:` | `0` | |
787
+ | `min_value:` | `0` | |
788
+ | `max_value:` | `100` | |
789
+ | `start_angle:` | `0` | 0: the top (12 o'clock). They grow clockwise. |
790
+ | `sweep_angle:` | `360` | 360: a full ring. 180: a half arc. |
791
+ | `radius:` | `74` | |
792
+ | `marker_value:` | `null` | null: no marker line. (A target, a reserve, a limit...) |
793
+ | `value_text:` | `""` | "": the value itself, with decimals and valueSuffix. |
794
+ | `value_suffix:` | `"%"` | |
795
+ | `decimals:` | `0` | |
796
+ | `sub_text:` | `""` | The small line under the value. |
797
+ | `title_text:` | `""` | Under the whole gauge. |
798
+ | `duration:` | `600` | Length of the animation, in milliseconds. |
799
+ | `aria_label:` | `"Gauge"` | |
800
+ | `on_change:` | `a block` | |
801
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "modern" or a name added to Gauge.styles |
802
+ | `style:` | `{...}` | Light style package (default) |
803
+
804
+ ## GraphBox
805
+
806
+ `GraphBox(...)` makes the GraphBox of the kit (comp/graph-box.js).
807
+
808
+ A dark window gives it its dark look.
809
+
810
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_dataset`, `add_point`, `add_value`, `download`, `get_canvas`, `get_image`, `get_table_data`, `remove_dataset`, `set_animated`, `set_axis_texts`, `set_center_text`, `set_curve`, `set_data`, `set_dataset_visible`, `set_datasets`, `set_format_value`, `set_format_x`, `set_horizontal`, `set_labels`, `set_legend`, `set_max_slices`, `set_show_values`, `set_slice_visible`, `set_soft_limits`, `set_stacked`, `set_style`, `set_subtitle_text`, `set_table_view`, `set_target_lines`, `set_theme`, `set_title_text`, `set_type`, `set_value_limits`, `set_value_step`, `set_values`, `set_xLimits`, `when_ready`.
811
+
812
+ | Param | Default | The kit says |
813
+ |---|---|---|
814
+ | `key:` | `"0"` | |
815
+ | `width:` | `500` | |
816
+ | `height:` | `300` | |
817
+ | `type:` | `"line"` | "line", "area", "bar", "pie", "doughnut", "radar", "scatter", "bubble" |
818
+ | `theme:` | `"light"` | "light", "dark", "auto" (follows the system setting), "minimal", "minimalDark" |
819
+ | `title_text:` | `""` | |
820
+ | `subtitle_text:` | `""` | |
821
+ | `labels:` | `null` | ["Jan", "Feb", "Mar"] |
822
+ | `values:` | `null` | [12, 19, 7] Shortcut: creates one dataset. |
823
+ | `datasets:` | `null` | [{ label: "2026", data: [12, 19, 7], ...see A DATASET above }] |
824
+ | `data:` | `null` | { labels, datasets } (Used instead of labels, values and datasets.) |
825
+ | `legend:` | `"auto"` | |
826
+ | `stacked:` | `0` | 1: Bars one on the other, lines and areas over each other. The tooltip adds totalText. |
827
+ | `horizontal:` | `0` | 1: The values grow to the right. (Long names read better so.) |
828
+ | `total_text:` | `"Total"` | The last row of the tooltip of a stacked chart. "": No total |
829
+ | `target_lines:` | `null` | [{ value: 90000, label: "Target", color: "" }] No label: its value. label: "": No text. |
830
+ | `max_slices:` | `8` | A pie, a doughnut: at most this many slices; the smallest ones become "Other". 0: No limit. |
831
+ | `other_text:` | `"Other"` | The name of that slice |
832
+ | `center_text:` | `""` | The big text in the middle of a doughnut. Ex: "1,284" |
833
+ | `center_sub_text:` | `""` | The small text under it. Ex: "Users" |
834
+ | `begin_at_zero:` | `1` | 1: The value axis holds 0. (A bar chart always holds it: the length of a bar is its value.) |
835
+ | `min_value:` | `null` | null: From the values. |
836
+ | `max_value:` | `null` | null: From the values. Ex: 100 |
837
+ | `soft_min_value:` | `null` | The axis goes at least this low. Unlike minValue, a smaller value still widens it. |
838
+ | `soft_max_value:` | `null` | The axis goes at least this high. Ex: 260 |
839
+ | `value_step:` | `0` | 0: The axis finds its own step. Ex: 1: a line and a text for every whole number. |
840
+ | `min_x:` | `null` | scatter, bubble: the limits of the x axis. null: From the values. (They do not hold 0 by themselves.) |
841
+ | `max_x:` | `null` | |
842
+ | `size_text:` | `"Size"` | bubble: the name of its size in the tooltip |
843
+ | `x_axis_text:` | `""` | A small title under the chart. Ex: "Height (cm)" |
844
+ | `y_axis_text:` | `""` | A small title at the left of the chart, turned. Ex: "Weight (kg)" |
845
+ | `show_values:` | `0` | 1: The values on the chart, only where they fit. |
846
+ | `table_view:` | `0` | 1: A table of the values in place of the chart. setTableView() |
847
+ | `table_head_text:` | `""` | The title of the first column of the table |
848
+ | `max_labels:` | `0` | At most this many labels on the index axis. 0: As many as fit. |
849
+ | `curve:` | `"linear"` | "linear", "smooth" (never goes over a value) |
850
+ | `show_points:` | `"auto"` | "auto": When there is room for them. 1, 0 |
851
+ | `format_value:` | `null` | a format text, made by the page at once: "{:,.2f} TL", "{:.0f} kg", "{:.1%}" (not a block) |
852
+ | `format_x:` | `null` | a format text, made by the page at once: "{:,.2f} TL", "{:.0f} kg", "{:.1%}" (not a block) |
853
+ | `locale:` | `""` | "": The language of the browser. Ex: "tr-TR" |
854
+ | `max_count:` | `0` | addValue(): 0: No limit. Ex: 20 (the first value is removed, for live data) |
855
+ | `empty_text:` | `"No data"` | In the middle of a chart with no values. "": Nothing |
856
+ | `animated:` | `0` | 1: Small motions when the data changes. setAnimated() |
857
+ | `on_click:` | `a block` | item: { datasetIndex, index, label, value, datasetLabel, dataset } |
858
+ | `style:` | `{...}` | |
859
+
860
+ ## GridGroup
861
+
862
+ `GridGroup(...)` makes the GridGroup of the kit (comp/grid-group.js).
863
+
864
+ Objects go into it with its block: `GridGroup(...) { ... }`.
865
+
866
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `place`, `set_align`, `set_columns`, `set_gap`, `set_rows`.
867
+
868
+ | Param | Default | The kit says |
869
+ |---|---|---|
870
+ | `width:` | `"100%"` | |
871
+ | `height:` | `"auto"` | "auto": as high as its rows. |
872
+ | `columns:` | `2` | A number, a list ([120, "1fr", "auto"]) or a text (CSS) |
873
+ | `rows:` | `null` | null: as many as the objects need. A number, a list or a text, as columns. |
874
+ | `gap:` | `0` | px, or [column gap, row gap] |
875
+ | `align:` | `""` | "": the objects fill their cells. "left center", "center"...: where each one stands in its cell. |
876
+ | `clip_content:` | `0` | |
877
+ | `padding:` | | a value of its box |
878
+ | `color:` | | a value of its box |
879
+ | `round:` | | a value of its box |
880
+
881
+ ## HoldToConfirmButton
882
+
883
+ `HoldToConfirmButton(...)` makes the HoldToConfirmButton of the kit (comp/hold-to-confirm-button.js).
884
+
885
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `cancel_hold`, `start_hold`.
886
+
887
+ | Param | Default | The kit says |
888
+ |---|---|---|
889
+ | `key:` | `"0"` | |
890
+ | `width:` | `"auto"` | |
891
+ | `height:` | `50` | |
892
+ | `label_text:` | `"Hold to Delete"` | Hold to Vanish, Hold to Delete |
893
+ | `completed_text:` | `"DELETED"` | Poof! And it's gone. // DELETED // REMOVED |
894
+ | `allow_html:` | `0` | 1: labelText and completedText are HTML (only for your own texts) |
895
+ | `icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | a bin (a page can give its own picture) |
896
+ | `holding_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | the bin in red while it is held |
897
+ | `on_confirm:` | `a block` | |
898
+ | `on_reset:` | `a block` | |
899
+ | `hold_duration:` | `3000` | ms |
900
+ | `reset_delay:` | `3000` | ms: the completed text stays this long |
901
+ | `style:` | `{...}` | |
902
+
903
+ ## ImageView
904
+
905
+ `ImageView(...)` makes the ImageView of the kit (comp/image-view.js).
906
+
907
+ `style_name:` `"dark"`, `"light"`.
908
+
909
+ A dark window gives it its dark look.
910
+
911
+ Read without a question to the page: `obj.natural_height`, `obj.natural_width`, `obj.zoom_level`.
912
+
913
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `clear_image`, `set_image`, `set_show_toolbar`, `set_theme`, `set_zoom_level`, `zoom_in`, `zoom_out`, `zoom_to_actual_size`, `zoom_to_fit`.
914
+
915
+ | Param | Default | The kit says |
916
+ |---|---|---|
917
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
918
+ | `width:` | `"100%"` | |
919
+ | `height:` | `360` | |
920
+ | `image_file:` | `""` | A file, an address or a data: address. "": empty |
921
+ | `alt_text:` | `""` | What the picture shows, for a screen reader |
922
+ | `min_zoom:` | `0.1` | 1 is 100%. (A big picture can always go down to its fitted size.) |
923
+ | `max_zoom:` | `8` | |
924
+ | `zoom_step:` | `1.25` | A button or a key: multiplies the zoom |
925
+ | `enlarge_to_fit:` | `0` | 1: a picture smaller than the box also grows to fit (a vector drawing). 0: it stays at 100% |
926
+ | `wheel_zoom:` | `1` | 0: the wheel is left to the page around it (a viewer in a long page) |
927
+ | `pixelated_zoom:` | `3` | From this zoom the pixels stay sharp. 0: never |
928
+ | `show_toolbar:` | `1` | |
929
+ | `empty_text:` | `"No image"` | |
930
+ | `error_text:` | `"This image can not be opened."` | |
931
+ | `aria_label:` | `"Image viewer"` | |
932
+ | `button_texts:` | `{ zoomOut: "Zoom out", actualSize: "Actual size", zoomIn:...` | For a screen reader |
933
+ | `on_load:` | `a block` | self.naturalWidth, self.naturalHeight |
934
+ | `on_error:` | `a block` | |
935
+ | `on_zoom_change:` | `a block` | self.zoomLevel |
936
+ | `style_name:` | `"light"` | "light", "dark" or a name added to ImageView.styles |
937
+ | `style:` | `{...}` | Light style package (default) |
938
+
939
+ ## ItemList
940
+
941
+ `ItemList(...)` makes the ItemList of the kit (comp/item-list.js).
942
+
943
+ `style_name:` `"classic"`, `"dark"`, `"gallery"`, `"galleryDark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"ozden"`, `"ozdenDark"`.
944
+
945
+ A dark window gives it its dark look.
946
+
947
+ Read without a question to the page: `obj.selected`, `obj.selected_keys`.
948
+
949
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_item`, `clear_selection`, `focus_item`, `for_each`, `get_item`, `get_items`, `get_row`, `get_selected`, `get_selected_keys`, `remove_item`, `scroll_to_item`, `search`, `select`, `set_active_key`, `set_animated`, `set_enabled`, `set_items`, `set_layout`, `set_selected`, `set_selection`, `unselect`.
950
+
951
+ | Param | Default | The kit says |
952
+ |---|---|---|
953
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
954
+ | `width:` | `600` | |
955
+ | `height:` | `400` | "auto": grows with the rows (no scrolling) |
956
+ | `items:` | `[]` | Strings or { key, text, description, iconFile, searchText, enabled }. A title row: { type: "section", text: "VIEWS" } |
957
+ | `layout:` | `"vertical"` | "vertical", "horizontal", "grid" |
958
+ | `selection:` | `"single"` | "single", "multiple", "none" |
959
+ | `selected_keys:` | `[]` | The keys selected at create time |
960
+ | `scroll_to_selected:` | `1` | 1: the list scrolls to the selected item at create time and after setSelected() / select() |
961
+ | `animated:` | `0` | 1: addItem / removeItem move the rows (a new row fades in, a removed one fades out). setAnimated(0/1) |
962
+ | `show_search:` | `0` | 1: a search box over the list (comp/search-input.js SearchInput must be loaded) |
963
+ | `search_params:` | `{}` | More params of the SearchInput. Ex: { placeholder: "Ara", searchIconFile: "comp/search-input/search.svg" } |
964
+ | `empty_text:` | `"No items"` | |
965
+ | `no_result_text:` | `"No results"` | |
966
+ | `enabled:` | `1` | |
967
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js. 0: the scrollbar of the browser. |
968
+ | `aria_label:` | `"List"` | |
969
+ | `on_item_click:` | `a block` | |
970
+ | `on_change:` | `a block` | Not at create time, not by setItems(), not with silent: 1 |
971
+ | `style_name:` | `"ozden"` | "ozden", "ozdenDark", "light", "dark", "gallery", "galleryDark", "minimal", "minimalDark" or a name added to ItemList.styles |
972
+ | `style:` | `{...}` | The ozden style package (default) |
973
+
974
+ ## JsonEditor
975
+
976
+ `JsonEditor(...)` makes the JsonEditor of the kit (comp/json-editor.js).
977
+
978
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
979
+
980
+ A dark window gives it its dark look.
981
+
982
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `focus`, `get_json_text`, `get_value`, `get_view`, `has_changes`, `redo`, `set_json_text`, `set_title_text`, `set_value`, `set_view`, `undo`.
983
+
984
+ | Param | Default | The kit says |
985
+ |---|---|---|
986
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
987
+ | `left:` | `0` | |
988
+ | `top:` | `0` | |
989
+ | `width:` | `"100%"` | |
990
+ | `height:` | `400` | |
991
+ | `value:` | `[]` | A list or an object (or its JSON text). The editor reads it into its rows: the value of the page does not change. |
992
+ | `title_text:` | `""` | The name of the value at the start of the path. "": texts.list or texts.object |
993
+ | `note_text:` | `""` | A soft line under the title (Ex: what a row holds) |
994
+ | `columns:` | `[]` | [A COLUMN] (See A COLUMN above): the columns of an empty list; the kind and the choices of a column |
995
+ | `show_title_bar:` | `"auto"` | "auto": when there is a title, a note or a table opened in a cell. 1: always |
996
+ | `show_hint:` | `1` | The keys of the cells at the bottom |
997
+ | `picture_base:` | `""` | The address the relative pictures of the cells are read from. "": the page |
998
+ | `aria_label:` | `""` | "": the titleText |
999
+ | `texts:` | `{...}` | |
1000
+ | `on_change:` | `a block` | The value changed in the table: a list or an object. (Not at create time, not with setValue()) |
1001
+ | `on_pick_color:` | `a block` | function (self, cell) { }: your own color picker for a color cell (See A CELL above). null: the one of the browser |
1002
+ | `on_pick_picture:` | `a block` | function (self, cell) { }: a list of pictures for a picture cell (a click on its picture). null: the address is written |
1003
+ | `color_of:` | `null` | function (value, self) { return a color }: the color a swatch paints, when only the page can read it (Ex: a token of another document). null: the value |
1004
+ | `options_of:` | `null` | function (key, value, self) { return [choices] or null }: the choices of a text of this name (a column, a row of an object), besides columns |
1005
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to JsonEditor.styles |
1006
+ | `style:` | `{...}` | Light style package (default) |
1007
+
1008
+ ## JsonView
1009
+
1010
+ `JsonView(...)` makes the JsonView of the kit (comp/json-view.js).
1011
+
1012
+ `style_name:` `"dark"`, `"light"`.
1013
+
1014
+ A dark window gives it its dark look.
1015
+
1016
+ Read without a question to the page: `obj.selected_path`, `obj.selected_path_text`.
1017
+
1018
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `collapse_all`, `expand_all`, `get_selected_path`, `get_selected_path_text`, `get_selected_value`, `get_value`, `remove`, `select_path`, `set_json_text`, `set_theme`, `set_value`.
1019
+
1020
+ | Param | Default | The kit says |
1021
+ |---|---|---|
1022
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1023
+ | `left:` | `0` | |
1024
+ | `top:` | `0` | |
1025
+ | `width:` | `"100%"` | |
1026
+ | `height:` | `"100%"` | A number or "100%": its rows scroll inside it. "auto": it grows with its rows. |
1027
+ | `value:` | `null` | A value of JSON. null: emptyText |
1028
+ | `expand_level:` | `1` | How many levels are open at the start. 0: only the first rows, closed. |
1029
+ | `page_size:` | `100` | A list or an object with more items than this comes in pages. |
1030
+ | `empty_text:` | `"No value"` | |
1031
+ | `copy_value_text:` | `"Copy value"` | |
1032
+ | `copy_path_text:` | `"Copy path"` | |
1033
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js (when it is loaded), with a height that is not "auto". 0: the scrollbar of the browser |
1034
+ | `aria_label:` | `"JSON"` | |
1035
+ | `on_select:` | `a block` | A row was chosen (See AN ENTRY above). (Not at create time, not with selectPath()) |
1036
+ | `on_copy:` | `a block` | A value or a path is on the clipboard. |
1037
+ | `style_name:` | `"light"` | "light", "dark" or a name added to JsonView.styles |
1038
+ | `style:` | `{...}` | Light style package (default) |
1039
+
1040
+ ## LabelEditor
1041
+
1042
+ `LabelEditor(...)` makes the LabelEditor of the kit (comp/label-editor.js).
1043
+
1044
+ `style_name:` `"classic"`, `"dark"`, `"light"`.
1045
+
1046
+ A dark window gives it its dark look.
1047
+
1048
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_label`, `duplicate_label`, `get_labels`, `get_saved_styles`, `get_selected_index`, `move_label`, `remove_label`, `remove_style`, `save_style`, `select_label`, `set_labels`, `set_saved_styles`.
1049
+
1050
+ | Param | Default | The kit says |
1051
+ |---|---|---|
1052
+ | `key:` | `"0"` | |
1053
+ | `width:` | `860` | |
1054
+ | `height:` | `540` | |
1055
+ | `labels:` | `[]` | Start labels: [{ text, fontSize, ... , styleName }] |
1056
+ | `saved_styles:` | `[]` | Start styles: [{ name, props: { fontSize, textColor, ... } }] (storageKey wins when it has data) |
1057
+ | `storage_key:` | `""` | "": the saved styles are not kept. Ex: "label-editor-styles" |
1058
+ | `new_label:` | `{...}` | Properties of a new label |
1059
+ | `color_palette:` | `[...]` | The colors of the color pickers in the panel |
1060
+ | `panel_width:` | `340` | |
1061
+ | `use_scroll_bar:` | `1` | |
1062
+ | `texts:` | `{...}` | |
1063
+ | `on_change:` | `a block` | The labels changed. self.getLabels() |
1064
+ | `on_select:` | `a block` | index: -1 when nothing is selected |
1065
+ | `on_styles_change:` | `a block` | The saved styles changed. self.getSavedStyles() |
1066
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark" or a name added to LabelEditor.styles |
1067
+ | `style:` | `{...}` | Light style package (default) |
1068
+
1069
+ ## LeftMenu
1070
+
1071
+ `LeftMenu(...)` makes the LeftMenu of the kit (comp/left-menu.js).
1072
+
1073
+ `style_name:` `"dark"`, `"light"`.
1074
+
1075
+ A dark window gives it its dark look.
1076
+
1077
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_item_to_bottom`, `add_item_to_top`, `clear_selection`, `collapse`, `expand`, `get_selected_item`, `is_tap_mode`, `remove`, `remove_item`, `set_open_on_click`, `set_selected_item`, `toggle`.
1078
+
1079
+ | Param | Default | The kit says |
1080
+ |---|---|---|
1081
+ | `key:` | `"0"` | |
1082
+ | `expanded_width:` | `250` | Expanded width on hover |
1083
+ | `item_height:` | `40` | The height of a button item |
1084
+ | `top_bar_height:` | `40` | Height of top bar to account for |
1085
+ | `background_color:` | `"#141414"` | Menu background color |
1086
+ | `hover_color:` | `"rgba(255, 255, 255, 0.05)"` | Hover color for buttons |
1087
+ | `selected_color:` | `"#583432"` | Selected button color |
1088
+ | `title_color:` | `"#8E342F"` | |
1089
+ | `text_color:` | `"rgba(255, 255, 255, 0.6)"` | Text color |
1090
+ | `selected_text_color:` | `"rgba(255, 255, 255, 0.95)"` | |
1091
+ | `allow_html:` | `0` | 1: the texts of the items are HTML (only for your own texts) |
1092
+ | `invert_icon_color:` | `1` | |
1093
+ | `line_color:` | `""` | A line at the right side of the menu ("": none) |
1094
+ | `expanded_shadow:` | `""` | The shadow of the open menu over the page ("": none). Ex: "6px 0 18px rgba(0, 0, 0, 0.08)" |
1095
+ | `scroll_bar_color:` | `"#FFFFFF"` | The bar of the scroll of the items (a dark one on a light menu) |
1096
+ | `open_on_click:` | `"auto"` | "auto": Tap on a touch device, hover with a mouse. 1: Always tap, 0: Always hover. |
1097
+ | `items:` | `[]` | [{ key, type: "button", text, iconFile }, { key, type: "header", text }] |
1098
+ | `on_item_click:` | `a block` | Callback when item is clicked |
1099
+ | `on_menu_toggle:` | `a block` | Callback when menu expands/collapses |
1100
+ | `style_name:` | `"dark"` | "dark", "light" or a name added to LeftMenu.styles |
1101
+ | `style:` | `{}` | WHY: the look is in the flat params above; the packages are packages of params (LeftMenu.styles) |
1102
+
1103
+ ## LineProgressBar
1104
+
1105
+ `LineProgressBar(...)` makes the LineProgressBar of the kit (comp/line-progress-bar.js).
1106
+
1107
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_animated`, `set_primary_color`, `set_progress`, `set_secondary_color`.
1108
+
1109
+ | Param | Default | The kit says |
1110
+ |---|---|---|
1111
+ | `width:` | `300` | |
1112
+ | `height:` | `50` | |
1113
+ | `progress:` | `0` | 0 to 100 |
1114
+ | `primary_color:` | `"indianred"` | the full lines |
1115
+ | `secondary_color:` | `"lightgray"` | the empty lines |
1116
+ | `line_width:` | `1` | px |
1117
+ | `line_gap:` | `3` | px between two lines |
1118
+ | `line_round:` | `3` | px, or "full": the top and the bottom of a line are half circles |
1119
+ | `head_grow:` | `1` | 1: the line at the progress and its two neighbors are wider and longer; 0: every line the same |
1120
+ | `show_value_label:` | `false` | the value in a small label for a moment when it changes |
1121
+ | `value_bubble:` | `0` | 1: the value all the time in a bubble with an arrow over the last full line (comp/tooltip.js) |
1122
+ | `value_bubble_look:` | `{}` | the keys of Tooltip.BUBBLE_LOOK (its color: primaryColor) |
1123
+ | `animated:` | `0` | 1: the bubble of the value slides to a new value (box.setAnimated(0/1)) |
1124
+ | `background_color:` | `"transparent"` | |
1125
+
1126
+ ## LoadingScreen
1127
+
1128
+ `LoadingScreen(...)` makes the LoadingScreen of the kit (comp/loading-screen.js).
1129
+
1130
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"ozden"`, `"ozdenDark"`.
1131
+
1132
+ A dark window gives it its dark look.
1133
+
1134
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `open`, `set_message_text`, `set_progress`, `set_title_text`.
1135
+
1136
+ | Param | Default | The kit says |
1137
+ |---|---|---|
1138
+ | `left:` | `0` | |
1139
+ | `top:` | `0` | |
1140
+ | `width:` | `"100%"` | |
1141
+ | `height:` | `"100%"` | |
1142
+ | `style_name:` | `"light"` | "light", "dark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to LoadingScreen.styles |
1143
+ | `icon_file:` | `""` | An image file (Ex: the app icon) |
1144
+ | `icon_svg:` | `""` | Or an SVG text (works with no file, also offline) |
1145
+ | `title_text:` | `""` | |
1146
+ | `allow_html:` | `0` | 1: titleText and messageText are HTML, only for your own texts (Ex: "Please wait.<br>It takes a few seconds.") |
1147
+ | `message_text:` | `""` | |
1148
+ | `spinner_type:` | `"clock"` | "clock" (the default wait, the user), "ring", "dots", "none" |
1149
+ | `progress:` | `-1` | 0 - 1: a progress bar is shown. -1: no progress bar |
1150
+ | `opened:` | `1` | 0: created closed, open() shows it |
1151
+ | `min_duration:` | `600` | ms. A close() before this time waits. (No short flash on a fast load) |
1152
+ | `fade_duration:` | `0.35` | seconds |
1153
+ | `remove_on_close:` | `0` | 1: The object is removed after it is closed (a splash screen that is used once) |
1154
+ | `on_close:` | `a block` | After the fade out |
1155
+ | `style:` | `{...}` | |
1156
+
1157
+ ## LogView
1158
+
1159
+ `LogView(...)` makes the LogView of the kit (comp/log-view.js).
1160
+
1161
+ `style_name:` `"dark"`, `"light"`.
1162
+
1163
+ A dark window gives it its dark look.
1164
+
1165
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_line`, `clear_lines`, `debug`, `error`, `get_text`, `info`, `scroll_to_end`, `set_auto_scroll`, `set_levels`, `set_max_lines`, `set_show_level`, `set_show_time`, `set_theme`, `set_wrap_lines`, `success`, `warn`.
1166
+
1167
+ | Param | Default | The kit says |
1168
+ |---|---|---|
1169
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1170
+ | `width:` | `"100%"` | |
1171
+ | `height:` | `260` | |
1172
+ | `lines:` | `[]` | The first lines: "Text" or { text, level, time } |
1173
+ | `max_lines:` | `1000` | The oldest lines go. 0: no limit |
1174
+ | `auto_scroll:` | `1` | 1: follows the last line |
1175
+ | `show_time:` | `1` | |
1176
+ | `show_level:` | `1` | |
1177
+ | `wrap_lines:` | `1` | |
1178
+ | `empty_text:` | `"No output yet."` | |
1179
+ | `new_lines_text:` | `"{count} new"` | The button that goes back to the end |
1180
+ | `level_texts:` | `{ info: "INFO", success: "OK", warn: "WARN", error: "ERRO...` | |
1181
+ | `aria_label:` | `"Output"` | |
1182
+ | `style_name:` | `"light"` | "light", "dark" or a name added to LogView.styles |
1183
+ | `style:` | `{...}` | Light style package (default) |
1184
+
1185
+ ## LoginPage
1186
+
1187
+ `LoginPage(...)` makes the LoginPage of the kit (comp/login-page.js).
1188
+
1189
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `remove`, `set_active_tab`, `show_alert`.
1190
+
1191
+ | Param | Default | The kit says |
1192
+ |---|---|---|
1193
+ | `panel_width:` | `420` | |
1194
+ | `primary_color:` | `"#2C5A38"` | |
1195
+ | `"tab_backgroundColorBottom" =>` | `"#242424"` | "#242424", "whitesmoke" |
1196
+ | `"tab_backgroundColorTop" =>` | `"#242424"` | |
1197
+ | `"tab_borderColor" =>` | `White(0.1)` | White(0.1), Black(0), |
1198
+ | `"tab_border" =>` | `1` | 1, 0 |
1199
+ | `"tab_textColor" =>` | `White(0.75)` | White(0.75), "#373836", |
1200
+ | `"tab_selectedColor" =>` | `"#000000"` | "#000000", "white", |
1201
+ | `tab_width:` | `"auto"` | the LOGIN / SIGN UP bar: "auto" (as wide as its tabs) or a width the tabs share (Ex: the panelWidth) |
1202
+ | `tab_style:` | `{}` | more keys of the style of its Tabs (pillBar, tab, pillActive, pillIndicator...), over the tab_ look |
1203
+ | `input_style_name:` | `""` | "": the fields take the input_ colors below. A TextField package ("ozden", "ozdenDark"...): the fields take its look. |
1204
+ | `button_style_name:` | `""` | "": LOGIN / SIGN UP are flat buttons in primaryColor. A SmartButton template ("ozden3"...): SmartButtons |
1205
+ | `button_tone:` | `""` | The tone of those SmartButtons (Ex: "blue"; "": the gray of the template) |
1206
+ | `"input_backgroundColor" =>` | `"#141414"` | |
1207
+ | `"input_lineColor" =>` | `"transparent"` | |
1208
+ | `"input_selectedBackgroundColor" =>` | `"#202020"` | |
1209
+ | `"input_textColor" =>` | `White(0.85)` | Black(0.85), White(0.85) |
1210
+ | `"input_border" =>` | `1` | 1, 0 |
1211
+ | `"input_borderColor" =>` | `White(0.1)` | White(0.1), Black(0.1) |
1212
+ | `or_text_color:` | `White(0.75)` | White(0.75), Black(0.75) |
1213
+ | `or_line_color:` | `White(0.1)` | White(0.1), Black(0.1) |
1214
+ | `panel_name:` | `"MY PANEL v25.08.11"` | |
1215
+ | `allow_html:` | `0` | 1: panelName, the alerts and the texts of the buttons are HTML (only for your own texts) |
1216
+ | `on_login_click:` | `a block` | |
1217
+ | `on_signup_click:` | `a block` | |
1218
+ | `show_password_icon_invert:` | `1` | |
1219
+ | `show_password_icon_file:` | `""` | "": the eye of PasswordField |
1220
+ | `hide_password_icon_file:` | `""` | "": the crossed eye of PasswordField |
1221
+ | `waiting_cover_color:` | `"rgba(0, 0, 0, 0.6)"` | The cover of box.waiting (LoadingScreen) |
1222
+ | `waiting_clock:` | `"ozden"` | The clock of box.waiting: "ozden" (a white face) or "ozdenDark" (LoadingScreen.clocks) |
1223
+ | `signup_password_params:` | `{...}` | |
1224
+ | `style:` | `{...}` | |
1225
+
1226
+ ## MarkdownView
1227
+
1228
+ `MarkdownView(...)` makes the MarkdownView of the kit (comp/markdown-view.js).
1229
+
1230
+ `style_name:` `"dark"`, `"light"`.
1231
+
1232
+ A dark window gives it its dark look.
1233
+
1234
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `append_text`, `clear`, `get_headings`, `get_markdown_text`, `scroll_to_end`, `scroll_to_heading`, `scroll_to_top`, `set_auto_scroll`, `set_empty_text`, `set_markdown_text`, `set_theme`.
1235
+
1236
+ | Param | Default | The kit says |
1237
+ |---|---|---|
1238
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1239
+ | `left:` | `0` | |
1240
+ | `top:` | `0` | |
1241
+ | `width:` | `"100%"` | |
1242
+ | `height:` | `"100%"` | A number or "100%": the text scrolls inside it. "auto": it grows with its text. |
1243
+ | `markdown_text:` | `""` | The text. setMarkdownText(), appendText() |
1244
+ | `empty_text:` | `""` | Shown when there is no text |
1245
+ | `auto_scroll:` | `1` | 1: with appendText() the view follows the end, until the reader scrolls up |
1246
+ | `remote_pictures:` | `0` | 1: a picture with an http address is drawn, not a link (See the note at the top) |
1247
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js (when it is loaded), with a height that is not "auto". 0: the scrollbar of the browser |
1248
+ | `aria_label:` | `"Document"` | |
1249
+ | `copy_text:` | `"Copy"` | The button of a code |
1250
+ | `copied_text:` | `"Copied"` | |
1251
+ | `on_link_click:` | `a block` | function (self, address) {}: a link comes to you, not to the browser. null: it opens in a new tab. |
1252
+ | `style_name:` | `"light"` | "light", "dark" or a name added to MarkdownView.styles |
1253
+ | `style:` | `{...}` | Light style package (default) |
1254
+
1255
+ ## MenuBar
1256
+
1257
+ `MenuBar(...)` makes the MenuBar of the kit (comp/menu-bar.js).
1258
+
1259
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
1260
+
1261
+ A dark window gives it its dark look.
1262
+
1263
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close_menu`, `remove`, `set_enabled`, `set_item_checked`, `set_item_enabled`, `set_menus`, `set_theme`.
1264
+
1265
+ | Param | Default | The kit says |
1266
+ |---|---|---|
1267
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1268
+ | `left:` | `0` | |
1269
+ | `top:` | `0` | |
1270
+ | `width:` | `"100%"` | |
1271
+ | `height:` | `34` | |
1272
+ | `menus:` | `[]` | [{ text, key, enabled, items, onClick }] |
1273
+ | `enabled:` | `1` | |
1274
+ | `aria_label:` | `"Menu bar"` | |
1275
+ | `on_click:` | `a block` | An item (with a click, the keyboard or its shortcut) |
1276
+ | `on_menu_open:` | `a block` | |
1277
+ | `on_menu_close:` | `a block` | |
1278
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to MenuBar.styles |
1279
+ | `style:` | `{...}` | Light style package (default) |
1280
+
1281
+ ## MiniGraphBox
1282
+
1283
+ `MiniGraphBox(...)` makes the MiniGraphBox of the kit (comp/mini-graph-box.js).
1284
+
1285
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_value`, `clear`, `get_last_value`, `get_values`, `set_bar_color`, `set_icon`, `set_max_value`, `set_title_text`, `set_value_text`, `set_values`.
1286
+
1287
+ | Param | Default | The kit says |
1288
+ |---|---|---|
1289
+ | `key:` | `"0"` | |
1290
+ | `width:` | `200` | |
1291
+ | `height:` | `80` | |
1292
+ | `title_text:` | `"Sold Items"` | |
1293
+ | `value_text:` | `"1.3K"` | |
1294
+ | `allow_html:` | `0` | 1: titleText and valueText are HTML (only for your own texts) |
1295
+ | `icon_file:` | `""` | "": No icon |
1296
+ | `bar_color:` | `"tomato"` | |
1297
+ | `values:` | `[]` | [10, 20, { value: 15, color: "orange" }] |
1298
+ | `max_value:` | `0` | 0: Auto (the biggest visible value is the top of the graph) |
1299
+ | `animated:` | `1` | 1: Bar heights change with a short motion. |
1300
+ | `show_tooltip:` | `1` | 1: the value of the bar under the mouse, in a small box (at once) |
1301
+ | `value_format:` | `a block` | The text of the tooltip |
1302
+ | `on_click:` | `a block` | |
1303
+ | `style:` | `{...}` | |
1304
+
1305
+ ## Notice
1306
+
1307
+ `Notice(...)` makes the Notice of the kit (comp/notice.js).
1308
+
1309
+ `style_name:` `"classic"`.
1310
+
1311
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `remove`.
1312
+
1313
+ | Param | Default | The kit says |
1314
+ |---|---|---|
1315
+ | `left:` | `0` | |
1316
+ | `top:` | `0` | |
1317
+ | `width:` | `"100%"` | |
1318
+ | `height:` | `"100%"` | |
1319
+ | `message_text:` | `"No message"` | |
1320
+ | `description_text:` | `""` | "": no second line |
1321
+ | `type:` | `"info"` | "info", "warning", "error", "note", "success" |
1322
+ | `icon_file:` | `""` | "": no icon |
1323
+ | `allow_html:` | `0` | 1: the texts are HTML (only for your own texts) |
1324
+ | `display_time:` | `2000` | ms; 0: it stays until a click or Escape |
1325
+ | `close_on_click:` | `1` | |
1326
+ | `on_close:` | `a block` | |
1327
+ | `style_name:` | `"classic"` | "classic" or a name added to Notice.styles |
1328
+ | `style:` | `{...}` | Classic style package |
1329
+
1330
+ ## NumberField
1331
+
1332
+ `NumberField(...)` makes the NumberField of the kit (comp/number-field.js).
1333
+
1334
+ A dark window gives it its dark look.
1335
+
1336
+ Read without a question to the page: `obj.text`.
1337
+
1338
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `focus_func`, `get_value`, `input_func`, `is_valid`, `set_background_color`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
1339
+
1340
+ | Param | Default | The kit says |
1341
+ |---|---|---|
1342
+ | `required:` | `0 (the kit alone: 0)` | |
1343
+ | `type:` | `"number"` | |
1344
+ | `title_text:` | `"" (the kit alone: "NUMERIC")` | |
1345
+ | `max_length:` | `35` | |
1346
+ | `placeholder:` | `"" (the kit alone: "(auto)")` | |
1347
+ | `allow_negative:` | `0` | |
1348
+ | `allow_decimal:` | `1` | |
1349
+ | `decimal_separator:` | `"."` | "," |
1350
+ | `max_decimal_digits:` | `2` | |
1351
+ | `key:` | `"0"` | |
1352
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
1353
+ | `width:` | `350` | |
1354
+ | `height:` | `"auto"` | |
1355
+ | `left_padding:` | `20` | |
1356
+ | `right_padding:` | `60` | |
1357
+ | `title_font_size:` | `16` | |
1358
+ | `input_font_size:` | `20` | |
1359
+ | `input_height:` | `40` | px: the row of the text |
1360
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
1361
+ | `description_font_size:` | `14` | |
1362
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
1363
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
1364
+ | `value:` | `""` | |
1365
+ | `show_description:` | `0` | |
1366
+ | `description_text:` | `""` | |
1367
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
1368
+ | `background_color:` | `"#F6F6F6"` | |
1369
+ | `focus_background_color:` | `"#F3F4E0"` | |
1370
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
1371
+ | `line_color:` | `"#373836"` | |
1372
+ | `focus_line_color:` | `"#65A293"` | |
1373
+ | `back_border_color:` | `Black(0)` | |
1374
+ | `focus_back_border_color:` | `Black(0)` | |
1375
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
1376
+ | `back_border_top_round:` | `2` | |
1377
+ | `back_border_bottom_round:` | `0` | |
1378
+ | `title_text_color:` | `"#555555"` | |
1379
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
1380
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
1381
+ | `input_text_color:` | `"#373836"` | |
1382
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
1383
+ | `placeholder_color:` | `""` | "": the color of the browser |
1384
+ | `description_text_color:` | `"#999999"` | |
1385
+ | `warning_ball_border_color:` | `"#373836"` | |
1386
+ | `required_text:` | `"Required"` | |
1387
+ | `required_color:` | `"white"` | |
1388
+ | `warning_text:` | `"Invalid value format"` | |
1389
+ | `warning_color:` | `"#E5885E"` | |
1390
+ | `animated_warning_ball:` | `1` | |
1391
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
1392
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
1393
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
1394
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
1395
+ | `warning_icon_size:` | `20` | |
1396
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
1397
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
1398
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
1399
+ | `tooltip_style:` | `{...}` | |
1400
+ | `select_style:` | `{...}` | |
1401
+ | `show_left_box:` | `0` | |
1402
+ | `show_right_box:` | `0` | |
1403
+ | `show_unit:` | `0` | |
1404
+ | `create_input:` | `1` | |
1405
+ | `unit_text:` | `""` | |
1406
+ | `unit_style:` | `{...}` | |
1407
+ | `on_focus:` | `a block` | |
1408
+ | `on_blur:` | `a block` | |
1409
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
1410
+ | `on_enter:` | | the Enter key: a block or a lambda that gets the field |
1411
+
1412
+ ## NumericKeyboard
1413
+
1414
+ `NumericKeyboard(...)` makes the NumericKeyboard of the kit (comp/numeric-keyboard.js).
1415
+
1416
+ `style_name:` `"classic"`, `"dark"`, `"light"`.
1417
+
1418
+ A dark window gives it its dark look.
1419
+
1420
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `clear`, `get_value`, `set_title_text`, `set_value`.
1421
+
1422
+ | Param | Default | The kit says |
1423
+ |---|---|---|
1424
+ | `width:` | `"auto"` | As wide as the keys |
1425
+ | `height:` | `"auto"` | |
1426
+ | `key_layout:` | `"wide"` | "wide": two rows; "phone": a 3 x 4 grid with an enter key |
1427
+ | `title_text:` | `"PIN"` | "": no title |
1428
+ | `value:` | `""` | |
1429
+ | `max_length:` | `4` | |
1430
+ | `mask:` | `0` | 1: a • for each digit (a PIN) |
1431
+ | `show_value:` | `1` | 0: only the keys (the value is shown somewhere else) |
1432
+ | `on_change:` | `a block` | |
1433
+ | `on_enter:` | `a block` | |
1434
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark" or a name added to NumericKeyboard.styles |
1435
+ | `style:` | `{...}` | Classic style package |
1436
+
1437
+ ## PageControl
1438
+
1439
+ `PageControl(...)` makes the PageControl of the kit (comp/page-control.js).
1440
+
1441
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_page`, `clear`, `end_page`, `focus`, `get_count`, `get_index`, `get_keys`, `get_page`, `is_first`, `is_last`, `next`, `open`, `open_index`, `previous`, `remove_page`, `set_auto_play`, `set_enabled`, `set_loop`, `start_page`.
1442
+
1443
+ | Param | Default | The kit says |
1444
+ |---|---|---|
1445
+ | `key:` | `"0"` | |
1446
+ | `width:` | `600` | |
1447
+ | `height:` | `400` | |
1448
+ | `pages:` | `[]` | Keys of the pages to create at start. Ex: ["welcome", "details"] |
1449
+ | `value:` | `null` | Key of the open page. null: the first page |
1450
+ | `transition:` | `"slide"` | "slide", "slide-vertical", "fade", "none" (Only at create time) |
1451
+ | `motion:` | `0.3` | Seconds. 0: No animation |
1452
+ | `easing:` | `"cubic-bezier(0.2, 0, 0, 1)"` | |
1453
+ | `loop:` | `0` | 1: next() after the last page opens the first page. |
1454
+ | `swipe:` | `1` | 1: Drag with a finger or the mouse to change the page. (slide transitions) |
1455
+ | `swipe_threshold:` | `0.2` | Part of the box size (0.2: 20%) to change the page. A fast flick also changes it. |
1456
+ | `keyboard:` | `1` | 1: Arrow keys (when the box has the focus), Home / End |
1457
+ | `dots:` | `0` | 1: Page dots at the bottom |
1458
+ | `arrows:` | `0` | 1: Previous / next buttons at the sides |
1459
+ | `auto_play:` | `0` | Seconds. 0: Off. Ex: 4 -> next page every 4 seconds (loop is used) |
1460
+ | `page_scroll:` | `0` | 1: Every page scrolls its own content (scrollY) |
1461
+ | `enabled:` | `1` | |
1462
+ | `aria_label:` | `"Pages"` | |
1463
+ | `on_before_change:` | `a block` | Return false to stop the change. |
1464
+ | `on_change:` | `a block` | self.value, self.previousValue |
1465
+ | `on_close:` | `a block` | The old page is out of the view (after the motion) |
1466
+ | `style:` | `{...}` | |
1467
+
1468
+ ## PageHeader
1469
+
1470
+ `PageHeader(...)` makes the PageHeader of the kit (comp/page-header.js).
1471
+
1472
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_back_text`, `set_back_visible`, `set_title_text`.
1473
+
1474
+ | Param | Default | The kit says |
1475
+ |---|---|---|
1476
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1477
+ | `left:` | `0` | The header stands at the top of its container (a page) |
1478
+ | `top:` | `0` | |
1479
+ | `width:` | `"100%"` | |
1480
+ | `height:` | `105` | |
1481
+ | `color:` | `"white"` | The background of the header |
1482
+ | `title_text:` | `""` | |
1483
+ | `back_text:` | `"Back"` | The text of the back link (Ex: the name of the page it goes back to) |
1484
+ | `show_back:` | `1` | 1: the back link over the title (setBackVisible) |
1485
+ | `back_color:` | `"#689BD2"` | The drawn chevron and the text of the back link |
1486
+ | `back_icon_file:` | `""` | "": a chevron drawn in SVG in backColor |
1487
+ | `on_back:` | `a block` | The back link is clicked (or pressed with Enter / Space) |
1488
+ | `style:` | `{...}` | |
1489
+
1490
+ ## PasswordField
1491
+
1492
+ `PasswordField(...)` makes the PasswordField of the kit (comp/password-field.js).
1493
+
1494
+ A dark window gives it its dark look.
1495
+
1496
+ Read without a question to the page: `obj.text`.
1497
+
1498
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `focus_func`, `get_value`, `input_func`, `is_valid`, `set_background_color`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_show_password`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
1499
+
1500
+ | Param | Default | The kit says |
1501
+ |---|---|---|
1502
+ | `required:` | `0 (the kit alone: 1)` | |
1503
+ | `required_text:` | `"Password must be entered"` | |
1504
+ | `type:` | `"password"` | |
1505
+ | `title_text:` | `"" (the kit alone: "PASSWORD")` | |
1506
+ | `placeholder:` | `"Enter your password"` | |
1507
+ | `warning_text:` | `""` | |
1508
+ | `warning_color:` | `"#E5885E"` | |
1509
+ | `max_length:` | `1000 (the kit alone: 25)` | |
1510
+ | `show_password:` | `0` | |
1511
+ | `show_show_password_button:` | `1` | enable show/hide icon by default |
1512
+ | `show_password_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | an eye (a page can give its own picture) |
1513
+ | `hide_password_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | a crossed eye |
1514
+ | `eye_icon_size:` | `""` | px: the size of the eye (both icons). "": by the height of the field (32; a small field less) |
1515
+ | `show_password_hint_text:` | `"Show Password"` | |
1516
+ | `hide_password_hint_text:` | `"Hide Password"` | |
1517
+ | `min_length:` | `6` | |
1518
+ | `min_length_warning_text:` | `"Password must be at least 6 characters"` | |
1519
+ | `must_use_number:` | `1` | |
1520
+ | `must_use_number_warning_text:` | `"Password must contain at least one number"` | |
1521
+ | `must_use_letter:` | `1` | |
1522
+ | `must_use_letter_warning_text:` | `"Password must contain at least one letter"` | |
1523
+ | `must_use_uppercase:` | `0` | |
1524
+ | `must_use_uppercase_warning_text:` | `"Password must contain at least one uppercase letter"` | |
1525
+ | `must_use_lowercase:` | `0` | |
1526
+ | `must_use_lowercase_warning_text:` | `"Password must contain at least one lowercase letter"` | |
1527
+ | `must_use_special_char:` | `0` | |
1528
+ | `must_use_special_char_warning_text:` | `"Password must contain at least one special character"` | |
1529
+ | `invert_icon_color:` | `0` | |
1530
+ | `key:` | `"0"` | |
1531
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
1532
+ | `width:` | `350` | |
1533
+ | `height:` | `"auto"` | |
1534
+ | `left_padding:` | `20` | |
1535
+ | `right_padding:` | `60` | |
1536
+ | `title_font_size:` | `16` | |
1537
+ | `input_font_size:` | `20` | |
1538
+ | `input_height:` | `40` | px: the row of the text |
1539
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
1540
+ | `description_font_size:` | `14` | |
1541
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
1542
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
1543
+ | `value:` | `""` | |
1544
+ | `show_description:` | `0` | |
1545
+ | `description_text:` | `""` | |
1546
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
1547
+ | `background_color:` | `"#F6F6F6"` | |
1548
+ | `focus_background_color:` | `"#F3F4E0"` | |
1549
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
1550
+ | `line_color:` | `"#373836"` | |
1551
+ | `focus_line_color:` | `"#65A293"` | |
1552
+ | `back_border_color:` | `Black(0)` | |
1553
+ | `focus_back_border_color:` | `Black(0)` | |
1554
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
1555
+ | `back_border_top_round:` | `2` | |
1556
+ | `back_border_bottom_round:` | `0` | |
1557
+ | `title_text_color:` | `"#555555"` | |
1558
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
1559
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
1560
+ | `input_text_color:` | `"#373836"` | |
1561
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
1562
+ | `placeholder_color:` | `""` | "": the color of the browser |
1563
+ | `description_text_color:` | `"#999999"` | |
1564
+ | `warning_ball_border_color:` | `"#373836"` | |
1565
+ | `required_color:` | `"white"` | |
1566
+ | `animated_warning_ball:` | `1` | |
1567
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
1568
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
1569
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
1570
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
1571
+ | `warning_icon_size:` | `20` | |
1572
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
1573
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
1574
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
1575
+ | `tooltip_style:` | `{...}` | |
1576
+ | `select_style:` | `{...}` | |
1577
+ | `show_left_box:` | `0` | |
1578
+ | `show_right_box:` | `0` | |
1579
+ | `show_unit:` | `0` | |
1580
+ | `create_input:` | `1` | |
1581
+ | `unit_text:` | `""` | |
1582
+ | `unit_style:` | `{...}` | |
1583
+ | `on_focus:` | `a block` | |
1584
+ | `on_blur:` | `a block` | |
1585
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
1586
+ | `on_enter:` | | the Enter key: a block or a lambda that gets the field |
1587
+
1588
+ ## PeriodBar
1589
+
1590
+ `PeriodBar(...)` makes the PeriodBar of the kit (comp/period-bar.js).
1591
+
1592
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `focus`, `get_selected_date`, `select_next`, `select_previous`, `set_value`, `set_visible`.
1593
+
1594
+ | Param | Default | The kit says |
1595
+ |---|---|---|
1596
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1597
+ | `width:` | `600` | |
1598
+ | `height:` | `160` | |
1599
+ | `month_count:` | `12` | This month and the months before it. (Only at create time) |
1600
+ | `language:` | `"en"` | "en", "tr" or a key added to PeriodBar.TEXTS (Only at create time) |
1601
+ | `value:` | `null` | The index of the selected month: 0 the oldest, monthCount - 1 this month. null: this month |
1602
+ | `aria_label:` | `""` | "": the name of the bar in the language ("Month") |
1603
+ | `on_change:` | `a block` | self.value, self.previousValue, self.getSelectedDate() |
1604
+ | `style:` | `{...}` | |
1605
+
1606
+ ## PhoneField
1607
+
1608
+ `PhoneField(...)` makes the PhoneField of the kit (comp/phone-field.js).
1609
+
1610
+ A dark window gives it its dark look.
1611
+
1612
+ Read without a question to the page: `obj.text`.
1613
+
1614
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `fill_auto_placeholder`, `focus_func`, `get_value`, `input_func`, `is_valid`, `set_background_color`, `set_country_code`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_phone_mask`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
1615
+
1616
+ | Param | Default | The kit says |
1617
+ |---|---|---|
1618
+ | `required:` | `0 (the kit alone: 1)` | |
1619
+ | `title_text:` | `"" (the kit alone: "PHONE NUMBER")` | |
1620
+ | `placeholder:` | `"(auto)"` | |
1621
+ | `warning_text:` | `"Invalid phone number format"` | |
1622
+ | `warning_color:` | `"#E5885E"` | |
1623
+ | `country_code:` | `"+90"` | |
1624
+ | `phone_mask:` | `" (___) ___-____"` | |
1625
+ | `unit_text:` | `"TR"` | |
1626
+ | `key:` | `"0"` | |
1627
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
1628
+ | `type:` | `"text"` | |
1629
+ | `width:` | `350` | |
1630
+ | `height:` | `"auto"` | |
1631
+ | `left_padding:` | `20` | |
1632
+ | `right_padding:` | `60` | |
1633
+ | `title_font_size:` | `16` | |
1634
+ | `input_font_size:` | `20` | |
1635
+ | `input_height:` | `40` | px: the row of the text |
1636
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
1637
+ | `description_font_size:` | `14` | |
1638
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
1639
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
1640
+ | `value:` | `""` | |
1641
+ | `max_length:` | `30` | |
1642
+ | `show_description:` | `0` | |
1643
+ | `description_text:` | `""` | |
1644
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
1645
+ | `background_color:` | `"#F6F6F6"` | |
1646
+ | `focus_background_color:` | `"#F3F4E0"` | |
1647
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
1648
+ | `line_color:` | `"#373836"` | |
1649
+ | `focus_line_color:` | `"#65A293"` | |
1650
+ | `back_border_color:` | `Black(0)` | |
1651
+ | `focus_back_border_color:` | `Black(0)` | |
1652
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
1653
+ | `back_border_top_round:` | `2` | |
1654
+ | `back_border_bottom_round:` | `0` | |
1655
+ | `title_text_color:` | `"#555555"` | |
1656
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
1657
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
1658
+ | `input_text_color:` | `"#373836"` | |
1659
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
1660
+ | `placeholder_color:` | `""` | "": the color of the browser |
1661
+ | `description_text_color:` | `"#999999"` | |
1662
+ | `warning_ball_border_color:` | `"#373836"` | |
1663
+ | `required_text:` | `"Required"` | |
1664
+ | `required_color:` | `"white"` | |
1665
+ | `animated_warning_ball:` | `1` | |
1666
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
1667
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
1668
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
1669
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
1670
+ | `warning_icon_size:` | `20` | |
1671
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
1672
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
1673
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
1674
+ | `tooltip_style:` | `{...}` | |
1675
+ | `select_style:` | `{...}` | |
1676
+ | `show_left_box:` | `0` | |
1677
+ | `show_right_box:` | `0` | |
1678
+ | `show_unit:` | `0` | |
1679
+ | `create_input:` | `1` | |
1680
+ | `unit_style:` | `{...}` | |
1681
+ | `on_focus:` | `a block` | |
1682
+ | `on_blur:` | `a block` | |
1683
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
1684
+ | `on_enter:` | | the Enter key: a block or a lambda that gets the field |
1685
+
1686
+ ## ProgressBar
1687
+
1688
+ `ProgressBar(...)` makes the ProgressBar of the kit (comp/progress-bar.js).
1689
+
1690
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`, `"ozden"`, `"ozdenDark"`.
1691
+
1692
+ A dark window gives it its dark look.
1693
+
1694
+ Read without a question to the page: `obj.value`.
1695
+
1696
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_value`, `get_percent`, `reset`, `set_dark_track`, `set_indeterminate`, `set_limits`, `set_max_value`, `set_second_stripes`, `set_second_value`, `set_status`, `set_stripes`, `set_title_text`, `set_value`, `set_values`.
1697
+
1698
+ | Param | Default | The kit says |
1699
+ |---|---|---|
1700
+ | `key:` | `"0"` | |
1701
+ | `width:` | `320` | |
1702
+ | `height:` | `"auto"` | |
1703
+ | `value:` | `0` | 0 - maxValue |
1704
+ | `second_value:` | `0` | A second part after the value (value + secondValue <= maxValue). 0: none |
1705
+ | `max_value:` | `100` | |
1706
+ | `stripes:` | `0` | 1: moving stripes on the value part |
1707
+ | `second_stripes:` | `0` | 1: moving stripes on the second part |
1708
+ | `limits:` | `[]` | Lines at these values: [80] or [{ value: 80, color: "indianred" }] |
1709
+ | `dark_track:` | `0` | 1: the track in the colors of style.darkTrack (the bars keep theirs) |
1710
+ | `indeterminate:` | `0` | 1: Progress is not known, show a moving bar. |
1711
+ | `status:` | `"normal"` | "normal", "success", "error" |
1712
+ | `title_text:` | `""` | |
1713
+ | `allow_html:` | `0` | 1: titleText and the text of valueFormat are HTML (only for your own texts) |
1714
+ | `value_position:` | `"top"` | "top", "right", "none" (Only at create time) |
1715
+ | `value_format:` | `a block` | Returns the value text. |
1716
+ | `on_change:` | `a block` | self.value |
1717
+ | `on_complete:` | `a block` | Called once when the value reaches maxValue. |
1718
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "modern", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to ProgressBar.styles |
1719
+ | `style:` | `{...}` | The base of every package (a thin dark bar on a light gray track): a package changes only some keys |
1720
+
1721
+ ## PropertyPanel
1722
+
1723
+ `PropertyPanel(...)` makes the PropertyPanel of the kit (comp/property-panel.js).
1724
+
1725
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `close_color_picker`, `get_data`, `get_item`, `get_value`, `get_values`, `is_color_picker_open`, `is_popup_element`, `listen`, `open`, `open_color_picker_for`, `remove`, `set_active_tab`, `set_data`, `set_enabled`, `set_item_visible`, `set_title`, `set_value`, `set_values`, `toggle`.
1726
+
1727
+ | Param | Default | The kit says |
1728
+ |---|---|---|
1729
+ | `key:` | `"0"` | |
1730
+ | `width:` | `240` | |
1731
+ | `data:` | `{}` | tabs, activeTab, headerTitle, headerItem, title, titleActions, sections, footer, empty (See the USAGE above) |
1732
+ | `opened:` | `1` | 1: Open at create time. |
1733
+ | `on_change:` | `a block` | Every change: { kind, key, value, oldValue, item, sectionKey } |
1734
+ | `palettes:` | `null` | The color groups of the color picker: [{ key, name, colors, canAdd, emptyText }] or function (panel) -> that |
1735
+ | `recent_colors_key:` | `""` | The recent colors of the color picker are kept in basic.storage with this key. "": only until the page closes. |
1736
+ | `pick_color:` | `null` | function (panel, done): the eyedropper where the browser has none (VS Code, Safari, Firefox): the page |
1737
+ | `style:` | `{...}` | |
1738
+
1739
+ ## RadioButton
1740
+
1741
+ `RadioButton(...)` makes the RadioButton of the kit (comp/radio-button.js).
1742
+
1743
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`.
1744
+
1745
+ A dark window gives it its dark look.
1746
+
1747
+ Read without a question to the page: `obj.checked`.
1748
+
1749
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `remove`, `select`, `set_checked`, `set_enabled`, `set_label_text`.
1750
+
1751
+ | Param | Default | The kit says |
1752
+ |---|---|---|
1753
+ | `key:` | `"0"` | |
1754
+ | `width:` | `"auto"` | |
1755
+ | `height:` | `"auto"` | |
1756
+ | `group:` | `"default"` | Radio buttons with the same group name work together. |
1757
+ | `value:` | `""` | Returned by RadioButton.getValue(group) |
1758
+ | `checked:` | `0` | 0, 1 |
1759
+ | `enabled:` | `1` | 0, 1 |
1760
+ | `label_text:` | `""` | |
1761
+ | `allow_html:` | `0` | 1: labelText is HTML (only for your own texts) |
1762
+ | `label_position:` | `"right"` | "right", "left" |
1763
+ | `on_change:` | `a block` | Called when this radio button is selected. |
1764
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark", "minimal", "minimalDark" or a name added to RadioButton.styles |
1765
+ | `style:` | `{...}` | Light style package (default) |
1766
+
1767
+ ## RangeSlider
1768
+
1769
+ `RangeSlider(...)` makes the RangeSlider of the kit (comp/range-slider.js).
1770
+
1771
+ `style_name:` `"minimal"`, `"minimalDark"`, `"round"`, `"roundDark"`.
1772
+
1773
+ A dark window gives it its dark look.
1774
+
1775
+ Read without a question to the page: `obj.high`, `obj.low`.
1776
+
1777
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_values`, `set_enabled`, `set_max_value`, `set_min_gap`, `set_min_value`, `set_step`, `set_theme`, `set_values`.
1778
+
1779
+ | Param | Default | The kit says |
1780
+ |---|---|---|
1781
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1782
+ | `left:` | `0` | |
1783
+ | `top:` | `0` | |
1784
+ | `width:` | `250` | |
1785
+ | `height:` | `44` | WHY: The place a finger can take; the bar stands in its middle. |
1786
+ | `min_value:` | `0` | The value at the left end |
1787
+ | `max_value:` | `100` | The value at the right end |
1788
+ | `step:` | `1` | The values are min + n * step (Ex: 0.5) |
1789
+ | `low_value:` | `null` | The left knob. null: minValue |
1790
+ | `high_value:` | `null` | The right knob. null: maxValue |
1791
+ | `min_gap:` | `0` | The smallest distance between the two values |
1792
+ | `show_value_on_move:` | `1` | 1: the bubble of the value over a knob that moves |
1793
+ | `format_value:` | `null` | a format text, made by the page at once: "{:,.2f} TL", "{:.0f} kg", "{:.1%}" (not a block) |
1794
+ | `enabled:` | `1` | |
1795
+ | `low_aria_label:` | `"Minimum"` | The names a screen reader says |
1796
+ | `high_aria_label:` | `"Maximum"` | |
1797
+ | `on_change:` | `a block` | It moves: self.lowValue, self.highValue |
1798
+ | `on_change_end:` | `a block` | It was let go |
1799
+ | `style_name:` | `"round"` | "round", "roundDark", "minimal", "minimalDark" or a name added to RangeSlider.styles |
1800
+ | `style:` | `{...}` | The round style package (default) |
1801
+
1802
+ ## RichTextEditor
1803
+
1804
+ `RichTextEditor(...)` makes the RichTextEditor of the kit (comp/rich-text-editor.js).
1805
+
1806
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"modern"`.
1807
+
1808
+ A dark window gives it its dark look.
1809
+
1810
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `clear`, `focus`, `focus_end`, `get_html_text`, `get_length`, `get_text`, `insert_html`, `insert_text`, `is_empty`, `run_tool`, `set_enabled`, `set_html_text`, `set_max_length`, `set_placeholder`, `set_read_only`.
1811
+
1812
+ | Param | Default | The kit says |
1813
+ |---|---|---|
1814
+ | `key:` | `"0"` | |
1815
+ | `width:` | `560` | |
1816
+ | `height:` | `300` | |
1817
+ | `html_text:` | `""` | Start content (HTML, it is cleaned) |
1818
+ | `placeholder:` | `"Write something..."` | |
1819
+ | `tools:` | `["bold", "italic", "underline", "strike", "\|", "h2", "h3"...` | |
1820
+ | `paste_as:` | `"clean"` | "clean": keeps the allowed formats, "text": plain text |
1821
+ | `max_length:` | `0` | Characters of the text. 0: no limit |
1822
+ | `show_counter:` | `0` | 1: "120 / 500" (or "120 characters") at the bottom right |
1823
+ | `read_only:` | `0` | |
1824
+ | `enabled:` | `1` | |
1825
+ | `spell_check:` | `1` | |
1826
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js for the writing area. 0: the scrollbar of the browser. |
1827
+ | `aria_label:` | `"Text editor"` | |
1828
+ | `texts:` | `{...}` | |
1829
+ | `on_change:` | `a block` | self.getHtmlText(), self.getText() |
1830
+ | `on_focus:` | `a block` | |
1831
+ | `on_blur:` | `a block` | |
1832
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark" or a name added to RichTextEditor.styles |
1833
+ | `style:` | `{...}` | Light style package (default) |
1834
+
1835
+ ## ScrollArea
1836
+
1837
+ `ScrollArea(...)` makes the ScrollArea of the kit (comp/scroll-area.js).
1838
+
1839
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
1840
+
1841
+ A dark window gives it its dark look.
1842
+
1843
+ Objects go into it with its block: `ScrollArea(...) { ... }`.
1844
+
1845
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_scroll_top`, `scroll_to_end`, `scroll_to_object`, `scroll_to_top`, `set_align`, `set_gap`, `set_padding`, `set_scroll_top`, `set_scroll_x`, `set_scroll_y`.
1846
+
1847
+ | Param | Default | The kit says |
1848
+ |---|---|---|
1849
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
1850
+ | `left:` | `0` | The place on a box (the page). In a group, the group places it. |
1851
+ | `top:` | `0` | |
1852
+ | `width:` | `"100%"` | "100%" in an HGroup: the width the other objects leave. |
1853
+ | `height:` | `"100%"` | "100%" in a VGroup: the height the other objects leave. |
1854
+ | `align:` | `"left top"` | The content, as in a VGroup: "center top", "center center" (in the middle while it fits)... |
1855
+ | `gap:` | `0` | px between the objects of the content |
1856
+ | `padding:` | `0` | Around the content, it scrolls with it: 40, [x, y] or [left, top, right, bottom] |
1857
+ | `scroll_y:` | `1` | 1: it scrolls down. |
1858
+ | `scroll_x:` | `0` | 1: it scrolls to the side too. |
1859
+ | `use_scroll_bar:` | `1` | 1: the ScrollBar of the kit, when basic/scroll-bar.js is loaded. (Only at create time) |
1860
+ | `on_scroll:` | `a block` | The content moved. (self.getScrollTop()) |
1861
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to ScrollArea.styles |
1862
+ | `style:` | `{...}` | Light style package (default) |
1863
+
1864
+ ## ScrollingText
1865
+
1866
+ `ScrollingText(...)` makes the ScrollingText of the kit (comp/scrolling-text.js).
1867
+
1868
+ `style_name:` `"classic"`.
1869
+
1870
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `remove`, `set_label_text`.
1871
+
1872
+ | Param | Default | The kit says |
1873
+ |---|---|---|
1874
+ | `width:` | `200` | |
1875
+ | `height:` | `"auto"` | As high as the text (with the padding) |
1876
+ | `label_text:` | `""` | |
1877
+ | `allow_html:` | `0` | 1: the text is HTML (only for your own texts) |
1878
+ | `mode:` | `"always"` | "always": it slides again and again; "hover": only while the mouse is over it |
1879
+ | `speed:` | `40` | px in a second |
1880
+ | `wait_time:` | `1.2` | s: at the start and at the end (the longest wait: a short slide waits less) |
1881
+ | `min_wait_time:` | `0.5` | s: the wait of a very short slide (a few hidden letters are read quickly, but not in a blink) |
1882
+ | `full_wait_distance:` | `120` | px: a slide this long (or longer) waits the whole waitTime; a shorter one waits less |
1883
+ | `style_name:` | `"classic"` | "classic" or a name added to ScrollingText.styles |
1884
+ | `style:` | `{...}` | |
1885
+
1886
+ ## SearchInput
1887
+
1888
+ `SearchInput(...)` makes the SearchInput of the kit (comp/search-input.js).
1889
+
1890
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"original"`, `"ozden"`, `"ozdenDark"`.
1891
+
1892
+ A dark window gives it its dark look.
1893
+
1894
+ Read without a question to the page: `obj.text`.
1895
+
1896
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `focus`, `get_search_text`, `get_value`, `public_func`, `set_animated`, `set_clear_icon_right`, `set_placeholder`, `set_value`.
1897
+
1898
+ | Param | Default | The kit says |
1899
+ |---|---|---|
1900
+ | `left:` | `0` | |
1901
+ | `top:` | `0` | |
1902
+ | `width:` | `300` | |
1903
+ | `height:` | `50` | |
1904
+ | `search_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | |
1905
+ | `clear_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | |
1906
+ | `search_icon_size:` | `24` | |
1907
+ | `search_icon_left:` | `16` | px: the search icon from the left side of the box |
1908
+ | `search_icon_gap:` | `8` | px: between the search icon and the text |
1909
+ | `clear_icon_right:` | `16` | px: the clear icon from the right side of the box (more: the right end is for an object of the page) |
1910
+ | `text_end_space:` | `null` | px between the end of the text and the clear icon. null: 20 - searchIconSize (where it always was) |
1911
+ | `show_clear_icon:` | `1` | |
1912
+ | `clear_icon_min_text_width:` | `0` | px: the clear icon is not shown when the text beside it would be narrower (0: always shown) |
1913
+ | `text_fade_width:` | `24` | px: a text longer than the box fades out over this width where it is cut (0: cut sharply) |
1914
+ | `clear_on_escape:` | `0` | 1: Escape clears the text (as the clear icon); in an empty field it goes on to the page |
1915
+ | `value:` | `""` | The text in the box: typing changes it. setValue(), getValue() |
1916
+ | `placeholder:` | `"Search"` | |
1917
+ | `color:` | `"whitesmoke"` | |
1918
+ | `text_color:` | `"rgba(0, 0, 0, 0.8)"` | |
1919
+ | `placeholder_color:` | `""` | "": the color of the browser. On a dark ground give a color like White(0.35). |
1920
+ | `search_icon_opacity:` | `1` | |
1921
+ | `clear_icon_opacity:` | `0.6` | The clear icon while it is shown |
1922
+ | `border:` | `0` | |
1923
+ | `border_color:` | `"rgba(0, 0, 0, 0.1)"` | |
1924
+ | `border_bottom_style:` | `"2px solid rgba(0, 0, 0, 0.06)"` | |
1925
+ | `focus_border_color:` | `""` | the edge while typing: 2 px of this color ("": it does not change) |
1926
+ | `focus_border_width:` | `2` | px of the edge while typing: 2 the edge and a 1 px line inside it, 1 only the edge |
1927
+ | `round:` | `6` | |
1928
+ | `font_size:` | `20` | |
1929
+ | `text_offset_y:` | `0` | px: the text up (-) or down (+) from the middle of the box (the ozden packages: -2) |
1930
+ | `clear_icon_offset_y:` | `0` | px: the clear icon up (-) or down (+) from the middle of the box (the ozden packages: -1) |
1931
+ | `search_icon_offset_y:` | `0` | px: the search icon up (-) or down (+) from the middle of the box (light and dark: 1) |
1932
+ | `invert_icon_color:` | `0` | 1: both icons are inverted (white icons for a dark field) |
1933
+ | `invert_search_icon_color:` | `null` | null: invertIconColor. 0 / 1: only the search icon |
1934
+ | `invert_clear_icon_color:` | `null` | null: invertIconColor. 0 / 1: only the clear icon |
1935
+ | `animated:` | `0` | 1: small hover / focus / clear motions. (box.setAnimated(0/1)) |
1936
+ | `hover_ring_color:` | `"rgba(0, 0, 0, 0.08)"` | animated: the thin line inside the border under the mouse |
1937
+ | `focus_ring_color:` | `"rgba(0, 0, 0, 0.16)"` | animated: the line while typing |
1938
+ | `on_change:` | `a block` | The text changed (typed, pasted, cleared, setValue()): self.value, self.getSearchText() (lower case). Not at create time, not with setValue(value, 1) |
1939
+ | `on_enter:` | `a block` | Enter, and the clear icon: self.getSearchText() |
1940
+ | `style_name:` | `"ozden" (the kit alone: "ozden")` | "ozden", "ozdenDark", "original" (the look of these defaults), "light" ("classic": its old name), "dark", "minimal", "minimalDark" or a name added to SearchInput.styles |
1941
+ | `style:` | `{}` | WHY: the look is in the flat params above; the packages are packages of params (see SearchInput.styles). |
1942
+
1943
+ ## SearchResults
1944
+
1945
+ `SearchResults(...)` makes the SearchResults of the kit (comp/search-results.js).
1946
+
1947
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"modern"`.
1948
+
1949
+ A dark window gives it its dark look.
1950
+
1951
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `attach_to`, `close`, `detach`, `get_active_index`, `get_items`, `move_active`, `open`, `remove`, `select_active`, `select_index`, `set_active_index`, `set_items`, `set_match_anchor_width`.
1952
+
1953
+ | Param | Default | The kit says |
1954
+ |---|---|---|
1955
+ | `key:` | `"0"` | |
1956
+ | `anchor:` | `null` | The basic.js object the list opens under. (Ex: a SearchInput) |
1957
+ | `anchor_align:` | `"right"` | "right": the right edges meet, "left": the left edges meet. |
1958
+ | `match_anchor_width:` | `0` | 1: the list is as wide as the anchor (both edges meet; maxWidth is not used). setMatchAnchorWidth() |
1959
+ | `max_width:` | `380` | |
1960
+ | `max_height_ratio:` | `0.7` | Of the screen height. |
1961
+ | `offset_y:` | `6` | Space between the anchor and the list. |
1962
+ | `screen_margin:` | `8` | The list never comes closer than this to the edge of the screen. |
1963
+ | `empty_text:` | `"No results for \"{query}\""` | {query} is replaced by the text that was searched. |
1964
+ | `show_empty:` | `1` | 0: The list is not opened at all when there is no result. |
1965
+ | `hint_text:` | `"↑ ↓ to move · Enter to open · Esc to close"` | |
1966
+ | `show_hint:` | `1` | |
1967
+ | `show_groups:` | `1` | |
1968
+ | `open_on_focus:` | `1` | Focus on the input opens the last results again. |
1969
+ | `close_on_blur:` | `1` | |
1970
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js. 0: the scrollbar of the browser. |
1971
+ | `z_index_value:` | `1000` | WHY: "zIndex" is a basic.js property of every box, the name is taken. |
1972
+ | `aria_label:` | `"Search results"` | |
1973
+ | `on_select:` | `a block` | |
1974
+ | `on_open:` | `a block` | |
1975
+ | `on_close:` | `a block` | |
1976
+ | `on_active_change:` | `a block` | |
1977
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "modern" or a name added to SearchResults.styles |
1978
+ | `style:` | `{...}` | Light style package (default) |
1979
+
1980
+ ## SelectBox
1981
+
1982
+ `SelectBox(...)` makes the SelectBox of the kit (comp/select-box.js).
1983
+
1984
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"ozden"`, `"ozdenDark"`.
1985
+
1986
+ A dark window gives it its dark look.
1987
+
1988
+ Read without a question to the page: `obj.value`.
1989
+
1990
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `clear`, `close`, `focus`, `get_selected_options`, `get_value`, `is_open`, `open`, `set_enabled`, `set_full_height_list`, `set_options`, `set_placeholder`, `set_value`, `toggle`.
1991
+
1992
+ | Param | Default | The kit says |
1993
+ |---|---|---|
1994
+ | `key:` | `"0"` | |
1995
+ | `width:` | `240` | |
1996
+ | `height:` | `44` | |
1997
+ | `options:` | `[]` | [{ value, label, description, iconFile, group, disabled }] or ["A", "B"] |
1998
+ | `value:` | `null` | Single: a value or null. Multiple: [values] |
1999
+ | `multiple:` | `0` | |
2000
+ | `searchable:` | `"auto"` | 1, 0, "auto" (more than autoSearchCount options) |
2001
+ | `auto_search_count:` | `8` | |
2002
+ | `clearable:` | `0` | 1: Clear button in the field |
2003
+ | `close_on_select:` | `null` | null: 1 for single, 0 for multiple |
2004
+ | `show_select_all:` | `1` | Multiple: "Select all" and "Clear" buttons |
2005
+ | `placeholder:` | `"Select..."` | |
2006
+ | `search_placeholder:` | `"Search..."` | |
2007
+ | `empty_text:` | `"No results"` | |
2008
+ | `select_all_text:` | `"Select all"` | |
2009
+ | `clear_text:` | `"Clear"` | |
2010
+ | `more_text:` | `"+{count}"` | Multiple: field text when many are selected. Ex: "Apple, Banana +3" |
2011
+ | `field_label_count:` | `2` | Multiple: how many labels are written in the field |
2012
+ | `panel_min_width:` | `220` | |
2013
+ | `panel_max_height:` | `320` | |
2014
+ | `max_render_count:` | `300` | |
2015
+ | `enabled:` | `1` | |
2016
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js on the list (load it first). 0: the scrollbar of the browser (hidden by basic.css in Chrome). |
2017
+ | `use_search_input:` | `1` | 1: the search box is a SearchInput when comp/search-input.js is loaded first (style.searchInput). 0: the own input (style.search) |
2018
+ | `full_height_list:` | `0` | 1: the list opens from the top of the page to its bottom, as wide as the field, at its left. (box.setFullHeightList()) |
2019
+ | `scale:` | `null` | Multiplies every size. null: basic.uiScale (1, or 1 / page.zoom on a fitted page). (Only at create time) |
2020
+ | `aria_label:` | `""` | |
2021
+ | `on_change:` | `a block` | self.value, self.getSelectedOptions() |
2022
+ | `on_open:` | `a block` | |
2023
+ | `on_close:` | `a block` | |
2024
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to SelectBox.styles |
2025
+ | `style:` | `{...}` | Light style package (default) |
2026
+
2027
+ ## SettingsRow
2028
+
2029
+ `SettingsRow(...)` makes the SettingsRow of the kit (comp/settings-row.js).
2030
+
2031
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_description_text`, `set_title_color`, `set_title_text`.
2032
+
2033
+ | Param | Default | The kit says |
2034
+ |---|---|---|
2035
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
2036
+ | `width:` | `"100%"` | |
2037
+ | `height:` | `100` | |
2038
+ | `color:` | `"white"` | The background of the row |
2039
+ | `title_text:` | `""` | |
2040
+ | `description_text:` | `""` | The small text under the title. "": the title stands in the middle (setDescriptionText) |
2041
+ | `title_color:` | `Black(0.8)` | Ex: "orangered" for a row that deletes something (setTitleColor) |
2042
+ | `control:` | `null` | function (row): the objects made in it stand at the right (Ex: a Toggle). Its result: row.controlObject |
2043
+ | `arrow:` | `0` | 1: a chevron at the right (a row that opens a page: give it onClick) |
2044
+ | `on_click:` | `a block` | function (self, event): the row can be clicked (role "button", Enter / Space) |
2045
+ | `style:` | `{...}` | |
2046
+
2047
+ ## SidePanel
2048
+
2049
+ `SidePanel(...)` makes the SidePanel of the kit (comp/side-panel.js).
2050
+
2051
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`.
2052
+
2053
+ A dark window gives it its dark look.
2054
+
2055
+ Read without a question to the page: `obj.is_opened`.
2056
+
2057
+ Objects go into it with `panel.body { ... }`.
2058
+
2059
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `end_body`, `get_body`, `open`, `remove`, `set_panel_size`, `set_title_text`, `start_body`, `toggle`.
2060
+
2061
+ | Param | Default | The kit says |
2062
+ |---|---|---|
2063
+ | `key:` | `"0"` | |
2064
+ | `side:` | `"right"` | "right", "left", "bottom", "top" (Only at create time) |
2065
+ | `container:` | `null` | null: the page. A box: the panel and its backdrop are made in it. (Only at create time) |
2066
+ | `panel_size:` | `420` | Width of a left/right panel, height of a top/bottom panel. |
2067
+ | `screen_margin:` | `60` | The panel never comes closer than this to the opposite edge (of the page or the container). |
2068
+ | `duration:` | `300` | Length of the animation, in milliseconds. |
2069
+ | `fade:` | `1` | 1: The panel fades in / out with its slide. 0: It only slides. (The backdrop always fades.) (Only at create time) |
2070
+ | `title_text:` | `""` | |
2071
+ | `allow_html:` | `0` | 1: titleText is HTML (only for your own texts) |
2072
+ | `show_header:` | `1` | 0: No header. (The close button goes with it.) |
2073
+ | `show_close_button:` | `1` | |
2074
+ | `show_backdrop:` | `1` | |
2075
+ | `close_on_backdrop:` | `1` | |
2076
+ | `close_on_escape:` | `1` | |
2077
+ | `exclusive:` | `1` | 1: Opening this panel closes the other open panel. |
2078
+ | `opened:` | `0` | 1: Open when it is created. (No animation.) |
2079
+ | `aria_label:` | `"Panel"` | |
2080
+ | `on_open:` | `a block` | |
2081
+ | `on_close:` | `a block` | |
2082
+ | `on_before_close:` | `a block` | Return false to keep the panel open. |
2083
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark", "minimal", "minimalDark" or a name added to SidePanel.styles |
2084
+ | `style:` | `{...}` | Light style package (default) |
2085
+
2086
+ ## Slider
2087
+
2088
+ `Slider(...)` makes the Slider of the kit (comp/slider.js).
2089
+
2090
+ `style_name:` `"minimal"`, `"minimalDark"`, `"round"`, `"roundDark"`, `"split"`, `"splitDark"`.
2091
+
2092
+ A dark window gives it its dark look.
2093
+
2094
+ Read without a question to the page: `obj.value`.
2095
+
2096
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_value`, `set_max_value`, `set_min_value`, `set_step`, `set_thumb_color`, `set_track_background_color`, `set_track_color`, `set_value`, `show_value`, `show_value_clean`.
2097
+
2098
+ | Param | Default | The kit says |
2099
+ |---|---|---|
2100
+ | `key:` | `0` | |
2101
+ | `width:` | `250` | |
2102
+ | `value:` | `0` | Current selected value |
2103
+ | `min_value:` | `0` | The value at the left end (setMinValue) |
2104
+ | `max_value:` | `100` | The value at the right end (setMaxValue) |
2105
+ | `step:` | `1` | The values are min + n * step (Ex: 0.5). setStep() |
2106
+ | `min_thumb_height:` | `44` | |
2107
+ | `thumb_color:` | `"rgba(0,0,0,0.7)"` | Color of the draggable button |
2108
+ | `track_height:` | `16` | Ex: 16, 50 |
2109
+ | `track_color:` | `"cadetblue"` | Color of the filled part |
2110
+ | `track_background_color:` | `"rgba(0,0,0,0.05)"` | Color of the unfilled part |
2111
+ | `on_change_start:` | `a block` | A drag starts (a tap and a key are short drags) |
2112
+ | `on_change:` | `a block` | self.value changed: while dragging, a tap, a key. Not at create time, not by setValue() |
2113
+ | `on_change_end:` | `a block` | The drag ends: a page that saves, saves here |
2114
+ | `show_value_at_start:` | `0` | |
2115
+ | `show_value_on_set:` | `1` | |
2116
+ | `show_value_on_drag:` | `1` | |
2117
+ | `aria_label:` | `""` | The name a screen reader says (Ex: "Volume"). "": none |
2118
+ | `style_name:` | `"round" (the kit alone: "split")` | "split", "splitDark", "round", "roundDark", "minimal", "minimalDark" or a name added to Slider.styles |
2119
+ | `style:` | `{...}` | The split style package (default): inspired by Material 3 |
2120
+
2121
+ ## SliderField
2122
+
2123
+ `SliderField(...)` makes the SliderField of the kit (comp/slider-field.js).
2124
+
2125
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`, `"ozden"`.
2126
+
2127
+ A dark window gives it its dark look.
2128
+
2129
+ Read without a question to the page: `obj.max_value`, `obj.min_value`, `obj.value`.
2130
+
2131
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `decrease`, `focus`, `format_number`, `get_value`, `increase`, `set_enabled`, `set_label_text`, `set_max_value`, `set_min_value`, `set_precision`, `set_range`, `set_show_ticks`, `set_step`, `set_unit_text`, `set_value`.
2132
+
2133
+ | Param | Default | The kit says |
2134
+ |---|---|---|
2135
+ | `key:` | `"0"` | |
2136
+ | `width:` | `320` | |
2137
+ | `height:` | `44` | |
2138
+ | `label_text:` | `""` | Text at the left. Ex: "Width" |
2139
+ | `value:` | `0` | |
2140
+ | `min_value:` | `0` | |
2141
+ | `max_value:` | `10` | |
2142
+ | `step:` | `1` | |
2143
+ | `precision:` | `"auto"` | Decimals shown and used for rounding. "auto": the decimals of the step (0.25 -> 2) |
2144
+ | `unit_text:` | `""` | After the value. Ex: "px", " kg" (with the space) |
2145
+ | `editable:` | `1` | 1: A click on the value opens the typing. |
2146
+ | `show_ticks:` | `1` | 1: Dots for the steps in the empty part. |
2147
+ | `max_ticks:` | `30` | More steps than this -> fewer dots |
2148
+ | `enabled:` | `1` | |
2149
+ | `aria_label:` | `"Value"` | Used when labelText is empty |
2150
+ | `value_format:` | `a block` | Text of the value |
2151
+ | `on_change:` | `a block` | self.value (also while dragging) |
2152
+ | `on_change_end:` | `a block` | After a drag, a key step or a typed value |
2153
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "modern", "ozden", "minimal", "minimalDark" or a name added to SliderField.styles |
2154
+ | `style:` | `{...}` | The base of every package (a light gray field with a gray fill): a package changes only some keys |
2155
+
2156
+ ## SmartButton
2157
+
2158
+ `SmartButton(...)` makes the SmartButton of the kit (comp/smart-button.js).
2159
+
2160
+ `style_name:` `"minimal"`, `"minimalDanger"`, `"minimalDangerDark"`, `"minimalDark"`, `"outlined"`, `"ozden"`, `"ozden2"`, `"ozden2Dark"`, `"ozden3"`, `"ozden3Dark"`, `"ozden4"`, `"ozden4Dark"`, `"ozdenDark"`, `"pill"`.
2161
+
2162
+ A dark window gives it its dark look.
2163
+
2164
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `cancel_ask`, `press`, `remove`, `set_animated`, `set_ask`, `set_enabled`, `set_icon`, `set_label_text`, `set_ripple`, `set_style`, `set_tone`, `set_waiting`.
2165
+
2166
+ | Param | Default | The kit says |
2167
+ |---|---|---|
2168
+ | `key:` | `"0"` | |
2169
+ | `style_name:` | `"ozden" (the kit alone: "ozden")` | the template (SmartButton.styles): "ozden" (the default) ... "ozden4", "pill", "outlined", "ozdenDark" ... "ozden4Dark", "minimal", "minimalDark", "minimalDanger", "minimalDangerDark" |
2170
+ | `tone:` | `""` | a color of the kit (SmartButton.tones): "white", "cyan", "orange", "yellow", "green", "blue", "cyanDark"..., "ink" / "inkDark" (minimal). "": the gray of the template. setTone() |
2171
+ | `width:` | `"auto"` | an icon button (labelText: "") is a square |
2172
+ | `height:` | `44` | "auto": as high as its padding and content (an icon on top of a text is "auto") |
2173
+ | `label_text:` | `"Button"` | "": an icon button |
2174
+ | `allow_html:` | `0` | 1: labelText is HTML (only for your own texts) |
2175
+ | `icon_file:` | `""` | "": no icon (Ex: "comp/smart-button/alert-black.png") |
2176
+ | `icon_position:` | `"left"` | "left", "top" |
2177
+ | `enabled:` | `1` | 0: gray, can not be pressed (set later with setEnabled) |
2178
+ | `aria_label:` | `""` | "": labelText is read. An icon button needs it (Ex: "Delete") |
2179
+ | `waiting:` | `0` | 1: it waits (set later with setWaiting) |
2180
+ | `waiting_type:` | `"clock"` | "clock" (the default wait) or "dots" |
2181
+ | `animated:` | `1` | 1: pressed it gets smaller and darker (style.press). setAnimated() |
2182
+ | `ripple:` | `0` | 1: a wave from the pressed point (it works with animated: 0 too). setRipple() |
2183
+ | `ask:` | `""` | "Click again to delete.": two clicks (the first one asks with an orange button and this text in a bubble). setAsk() |
2184
+ | `on_before_click:` | `a block` | function (self): false stops the press, with no ask either |
2185
+ | `on_click:` | `a block` | Not called while waiting |
2186
+ | `on_waiting_end:` | `a block` | The wait ended (setWaiting(0)) |
2187
+ | `style:` | `{...}` | ozden (the default template) |
2188
+
2189
+ ## SmartTable
2190
+
2191
+ `SmartTable(...)` makes the SmartTable of the kit (comp/smart-table.js).
2192
+
2193
+ When to use it: to show very big data well, in both directions: very many rows (only the rows that are seen are made) and very many columns (it scrolls sideways).
2194
+
2195
+ `style_name:` `"classic"`, `"dark"`, `"green"`, `"light"`, `"minimal"`, `"minimalDark"`.
2196
+
2197
+ A dark window gives it its dark look.
2198
+
2199
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `clear_column_highlight`, `clear_selection`, `filter_and_sort_data`, `generate_test_data`, `get_selected_index`, `get_total_width`, `get_vertical_scroll_width`, `remove`, `reset_sort_icons`, `scroll_page`, `select_item`, `select_next_search_title`, `set_can_select`, `set_fit_line_count`, `set_height`, `set_item_data_list`, `set_item_height`, `set_item_line_count`, `set_locale`, `set_scroll_to_top`, `set_search_title_index`, `set_show_cell_tooltip`, `set_show_search_title_select`, `set_state`, `set_title_cell_width`, `set_title_data_list`, `set_vertical_scroll_enabled`, `set_wheel_scroll`, `set_width`, `show_loading`, `stretch_last_cell`, `sync_scroll_position`.
2200
+
2201
+ | Param | Default | The kit says |
2202
+ |---|---|---|
2203
+ | `key:` | `"0"` | |
2204
+ | `title_height:` | `50` | |
2205
+ | `item_height:` | `40` | |
2206
+ | `info_height:` | `50` | |
2207
+ | `item_line_count:` | `16` | |
2208
+ | `highlight_title:` | `true` | |
2209
+ | `highlight_line:` | `true` | |
2210
+ | `invert_color:` | `0` | |
2211
+ | `no_data_found_alert:` | `"No data found!"` | |
2212
+ | `search_keyword:` | `""` | |
2213
+ | `search_title_index:` | `-1` | -1: Search in all columns (ALL). 0, 1...: Search only in this column. |
2214
+ | `show_search_title_select:` | `1` | 0: Hide the column select box (ALL) next to the search input. |
2215
+ | `wheel_scroll:` | `0` | 1: The mouse wheel scrolls the rows (and the page does not scroll). 0: The wheel is left to the page. |
2216
+ | `allow_html:` | `0` | 1: The cell values, the titles of the columns and the texts are written as HTML. 0: As plain text (safe for the text of the users) |
2217
+ | `show_cell_tooltip:` | `1` | 1: a cell whose text does not fit shows all of it in a bubble (comp/tooltip.js). 0: no bubble |
2218
+ | `all_titles_text:` | `"ALL"` | |
2219
+ | `can_select:` | `1` | 1: a click or a key selects a row; Enter runs onSelect. 0: no selection, no keys |
2220
+ | `fit_line_count:` | `0` | 1: rows of about itemHeight px, as many as the height of the table holds |
2221
+ | `locale:` | `""` | the numbers of the info line ("": the language of the page). Ex: "en-US", "tr-TR" |
2222
+ | `sort_by_title_index:` | `0` | |
2223
+ | `sort_direction:` | `"A-Z"` | "A-Z" or "Z-A" |
2224
+ | `fill_test_data:` | `0` | |
2225
+ | `on_select:` | `a block` | |
2226
+ | `title_data_list:` | `[...]` | Ex: { name: "ID", dataTitle: "id", dataType: "integer", width: 100, sortable: 1 } |
2227
+ | `item_data_list:` | `[...]` | Ex: { id: 1, name: "Bugra", desc: "about", email: "emainil", active: 1 } |
2228
+ | `scroll_bar_params:` | `{...}` | |
2229
+ | `search_title_menu_params:` | `{}` | |
2230
+ | `search_input_params:` | `{...}` | |
2231
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "green", "minimal", "minimalDark" or a name added to SmartTable.styles |
2232
+ | `style:` | `{...}` | Light style package (default): the look of DataTable "light" |
2233
+
2234
+ ## SortableList
2235
+
2236
+ `SortableList(...)` makes the SortableList of the kit (comp/sortable-list.js).
2237
+
2238
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"modern"`.
2239
+
2240
+ A dark window gives it its dark look.
2241
+
2242
+ Read without a question to the page: `obj.order`.
2243
+
2244
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_item`, `focus_item`, `get_index_by_key`, `get_items`, `get_keys`, `move_down`, `move_item`, `move_up`, `remove`, `remove_item`, `set_enabled`, `set_items`.
2245
+
2246
+ | Param | Default | The kit says |
2247
+ |---|---|---|
2248
+ | `key:` | `"0"` | |
2249
+ | `width:` | `340` | |
2250
+ | `height:` | `320` | "auto": grows with the rows (no scrolling) |
2251
+ | `items:` | `[]` | Strings or { key, text, description, locked } (style.desc is the look of the description) |
2252
+ | `drag_by:` | `"handle"` | "handle": drag by the grip at the left, "row": drag by the whole row (touch: the list then scrolls only by the scroll bar) |
2253
+ | `show_handle:` | `1` | The grip at the left. (dragBy: "row" can hide it) |
2254
+ | `show_numbers:` | `1` | Position numbers |
2255
+ | `show_buttons:` | `0` | Up / down buttons |
2256
+ | `removable:` | `0` | A remove button and the Delete key |
2257
+ | `enabled:` | `1` | |
2258
+ | `row_gap:` | `6` | Space between the rows |
2259
+ | `empty_text:` | `"No items"` | |
2260
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js. 0: the scrollbar of the browser. |
2261
+ | `aria_label:` | `"Sortable list"` | |
2262
+ | `texts:` | `{...}` | |
2263
+ | `on_change:` | `a block` | self.getItems() for the new order |
2264
+ | `on_remove:` | `a block` | |
2265
+ | `on_item_click:` | `a block` | |
2266
+ | `on_drag_start:` | `a block` | |
2267
+ | `on_drag_end:` | `a block` | index: the new position |
2268
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark" or a name added to SortableList.styles |
2269
+ | `style:` | `{...}` | Light style package (default) |
2270
+
2271
+ ## SparkLineBox
2272
+
2273
+ `SparkLineBox(...)` makes the SparkLineBox of the kit (comp/spark-line-box.js).
2274
+
2275
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_value`, `clear`, `get_last_value`, `get_values`, `set_icon`, `set_line_color`, `set_max_points`, `set_max_value`, `set_min_value`, `set_title_text`, `set_trend_text`, `set_value_text`, `set_values`.
2276
+
2277
+ | Param | Default | The kit says |
2278
+ |---|---|---|
2279
+ | `key:` | `"0"` | |
2280
+ | `width:` | `200` | |
2281
+ | `height:` | `80` | |
2282
+ | `title_text:` | `"Sold Items"` | |
2283
+ | `value_text:` | `"1.3K"` | |
2284
+ | `allow_html:` | `0` | 1: titleText, valueText, trendText and the text of valueFormat are HTML (only for your own texts) |
2285
+ | `icon_file:` | `""` | "": No icon |
2286
+ | `line_color:` | `"tomato"` | |
2287
+ | `values:` | `[]` | [10, 20, { value: 15, color: "orange" }] |
2288
+ | `max_points:` | `30` | How many values are shown |
2289
+ | `min_value:` | `null` | null: Auto. 0: The base line is always zero. |
2290
+ | `max_value:` | `0` | 0: Auto (the biggest visible value is the top of the graph) |
2291
+ | `curve:` | `"smooth"` | "smooth", "linear" |
2292
+ | `show_area:` | `1` | 1: Light fill under the line |
2293
+ | `show_last_dot:` | `1` | 1: A dot on the last value |
2294
+ | `show_min_max:` | `0` | 1: Dots on the smallest and the biggest value |
2295
+ | `show_trend:` | `1` | 1: Trend badge (last value compared with the first visible value) |
2296
+ | `trend_text:` | `""` | Your own badge text. "": Calculated. (Ex: "▲ 12%") |
2297
+ | `show_tooltip:` | `1` | 1: Tooltip with the value on mouse over |
2298
+ | `animated:` | `1` | 1: The line moves with a short motion when a value is added. |
2299
+ | `value_format:` | `a block` | Tooltip text |
2300
+ | `on_click:` | `a block` | |
2301
+ | `style:` | `{...}` | |
2302
+
2303
+ ## Splitter
2304
+
2305
+ `Splitter(...)` makes the Splitter of the kit (comp/splitter.js).
2306
+
2307
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
2308
+
2309
+ A dark window gives it its dark look.
2310
+
2311
+ Read without a question to the page: `obj.first_size_now`.
2312
+
2313
+ Objects go into it with `splitter.first { ... } and splitter.second { ... }`.
2314
+
2315
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_first_size`, `set_area_visible`, `set_first_size`, `set_theme`.
2316
+
2317
+ | Param | Default | The kit says |
2318
+ |---|---|---|
2319
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
2320
+ | `left:` | `0` | |
2321
+ | `top:` | `0` | |
2322
+ | `width:` | `"100%"` | |
2323
+ | `height:` | `"100%"` | |
2324
+ | `direction:` | `"horizontal"` | "horizontal": side by side, "vertical": one under the other |
2325
+ | `first_size:` | `"30%"` | px or a part of the box |
2326
+ | `second_size:` | `null` | px or a part of the box: the second area keeps its size (firstSize is not used) |
2327
+ | `min_first:` | `60` | px |
2328
+ | `min_second:` | `60` | px |
2329
+ | `key_step:` | `16` | px: an arrow key moves the line this much |
2330
+ | `aria_label:` | `"Change the sizes of the areas"` | |
2331
+ | `on_change:` | `a block` | The line moves. (Not at create time, not with silent: 1) |
2332
+ | `on_change_end:` | `a block` | The line is let go. |
2333
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to Splitter.styles |
2334
+ | `style:` | `{...}` | Light style package (default) |
2335
+
2336
+ ## StatusBar
2337
+
2338
+ `StatusBar(...)` makes the StatusBar of the kit (comp/status-bar.js).
2339
+
2340
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
2341
+
2342
+ A dark window gives it its dark look.
2343
+
2344
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_item`, `set_busy`, `set_item_text`, `set_item_visible`, `set_items`, `set_message_text`, `set_theme`.
2345
+
2346
+ | Param | Default | The kit says |
2347
+ |---|---|---|
2348
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
2349
+ | `left:` | `0` | |
2350
+ | `width:` | `"100%"` | |
2351
+ | `height:` | `28` | |
2352
+ | `message_text:` | `""` | |
2353
+ | `message_tone:` | `""` | "", "success", "warn", "error", "info" |
2354
+ | `items:` | `[]` | [{ key, text, icon, tone, ariaLabel, onClick }, "Text"] |
2355
+ | `busy:` | `0` | |
2356
+ | `aria_label:` | `"Status bar"` | |
2357
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to StatusBar.styles |
2358
+ | `style:` | `{...}` | Light style package (default) |
2359
+
2360
+ ## StepBar
2361
+
2362
+ `StepBar(...)` makes the StepBar of the kit (comp/step-bar.js).
2363
+
2364
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
2365
+
2366
+ A dark window gives it its dark look.
2367
+
2368
+ Read without a question to the page: `obj.step`.
2369
+
2370
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_step`, `next`, `previous`, `set_step`, `set_steps`, `set_theme`.
2371
+
2372
+ | Param | Default | The kit says |
2373
+ |---|---|---|
2374
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
2375
+ | `left:` | `0` | |
2376
+ | `top:` | `0` | |
2377
+ | `width:` | `"100%"` | |
2378
+ | `height:` | `"auto"` | |
2379
+ | `steps:` | `[]` | [STEP]: a text or { key, text, description } |
2380
+ | `current_step:` | `0` | The step of now, from 0. steps.length: every step is done. |
2381
+ | `can_go_back:` | `1` | 1: a step that is behind can be clicked (onStepClick) |
2382
+ | `show_titles:` | `1` | |
2383
+ | `aria_label:` | `"Steps"` | |
2384
+ | `on_step_click:` | `a block` | A step that is behind was chosen. setStep() goes there. |
2385
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to StepBar.styles |
2386
+ | `style:` | `{...}` | Light style package (default) |
2387
+
2388
+ ## Stepper
2389
+
2390
+ `Stepper(...)` makes the Stepper of the kit (comp/stepper.js).
2391
+
2392
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`, `"ozden"`, `"ozdenDark"`.
2393
+
2394
+ A dark window gives it its dark look.
2395
+
2396
+ Read without a question to the page: `obj.value`.
2397
+
2398
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `decrease`, `focus`, `format_number`, `get_value`, `increase`, `set_enabled`, `set_max_value`, `set_min_value`, `set_precision`, `set_range`, `set_step`, `set_unit_text`, `set_value`.
2399
+
2400
+ | Param | Default | The kit says |
2401
+ |---|---|---|
2402
+ | `key:` | `"0"` | |
2403
+ | `width:` | `150` | |
2404
+ | `height:` | `44` | |
2405
+ | `value:` | `1` | |
2406
+ | `min_value:` | `0` | |
2407
+ | `max_value:` | `10` | |
2408
+ | `step:` | `1` | |
2409
+ | `precision:` | `0` | Decimals shown and used for rounding. (step: 0.5 -> precision: 1) |
2410
+ | `unit_text:` | `""` | After the value. Ex: " kg" (with the space) |
2411
+ | `editable:` | `1` | 1: The value can be typed. |
2412
+ | `wrap:` | `0` | 1: After max comes min, before min comes max. |
2413
+ | `hold_to_repeat:` | `1` | 1: Press and hold a button to change the value continuously. |
2414
+ | `layout:` | `"horizontal"` | "horizontal": [-] value [+], "compact": value [-+] stacked at the right (Only at create time) |
2415
+ | `enabled:` | `1` | |
2416
+ | `aria_label:` | `"Value"` | |
2417
+ | `value_format:` | `a block` | a format text, made by the page at once: "{:,.2f} TL", "{:.0f} kg", "{:.1%}" (not a block) |
2418
+ | `on_change:` | `a block` | self.value |
2419
+ | `on_min_reached:` | `a block` | Called when the value arrives at min |
2420
+ | `on_max_reached:` | `a block` | Called when the value arrives at max |
2421
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to Stepper.styles |
2422
+ | `style:` | `{...}` | Light style package (default) |
2423
+
2424
+ ## Tabs
2425
+
2426
+ `Tabs(...)` makes the Tabs of the kit (comp/tabs.js).
2427
+
2428
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`.
2429
+
2430
+ A dark window gives it its dark look.
2431
+
2432
+ Read without a question to the page: `obj.previous_value`, `obj.value`.
2433
+
2434
+ Objects go into it with `tabs.panel(key) { ... }`.
2435
+
2436
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_tab`, `end_panel`, `focus`, `get_active_tab`, `get_index`, `get_panel`, `get_tab`, `get_tabs`, `get_value`, `remove_tab`, `set_badge`, `set_count`, `set_enabled`, `set_panel_content`, `set_tab_enabled`, `set_tabs`, `set_value`, `start_panel`.
2437
+
2438
+ | Param | Default | The kit says |
2439
+ |---|---|---|
2440
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
2441
+ | `width:` | `"100%" (the kit alone: "auto")` | |
2442
+ | `height:` | `"auto"` | |
2443
+ | `tabs:` | `[]` | [{ key, text, iconFile, count, badge, disabled, closable, selectedColor, selectedTextColor, selectedIconFile }] or ["A", "B"] |
2444
+ | `value:` | `null` | Key of the active tab. null: the first enabled tab. |
2445
+ | `variant:` | `"underline"` | "underline", "pill" (Only at create time) |
2446
+ | `vertical:` | `0` | 1: Tabs are stacked. (Only at create time) |
2447
+ | `full_width:` | `0` | 1: Tabs share the bar width equally. (Only at create time) |
2448
+ | `closable:` | `0` | 1: Every tab has a close (x) button. (A tab can also set its own "closable".) |
2449
+ | `add_button:` | `0` | 1: "+" button at the end of the bar. |
2450
+ | `show_arrows:` | `"auto"` | "auto": Arrow buttons when the tabs do not fit. 0: Never. |
2451
+ | `panels:` | `1 (the kit alone: 0)` | 1: A content Box for every tab. (Only at create time) |
2452
+ | `panel_height:` | `"auto"` | Height of the panels area. Ex: 300 or "auto" (grows with the content) |
2453
+ | `bar_width:` | `200` | vertical + panels: Width of the tab bar. (The panels take the rest.) |
2454
+ | `scale:` | `null` | Multiplies every size. null: basic.uiScale (1, or 1 / page.zoom on a fitted page). (Only at create time) |
2455
+ | `enabled:` | `1` | |
2456
+ | `aria_label:` | `"Tabs"` | |
2457
+ | `on_change:` | `a block` | self.value, self.previousValue, self.getActiveTab() |
2458
+ | `on_close:` | `a block` | Return false to keep the tab. |
2459
+ | `on_add:` | `a block` | |
2460
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark", "minimal", "minimalDark" or a name added to Tabs.styles |
2461
+ | `style:` | `{...}` | Light style package (default) |
2462
+
2463
+ ## TagInput
2464
+
2465
+ `TagInput(...)` makes the TagInput of the kit (comp/tag-input.js).
2466
+
2467
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`.
2468
+
2469
+ A dark window gives it its dark look.
2470
+
2471
+ Read without a question to the page: `obj.tags`.
2472
+
2473
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_tag`, `blur`, `clear`, `focus`, `get_tags`, `remove_tag`, `set_enabled`, `set_max_tags`, `set_placeholder`, `set_suggestions`, `set_tags`.
2474
+
2475
+ | Param | Default | The kit says |
2476
+ |---|---|---|
2477
+ | `key:` | `"0"` | |
2478
+ | `width:` | `320` | |
2479
+ | `height:` | `"auto"` | |
2480
+ | `tags:` | `[]` | ["audio", "guide"] |
2481
+ | `suggestions:` | `[]` | ["audio", "fitness", ...] Shown while typing. (Tags that are already added are hidden.) |
2482
+ | `allow_custom:` | `1` | 0: Only the suggestions can be added. |
2483
+ | `show_suggestions_on_focus:` | `0` | 1: The suggestion list opens also when the input is empty. |
2484
+ | `max_suggestions:` | `8` | |
2485
+ | `max_tags:` | `0` | 0: No limit |
2486
+ | `min_length:` | `1` | |
2487
+ | `max_length:` | `32` | |
2488
+ | `lowercase:` | `0` | 1: "Audio" -> "audio" |
2489
+ | `separators:` | `","` | Characters that end a tag while typing and when a text is pasted. (Enter always works.) |
2490
+ | `placeholder:` | `"Add a tag..."` | |
2491
+ | `empty_text:` | `"No suggestions"` | Suggestion list, when the typed text does not match. (allowCustom: 0) |
2492
+ | `enabled:` | `1` | |
2493
+ | `aria_label:` | `"Tags"` | |
2494
+ | `validate:` | `a block` | Returns an error text, or "" when the tag is ok. |
2495
+ | `on_change:` | `a block` | self.getTags() |
2496
+ | `on_add:` | `a block` | |
2497
+ | `on_remove:` | `a block` | |
2498
+ | `on_reject:` | `a block` | reason: "duplicate", "max", "short", "long", "notAllowed", "invalid" (or the validate() text) |
2499
+ | `messages:` | `{...}` | |
2500
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark", "minimal", "minimalDark" or a name added to TagInput.styles |
2501
+ | `style:` | `{...}` | Light style package (default) |
2502
+
2503
+ ## TextAreaField
2504
+
2505
+ `TextAreaField(...)` makes the TextAreaField of the kit (comp/text-area-field.js).
2506
+
2507
+ A dark window gives it its dark look.
2508
+
2509
+ Read without a question to the page: `obj.text`.
2510
+
2511
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `focus_func`, `get_value`, `input_func`, `is_valid`, `set_background_color`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
2512
+
2513
+ | Param | Default | The kit says |
2514
+ |---|---|---|
2515
+ | `type:` | `"textarea"` | |
2516
+ | `title_text:` | `"" (the kit alone: "MESSAGE")` | |
2517
+ | `placeholder:` | `"" (the kit alone: "How can we help you?")` | |
2518
+ | `required:` | `0 (the kit alone: 1)` | |
2519
+ | `min_char_count:` | `0 (the kit alone: 80)` | 0, 80 |
2520
+ | `show_count:` | `0 (the kit alone: 1)` | 0, 1 |
2521
+ | `length_text:` | `"length: "` | |
2522
+ | `warning_text:` | `"" (the kit alone: "The entered text must be longer than 80")` | |
2523
+ | `warning_color:` | `"#E5885E"` | |
2524
+ | `max_length:` | `100000 (the kit alone: 255)` | |
2525
+ | `height:` | `170` | 170 (4line) |
2526
+ | `right_padding:` | `5` | |
2527
+ | `unit_style:` | `{...}` | |
2528
+ | `scroll_bar_style:` | `{...}` | The scroll bar of the text (the params of ScrollBar) |
2529
+ | `key:` | `"0"` | |
2530
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
2531
+ | `width:` | `350` | |
2532
+ | `left_padding:` | `20` | |
2533
+ | `title_font_size:` | `16` | |
2534
+ | `input_font_size:` | `20` | |
2535
+ | `input_height:` | `40` | px: the row of the text |
2536
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
2537
+ | `description_font_size:` | `14` | |
2538
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
2539
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
2540
+ | `value:` | `""` | |
2541
+ | `show_description:` | `0` | |
2542
+ | `description_text:` | `""` | |
2543
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
2544
+ | `background_color:` | `"#F6F6F6"` | |
2545
+ | `focus_background_color:` | `"#F3F4E0"` | |
2546
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
2547
+ | `line_color:` | `"#373836"` | |
2548
+ | `focus_line_color:` | `"#65A293"` | |
2549
+ | `back_border_color:` | `Black(0)` | |
2550
+ | `focus_back_border_color:` | `Black(0)` | |
2551
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
2552
+ | `back_border_top_round:` | `2` | |
2553
+ | `back_border_bottom_round:` | `0` | |
2554
+ | `title_text_color:` | `"#555555"` | |
2555
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
2556
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
2557
+ | `input_text_color:` | `"#373836"` | |
2558
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
2559
+ | `placeholder_color:` | `""` | "": the color of the browser |
2560
+ | `description_text_color:` | `"#999999"` | |
2561
+ | `warning_ball_border_color:` | `"#373836"` | |
2562
+ | `required_text:` | `"Required"` | |
2563
+ | `required_color:` | `"white"` | |
2564
+ | `animated_warning_ball:` | `1` | |
2565
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
2566
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
2567
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
2568
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
2569
+ | `warning_icon_size:` | `20` | |
2570
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
2571
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
2572
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
2573
+ | `tooltip_style:` | `{...}` | |
2574
+ | `select_style:` | `{...}` | |
2575
+ | `show_left_box:` | `0` | |
2576
+ | `show_right_box:` | `0` | |
2577
+ | `show_unit:` | `0` | |
2578
+ | `create_input:` | `1` | |
2579
+ | `unit_text:` | `""` | |
2580
+ | `on_focus:` | `a block` | |
2581
+ | `on_blur:` | `a block` | |
2582
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
2583
+
2584
+ ## TextField
2585
+
2586
+ `TextField(...)` makes the TextField of the kit (comp/text-field.js).
2587
+
2588
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`, `"modernDark"`, `"ozden"`, `"ozdenDark"`.
2589
+
2590
+ A dark window gives it its dark look.
2591
+
2592
+ Read without a question to the page: `obj.text`.
2593
+
2594
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `focus_func`, `get_value`, `input_func`, `is_valid`, `set_background_color`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
2595
+
2596
+ | Param | Default | The kit says |
2597
+ |---|---|---|
2598
+ | `key:` | `"0"` | |
2599
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
2600
+ | `type:` | `"text"` | |
2601
+ | `width:` | `350` | |
2602
+ | `height:` | `"auto"` | |
2603
+ | `left_padding:` | `20` | |
2604
+ | `right_padding:` | `60` | |
2605
+ | `title_font_size:` | `16` | |
2606
+ | `input_font_size:` | `20` | |
2607
+ | `input_height:` | `40` | px: the row of the text |
2608
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
2609
+ | `description_font_size:` | `14` | |
2610
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
2611
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
2612
+ | `title_text:` | `"" (the kit alone: "INPUT NAME")` | |
2613
+ | `placeholder:` | `"" (the kit alone: "input value")` | |
2614
+ | `value:` | `""` | |
2615
+ | `max_length:` | `1000 (the kit alone: 30)` | |
2616
+ | `show_description:` | `0` | |
2617
+ | `description_text:` | `""` | |
2618
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
2619
+ | `background_color:` | `"#F6F6F6"` | |
2620
+ | `focus_background_color:` | `"#F3F4E0"` | |
2621
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
2622
+ | `line_color:` | `"#373836"` | |
2623
+ | `focus_line_color:` | `"#65A293"` | |
2624
+ | `back_border_color:` | `Black(0)` | |
2625
+ | `focus_back_border_color:` | `Black(0)` | |
2626
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
2627
+ | `back_border_top_round:` | `2` | |
2628
+ | `back_border_bottom_round:` | `0` | |
2629
+ | `title_text_color:` | `"#555555"` | |
2630
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
2631
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
2632
+ | `input_text_color:` | `"#373836"` | |
2633
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
2634
+ | `placeholder_color:` | `""` | "": the color of the browser |
2635
+ | `description_text_color:` | `"#999999"` | |
2636
+ | `warning_ball_border_color:` | `"#373836"` | |
2637
+ | `required:` | `0 (the kit alone: 0)` | |
2638
+ | `required_text:` | `"Required"` | |
2639
+ | `required_color:` | `"white"` | |
2640
+ | `warning_text:` | `"Invalid value format"` | |
2641
+ | `warning_color:` | `"#E5885E"` | |
2642
+ | `animated_warning_ball:` | `1` | |
2643
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
2644
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
2645
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
2646
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
2647
+ | `warning_icon_size:` | `20` | |
2648
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
2649
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
2650
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
2651
+ | `tooltip_style:` | `{...}` | |
2652
+ | `select_style:` | `{...}` | |
2653
+ | `show_left_box:` | `0` | |
2654
+ | `show_right_box:` | `0` | |
2655
+ | `show_unit:` | `0` | |
2656
+ | `create_input:` | `1` | |
2657
+ | `unit_text:` | `""` | |
2658
+ | `unit_style:` | `{...}` | |
2659
+ | `on_focus:` | `a block` | |
2660
+ | `on_blur:` | `a block` | |
2661
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
2662
+ | `on_enter:` | | the Enter key: a block or a lambda that gets the field |
2663
+
2664
+ ## TimeLine
2665
+
2666
+ `TimeLine(...)` makes the TimeLine of the kit (comp/time-line.js).
2667
+
2668
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
2669
+
2670
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_item`, `clear`, `get_items`, `set_enabled`, `set_items`, `set_theme`.
2671
+
2672
+ | Param | Default | The kit says |
2673
+ |---|---|---|
2674
+ | `key:` | `"0"` | |
2675
+ | `width:` | `320` | A number or "100%". (The height always grows with the items.) |
2676
+ | `items:` | `[]` | [{ time, text, description, color, key, data }] or ["Order created"] |
2677
+ | `item_gap:` | `20` | Space between two items. (The line is drawn in it.) |
2678
+ | `dot_size:` | `12` | |
2679
+ | `line_width:` | `2` | |
2680
+ | `show_line:` | `1` | 0: Only the dots. |
2681
+ | `clickable_items:` | `0` | 1: An item can be clicked. (onClick) |
2682
+ | `enabled:` | `1` | |
2683
+ | `on_click:` | `a block` | |
2684
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to TimeLine.styles |
2685
+ | `style:` | `{...}` | Light style package (default) |
2686
+
2687
+ ## TimePicker
2688
+
2689
+ `TimePicker(...)` makes the TimePicker of the kit (comp/time-picker.js).
2690
+
2691
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
2692
+
2693
+ A dark window gives it its dark look.
2694
+
2695
+ Read without a question to the page: `obj.value`.
2696
+
2697
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `close`, `get_time`, `is_open`, `open`, `set_enabled`, `set_max_time`, `set_min_time`, `set_minute_step`, `set_time`, `toggle`.
2698
+
2699
+ | Param | Default | The kit says |
2700
+ |---|---|---|
2701
+ | `key:` | `"0"` | |
2702
+ | `width:` | `160` | Field width (not used if inline: 1) |
2703
+ | `height:` | `44` | Field height (not used if inline: 1) |
2704
+ | `time:` | `null` | "HH:mm", Date or null |
2705
+ | `min_time:` | `null` | "HH:mm" or null |
2706
+ | `max_time:` | `null` | "HH:mm" or null. If it is smaller than minTime, the range goes over midnight. |
2707
+ | `minute_step:` | `5` | 1, 5, 10, 15, 30... |
2708
+ | `format:` | `"HH:mm"` | Tokens: HH, H, hh, h, mm, A (AM/PM), a (am/pm) |
2709
+ | `language:` | `"en"` | "en", "tr" |
2710
+ | `placeholder:` | `""` | Empty: uses the language text |
2711
+ | `inline:` | `0` | 1: Panel is always visible, no field. |
2712
+ | `enabled:` | `1` | |
2713
+ | `close_on_select:` | `1` | 1: Close after a minute is selected. |
2714
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js. 0: the scrollbar of the browser. |
2715
+ | `show_now_button:` | `1` | |
2716
+ | `show_clear_button:` | `1` | |
2717
+ | `on_change:` | `a block` | self.value ("19:30" or ""), self.hours, self.minutes (number or null), self.timeText |
2718
+ | `on_open:` | `a block` | |
2719
+ | `on_close:` | `a block` | |
2720
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "dark", "minimal", "minimalDark" or a name added to TimePicker.styles |
2721
+ | `style:` | `{...}` | Light style package (default) |
2722
+
2723
+ ## TinySelect
2724
+
2725
+ `TinySelect(...)` makes the TinySelect of the kit (comp/tiny-select.js).
2726
+
2727
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `get_index_by_value`, `get_selected_item`, `remove`, `set_color`, `set_enabled`, `set_list`, `set_selected_index`, `set_title_text`.
2728
+
2729
+ | Param | Default | The kit says |
2730
+ |---|---|---|
2731
+ | `title_text:` | `""` | |
2732
+ | `list:` | `[]` | [{ value: "1", label: "(none)" },] |
2733
+ | `on_change:` | `a block` | Another item is chosen: self.selectedIndex, self.getSelectedItem() ({ value, label }). Not at create time; setSelectedIndex(index) calls it, setSelectedIndex(index, 1) does not. |
2734
+ | `selected_index:` | `0` | |
2735
+ | `font_size:` | `20` | |
2736
+ | `border:` | `0` | |
2737
+ | `color:` | `"transparent"` | "whitesmoke" |
2738
+ | `round:` | `3` | |
2739
+ | `width:` | `"auto"` | |
2740
+ | `height:` | `50` | |
2741
+ | `padding_x:` | `12` | |
2742
+ | `enabled:` | `1` | 0: it can not be opened, a little transparent (setEnabled) |
2743
+ | `arrow_icon_file:` | `"data:image/svg+xml;utf8," + encodeURIComponent('<svg xml...` | |
2744
+ | `arrow_border:` | `0` | 1 |
2745
+ | `arrow_border_color:` | `"rgba(0, 0, 0, 0.2)"` | |
2746
+ | `arrow_background_color:` | `"transparent"` | "white" |
2747
+ | `arrow_round:` | `3` | 30 |
2748
+ | `arrow_size:` | `24` | |
2749
+ | `list_font_size:` | `14` | |
2750
+ | `list_text_color:` | `"rgba(0, 0, 0, 0.8)"` | |
2751
+ | `list_over_text_color:` | `"indianred"` | |
2752
+ | `list_background_color:` | `"whitesmoke"` | |
2753
+ | `list_border:` | `1` | |
2754
+ | `list_border_color:` | `"rgba(0, 0, 0, 0.6)"` | |
2755
+ | `empty_text:` | `"Empty"` | |
2756
+ | `allow_html:` | `0` | 1: titleText, emptyText and the labels of the list are HTML (only for your own texts) |
2757
+ | `invert_icon_color:` | `0` | |
2758
+ | `label_bold:` | `1` | |
2759
+ | `label_text_color:` | `"rgba(0,0,0,0.8)"` | |
2760
+
2761
+ ## TinyTable
2762
+
2763
+ `TinyTable(...)` makes the TinyTable of the kit (comp/tiny-table.js).
2764
+
2765
+ When to use it: a small table between the lines of a page, like a table in a text, for small data that needs nothing more: it has no sorting, no search and no selection.
2766
+
2767
+ `style_name:` `"classic"`, `"dark"`, `"light"`.
2768
+
2769
+ A dark window gives it its dark look.
2770
+
2771
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_rows`.
2772
+
2773
+ | Param | Default | The kit says |
2774
+ |---|---|---|
2775
+ | `width:` | `"auto"` | As wide as the columns |
2776
+ | `height:` | `"auto"` | |
2777
+ | `columns:` | `[]` | [{ title, width (px), align: "left" \| "center" \| "right" }] |
2778
+ | `rows:` | `[]` | [["text", "text", ...], ...] |
2779
+ | `body_height:` | `"auto"` | "auto" or a number: the rows scroll |
2780
+ | `allow_html:` | `0` | 1: the titles and the cells are HTML (only for your own texts) |
2781
+ | `on_cell_create:` | `a block` | cell.rowIndex, cell.columnIndex, cell.value, cell.label (Ex: cell.label.bold = 1) |
2782
+ | `on_row_click:` | `a block` | |
2783
+ | `style_name:` | `"classic"` | "classic", "light", "dark" or a name added to TinyTable.styles |
2784
+ | `style:` | `{...}` | Classic style package (default) |
2785
+
2786
+ ## Toggle
2787
+
2788
+ `Toggle(...)` makes the Toggle of the kit (comp/toggle.js).
2789
+
2790
+ `style_name:` `"badge"`, `"classic"`, `"dark"`, `"float"`, `"label"`, `"light"`, `"minimal"`, `"minimalDark"`, `"outline"`, `"ozden"`, `"ozdenDark"`, `"round"`, `"slim"`, `"square"`, `"tick"`.
2791
+
2792
+ A dark window gives it its dark look.
2793
+
2794
+ Read without a question to the page: `obj.value`.
2795
+
2796
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `set_animated`, `set_background_selected_color`, `set_marks`, `set_second_state`, `set_state`, `set_value`, `switch`.
2797
+
2798
+ | Param | Default | The kit says |
2799
+ |---|---|---|
2800
+ | `key:` | `"0"` | |
2801
+ | `width:` | `70` | Standard box features are added automatically. |
2802
+ | `height:` | `40` | |
2803
+ | `spacing:` | `3` | px: between the track and the knob |
2804
+ | `value:` | `0` | |
2805
+ | `invert_color:` | `0` | |
2806
+ | `off_button_scale:` | `0.6` | The size of the knob when off. (1: the same size as on) |
2807
+ | `on_mark:` | `a block` | Shows when on: "check", "cross" or a text ("ON"). "": nothing |
2808
+ | `off_mark:` | `""` | Shows when off |
2809
+ | `mark_place:` | `"track"` | "track": on the free side of the track, "knob": in the knob (Only at create time) |
2810
+ | `animated:` | `1` | 1: small motions of a toggle with marks. (box.setAnimated(0/1)) |
2811
+ | `focus_ring_color:` | `""` | the ring of the keyboard focus. "": the ring of basic.js |
2812
+ | `mark_style:` | `{...}` | |
2813
+ | `on_change:` | `a block` | self.value changed (a click, a key, setValue()). Not at create time, not with setValue(value, 1) |
2814
+ | `background_style:` | `{...}` | The track |
2815
+ | `button_style:` | `{...}` | The knob |
2816
+ | `style_name:` | `"ozden"` | "ozden", "ozdenDark", "light", "dark", "classic", "float", "round", "slim", "outline", "square", "tick", "badge", "label", "minimal", "minimalDark" or a name added to Toggle.styles |
2817
+ | `style:` | `{}` | WHY: the look is in the params above; the packages are packages of params (see Toggle.styles). |
2818
+
2819
+ ## ToolBar
2820
+
2821
+ `ToolBar(...)` makes the ToolBar of the kit (comp/tool-bar.js).
2822
+
2823
+ `style_name:` `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`.
2824
+
2825
+ A dark window gives it its dark look.
2826
+
2827
+ Read without a question to the page: `obj.checked_keys`.
2828
+
2829
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `click_item`, `close_menu`, `get_checked_keys`, `is_item_checked`, `remove`, `set_enabled`, `set_item_checked`, `set_item_enabled`, `set_item_hint`, `set_item_text`, `set_items`, `set_theme`.
2830
+
2831
+ | Param | Default | The kit says |
2832
+ |---|---|---|
2833
+ | `key:` | `"0"` | Your name for this object: read it in a callback (self.key) |
2834
+ | `left:` | `0` | |
2835
+ | `top:` | `0` | |
2836
+ | `width:` | `"100%"` | |
2837
+ | `height:` | `42` | |
2838
+ | `shrink:` | `0 (the kit alone: 0)` | WHY: In a full group its row must not get thinner: its height is its buttons. |
2839
+ | `items:` | `[]` | [ITEM] (See AN ITEM above) |
2840
+ | `enabled:` | `1` | |
2841
+ | `aria_label:` | `"Tool bar"` | |
2842
+ | `more_text:` | `"More"` | The name of the "..." button |
2843
+ | `on_click:` | `a block` | An item (with a click, the keyboard, its shortcut or clickItem()) |
2844
+ | `style_name:` | `"light"` | "light", "dark", "minimal", "minimalDark" or a name added to ToolBar.styles |
2845
+ | `style:` | `{...}` | Light style package (default) |
2846
+
2847
+ ## Tooltip
2848
+
2849
+ `Tooltip(...)` makes the Tooltip of the kit (comp/tooltip.js).
2850
+
2851
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `hide_hint`, `remove`, `set_hint_text`, `set_lbl_color`.
2852
+
2853
+ | Param | Default | The kit says |
2854
+ |---|---|---|
2855
+ | `target:` | `null` | |
2856
+ | `hint_text:` | `""` | |
2857
+ | `hint_position:` | `"top"` | "top", "left", "bottom", "right" |
2858
+ | `"lbl_fontSize" =>` | `12` | |
2859
+ | `"lbl_spaceX" =>` | `8` | |
2860
+ | `"lbl_spaceY" =>` | `3` | |
2861
+ | `"lbl_color" =>` | `"rgba(255, 255, 255, 0.90)"` | |
2862
+ | `"lbl_textColor" =>` | `"rgba(0, 0, 0, 0.85)"` | |
2863
+ | `"lbl_round" =>` | `3` | |
2864
+ | `"lbl_border" =>` | `1` | |
2865
+ | `"lbl_borderColor" =>` | `"rgba(0, 0, 0, 0.9)"` | |
2866
+ | `"lbl_arrow" =>` | `0` | px: the side of the arrow (0: no arrow) |
2867
+ | `content:` | `null` | function (bubble): its own objects in the bubble, in place of hintText |
2868
+ | `trigger:` | `"hover"` | "hover": it follows the mouse; "click": a popover (it stays, its content can be clicked) |
2869
+ | `look:` | `null` | Tooltip.BUBBLE_LOOK keys over the lbl_ ones (Ex: { shadow, padding: [16, 14], contentGap }) |
2870
+ | `style_name:` | `""` | a look of Tooltip.looks under look ("minimal", "minimalDark"). "": the lbl_ params |
2871
+ | `scale:` | `null` | every size of the bubble multiplied (Ex: 1.5); null: basic.uiScale when the bubble opens |
2872
+ | `visible:` | `0` | |
2873
+
2874
+ ## TreeView
2875
+
2876
+ `TreeView(...)` makes the TreeView of the kit (comp/tree-view.js).
2877
+
2878
+ `style_name:` `"classic"`, `"dark"`, `"light"`, `"minimal"`, `"minimalDark"`, `"modern"`.
2879
+
2880
+ A dark window gives it its dark look.
2881
+
2882
+ Read without a question to the page: `obj.previous_value`, `obj.value`.
2883
+
2884
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `add_node`, `collapse`, `collapse_all`, `expand`, `expand_all`, `focus`, `get_items`, `get_node`, `get_node_of_event`, `get_parent`, `get_path`, `get_row_elem`, `get_selected_node`, `remove_node`, `reveal`, `set_children`, `set_empty_text`, `set_enabled`, `set_items`, `set_value`, `toggle`.
2885
+
2886
+ | Param | Default | The kit says |
2887
+ |---|---|---|
2888
+ | `key:` | `"0"` | |
2889
+ | `width:` | `260` | |
2890
+ | `height:` | `320` | "auto": no scrolling, the tree grows with its rows. |
2891
+ | `items:` | `[]` | [NODE] (See NODE above) |
2892
+ | `value:` | `null` | Key of the selected node. null: nothing is selected. |
2893
+ | `empty_text:` | `"No items"` | |
2894
+ | `type_ahead:` | `1` | 1: Typing a letter jumps to the next row that starts with it. |
2895
+ | `use_scroll_bar:` | `1` | basic/scroll-bar.js (when it is loaded). 0: the scrollbar of the browser. |
2896
+ | `enabled:` | `1` | |
2897
+ | `aria_label:` | `"Tree"` | |
2898
+ | `on_select:` | `a block` | self.value, self.previousValue |
2899
+ | `on_activate:` | `a block` | Double click or Enter (event.type: "dblclick" or "keydown") |
2900
+ | `toggle_on_double_click:` | `1` | 0: a double click does not open / close the row (Ex: it renames it) |
2901
+ | `on_toggle:` | `a block` | node.expanded: 1 or 0 |
2902
+ | `on_hover:` | `a block` | node: null when the mouse leaves the rows |
2903
+ | `on_load_children:` | `a block` | hasChildren: 1 and no children. Call self.setChildren(node.key, [...]). |
2904
+ | `style_name:` | `"light"` | "light" ("classic": its old name), "modern", "dark", "minimal", "minimalDark" or a name added to TreeView.styles |
2905
+ | `style:` | `{...}` | Light style package (default) |
2906
+
2907
+ ## UrlField
2908
+
2909
+ `UrlField(...)` makes the UrlField of the kit (comp/url-field.js).
2910
+
2911
+ A dark window gives it its dark look.
2912
+
2913
+ Read without a question to the page: `obj.text`.
2914
+
2915
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `blur_func`, `check_if_input_is_required_and_empty`, `check_input_value`, `focus_func`, `get_value`, `input_func`, `is_valid`, `set_background_color`, `set_description_text`, `set_focus_background_color`, `set_focus_line_color`, `set_line_color`, `set_max_length`, `set_placeholder`, `set_required`, `set_required_icon`, `set_required_text`, `set_title_text`, `set_unit_text`, `set_value`, `set_warning_color`, `set_warning_icon`, `set_warning_text`, `show_warning_if_not_valid`.
2916
+
2917
+ | Param | Default | The kit says |
2918
+ |---|---|---|
2919
+ | `width:` | `400` | |
2920
+ | `required:` | `0 (the kit alone: 1)` | |
2921
+ | `title_text:` | `"" (the kit alone: "URL")` | |
2922
+ | `placeholder:` | `"example.com"` | |
2923
+ | `warning_text:` | `"Invalid URL format"` | |
2924
+ | `warning_color:` | `"#E5885E"` | |
2925
+ | `max_length:` | `2048 (the kit alone: 255)` | |
2926
+ | `right_padding:` | `20` | |
2927
+ | `tiny_select_params:` | `{...}` | |
2928
+ | `key:` | `"0"` | |
2929
+ | `style_name:` | `"light" (the kit alone: "light")` | "light", "dark", "modern" ("classic": its old name), "modernDark", "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to TextField.styles |
2930
+ | `type:` | `"text"` | |
2931
+ | `height:` | `"auto"` | |
2932
+ | `left_padding:` | `20` | |
2933
+ | `title_font_size:` | `16` | |
2934
+ | `input_font_size:` | `20` | |
2935
+ | `input_height:` | `40` | px: the row of the text |
2936
+ | `field_padding:` | `14` | px: over and under the title and the text (titlePosition "inside") |
2937
+ | `description_font_size:` | `14` | |
2938
+ | `title_position:` | `"inside"` | "inside": the title in the field, over the text. "above": the title over the field (the field is only the row of the text). (Only at create time) |
2939
+ | `title_gap:` | `4` | px between the title and the field (titlePosition "above") |
2940
+ | `value:` | `""` | |
2941
+ | `show_description:` | `0` | |
2942
+ | `description_text:` | `""` | |
2943
+ | `allow_html:` | `0` | 1: titleText, descriptionText and unitText are HTML (only for your own texts) |
2944
+ | `background_color:` | `"#F6F6F6"` | |
2945
+ | `focus_background_color:` | `"#F3F4E0"` | |
2946
+ | `hover_background_color:` | `""` | the field under the mouse (not while it is selected). "": no change |
2947
+ | `line_color:` | `"#373836"` | |
2948
+ | `focus_line_color:` | `"#65A293"` | |
2949
+ | `back_border_color:` | `Black(0)` | |
2950
+ | `focus_back_border_color:` | `Black(0)` | |
2951
+ | `hover_back_border_color:` | `""` | the edge under the mouse (not while it is selected). "": no change |
2952
+ | `back_border_top_round:` | `2` | |
2953
+ | `back_border_bottom_round:` | `0` | |
2954
+ | `title_text_color:` | `"#555555"` | |
2955
+ | `title_bold:` | `0` | 1: the title in bold (opensans-bold) |
2956
+ | `title_letter_spacing:` | `""` | "": normal. Ex: "0.06em" |
2957
+ | `input_text_color:` | `"#373836"` | |
2958
+ | `input_color_scheme:` | `""` | "": the page's. "dark": the autofill colors of the browser stay dark (on a dark field) |
2959
+ | `placeholder_color:` | `""` | "": the color of the browser |
2960
+ | `description_text_color:` | `"#999999"` | |
2961
+ | `warning_ball_border_color:` | `"#373836"` | |
2962
+ | `required_text:` | `"Required"` | |
2963
+ | `required_color:` | `"white"` | |
2964
+ | `animated_warning_ball:` | `1` | |
2965
+ | `warning_ball_type:` | `"color"` | "color": colored ball, "icon": icon image |
2966
+ | `warning_ball_size:` | `16` | px: the colored ball (warningBallType "color") |
2967
+ | `warning_ball_border:` | `2` | px: the edge of the colored ball (warningBallBorderColor) |
2968
+ | `warning_border_color:` | `""` | the edge of the field while it shows a warning (not while typing). "": no change |
2969
+ | `warning_icon_size:` | `20` | |
2970
+ | `required_icon_file:` | `""` | image path or data URI. "": built-in icon |
2971
+ | `warning_icon_file:` | `""` | image path or data URI. "": built-in icon |
2972
+ | `required_icon_color:` | `"#373836"` | built-in required icon color (built-in warning icon uses warningColor) |
2973
+ | `tooltip_style:` | `{...}` | |
2974
+ | `select_style:` | `{...}` | |
2975
+ | `show_left_box:` | `0` | |
2976
+ | `show_right_box:` | `0` | |
2977
+ | `show_unit:` | `0` | |
2978
+ | `create_input:` | `1` | |
2979
+ | `unit_text:` | `""` | |
2980
+ | `unit_style:` | `{...}` | |
2981
+ | `on_focus:` | `a block` | |
2982
+ | `on_blur:` | `a block` | |
2983
+ | `on_change:` | `a block` | the user changed the text (not at create time, not by setValue()) |
2984
+ | `on_enter:` | | the Enter key: a block or a lambda that gets the field |
2985
+
2986
+ ## WebView
2987
+
2988
+ `WebView(...)` makes the WebView of the kit (comp/web-view.js).
2989
+
2990
+ Methods of the kit, as `obj.method_name(...)` in snake_case (its file tells what each takes): `clear`, `get_document`, `get_iframe`, `get_window`, `hide_error`, `is_loading_page`, `load`, `load_html`, `post_message`, `reload`, `remove`, `set_auto_height`, `set_interactive`, `set_scale`, `show_error`.
2991
+
2992
+ | Param | Default | The kit says |
2993
+ |---|---|---|
2994
+ | `key:` | `"0"` | |
2995
+ | `width:` | `400` | |
2996
+ | `height:` | `300` | |
2997
+ | `url:` | `""` | "": Nothing is loaded (placeholder is shown) |
2998
+ | `html_text:` | `""` | HTML text instead of a URL (srcdoc). NOTE: Not "html": that is the innerHTML setter of a basic.js Box. |
2999
+ | `aria_label:` | `"Web view"` | the name a screen reader says (the title of the iframe) |
3000
+ | `sandbox:` | `null` | null: No sandbox. Ex: "allow-scripts allow-same-origin allow-forms allow-popups" |
3001
+ | `allow:` | `""` | Ex: "fullscreen; clipboard-write" |
3002
+ | `referrer_policy:` | `""` | Ex: "no-referrer" |
3003
+ | `lazy:` | `0` | 1: The browser loads the page when the box is near the screen. (loading="lazy") |
3004
+ | `scale:` | `1` | 0.5: The page is shown at half size (scaled preview). NOTE: Not "zoom": basic.js uses it for the page. |
3005
+ | `interactive:` | `1` | 0: The page can not be clicked or scrolled. (Preview) |
3006
+ | `auto_height:` | `0` | 1: The box height follows the page height. (Same origin pages only) |
3007
+ | `toolbar:` | `0` | 1: A bar with the URL, reload and "open in a new tab" buttons (Only at create time) |
3008
+ | `show_loading:` | `1` | 1: Spinner until the page is loaded |
3009
+ | `empty_text:` | `"No page"` | Shown when nothing is loaded |
3010
+ | `load_timeout:` | `0` | Seconds. 0: No timeout. Ex: 15 -> onTimeout is called when the page is not loaded in 15 seconds. |
3011
+ | `on_load:` | `a block` | |
3012
+ | `on_error:` | `a block` | Same origin URL of load() that could not be loaded (the browser shows its error page) |
3013
+ | `on_timeout:` | `a block` | |
3014
+ | `on_message:` | `a block` | Messages from the page (window.parent.postMessage) |
3015
+ | `on_click:` | `a block` | interactive: 0 -> click on the cover |
3016
+ | `style:` | `{...}` | |
3017
+