@lowdefy/blocks-antd 5.6.0 → 6.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 (285) hide show
  1. package/dist/TagPillRow.js +88 -0
  2. package/dist/blocks/Affix/gallery.yaml +399 -0
  3. package/dist/blocks/Affix/tests/Affix.e2e.yaml +72 -0
  4. package/dist/blocks/Affix/tests.yaml +29 -0
  5. package/dist/blocks/Alert/gallery.yaml +701 -0
  6. package/dist/blocks/Alert/tests/Alert.e2e.yaml +161 -0
  7. package/dist/blocks/Alert/tests.yaml +261 -0
  8. package/dist/blocks/AutoComplete/gallery.yaml +713 -0
  9. package/dist/blocks/AutoComplete/tests/AutoComplete.e2e.yaml +330 -0
  10. package/dist/blocks/AutoComplete/tests.yaml +178 -0
  11. package/dist/blocks/Avatar/gallery.yaml +1037 -0
  12. package/dist/blocks/Avatar/tests/Avatar.e2e.yaml +125 -0
  13. package/dist/blocks/Avatar/tests.yaml +76 -0
  14. package/dist/blocks/Badge/gallery.yaml +1090 -0
  15. package/dist/blocks/Badge/tests/Badge.e2e.yaml +195 -0
  16. package/dist/blocks/Badge/tests.yaml +91 -0
  17. package/dist/blocks/Breadcrumb/gallery.yaml +484 -0
  18. package/dist/blocks/Breadcrumb/tests/Breadcrumb.e2e.yaml +165 -0
  19. package/dist/blocks/Breadcrumb/tests.yaml +106 -0
  20. package/dist/blocks/Button/Button.js +11 -2
  21. package/dist/blocks/Button/gallery.yaml +718 -0
  22. package/dist/blocks/Button/meta.js +4 -0
  23. package/dist/blocks/Button/tests/Button.e2e.yaml +246 -0
  24. package/dist/blocks/Button/tests.yaml +109 -0
  25. package/dist/blocks/ButtonSelector/gallery.yaml +891 -0
  26. package/dist/blocks/ButtonSelector/tests/ButtonSelector.e2e.yaml +188 -0
  27. package/dist/blocks/ButtonSelector/tests.yaml +167 -0
  28. package/dist/blocks/Calendar/gallery.yaml +128 -0
  29. package/dist/blocks/Calendar/tests/Calendar.e2e.yaml +136 -0
  30. package/dist/blocks/Calendar/tests.yaml +50 -0
  31. package/dist/blocks/Card/gallery.yaml +1035 -0
  32. package/dist/blocks/Card/tests/Card.e2e.yaml +209 -0
  33. package/dist/blocks/Card/tests.yaml +75 -0
  34. package/dist/blocks/Carousel/gallery.yaml +1971 -0
  35. package/dist/blocks/Carousel/tests/Carousel.e2e.yaml +211 -0
  36. package/dist/blocks/Carousel/tests.yaml +117 -0
  37. package/dist/blocks/CheckboxSelector/gallery.yaml +781 -0
  38. package/dist/blocks/CheckboxSelector/tests/CheckboxSelector.e2e.yaml +272 -0
  39. package/dist/blocks/CheckboxSelector/tests.yaml +325 -0
  40. package/dist/blocks/CheckboxSwitch/gallery.yaml +457 -0
  41. package/dist/blocks/CheckboxSwitch/tests/CheckboxSwitch.e2e.yaml +126 -0
  42. package/dist/blocks/CheckboxSwitch/tests.yaml +96 -0
  43. package/dist/blocks/Collapse/gallery.yaml +1079 -0
  44. package/dist/blocks/Collapse/tests/Collapse.e2e.yaml +206 -0
  45. package/dist/blocks/Collapse/tests.yaml +265 -0
  46. package/dist/blocks/ColorSelector/gallery.yaml +807 -0
  47. package/dist/blocks/ColorSelector/tests/ColorSelector.e2e.yaml +77 -0
  48. package/dist/blocks/ColorSelector/tests.yaml +84 -0
  49. package/dist/blocks/ConfigProvider/gallery.yaml +1003 -0
  50. package/dist/blocks/ConfigProvider/tests.yaml +62 -0
  51. package/dist/blocks/ConfirmModal/gallery.yaml +1043 -0
  52. package/dist/blocks/ConfirmModal/tests/ConfirmModal.e2e.yaml +410 -0
  53. package/dist/blocks/ConfirmModal/tests.yaml +95 -0
  54. package/dist/blocks/Content/gallery.yaml +528 -0
  55. package/dist/blocks/Content/tests/Content.e2e.yaml +71 -0
  56. package/dist/blocks/Content/tests.yaml +42 -0
  57. package/dist/blocks/ControlledList/ControlledList.js +1 -1
  58. package/dist/blocks/ControlledList/gallery.yaml +481 -0
  59. package/dist/blocks/ControlledList/{style.module.css → style.css} +3 -3
  60. package/dist/blocks/ControlledList/tests/ControlledList.e2e.yaml +161 -0
  61. package/dist/blocks/ControlledList/tests.yaml +57 -0
  62. package/dist/blocks/DateRangeSelector/DateRangeSelector.js +7 -0
  63. package/dist/blocks/DateRangeSelector/e2e.js +28 -2
  64. package/dist/blocks/DateRangeSelector/gallery.yaml +858 -0
  65. package/dist/blocks/DateRangeSelector/meta.js +2 -0
  66. package/dist/blocks/DateRangeSelector/tests/DateRangeSelector.e2e.yaml +204 -0
  67. package/dist/blocks/DateRangeSelector/tests.yaml +129 -0
  68. package/dist/blocks/DateSelector/DateSelector.js +6 -0
  69. package/dist/blocks/DateSelector/e2e.js +28 -2
  70. package/dist/blocks/DateSelector/gallery.yaml +691 -0
  71. package/dist/blocks/DateSelector/meta.js +6 -0
  72. package/dist/blocks/DateSelector/tests/DateSelector.e2e.yaml +229 -0
  73. package/dist/blocks/DateSelector/tests.yaml +117 -0
  74. package/dist/blocks/DateTimeSelector/DateTimeSelector.js +7 -0
  75. package/dist/blocks/DateTimeSelector/e2e.js +26 -2
  76. package/dist/blocks/DateTimeSelector/gallery.yaml +770 -0
  77. package/dist/blocks/DateTimeSelector/meta.js +2 -0
  78. package/dist/blocks/DateTimeSelector/tests/DateTimeSelector.e2e.yaml +163 -0
  79. package/dist/blocks/DateTimeSelector/tests.yaml +140 -0
  80. package/dist/blocks/Descriptions/gallery.yaml +839 -0
  81. package/dist/blocks/Descriptions/tests/Descriptions.e2e.yaml +143 -0
  82. package/dist/blocks/Descriptions/tests.yaml +256 -0
  83. package/dist/blocks/Divider/gallery.yaml +375 -0
  84. package/dist/blocks/Divider/tests/Divider.e2e.yaml +107 -0
  85. package/dist/blocks/Divider/tests.yaml +58 -0
  86. package/dist/blocks/Drawer/gallery.yaml +1257 -0
  87. package/dist/blocks/Drawer/tests/Drawer.e2e.yaml +562 -0
  88. package/dist/blocks/Drawer/tests.yaml +80 -0
  89. package/dist/blocks/DropdownButton/gallery.yaml +606 -0
  90. package/dist/blocks/DropdownButton/tests/DropdownButton.e2e.yaml +243 -0
  91. package/dist/blocks/DropdownMenu/gallery.yaml +578 -0
  92. package/dist/blocks/DropdownMenu/tests/DropdownMenu.e2e.yaml +267 -0
  93. package/dist/blocks/Flex/gallery.yaml +1416 -0
  94. package/dist/blocks/Flex/tests/Flex.e2e.yaml +95 -0
  95. package/dist/blocks/Flex/tests.yaml +92 -0
  96. package/dist/blocks/FloatButton/gallery.yaml +518 -0
  97. package/dist/blocks/FloatButton/tests/FloatButton.e2e.yaml +73 -0
  98. package/dist/blocks/FloatButton/tests.yaml +59 -0
  99. package/dist/blocks/Footer/gallery.yaml +355 -0
  100. package/dist/blocks/Footer/tests/Footer.e2e.yaml +70 -0
  101. package/dist/blocks/Footer/tests.yaml +28 -0
  102. package/dist/blocks/Header/gallery.yaml +249 -0
  103. package/dist/blocks/Header/tests/Header.e2e.yaml +77 -0
  104. package/dist/blocks/Header/tests.yaml +36 -0
  105. package/dist/blocks/Label/Label.js +1 -1
  106. package/dist/blocks/Label/gallery.yaml +762 -0
  107. package/dist/blocks/Label/{style.module.css → style.css} +28 -28
  108. package/dist/blocks/Label/tests/Label.e2e.yaml +247 -0
  109. package/dist/blocks/Label/tests.yaml +212 -0
  110. package/dist/blocks/Layout/gallery.yaml +548 -0
  111. package/dist/blocks/Layout/tests/Layout.e2e.yaml +86 -0
  112. package/dist/blocks/Layout/tests.yaml +28 -0
  113. package/dist/blocks/ListSelector/gallery.yaml +223 -0
  114. package/dist/blocks/Masonry/gallery.yaml +989 -0
  115. package/dist/blocks/Masonry/tests/Masonry.e2e.yaml +128 -0
  116. package/dist/blocks/Masonry/tests.yaml +42 -0
  117. package/dist/blocks/MasonryList/gallery.yaml +224 -0
  118. package/dist/blocks/MasonryList/tests/MasonryList.e2e.yaml +55 -0
  119. package/dist/blocks/MasonryList/tests.yaml +42 -0
  120. package/dist/blocks/Menu/gallery.yaml +974 -0
  121. package/dist/blocks/Menu/tests/Menu.e2e.yaml +484 -0
  122. package/dist/blocks/Menu/tests.yaml +1053 -0
  123. package/dist/blocks/Message/gallery.yaml +860 -0
  124. package/dist/blocks/Message/tests/Message.e2e.yaml +246 -0
  125. package/dist/blocks/Message/tests.yaml +54 -0
  126. package/dist/blocks/MobileMenu/gallery.yaml +1172 -0
  127. package/dist/blocks/MobileMenu/tests/MobileMenu.e2e.yaml +314 -0
  128. package/dist/blocks/MobileMenu/tests.yaml +359 -0
  129. package/dist/blocks/Modal/gallery.yaml +1039 -0
  130. package/dist/blocks/Modal/tests/Modal.e2e.yaml +493 -0
  131. package/dist/blocks/Modal/tests.yaml +75 -0
  132. package/dist/blocks/MonthSelector/MonthSelector.js +6 -0
  133. package/dist/blocks/MonthSelector/e2e.js +26 -2
  134. package/dist/blocks/MonthSelector/gallery.yaml +687 -0
  135. package/dist/blocks/MonthSelector/meta.js +6 -0
  136. package/dist/blocks/MonthSelector/tests/MonthSelector.e2e.yaml +167 -0
  137. package/dist/blocks/MonthSelector/tests.yaml +124 -0
  138. package/dist/blocks/MultipleSelector/gallery.yaml +1245 -0
  139. package/dist/blocks/MultipleSelector/tests/MultipleSelector.e2e.yaml +445 -0
  140. package/dist/blocks/MultipleSelector/tests.yaml +201 -0
  141. package/dist/blocks/Notification/gallery.yaml +1376 -0
  142. package/dist/blocks/Notification/tests/Notification.e2e.yaml +362 -0
  143. package/dist/blocks/Notification/tests.yaml +97 -0
  144. package/dist/blocks/NumberInput/gallery.yaml +753 -0
  145. package/dist/blocks/NumberInput/tests/NumberInput.e2e.yaml +228 -0
  146. package/dist/blocks/NumberInput/tests.yaml +116 -0
  147. package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +1 -1
  148. package/dist/blocks/PageHeaderMenu/gallery.yaml +480 -0
  149. package/dist/blocks/PageHeaderMenu/tests/PageHeaderMenu.e2e.yaml +110 -0
  150. package/dist/blocks/PageHeaderMenu/tests.yaml +173 -0
  151. package/dist/blocks/PageSidebarLayout/PageSidebarLayout.js +10 -1
  152. package/dist/blocks/PageSidebarLayout/gallery.yaml +302 -0
  153. package/dist/blocks/PageSidebarLayout/meta.js +1 -0
  154. package/dist/blocks/PageSidebarLayout/tests/PageSidebarLayout.e2e.yaml +216 -0
  155. package/dist/blocks/PageSidebarLayout/tests.yaml +174 -0
  156. package/dist/blocks/PageSiderMenu/PageSiderMenu.js +1 -1
  157. package/dist/blocks/PageSiderMenu/gallery.yaml +516 -0
  158. package/dist/blocks/PageSiderMenu/tests/PageSiderMenu.e2e.yaml +175 -0
  159. package/dist/blocks/PageSiderMenu/tests.yaml +211 -0
  160. package/dist/blocks/Pagination/gallery.yaml +503 -0
  161. package/dist/blocks/Pagination/tests/Pagination.e2e.yaml +159 -0
  162. package/dist/blocks/Pagination/tests.yaml +80 -0
  163. package/dist/blocks/Paragraph/gallery.yaml +458 -0
  164. package/dist/blocks/Paragraph/tests/Paragraph.e2e.yaml +153 -0
  165. package/dist/blocks/Paragraph/tests.yaml +176 -0
  166. package/dist/blocks/ParagraphInput/gallery.yaml +1483 -0
  167. package/dist/blocks/ParagraphInput/tests/ParagraphInput.e2e.yaml +189 -0
  168. package/dist/blocks/ParagraphInput/tests.yaml +163 -0
  169. package/dist/blocks/PasswordInput/gallery.yaml +420 -0
  170. package/dist/blocks/PasswordInput/tests/PasswordInput.e2e.yaml +188 -0
  171. package/dist/blocks/PasswordInput/tests.yaml +78 -0
  172. package/dist/blocks/PhoneNumberInput/gallery.yaml +677 -0
  173. package/dist/blocks/PhoneNumberInput/tests/PhoneNumberInput.e2e.yaml +279 -0
  174. package/dist/blocks/PhoneNumberInput/tests.yaml +25 -0
  175. package/dist/blocks/Popover/gallery.yaml +1301 -0
  176. package/dist/blocks/Popover/tests/Popover.e2e.yaml +249 -0
  177. package/dist/blocks/Popover/tests.yaml +105 -0
  178. package/dist/blocks/Progress/gallery.yaml +772 -0
  179. package/dist/blocks/Progress/tests/Progress.e2e.yaml +167 -0
  180. package/dist/blocks/Progress/tests.yaml +114 -0
  181. package/dist/blocks/QRCode/gallery.yaml +492 -0
  182. package/dist/blocks/QRCode/tests/QRCode.e2e.yaml +66 -0
  183. package/dist/blocks/QRCode/tests.yaml +113 -0
  184. package/dist/blocks/RadioSelector/gallery.yaml +816 -0
  185. package/dist/blocks/RadioSelector/tests/RadioSelector.e2e.yaml +269 -0
  186. package/dist/blocks/RadioSelector/tests.yaml +339 -0
  187. package/dist/blocks/RatingSlider/gallery.yaml +627 -0
  188. package/dist/blocks/RatingSlider/tests/RatingSlider.e2e.yaml +188 -0
  189. package/dist/blocks/RatingSlider/tests.yaml +116 -0
  190. package/dist/blocks/Result/gallery.yaml +925 -0
  191. package/dist/blocks/Result/tests/Result.e2e.yaml +126 -0
  192. package/dist/blocks/Result/tests.yaml +75 -0
  193. package/dist/blocks/Search/Search.js +1 -1
  194. package/dist/blocks/Search/SearchModal.js +18 -9
  195. package/dist/blocks/Search/gallery.yaml +170 -0
  196. package/dist/blocks/Search/meta.js +2 -1
  197. package/dist/blocks/Search/{style.module.css → style.css} +19 -12
  198. package/dist/blocks/Search/tests/Search.e2e.yaml +125 -0
  199. package/dist/blocks/Search/useSearchIndex.js +24 -2
  200. package/dist/blocks/SegmentedSelector/gallery.yaml +725 -0
  201. package/dist/blocks/SegmentedSelector/tests/SegmentedSelector.e2e.yaml +115 -0
  202. package/dist/blocks/SegmentedSelector/tests.yaml +141 -0
  203. package/dist/blocks/Selector/gallery.yaml +1055 -0
  204. package/dist/blocks/Selector/tests/Selector.e2e.yaml +427 -0
  205. package/dist/blocks/Selector/tests.yaml +196 -0
  206. package/dist/blocks/Sider/gallery.yaml +994 -0
  207. package/dist/blocks/Sider/tests/Sider.e2e.yaml +162 -0
  208. package/dist/blocks/Sider/tests.yaml +20 -0
  209. package/dist/blocks/Slider/gallery.yaml +600 -0
  210. package/dist/blocks/Slider/tests/Slider.e2e.yaml +190 -0
  211. package/dist/blocks/Slider/tests.yaml +68 -0
  212. package/dist/blocks/Splitter/gallery.yaml +1511 -0
  213. package/dist/blocks/Splitter/tests/Splitter.e2e.yaml +114 -0
  214. package/dist/blocks/Splitter/tests.yaml +79 -0
  215. package/dist/blocks/Statistic/gallery.yaml +460 -0
  216. package/dist/blocks/Statistic/tests/Statistic.e2e.yaml +137 -0
  217. package/dist/blocks/Statistic/tests.yaml +77 -0
  218. package/dist/blocks/Steps/gallery.yaml +550 -0
  219. package/dist/blocks/Switch/gallery.yaml +502 -0
  220. package/dist/blocks/Switch/tests/Switch.e2e.yaml +132 -0
  221. package/dist/blocks/Switch/tests.yaml +87 -0
  222. package/dist/blocks/Tabs/gallery.yaml +1353 -0
  223. package/dist/blocks/Tabs/tests/Tabs.e2e.yaml +370 -0
  224. package/dist/blocks/Tabs/tests.yaml +349 -0
  225. package/dist/blocks/Tag/gallery.yaml +598 -0
  226. package/dist/blocks/Tag/tests/Tag.e2e.yaml +173 -0
  227. package/dist/blocks/Tag/tests.yaml +51 -0
  228. package/dist/blocks/TagMultipleSelector/TagMultipleSelector.js +53 -0
  229. package/dist/blocks/TagMultipleSelector/e2e.js +36 -0
  230. package/dist/blocks/TagMultipleSelector/gallery.yaml +70 -0
  231. package/dist/blocks/TagMultipleSelector/meta.js +91 -0
  232. package/dist/blocks/TagMultipleSelector/tests/TagMultipleSelector.e2e.yaml +93 -0
  233. package/dist/blocks/TagSelector/TagSelector.js +49 -0
  234. package/dist/blocks/TagSelector/e2e.js +36 -0
  235. package/dist/blocks/TagSelector/gallery.yaml +70 -0
  236. package/dist/blocks/TagSelector/meta.js +91 -0
  237. package/dist/blocks/TagSelector/tests/TagSelector.e2e.yaml +93 -0
  238. package/dist/blocks/TextArea/gallery.yaml +618 -0
  239. package/dist/blocks/TextArea/tests/TextArea.e2e.yaml +218 -0
  240. package/dist/blocks/TextArea/tests.yaml +100 -0
  241. package/dist/blocks/TextInput/gallery.yaml +560 -0
  242. package/dist/blocks/TextInput/tests/TextInput.e2e.yaml +287 -0
  243. package/dist/blocks/TextInput/tests.yaml +114 -0
  244. package/dist/blocks/TimelineList/gallery.yaml +431 -0
  245. package/dist/blocks/TimelineList/tests/TimelineList.e2e.yaml +244 -0
  246. package/dist/blocks/TimelineList/tests.yaml +251 -0
  247. package/dist/blocks/Title/gallery.yaml +483 -0
  248. package/dist/blocks/Title/tests/Title.e2e.yaml +180 -0
  249. package/dist/blocks/Title/tests.yaml +175 -0
  250. package/dist/blocks/TitleInput/gallery.yaml +1006 -0
  251. package/dist/blocks/TitleInput/tests/TitleInput.e2e.yaml +195 -0
  252. package/dist/blocks/TitleInput/tests.yaml +181 -0
  253. package/dist/blocks/Tooltip/gallery.yaml +1214 -0
  254. package/dist/blocks/Tooltip/tests/Tooltip.e2e.yaml +195 -0
  255. package/dist/blocks/Tooltip/tests.yaml +92 -0
  256. package/dist/blocks/Tour/gallery.yaml +2305 -0
  257. package/dist/blocks/Tour/tests/Tour.e2e.yaml +90 -0
  258. package/dist/blocks/Tour/tests.yaml +151 -0
  259. package/dist/blocks/TreeInput/gallery.yaml +78 -0
  260. package/dist/blocks/TreeInput/tests/TreeInput.e2e.yaml +139 -0
  261. package/dist/blocks/TreeInput/tests.yaml +140 -0
  262. package/dist/blocks/TreeMultipleSelector/gallery.yaml +67 -0
  263. package/dist/blocks/TreeSelector/gallery.yaml +81 -0
  264. package/dist/blocks/Watermark/gallery.yaml +479 -0
  265. package/dist/blocks/Watermark/tests/Watermark.e2e.yaml +62 -0
  266. package/dist/blocks/Watermark/tests.yaml +86 -0
  267. package/dist/blocks/WeekSelector/WeekSelector.js +6 -0
  268. package/dist/blocks/WeekSelector/e2e.js +26 -2
  269. package/dist/blocks/WeekSelector/gallery.yaml +589 -0
  270. package/dist/blocks/WeekSelector/meta.js +6 -0
  271. package/dist/blocks/WeekSelector/tests/WeekSelector.e2e.yaml +154 -0
  272. package/dist/blocks/WeekSelector/tests.yaml +122 -0
  273. package/dist/blocks.js +2 -0
  274. package/dist/disabledDate.js +91 -19
  275. package/dist/e2e.js +2 -0
  276. package/dist/getPresets.js +151 -0
  277. package/dist/getTagColor.js +44 -0
  278. package/dist/getTagSelectorOptions.js +30 -0
  279. package/dist/metas.js +2 -0
  280. package/dist/pickerPresetsStyle.css +26 -0
  281. package/dist/schemas/disabledDates.js +6 -2
  282. package/dist/schemas/index.js +1 -0
  283. package/dist/schemas/presets.js +111 -0
  284. package/dist/tagSelectorStyle.css +68 -0
  285. package/package.json +13 -13
@@ -0,0 +1,502 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ - title: Basic
16
+ blocks:
17
+ - id: basic_default
18
+ type: Switch
19
+ properties:
20
+ title: Default Switch
21
+ label:
22
+ disabled: true
23
+ - id: basic_small
24
+ type: Switch
25
+ properties:
26
+ title: Small Size
27
+ size: small
28
+ label:
29
+ disabled: true
30
+ - id: basic_autofocus
31
+ type: Switch
32
+ properties:
33
+ title: AutoFocus Switch
34
+ autoFocus: true
35
+ label:
36
+ disabled: true
37
+
38
+ - title: With Text Labels
39
+ blocks:
40
+ - id: text_on_off
41
+ type: Switch
42
+ properties:
43
+ title: On / Off
44
+ checkedText: 'ON'
45
+ uncheckedText: 'OFF'
46
+ label:
47
+ disabled: true
48
+ - id: text_yes_no
49
+ type: Switch
50
+ properties:
51
+ title: Yes / No
52
+ checkedText: 'Yes'
53
+ uncheckedText: 'No'
54
+ label:
55
+ disabled: true
56
+ - id: text_long
57
+ type: Switch
58
+ properties:
59
+ title: Longer Labels
60
+ checkedText: Enabled
61
+ uncheckedText: Disabled
62
+ label:
63
+ disabled: true
64
+ - id: text_numbers
65
+ type: Switch
66
+ properties:
67
+ title: Numeric Labels
68
+ checkedText: '1'
69
+ uncheckedText: '0'
70
+ label:
71
+ disabled: true
72
+ - id: text_small_on_off
73
+ type: Switch
74
+ properties:
75
+ title: Small with Text
76
+ checkedText: 'ON'
77
+ uncheckedText: 'OFF'
78
+ size: small
79
+ label:
80
+ disabled: true
81
+
82
+ - title: With Icon Labels
83
+ blocks:
84
+ - id: icon_custom_check
85
+ type: Switch
86
+ properties:
87
+ title: Custom Checked Icon
88
+ checkedIcon: AiOutlineLike
89
+ uncheckedIcon: AiOutlineDislike
90
+ label:
91
+ disabled: true
92
+ - id: icon_lock
93
+ type: Switch
94
+ properties:
95
+ title: Lock / Unlock
96
+ checkedIcon: AiOutlineLock
97
+ uncheckedIcon: AiOutlineUnlock
98
+ label:
99
+ disabled: true
100
+ - id: icon_sound
101
+ type: Switch
102
+ properties:
103
+ title: Sound On / Off
104
+ checkedIcon: AiOutlineSound
105
+ uncheckedIcon:
106
+ name: AiOutlineStop
107
+ color: '#999'
108
+ label:
109
+ disabled: true
110
+ - id: icon_visibility
111
+ type: Switch
112
+ properties:
113
+ title: Visibility Toggle
114
+ checkedIcon: AiOutlineEye
115
+ uncheckedIcon: AiOutlineEyeInvisible
116
+ label:
117
+ disabled: true
118
+ - id: icon_power
119
+ type: Switch
120
+ properties:
121
+ title: Power Toggle
122
+ checkedIcon: AiOutlineThunderbolt
123
+ uncheckedIcon: AiOutlinePoweroff
124
+ label:
125
+ disabled: true
126
+
127
+ - title: Custom Color
128
+ blocks:
129
+ - id: color_green
130
+ type: Switch
131
+ properties:
132
+ title: Green
133
+ color: '#52c41a'
134
+ label:
135
+ disabled: true
136
+ - id: color_orange
137
+ type: Switch
138
+ properties:
139
+ title: Orange
140
+ color: '#fa8c16'
141
+ label:
142
+ disabled: true
143
+ - id: color_purple
144
+ type: Switch
145
+ properties:
146
+ title: Purple
147
+ color: '#722ed1'
148
+ label:
149
+ disabled: true
150
+ - id: color_red
151
+ type: Switch
152
+ properties:
153
+ title: Red
154
+ color: '#f5222d'
155
+ label:
156
+ disabled: true
157
+ - id: color_cyan
158
+ type: Switch
159
+ properties:
160
+ title: Cyan
161
+ color: '#13c2c2'
162
+ label:
163
+ disabled: true
164
+
165
+ - title: Color with Text Labels
166
+ blocks:
167
+ - id: color_text_green
168
+ type: Switch
169
+ properties:
170
+ title: Active / Inactive
171
+ color: '#52c41a'
172
+ checkedText: Active
173
+ uncheckedText: Inactive
174
+ label:
175
+ disabled: true
176
+ - id: color_text_red
177
+ type: Switch
178
+ properties:
179
+ title: Allow / Deny
180
+ color: '#f5222d'
181
+ checkedText: Allow
182
+ uncheckedText: Deny
183
+ label:
184
+ disabled: true
185
+ - id: color_text_purple
186
+ type: Switch
187
+ properties:
188
+ title: Public / Private
189
+ color: '#722ed1'
190
+ checkedText: Public
191
+ uncheckedText: Private
192
+ label:
193
+ disabled: true
194
+
195
+ - title: Disabled State
196
+ blocks:
197
+ - id: disabled_off
198
+ type: Switch
199
+ properties:
200
+ title: Disabled (Off)
201
+ disabled: true
202
+ label:
203
+ disabled: true
204
+ - id: disabled_text
205
+ type: Switch
206
+ properties:
207
+ title: Disabled with Text
208
+ disabled: true
209
+ checkedText: 'ON'
210
+ uncheckedText: 'OFF'
211
+ label:
212
+ disabled: true
213
+ - id: disabled_small
214
+ type: Switch
215
+ properties:
216
+ title: Disabled Small
217
+ disabled: true
218
+ size: small
219
+ label:
220
+ disabled: true
221
+ - id: disabled_color
222
+ type: Switch
223
+ properties:
224
+ title: Disabled with Color
225
+ disabled: true
226
+ color: '#52c41a'
227
+ label:
228
+ disabled: true
229
+ - id: disabled_icons
230
+ type: Switch
231
+ properties:
232
+ title: Disabled with Icons
233
+ disabled: true
234
+ checkedIcon: AiOutlineLike
235
+ uncheckedIcon: AiOutlineDislike
236
+ label:
237
+ disabled: true
238
+
239
+ - title: Label Options
240
+ blocks:
241
+ - id: label_default
242
+ type: Switch
243
+ properties:
244
+ title: Enable notifications
245
+ - id: label_extra
246
+ type: Switch
247
+ properties:
248
+ title: Notifications
249
+ label:
250
+ extra: Enable push notifications on this device.
251
+ - id: label_no_colon
252
+ type: Switch
253
+ properties:
254
+ title: Status
255
+ label:
256
+ colon: false
257
+ - id: label_hidden
258
+ type: Switch
259
+ properties:
260
+ title: Hidden Label
261
+ label:
262
+ disabled: true
263
+ - id: label_feedback
264
+ type: Switch
265
+ properties:
266
+ title: With Feedback
267
+ label:
268
+ hasFeedback: true
269
+
270
+ - title: Label Inline
271
+ blocks:
272
+ - id: label_inline
273
+ type: Switch
274
+ properties:
275
+ title: Dark mode
276
+ label:
277
+ inline: true
278
+ span: 8
279
+ - id: label_inline_right
280
+ type: Switch
281
+ properties:
282
+ title: Auto-save
283
+ label:
284
+ inline: true
285
+ span: 8
286
+ align: right
287
+ - id: label_inline_small
288
+ type: Switch
289
+ properties:
290
+ title: Compact mode
291
+ size: small
292
+ label:
293
+ inline: true
294
+ span: 8
295
+
296
+ - title: Style and Class Overrides
297
+ blocks:
298
+ - id: style_margin
299
+ type: Switch
300
+ style:
301
+ .element:
302
+ marginTop: 8
303
+ properties:
304
+ title: Styled Element
305
+ label:
306
+ disabled: true
307
+ - id: style_label
308
+ type: Switch
309
+ style:
310
+ .label:
311
+ fontWeight: bold
312
+ color: '#1677ff'
313
+ properties:
314
+ title: Styled Label
315
+ - id: class_tailwind
316
+ type: Switch
317
+ class: p-2 border border-border rounded
318
+ properties:
319
+ title: Tailwind Classes
320
+ label:
321
+ disabled: true
322
+
323
+ - title: Theme Token Overrides
324
+ blocks:
325
+ - id: theme_large_track
326
+ type: Switch
327
+ properties:
328
+ title: Large Track
329
+ checkedText: 'ON'
330
+ uncheckedText: 'OFF'
331
+ label:
332
+ disabled: true
333
+ theme:
334
+ trackHeight: 30
335
+ trackMinWidth: 60
336
+ handleSize: 26
337
+ - id: theme_small_track
338
+ type: Switch
339
+ properties:
340
+ title: Tiny Track
341
+ size: small
342
+ label:
343
+ disabled: true
344
+ theme:
345
+ trackHeightSM: 12
346
+ trackMinWidthSM: 20
347
+ handleSizeSM: 8
348
+ - id: theme_no_shadow
349
+ type: Switch
350
+ properties:
351
+ title: No Handle Shadow
352
+ label:
353
+ disabled: true
354
+ theme:
355
+ handleShadow: '0 0 0 0 transparent'
356
+ - id: theme_colored_handle
357
+ type: Switch
358
+ properties:
359
+ title: Colored Handle
360
+ label:
361
+ disabled: true
362
+ - id: theme_primary_color
363
+ type: Switch
364
+ properties:
365
+ title: Custom Primary Color
366
+ label:
367
+ disabled: true
368
+ theme:
369
+ colorPrimary: '#eb2f96'
370
+ colorPrimaryHover: '#f759ab'
371
+
372
+ - title: Switch in Settings Panel
373
+ blocks:
374
+ - id: comp_settings_card
375
+ type: Card
376
+ properties:
377
+ title: Settings
378
+ size: small
379
+ blocks:
380
+ - id: comp_notifications
381
+ type: Switch
382
+ properties:
383
+ title: Notifications
384
+ label:
385
+ inline: true
386
+ span: 16
387
+ events:
388
+ onChange:
389
+ - id: comp_notifications_action
390
+ type: SetState
391
+ params:
392
+ notifications_enabled:
393
+ _state: comp_notifications
394
+ - id: comp_auto_update
395
+ type: Switch
396
+ properties:
397
+ title: Auto-update
398
+ label:
399
+ inline: true
400
+ span: 16
401
+ events:
402
+ onChange:
403
+ - id: comp_auto_update_action
404
+ type: SetState
405
+ params:
406
+ auto_update_enabled:
407
+ _state: comp_auto_update
408
+ - id: comp_dark_mode
409
+ type: Switch
410
+ properties:
411
+ title: Dark mode
412
+ label:
413
+ inline: true
414
+ span: 16
415
+ events:
416
+ onChange:
417
+ - id: comp_dark_mode_action
418
+ type: DisplayMessage
419
+ params:
420
+ content: Dark mode toggled.
421
+ duration: 2
422
+ - id: comp_analytics
423
+ type: Switch
424
+ properties:
425
+ title: Analytics
426
+ label:
427
+ inline: true
428
+ span: 16
429
+ extra: Allow anonymous usage data collection.
430
+ events:
431
+ onChange:
432
+ - id: comp_analytics_action
433
+ type: SetState
434
+ params:
435
+ analytics_enabled:
436
+ _state: comp_analytics
437
+
438
+ - title: Switch in Privacy Settings
439
+ blocks:
440
+ - id: applied2_privacy_card
441
+ type: Card
442
+ properties:
443
+ title: Privacy Settings
444
+ blocks:
445
+ - id: applied2_privacy_profile_visible
446
+ type: Switch
447
+ properties:
448
+ title: Public Profile
449
+ checkedText: Visible
450
+ uncheckedText: Hidden
451
+ color: '#1677ff'
452
+ label:
453
+ inline: true
454
+ span: 16
455
+ extra: Allow other users to view your profile.
456
+ - id: applied2_privacy_activity_status
457
+ type: Switch
458
+ properties:
459
+ title: Activity Status
460
+ checkedText: 'ON'
461
+ uncheckedText: 'OFF'
462
+ color: '#52c41a'
463
+ label:
464
+ inline: true
465
+ span: 16
466
+ extra: Show when you are online.
467
+ - id: applied2_privacy_search_indexing
468
+ type: Switch
469
+ properties:
470
+ title: Search Engine Indexing
471
+ checkedText: Allow
472
+ uncheckedText: Block
473
+ color: '#fa8c16'
474
+ label:
475
+ inline: true
476
+ span: 16
477
+ extra: Allow search engines to index your profile.
478
+ - id: applied2_privacy_data_sharing
479
+ type: Switch
480
+ properties:
481
+ title: Data Sharing
482
+ checkedText: 'Yes'
483
+ uncheckedText: 'No'
484
+ color: '#722ed1'
485
+ label:
486
+ inline: true
487
+ span: 16
488
+ extra: Share anonymous usage data to help improve the service.
489
+ - id: applied2_privacy_save_btn
490
+ type: Button
491
+ properties:
492
+ title: Save Privacy Settings
493
+ icon: AiOutlineSave
494
+ type: primary
495
+ block: true
496
+ events:
497
+ onClick:
498
+ - id: save_privacy_action
499
+ type: DisplayMessage
500
+ params:
501
+ content: Privacy settings updated successfully.
502
+ duration: 3
@@ -0,0 +1,132 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ id: switch
16
+ type: Box
17
+
18
+ events:
19
+ onInit:
20
+ - id: set_defaults
21
+ type: SetState
22
+ params:
23
+ switch_checked: true
24
+
25
+ blocks:
26
+ # ============================================
27
+ # BASIC RENDERING
28
+ # ============================================
29
+
30
+ - id: switch_basic
31
+ type: Switch
32
+ properties:
33
+ title: Basic Switch
34
+
35
+ - id: switch_checked
36
+ type: Switch
37
+ properties:
38
+ title: Checked Switch
39
+
40
+ # ============================================
41
+ # PROPERTY TESTS
42
+ # ============================================
43
+
44
+ - id: switch_disabled
45
+ type: Switch
46
+ properties:
47
+ title: Disabled Switch
48
+ disabled: true
49
+
50
+ - id: switch_disabled_checked
51
+ type: Switch
52
+ properties:
53
+ title: Disabled Checked
54
+ disabled: true
55
+
56
+ - id: switch_small
57
+ type: Switch
58
+ properties:
59
+ title: Small Switch
60
+ size: small
61
+
62
+ - id: switch_with_text
63
+ type: Switch
64
+ properties:
65
+ title: With Text
66
+ checkedText: 'ON'
67
+ uncheckedText: 'OFF'
68
+
69
+ - id: switch_with_icons
70
+ type: Switch
71
+ properties:
72
+ title: With Icons
73
+ checkedIcon: AiOutlineCheck
74
+ uncheckedIcon: AiOutlineClose
75
+
76
+ - id: switch_custom_color
77
+ type: Switch
78
+ properties:
79
+ title: Custom Color
80
+ color: '#52c41a'
81
+
82
+ # ============================================
83
+ # EVENT TESTS
84
+ # ============================================
85
+
86
+ - id: switch_onchange
87
+ type: Switch
88
+ properties:
89
+ title: OnChange Test
90
+ events:
91
+ onChange:
92
+ - id: set_onchange
93
+ type: SetState
94
+ params:
95
+ switch_onchange_value:
96
+ _event: value
97
+
98
+ - id: onchange_display
99
+ type: Span
100
+ properties:
101
+ content:
102
+ _if:
103
+ test:
104
+ _ne:
105
+ - _state: switch_onchange_value
106
+ - null
107
+ then:
108
+ _string.concat:
109
+ - 'Value: '
110
+ - _state: switch_onchange_value
111
+ else: ''
112
+
113
+ # ============================================
114
+ # INTERACTION TESTS
115
+ # ============================================
116
+
117
+ - id: switch_toggle
118
+ type: Switch
119
+ properties:
120
+ title: Toggle Test
121
+
122
+ - id: toggle_display
123
+ type: Span
124
+ properties:
125
+ content:
126
+ _if:
127
+ test:
128
+ _eq:
129
+ - _state: switch_toggle
130
+ - true
131
+ then: Switch is ON
132
+ else: Switch is OFF
@@ -0,0 +1,87 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ - id: default
16
+ type: Switch
17
+ - id: properties.title
18
+ type: Switch
19
+ properties:
20
+ title: A Switch
21
+ - id: 'properties.autoFocus: true'
22
+ type: Switch
23
+ properties:
24
+ autoFocus: true
25
+ - id: 'properties.color: #'
26
+ type: Switch
27
+ properties:
28
+ color: '#f44336'
29
+ - id: 'properties.inputStyle: CSS style applied'
30
+ type: Switch
31
+ properties:
32
+ inputStyle:
33
+ border: 2px solid red
34
+ - id: 'properties.disabled: true'
35
+ type: Switch
36
+ properties:
37
+ disabled: true
38
+ - id: 'properties.size: small'
39
+ type: Switch
40
+ properties:
41
+ size: small
42
+ - id: 'properties.checkedText: Checked'
43
+ type: Switch
44
+ properties:
45
+ checkedText: Checked
46
+ - id: 'properties.uncheckedText: Unchecked'
47
+ type: Switch
48
+ properties:
49
+ uncheckedText: Unchecked
50
+ - id: 'properties.checkedIcon: AiOutlineCheckCircle'
51
+ type: Switch
52
+ properties:
53
+ checkedIcon: AiOutlineCheckCircle
54
+ - id: 'properties.uncheckedIcon: UnlockFilled'
55
+ type: Switch
56
+ properties:
57
+ uncheckedIcon: UnlockFilled
58
+ - id: 'properties.label span: 4'
59
+ type: Switch
60
+ properties:
61
+ label:
62
+ span: 4
63
+ - id: 'properties.label align: right'
64
+ type: Switch
65
+ properties:
66
+ label:
67
+ align: right
68
+ - id: 'properties.label inline: true'
69
+ type: Switch
70
+ properties:
71
+ label:
72
+ inline: true
73
+ - id: 'properties.label disabled: true'
74
+ type: Switch
75
+ properties:
76
+ label:
77
+ disabled: true
78
+ - id: 'properties.label colon: false'
79
+ type: Switch
80
+ properties:
81
+ label:
82
+ colon: false
83
+ - id: 'properties.label extra: showing extra'
84
+ type: Switch
85
+ properties:
86
+ label:
87
+ extra: showing extra