@zohodesk/components 1.0.0-alpha-236 → 1.0.0-alpha-239

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 (267) hide show
  1. package/README.md +19 -0
  2. package/assets/Appearance/dark/mode/darkMode.module.css +1 -1
  3. package/assets/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +1 -1
  4. package/assets/Appearance/default/mode/defaultMode.module.css +1 -1
  5. package/assets/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +1 -1
  6. package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +358 -0
  7. package/assets/Appearance/pureDark/themes/blue/bluePureDarkCTATheme.module.css +34 -0
  8. package/assets/Appearance/pureDark/themes/blue/bluePureDarkComponentTheme.module.css +42 -0
  9. package/assets/Appearance/pureDark/themes/green/greenPureDarkCTATheme.module.css +34 -0
  10. package/assets/Appearance/pureDark/themes/green/greenPureDarkComponentTheme.module.css +42 -0
  11. package/assets/Appearance/pureDark/themes/orange/orangePureDarkCTATheme.module.css +34 -0
  12. package/assets/Appearance/pureDark/themes/orange/orangePureDarkComponentTheme.module.css +42 -0
  13. package/assets/Appearance/pureDark/themes/red/redPureDarkCTATheme.module.css +34 -0
  14. package/assets/Appearance/pureDark/themes/red/redPureDarkComponentTheme.module.css +42 -0
  15. package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkCTATheme.module.css +34 -0
  16. package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkComponentTheme.module.css +42 -0
  17. package/docs/external/active-line.js +72 -0
  18. package/docs/external/autorefresh.js +47 -0
  19. package/docs/external/codemirror.js +9681 -0
  20. package/docs/external/css/hopscotch.css +576 -0
  21. package/docs/external/css/styleGuide.css +1100 -0
  22. package/docs/external/css.js +466 -0
  23. package/docs/external/designTokens.js +1 -0
  24. package/docs/external/foldcode.js +152 -0
  25. package/docs/external/format.js +129 -0
  26. package/docs/external/htmlmixed.js +84 -0
  27. package/docs/external/images/bottom.png +0 -0
  28. package/docs/external/images/bottombg.jpg +0 -0
  29. package/docs/external/images/desk.png +0 -0
  30. package/docs/external/images/desklogo.png +0 -0
  31. package/docs/external/images/menu.png +0 -0
  32. package/docs/external/index.html +127 -0
  33. package/docs/external/javascript.js +422 -0
  34. package/docs/external/jsx.js +148 -0
  35. package/docs/external/matchbrackets.js +145 -0
  36. package/docs/external/xml.js +322 -0
  37. package/docs/package.json +41 -0
  38. package/docs/src/index.js +1311 -0
  39. package/es/Accordion/docs/Accordion__Demo.docs.js +80 -0
  40. package/es/Animation/docs/Animation__default.docs.js +34 -0
  41. package/es/Animation/docs/Animation__fadeIn.docs.js +34 -0
  42. package/es/Animation/docs/Animation__scaleIn.docs.js +34 -0
  43. package/es/Animation/docs/Animation__skewIn.docs.js +34 -0
  44. package/es/Animation/docs/Animation__slideDown.docs.js +34 -0
  45. package/es/Animation/docs/Animation__slideLeft.docs.js +34 -0
  46. package/es/Animation/docs/Animation__zoomIn.docs.js +34 -0
  47. package/es/AppContainer/AppContainer.js +6 -1
  48. package/es/AppContainer/docs/AppContainer__default.docs.js +20 -0
  49. package/es/Avatar/docs/Avatar__custom.docs.js +29 -0
  50. package/es/Avatar/docs/Avatar__default.docs.js +29 -0
  51. package/es/Avatar/docs/Avatar__palette.docs.js +49 -0
  52. package/es/Avatar/docs/Avatar__text.docs.js +28 -0
  53. package/es/AvatarTeam/docs/AvatarTeam__custom.docs.js +73 -0
  54. package/es/AvatarTeam/docs/AvatarTeam__default.docs.js +31 -0
  55. package/es/AvatarTeam/docs/AvatarTeam__palette.docs.js +50 -0
  56. package/es/AvatarTeam/docs/AvatarTeam__size.docs.js +49 -0
  57. package/es/Button/docs/Button__custom.docs.js +771 -0
  58. package/es/Button/docs/Button__default.docs.js +536 -0
  59. package/es/Buttongroup/docs/Buttongroup__custom.docs.js +37 -0
  60. package/es/Buttongroup/docs/Buttongroup__footer.docs.js +33 -0
  61. package/es/Buttongroup/docs/Buttongroup__header.docs.js +42 -0
  62. package/es/Card/docs/Card__Custom.docs.js +34 -0
  63. package/es/Card/docs/Card__Default.docs.js +37 -0
  64. package/es/Card/docs/Card__Scroll.docs.js +59 -0
  65. package/es/CheckBox/CheckBox.js +2 -1
  66. package/es/CheckBox/docs/CheckBox__custom.docs.js +293 -0
  67. package/es/CheckBox/docs/CheckBox__default.docs.js +219 -0
  68. package/es/DateTime/DateTime.js +8 -2
  69. package/es/DateTime/DateWidget.js +10 -2
  70. package/es/DateTime/docs/DateTime__default.docs.js +91 -0
  71. package/es/DateTime/docs/DateWidget__default.docs.js +183 -0
  72. package/es/DateTime/docs/timezonedata.json +1 -0
  73. package/es/DropBox/docs/DropBox__custom.docs.js +66 -0
  74. package/es/DropBox/docs/DropBox__customOrder.docs.js +92 -0
  75. package/es/DropBox/docs/DropBox__fixedPosition.docs.js +91 -0
  76. package/es/DropBox/docs/DropBox__position.docs.js +87 -0
  77. package/es/DropBox/docs/DropBox__size.docs.js +61 -0
  78. package/es/DropDown/docs/DropDownHeading__custom.docs.js +23 -0
  79. package/es/DropDown/docs/DropDownHeading__default.docs.js +21 -0
  80. package/es/Label/docs/Label__clipped.docs.js +27 -0
  81. package/es/Label/docs/Label__custom.docs.js +30 -0
  82. package/es/Label/docs/Label__palette.docs.js +42 -0
  83. package/es/Label/docs/Label__size.docs.js +29 -0
  84. package/es/Label/docs/Label__type.docs.js +37 -0
  85. package/es/Layout/docs/Layout__Hidden.docs.js +77 -0
  86. package/es/Layout/docs/Layout__default.docs.js +49 -0
  87. package/es/Layout/docs/Layout__four_Column.docs.js +85 -0
  88. package/es/Layout/docs/Layout__three_Column.docs.js +76 -0
  89. package/es/Layout/docs/Layout__two_Column.docs.js +69 -0
  90. package/es/LightNightMode/docs/AlternativeColors.docs.js +74 -0
  91. package/es/ListItem/ListItem.module.css +1 -1
  92. package/es/ListItem/docs/ListItemWithAvatar__custom.docs.js +155 -0
  93. package/es/ListItem/docs/ListItemWithAvatar__default.docs.js +112 -0
  94. package/es/ListItem/docs/ListItemWithCheckBox__custom.docs.js +91 -0
  95. package/es/ListItem/docs/ListItemWithCheckBox__default.docs.js +65 -0
  96. package/es/ListItem/docs/ListItemWithIcon__custom.docs.js +68 -0
  97. package/es/ListItem/docs/ListItemWithIcon__default.docs.js +62 -0
  98. package/es/ListItem/docs/ListItemWithRadio__custom.docs.js +91 -0
  99. package/es/ListItem/docs/ListItemWithRadio__default.docs.js +65 -0
  100. package/es/ListItem/docs/ListItem__custom.docs.js +114 -0
  101. package/es/ListItem/docs/ListItem__default.docs.js +82 -0
  102. package/es/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +125 -0
  103. package/es/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +114 -0
  104. package/es/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +141 -0
  105. package/es/MultiSelect/docs/MultiSelect__default.docs.js +161 -0
  106. package/es/PopOver/docs/PopOver__default.docs.js +32 -0
  107. package/es/Provider/Config.js +1 -2
  108. package/es/Provider/docs/Provider_Id__Class.docs.js +29 -0
  109. package/es/Provider/docs/Provider_Id__Function.docs.js +18 -0
  110. package/es/Provider/docs/Provider_Zindex__Class.docs.js +32 -0
  111. package/es/Provider/docs/Provider_Zindex__Function.docs.js +23 -0
  112. package/es/Provider.js +72 -35
  113. package/es/Radio/docs/Radio__custom.docs.js +245 -0
  114. package/es/Radio/docs/Radio__default.docs.js +169 -0
  115. package/es/Responsive/Responsive.js +1 -0
  116. package/es/Responsive/docs/Responsive__Custom.docs.js +206 -0
  117. package/es/Responsive/docs/Responsive__default.docs.js +97 -0
  118. package/es/Responsive/docs/style.module.css +56 -0
  119. package/es/Ribbon/docs/Ribbon__custom.docs.js +386 -0
  120. package/es/Ribbon/docs/Ribbon__default.docs.js +342 -0
  121. package/es/RippleEffect/docs/RippleEffect__default.docs.js +435 -0
  122. package/es/Select/SelectWithIcon.js +1 -0
  123. package/es/Select/docs/GroupSelect__default.docs.js +149 -0
  124. package/es/Select/docs/SelectWithAvatar__default.docs.js +97 -0
  125. package/es/Select/docs/SelectWithIcon__default.docs.js +138 -0
  126. package/es/Select/docs/Select__default.docs.js +288 -0
  127. package/es/Stencils/docs/Stencils__custom.docs.js +45 -0
  128. package/es/Stencils/docs/Stencils__default.docs.js +50 -0
  129. package/es/Switch/docs/Switch__custom.docs.js +153 -0
  130. package/es/Switch/docs/Switch__default.docs.js +107 -0
  131. package/es/Tab/docs/Tab__default.docs.js +258 -0
  132. package/es/Tab/docs/tabdocs.module.css +29 -0
  133. package/es/Tag/docs/Tag__custom.docs.js +368 -0
  134. package/es/Tag/docs/Tag__default.docs.js +323 -0
  135. package/es/TextBox/docs/TextBox__custom.docs.js +43 -0
  136. package/es/TextBox/docs/TextBox__default.docs.js +40 -0
  137. package/es/TextBox/docs/TextBox__size.docs.js +38 -0
  138. package/es/TextBox/docs/TextBox__variant.docs.js +38 -0
  139. package/es/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +89 -0
  140. package/es/TextBoxIcon/docs/TextBoxIcon__default.docs.js +61 -0
  141. package/es/Textarea/docs/Textarea__animated.docs.js +41 -0
  142. package/es/Textarea/docs/Textarea__custom.docs.js +82 -0
  143. package/es/Textarea/docs/Textarea__default.docs.js +76 -0
  144. package/es/Textarea/docs/Textarea__disabled.docs.js +29 -0
  145. package/es/Tooltip/Tooltip.js +40 -2
  146. package/es/Tooltip/docs/Tooltip__default.docs.js +371 -0
  147. package/es/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +97 -0
  148. package/es/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +150 -0
  149. package/es/a11y/FocusScope/docs/FocusScope__default.docs.js +139 -0
  150. package/es/beta/FocusRing/docs/FocusRing__default.docs.js +48 -0
  151. package/es/common/docStyle.module.css +6 -2
  152. package/es/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +72 -0
  153. package/es/semantic/Button/docs/Button__default.docs.js +20 -0
  154. package/lib/Accordion/docs/Accordion__Demo.docs.js +126 -0
  155. package/lib/Animation/docs/Animation__default.docs.js +85 -0
  156. package/lib/Animation/docs/Animation__fadeIn.docs.js +85 -0
  157. package/lib/Animation/docs/Animation__scaleIn.docs.js +85 -0
  158. package/lib/Animation/docs/Animation__skewIn.docs.js +85 -0
  159. package/lib/Animation/docs/Animation__slideDown.docs.js +85 -0
  160. package/lib/Animation/docs/Animation__slideLeft.docs.js +85 -0
  161. package/lib/Animation/docs/Animation__zoomIn.docs.js +85 -0
  162. package/lib/AppContainer/AppContainer.js +7 -0
  163. package/lib/AppContainer/docs/AppContainer__default.docs.js +70 -0
  164. package/lib/Avatar/docs/Avatar__custom.docs.js +87 -0
  165. package/lib/Avatar/docs/Avatar__default.docs.js +83 -0
  166. package/lib/Avatar/docs/Avatar__palette.docs.js +107 -0
  167. package/lib/Avatar/docs/Avatar__text.docs.js +86 -0
  168. package/lib/AvatarTeam/docs/AvatarTeam__custom.docs.js +124 -0
  169. package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +82 -0
  170. package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +101 -0
  171. package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +100 -0
  172. package/lib/Button/docs/Button__custom.docs.js +826 -0
  173. package/lib/Button/docs/Button__default.docs.js +590 -0
  174. package/lib/Buttongroup/docs/Buttongroup__custom.docs.js +89 -0
  175. package/lib/Buttongroup/docs/Buttongroup__footer.docs.js +85 -0
  176. package/lib/Buttongroup/docs/Buttongroup__header.docs.js +98 -0
  177. package/lib/Card/docs/Card__Custom.docs.js +90 -0
  178. package/lib/Card/docs/Card__Default.docs.js +92 -0
  179. package/lib/Card/docs/Card__Scroll.docs.js +114 -0
  180. package/lib/CheckBox/CheckBox.js +2 -1
  181. package/lib/CheckBox/docs/CheckBox__custom.docs.js +348 -0
  182. package/lib/CheckBox/docs/CheckBox__default.docs.js +273 -0
  183. package/lib/DateTime/DateTime.js +8 -2
  184. package/lib/DateTime/DateWidget.js +10 -2
  185. package/lib/DateTime/docs/DateTime__default.docs.js +142 -0
  186. package/lib/DateTime/docs/DateWidget__default.docs.js +240 -0
  187. package/lib/DateTime/docs/timezonedata.json +1 -0
  188. package/lib/DropBox/docs/DropBox__custom.docs.js +122 -0
  189. package/lib/DropBox/docs/DropBox__customOrder.docs.js +141 -0
  190. package/lib/DropBox/docs/DropBox__fixedPosition.docs.js +140 -0
  191. package/lib/DropBox/docs/DropBox__position.docs.js +142 -0
  192. package/lib/DropBox/docs/DropBox__size.docs.js +116 -0
  193. package/lib/DropDown/docs/DropDownHeading__custom.docs.js +73 -0
  194. package/lib/DropDown/docs/DropDownHeading__default.docs.js +70 -0
  195. package/lib/Label/docs/Label__clipped.docs.js +81 -0
  196. package/lib/Label/docs/Label__custom.docs.js +85 -0
  197. package/lib/Label/docs/Label__palette.docs.js +96 -0
  198. package/lib/Label/docs/Label__size.docs.js +83 -0
  199. package/lib/Label/docs/Label__type.docs.js +91 -0
  200. package/lib/Layout/docs/Layout__Hidden.docs.js +127 -0
  201. package/lib/Layout/docs/Layout__default.docs.js +98 -0
  202. package/lib/Layout/docs/Layout__four_Column.docs.js +135 -0
  203. package/lib/Layout/docs/Layout__three_Column.docs.js +126 -0
  204. package/lib/Layout/docs/Layout__two_Column.docs.js +119 -0
  205. package/lib/LightNightMode/docs/AlternativeColors.docs.js +131 -0
  206. package/lib/ListItem/ListItem.module.css +1 -1
  207. package/lib/ListItem/docs/ListItemWithAvatar__custom.docs.js +206 -0
  208. package/lib/ListItem/docs/ListItemWithAvatar__default.docs.js +162 -0
  209. package/lib/ListItem/docs/ListItemWithCheckBox__custom.docs.js +142 -0
  210. package/lib/ListItem/docs/ListItemWithCheckBox__default.docs.js +115 -0
  211. package/lib/ListItem/docs/ListItemWithIcon__custom.docs.js +119 -0
  212. package/lib/ListItem/docs/ListItemWithIcon__default.docs.js +112 -0
  213. package/lib/ListItem/docs/ListItemWithRadio__custom.docs.js +142 -0
  214. package/lib/ListItem/docs/ListItemWithRadio__default.docs.js +115 -0
  215. package/lib/ListItem/docs/ListItem__custom.docs.js +164 -0
  216. package/lib/ListItem/docs/ListItem__default.docs.js +131 -0
  217. package/lib/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +177 -0
  218. package/lib/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +165 -0
  219. package/lib/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +191 -0
  220. package/lib/MultiSelect/docs/MultiSelect__default.docs.js +214 -0
  221. package/lib/PopOver/docs/PopOver__default.docs.js +86 -0
  222. package/lib/Provider/Config.js +1 -2
  223. package/lib/Provider/docs/Provider_Id__Class.docs.js +77 -0
  224. package/lib/Provider/docs/Provider_Id__Function.docs.js +29 -0
  225. package/lib/Provider/docs/Provider_Zindex__Class.docs.js +80 -0
  226. package/lib/Provider/docs/Provider_Zindex__Function.docs.js +34 -0
  227. package/lib/Provider.js +88 -37
  228. package/lib/Radio/docs/Radio__custom.docs.js +299 -0
  229. package/lib/Radio/docs/Radio__default.docs.js +222 -0
  230. package/lib/Responsive/docs/Responsive__Custom.docs.js +272 -0
  231. package/lib/Responsive/docs/Responsive__default.docs.js +142 -0
  232. package/lib/Responsive/docs/style.module.css +56 -0
  233. package/lib/Ribbon/docs/Ribbon__custom.docs.js +437 -0
  234. package/lib/Ribbon/docs/Ribbon__default.docs.js +392 -0
  235. package/lib/RippleEffect/docs/RippleEffect__default.docs.js +484 -0
  236. package/lib/Select/docs/GroupSelect__default.docs.js +199 -0
  237. package/lib/Select/docs/SelectWithAvatar__default.docs.js +152 -0
  238. package/lib/Select/docs/SelectWithIcon__default.docs.js +190 -0
  239. package/lib/Select/docs/Select__default.docs.js +340 -0
  240. package/lib/Stencils/docs/Stencils__custom.docs.js +96 -0
  241. package/lib/Stencils/docs/Stencils__default.docs.js +101 -0
  242. package/lib/Switch/docs/Switch__custom.docs.js +203 -0
  243. package/lib/Switch/docs/Switch__default.docs.js +156 -0
  244. package/lib/Tab/docs/Tab__default.docs.js +308 -0
  245. package/lib/Tab/docs/tabdocs.module.css +29 -0
  246. package/lib/Tag/docs/Tag__custom.docs.js +423 -0
  247. package/lib/Tag/docs/Tag__default.docs.js +377 -0
  248. package/lib/TextBox/docs/TextBox__custom.docs.js +98 -0
  249. package/lib/TextBox/docs/TextBox__default.docs.js +95 -0
  250. package/lib/TextBox/docs/TextBox__size.docs.js +93 -0
  251. package/lib/TextBox/docs/TextBox__variant.docs.js +93 -0
  252. package/lib/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +145 -0
  253. package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +117 -0
  254. package/lib/Textarea/docs/Textarea__animated.docs.js +95 -0
  255. package/lib/Textarea/docs/Textarea__custom.docs.js +137 -0
  256. package/lib/Textarea/docs/Textarea__default.docs.js +130 -0
  257. package/lib/Textarea/docs/Textarea__disabled.docs.js +83 -0
  258. package/lib/Tooltip/Tooltip.js +47 -2
  259. package/lib/Tooltip/docs/Tooltip__default.docs.js +430 -0
  260. package/lib/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +150 -0
  261. package/lib/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +206 -0
  262. package/lib/a11y/FocusScope/docs/FocusScope__default.docs.js +191 -0
  263. package/lib/beta/FocusRing/docs/FocusRing__default.docs.js +101 -0
  264. package/lib/common/docStyle.module.css +6 -2
  265. package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +145 -0
  266. package/lib/semantic/Button/docs/Button__default.docs.js +66 -0
  267. package/package.json +7 -6
@@ -0,0 +1,145 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ var ie_lt8 = /MSIE \d/.test(navigator.userAgent) &&
13
+ (document.documentMode == null || document.documentMode < 8);
14
+
15
+ var Pos = CodeMirror.Pos;
16
+
17
+ var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};
18
+
19
+ function findMatchingBracket(cm, where, config) {
20
+ var line = cm.getLineHandle(where.line), pos = where.ch - 1;
21
+ var afterCursor = config && config.afterCursor
22
+ if (afterCursor == null)
23
+ afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className)
24
+
25
+ // A cursor is defined as between two characters, but in in vim command mode
26
+ // (i.e. not insert mode), the cursor is visually represented as a
27
+ // highlighted box on top of the 2nd character. Otherwise, we allow matches
28
+ // from before or after the cursor.
29
+ var match = (!afterCursor && pos >= 0 && matching[line.text.charAt(pos)]) ||
30
+ matching[line.text.charAt(++pos)];
31
+ if (!match) return null;
32
+ var dir = match.charAt(1) == ">" ? 1 : -1;
33
+ if (config && config.strict && (dir > 0) != (pos == where.ch)) return null;
34
+ var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));
35
+
36
+ var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);
37
+ if (found == null) return null;
38
+ return {from: Pos(where.line, pos), to: found && found.pos,
39
+ match: found && found.ch == match.charAt(0), forward: dir > 0};
40
+ }
41
+
42
+ // bracketRegex is used to specify which type of bracket to scan
43
+ // should be a regexp, e.g. /[[\]]/
44
+ //
45
+ // Note: If "where" is on an open bracket, then this bracket is ignored.
46
+ //
47
+ // Returns false when no bracket was found, null when it reached
48
+ // maxScanLines and gave up
49
+ function scanForBracket(cm, where, dir, style, config) {
50
+ var maxScanLen = (config && config.maxScanLineLength) || 10000;
51
+ var maxScanLines = (config && config.maxScanLines) || 1000;
52
+
53
+ var stack = [];
54
+ var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\]]/;
55
+ var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)
56
+ : Math.max(cm.firstLine() - 1, where.line - maxScanLines);
57
+ for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {
58
+ var line = cm.getLine(lineNo);
59
+ if (!line) continue;
60
+ var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;
61
+ if (line.length > maxScanLen) continue;
62
+ if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);
63
+ for (; pos != end; pos += dir) {
64
+ var ch = line.charAt(pos);
65
+ if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {
66
+ var match = matching[ch];
67
+ if ((match.charAt(1) == ">") == (dir > 0)) stack.push(ch);
68
+ else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};
69
+ else stack.pop();
70
+ }
71
+ }
72
+ }
73
+ return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;
74
+ }
75
+
76
+ function matchBrackets(cm, autoclear, config) {
77
+ // Disable brace matching in long lines, since it'll cause hugely slow updates
78
+ var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;
79
+ var marks = [], ranges = cm.listSelections();
80
+ for (var i = 0; i < ranges.length; i++) {
81
+ var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);
82
+ if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {
83
+ var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
84
+ marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));
85
+ if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)
86
+ marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));
87
+ }
88
+ }
89
+
90
+ if (marks.length) {
91
+ // Kludge to work around the IE bug from issue #1193, where text
92
+ // input stops going to the textare whever this fires.
93
+ if (ie_lt8 && cm.state.focused) cm.focus();
94
+
95
+ var clear = function() {
96
+ cm.operation(function() {
97
+ for (var i = 0; i < marks.length; i++) marks[i].clear();
98
+ });
99
+ };
100
+ if (autoclear) setTimeout(clear, 800);
101
+ else return clear;
102
+ }
103
+ }
104
+
105
+ function doMatchBrackets(cm) {
106
+ cm.operation(function() {
107
+ if (cm.state.matchBrackets.currentlyHighlighted) {
108
+ cm.state.matchBrackets.currentlyHighlighted();
109
+ cm.state.matchBrackets.currentlyHighlighted = null;
110
+ }
111
+ cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);
112
+ });
113
+ }
114
+
115
+ CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {
116
+ if (old && old != CodeMirror.Init) {
117
+ cm.off("cursorActivity", doMatchBrackets);
118
+ if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) {
119
+ cm.state.matchBrackets.currentlyHighlighted();
120
+ cm.state.matchBrackets.currentlyHighlighted = null;
121
+ }
122
+ }
123
+ if (val) {
124
+ cm.state.matchBrackets = typeof val == "object" ? val : {};
125
+ cm.on("cursorActivity", doMatchBrackets);
126
+ }
127
+ });
128
+
129
+ CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);});
130
+ CodeMirror.defineExtension("findMatchingBracket", function(pos, config, oldConfig){
131
+ // Backwards-compatibility kludge
132
+ if (oldConfig || typeof config == "boolean") {
133
+ if (!oldConfig) {
134
+ config = config ? {strict: true} : null
135
+ } else {
136
+ oldConfig.strict = config
137
+ config = oldConfig
138
+ }
139
+ }
140
+ return findMatchingBracket(this, pos, config)
141
+ });
142
+ CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){
143
+ return scanForBracket(this, pos, dir, style, config);
144
+ });
145
+ });
@@ -0,0 +1,322 @@
1
+ CodeMirror.defineMode("xml", function(config, parserConfig) {
2
+ var indentUnit = config.indentUnit;
3
+ var Kludges = parserConfig.htmlMode ? {
4
+ autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
5
+ 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
6
+ 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
7
+ 'track': true, 'wbr': true},
8
+ implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
9
+ 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
10
+ 'th': true, 'tr': true},
11
+ contextGrabbers: {
12
+ 'dd': {'dd': true, 'dt': true},
13
+ 'dt': {'dd': true, 'dt': true},
14
+ 'li': {'li': true},
15
+ 'option': {'option': true, 'optgroup': true},
16
+ 'optgroup': {'optgroup': true},
17
+ 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
18
+ 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
19
+ 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
20
+ 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
21
+ 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
22
+ 'rp': {'rp': true, 'rt': true},
23
+ 'rt': {'rp': true, 'rt': true},
24
+ 'tbody': {'tbody': true, 'tfoot': true},
25
+ 'td': {'td': true, 'th': true},
26
+ 'tfoot': {'tbody': true},
27
+ 'th': {'td': true, 'th': true},
28
+ 'thead': {'tbody': true, 'tfoot': true},
29
+ 'tr': {'tr': true}
30
+ },
31
+ doNotIndent: {"pre": true},
32
+ allowUnquoted: true,
33
+ allowMissing: true
34
+ } : {
35
+ autoSelfClosers: {},
36
+ implicitlyClosed: {},
37
+ contextGrabbers: {},
38
+ doNotIndent: {},
39
+ allowUnquoted: false,
40
+ allowMissing: false
41
+ };
42
+ var alignCDATA = parserConfig.alignCDATA;
43
+
44
+ // Return variables for tokenizers
45
+ var tagName, type;
46
+
47
+ function inText(stream, state) {
48
+ function chain(parser) {
49
+ state.tokenize = parser;
50
+ return parser(stream, state);
51
+ }
52
+
53
+ var ch = stream.next();
54
+ if (ch == "<") {
55
+ if (stream.eat("!")) {
56
+ if (stream.eat("[")) {
57
+ if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
58
+ else return null;
59
+ }
60
+ else if (stream.match("--")) return chain(inBlock("comment", "-->"));
61
+ else if (stream.match("DOCTYPE", true, true)) {
62
+ stream.eatWhile(/[\w\._\-]/);
63
+ return chain(doctype(1));
64
+ }
65
+ else return null;
66
+ }
67
+ else if (stream.eat("?")) {
68
+ stream.eatWhile(/[\w\._\-]/);
69
+ state.tokenize = inBlock("meta", "?>");
70
+ return "meta";
71
+ }
72
+ else {
73
+ var isClose = stream.eat("/");
74
+ tagName = "";
75
+ var c;
76
+ while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c;
77
+ if (!tagName) return "error";
78
+ type = isClose ? "closeTag" : "openTag";
79
+ state.tokenize = inTag;
80
+ return "tag";
81
+ }
82
+ }
83
+ else if (ch == "&") {
84
+ var ok;
85
+ if (stream.eat("#")) {
86
+ if (stream.eat("x")) {
87
+ ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
88
+ } else {
89
+ ok = stream.eatWhile(/[\d]/) && stream.eat(";");
90
+ }
91
+ } else {
92
+ ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
93
+ }
94
+ return ok ? "atom" : "error";
95
+ }
96
+ else {
97
+ stream.eatWhile(/[^&<]/);
98
+ return null;
99
+ }
100
+ }
101
+
102
+ function inTag(stream, state) {
103
+ var ch = stream.next();
104
+ if (ch == ">" || (ch == "/" && stream.eat(">"))) {
105
+ state.tokenize = inText;
106
+ type = ch == ">" ? "endTag" : "selfcloseTag";
107
+ return "tag";
108
+ }
109
+ else if (ch == "=") {
110
+ type = "equals";
111
+ return null;
112
+ }
113
+ else if (/[\'\"]/.test(ch)) {
114
+ state.tokenize = inAttribute(ch);
115
+ return state.tokenize(stream, state);
116
+ }
117
+ else {
118
+ stream.eatWhile(/[^\s\u00a0=<>\"\']/);
119
+ return "word";
120
+ }
121
+ }
122
+
123
+ function inAttribute(quote) {
124
+ return function(stream, state) {
125
+ while (!stream.eol()) {
126
+ if (stream.next() == quote) {
127
+ state.tokenize = inTag;
128
+ break;
129
+ }
130
+ }
131
+ return "string";
132
+ };
133
+ }
134
+
135
+ function inBlock(style, terminator) {
136
+ return function(stream, state) {
137
+ while (!stream.eol()) {
138
+ if (stream.match(terminator)) {
139
+ state.tokenize = inText;
140
+ break;
141
+ }
142
+ stream.next();
143
+ }
144
+ return style;
145
+ };
146
+ }
147
+ function doctype(depth) {
148
+ return function(stream, state) {
149
+ var ch;
150
+ while ((ch = stream.next()) != null) {
151
+ if (ch == "<") {
152
+ state.tokenize = doctype(depth + 1);
153
+ return state.tokenize(stream, state);
154
+ } else if (ch == ">") {
155
+ if (depth == 1) {
156
+ state.tokenize = inText;
157
+ break;
158
+ } else {
159
+ state.tokenize = doctype(depth - 1);
160
+ return state.tokenize(stream, state);
161
+ }
162
+ }
163
+ }
164
+ return "meta";
165
+ };
166
+ }
167
+
168
+ var curState, setStyle;
169
+ function pass() {
170
+ for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);
171
+ }
172
+ function cont() {
173
+ pass.apply(null, arguments);
174
+ return true;
175
+ }
176
+
177
+ function pushContext(tagName, startOfLine) {
178
+ var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent);
179
+ curState.context = {
180
+ prev: curState.context,
181
+ tagName: tagName,
182
+ indent: curState.indented,
183
+ startOfLine: startOfLine,
184
+ noIndent: noIndent
185
+ };
186
+ }
187
+ function popContext() {
188
+ if (curState.context) curState.context = curState.context.prev;
189
+ }
190
+
191
+ function element(type) {
192
+ if (type == "openTag") {
193
+ curState.tagName = tagName;
194
+ return cont(attributes, endtag(curState.startOfLine));
195
+ } else if (type == "closeTag") {
196
+ var err = false;
197
+ if (curState.context) {
198
+ if (curState.context.tagName != tagName) {
199
+ if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) {
200
+ popContext();
201
+ }
202
+ err = !curState.context || curState.context.tagName != tagName;
203
+ }
204
+ } else {
205
+ err = true;
206
+ }
207
+ if (err) setStyle = "error";
208
+ return cont(endclosetag(err));
209
+ }
210
+ return cont();
211
+ }
212
+ function endtag(startOfLine) {
213
+ return function(type) {
214
+ if (type == "selfcloseTag" ||
215
+ (type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(curState.tagName.toLowerCase()))) {
216
+ maybePopContext(curState.tagName.toLowerCase());
217
+ return cont();
218
+ }
219
+ if (type == "endTag") {
220
+ maybePopContext(curState.tagName.toLowerCase());
221
+ pushContext(curState.tagName, startOfLine);
222
+ return cont();
223
+ }
224
+ return cont();
225
+ };
226
+ }
227
+ function endclosetag(err) {
228
+ return function(type) {
229
+ if (err) setStyle = "error";
230
+ if (type == "endTag") { popContext(); return cont(); }
231
+ setStyle = "error";
232
+ return cont(arguments.callee);
233
+ };
234
+ }
235
+ function maybePopContext(nextTagName) {
236
+ var parentTagName;
237
+ while (true) {
238
+ if (!curState.context) {
239
+ return;
240
+ }
241
+ parentTagName = curState.context.tagName.toLowerCase();
242
+ if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||
243
+ !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
244
+ return;
245
+ }
246
+ popContext();
247
+ }
248
+ }
249
+
250
+ function attributes(type) {
251
+ if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);}
252
+ if (type == "endTag" || type == "selfcloseTag") return pass();
253
+ setStyle = "error";
254
+ return cont(attributes);
255
+ }
256
+ function attribute(type) {
257
+ if (type == "equals") return cont(attvalue, attributes);
258
+ if (!Kludges.allowMissing) setStyle = "error";
259
+ else if (type == "word") setStyle = "attribute";
260
+ return (type == "endTag" || type == "selfcloseTag") ? pass() : cont();
261
+ }
262
+ function attvalue(type) {
263
+ if (type == "string") return cont(attvaluemaybe);
264
+ if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();}
265
+ setStyle = "error";
266
+ return (type == "endTag" || type == "selfCloseTag") ? pass() : cont();
267
+ }
268
+ function attvaluemaybe(type) {
269
+ if (type == "string") return cont(attvaluemaybe);
270
+ else return pass();
271
+ }
272
+
273
+ return {
274
+ startState: function() {
275
+ return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, context: null};
276
+ },
277
+
278
+ token: function(stream, state) {
279
+ if (stream.sol()) {
280
+ state.startOfLine = true;
281
+ state.indented = stream.indentation();
282
+ }
283
+ if (stream.eatSpace()) return null;
284
+
285
+ setStyle = type = tagName = null;
286
+ var style = state.tokenize(stream, state);
287
+ state.type = type;
288
+ if ((style || type) && style != "comment") {
289
+ curState = state;
290
+ while (true) {
291
+ var comb = state.cc.pop() || element;
292
+ if (comb(type || style)) break;
293
+ }
294
+ }
295
+ state.startOfLine = false;
296
+ return setStyle || style;
297
+ },
298
+
299
+ indent: function(state, textAfter, fullLine) {
300
+ var context = state.context;
301
+ if ((state.tokenize != inTag && state.tokenize != inText) ||
302
+ context && context.noIndent)
303
+ return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
304
+ if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
305
+ if (context && /^<\//.test(textAfter))
306
+ context = context.prev;
307
+ while (context && !context.startOfLine)
308
+ context = context.prev;
309
+ if (context) return context.indent + indentUnit;
310
+ else return 0;
311
+ },
312
+
313
+ electricChars: "/",
314
+
315
+ configuration: parserConfig.htmlMode ? "html" : "xml"
316
+ };
317
+ });
318
+
319
+ CodeMirror.defineMIME("text/xml", "xml");
320
+ CodeMirror.defineMIME("application/xml", "xml");
321
+ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
322
+ CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "library",
3
+ "umdVar": "Library",
4
+ "version": "1.0.0",
5
+ "description": "",
6
+ "main": "lib/index",
7
+ "module": "es/index.js",
8
+ "jsnext:main": "es/index.js",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/vimalceg/fz-dnd.git"
12
+ },
13
+ "author": "",
14
+ "license": "ISC",
15
+ "bugs": {
16
+ "url": "https://github.com/vimalceg/fz-dnd/issues"
17
+ },
18
+ "homepage": "https://github.com/vimalceg/fz-dnd#readme",
19
+ "scripts": {
20
+ "clean": "react-cli clean lib coverage",
21
+ "build:umd": "react-cli build:component:umd",
22
+ "lint": "react-cli lint"
23
+ },
24
+ "tags": [
25
+ "react",
26
+ "redux"
27
+ ],
28
+ "keywords": [
29
+ "react",
30
+ "redux",
31
+ "router"
32
+ ],
33
+ "react-cli": {
34
+ "umd": {
35
+ "component": {
36
+ "outputFolder":"external/js",
37
+ "watch":"true"
38
+ }
39
+ }
40
+ }
41
+ }