solely 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/dist/compiler/ir/buildIR.cjs +1 -1
  2. package/dist/compiler/ir/buildIR.js +1 -1
  3. package/dist/compiler/parser/parser.cjs +1 -1
  4. package/dist/compiler/parser/parser.js +1 -1
  5. package/dist/components/commands/drawer/index.cjs +1 -0
  6. package/dist/components/commands/drawer/index.d.ts +10 -0
  7. package/dist/components/commands/drawer/index.js +1 -0
  8. package/dist/components/commands/drawer/style.css.cjs +1 -0
  9. package/dist/components/commands/drawer/style.css.js +1 -0
  10. package/dist/components/commands/drawer/types.d.ts +48 -0
  11. package/dist/components/commands/index.cjs +1 -0
  12. package/dist/components/commands/index.d.ts +15 -0
  13. package/dist/components/commands/index.js +1 -0
  14. package/dist/components/commands/message/index.cjs +1 -0
  15. package/dist/components/commands/message/index.d.ts +20 -0
  16. package/dist/components/commands/message/index.js +1 -0
  17. package/dist/components/commands/message/style.css.cjs +1 -0
  18. package/dist/components/commands/message/style.css.js +1 -0
  19. package/dist/components/commands/message/types.d.ts +39 -0
  20. package/dist/components/commands/modal/index.cjs +1 -0
  21. package/dist/components/commands/modal/index.d.ts +20 -0
  22. package/dist/components/commands/modal/index.js +1 -0
  23. package/dist/components/commands/modal/style.css.cjs +1 -0
  24. package/dist/components/commands/modal/style.css.js +1 -0
  25. package/dist/components/commands/modal/types.d.ts +70 -0
  26. package/dist/components/commands/popconfirm/index.cjs +1 -0
  27. package/dist/components/commands/popconfirm/index.d.ts +14 -0
  28. package/dist/components/commands/popconfirm/index.js +1 -0
  29. package/dist/components/commands/popconfirm/style.css.cjs +1 -0
  30. package/dist/components/commands/popconfirm/style.css.js +1 -0
  31. package/dist/components/commands/popconfirm/types.d.ts +46 -0
  32. package/dist/components/commands/tooltip/index.cjs +1 -0
  33. package/dist/components/commands/tooltip/index.d.ts +14 -0
  34. package/dist/components/commands/tooltip/index.js +1 -0
  35. package/dist/components/commands/tooltip/style.css.cjs +1 -0
  36. package/dist/components/commands/tooltip/style.css.js +1 -0
  37. package/dist/components/commands/tooltip/types.d.ts +43 -0
  38. package/dist/components/commands/utils.cjs +1 -0
  39. package/dist/components/commands/utils.d.ts +40 -0
  40. package/dist/components/commands/utils.js +1 -0
  41. package/dist/components/elements/alert/index.cjs +1 -0
  42. package/dist/components/elements/alert/index.d.ts +28 -0
  43. package/dist/components/elements/alert/index.html.cjs +1 -0
  44. package/dist/components/elements/alert/index.html.js +1 -0
  45. package/dist/components/elements/alert/index.js +1 -0
  46. package/dist/components/elements/alert/style.css.cjs +1 -0
  47. package/dist/components/elements/alert/style.css.js +1 -0
  48. package/dist/components/elements/alert/types.d.ts +18 -0
  49. package/dist/components/elements/backtop/index.cjs +1 -0
  50. package/dist/components/elements/backtop/index.d.ts +43 -0
  51. package/dist/components/elements/backtop/index.html.cjs +1 -0
  52. package/dist/components/elements/backtop/index.html.js +1 -0
  53. package/dist/components/elements/backtop/index.js +1 -0
  54. package/dist/components/elements/backtop/style.css.cjs +1 -0
  55. package/dist/components/elements/backtop/style.css.js +1 -0
  56. package/dist/components/elements/backtop/types.d.ts +9 -0
  57. package/dist/components/elements/badge/index.cjs +1 -0
  58. package/dist/components/elements/badge/index.d.ts +34 -0
  59. package/dist/components/elements/badge/index.html.cjs +1 -0
  60. package/dist/components/elements/badge/index.html.js +1 -0
  61. package/dist/components/elements/badge/index.js +1 -0
  62. package/dist/components/elements/badge/style.css.cjs +1 -0
  63. package/dist/components/elements/badge/style.css.js +1 -0
  64. package/dist/components/elements/badge/types.d.ts +22 -0
  65. package/dist/components/elements/breadcrumb/index.cjs +1 -0
  66. package/dist/components/elements/breadcrumb/index.d.ts +14 -0
  67. package/dist/components/elements/breadcrumb/index.html.cjs +1 -0
  68. package/dist/components/elements/breadcrumb/index.html.js +1 -0
  69. package/dist/components/elements/breadcrumb/index.js +1 -0
  70. package/dist/components/elements/breadcrumb/style.css.cjs +1 -0
  71. package/dist/components/elements/breadcrumb/style.css.js +1 -0
  72. package/dist/components/elements/breadcrumb/types.d.ts +15 -0
  73. package/dist/components/elements/button/index.cjs +1 -0
  74. package/dist/components/elements/button/index.d.ts +56 -0
  75. package/dist/components/elements/button/index.html.cjs +1 -0
  76. package/dist/components/elements/button/index.html.js +1 -0
  77. package/dist/components/elements/button/index.js +1 -0
  78. package/dist/components/elements/button/style.css.cjs +1 -0
  79. package/dist/components/elements/button/style.css.js +1 -0
  80. package/dist/components/elements/button/types.d.ts +42 -0
  81. package/dist/components/elements/card/index.cjs +1 -0
  82. package/dist/components/elements/card/index.d.ts +26 -0
  83. package/dist/components/elements/card/index.html.cjs +1 -0
  84. package/dist/components/elements/card/index.html.js +1 -0
  85. package/dist/components/elements/card/index.js +1 -0
  86. package/dist/components/elements/card/style.css.cjs +1 -0
  87. package/dist/components/elements/card/style.css.js +1 -0
  88. package/dist/components/elements/card/types.d.ts +28 -0
  89. package/dist/components/elements/checkbox/index.cjs +1 -0
  90. package/dist/components/elements/checkbox/index.d.ts +62 -0
  91. package/dist/components/elements/checkbox/index.html.cjs +1 -0
  92. package/dist/components/elements/checkbox/index.html.js +1 -0
  93. package/dist/components/elements/checkbox/index.js +1 -0
  94. package/dist/components/elements/checkbox/style.css.cjs +1 -0
  95. package/dist/components/elements/checkbox/style.css.js +1 -0
  96. package/dist/components/elements/checkbox/types.d.ts +30 -0
  97. package/dist/components/elements/coordinate-input/index.cjs +1 -0
  98. package/dist/components/elements/coordinate-input/index.d.ts +155 -0
  99. package/dist/components/elements/coordinate-input/index.html.cjs +1 -0
  100. package/dist/components/elements/coordinate-input/index.html.js +1 -0
  101. package/dist/components/elements/coordinate-input/index.js +1 -0
  102. package/dist/components/elements/coordinate-input/style.css.cjs +1 -0
  103. package/dist/components/elements/coordinate-input/style.css.js +1 -0
  104. package/dist/components/elements/coordinate-input/types.d.ts +112 -0
  105. package/dist/components/elements/divider/index.cjs +1 -0
  106. package/dist/components/elements/divider/index.d.ts +13 -0
  107. package/dist/components/elements/divider/index.html.cjs +1 -0
  108. package/dist/components/elements/divider/index.html.js +1 -0
  109. package/dist/components/elements/divider/index.js +1 -0
  110. package/dist/components/elements/divider/style.css.cjs +1 -0
  111. package/dist/components/elements/divider/style.css.js +1 -0
  112. package/dist/components/elements/divider/types.d.ts +15 -0
  113. package/dist/components/elements/empty/index.cjs +1 -0
  114. package/dist/components/elements/empty/index.d.ts +10 -0
  115. package/dist/components/elements/empty/index.html.cjs +1 -0
  116. package/dist/components/elements/empty/index.html.js +1 -0
  117. package/dist/components/elements/empty/index.js +1 -0
  118. package/dist/components/elements/empty/style.css.cjs +1 -0
  119. package/dist/components/elements/empty/style.css.js +1 -0
  120. package/dist/components/elements/empty/types.d.ts +9 -0
  121. package/dist/components/elements/fab/index.cjs +1 -0
  122. package/dist/components/elements/fab/index.d.ts +50 -0
  123. package/dist/components/elements/fab/index.html.cjs +1 -0
  124. package/dist/components/elements/fab/index.html.js +1 -0
  125. package/dist/components/elements/fab/index.js +1 -0
  126. package/dist/components/elements/fab/style.css.cjs +1 -0
  127. package/dist/components/elements/fab/style.css.js +1 -0
  128. package/dist/components/elements/fab/types.d.ts +52 -0
  129. package/dist/components/elements/index.cjs +1 -0
  130. package/dist/components/elements/index.d.ts +57 -0
  131. package/dist/components/elements/index.js +1 -0
  132. package/dist/components/elements/input/index.cjs +1 -0
  133. package/dist/components/elements/input/index.d.ts +109 -0
  134. package/dist/components/elements/input/index.html.cjs +1 -0
  135. package/dist/components/elements/input/index.html.js +1 -0
  136. package/dist/components/elements/input/index.js +1 -0
  137. package/dist/components/elements/input/style.css.cjs +1 -0
  138. package/dist/components/elements/input/style.css.js +1 -0
  139. package/dist/components/elements/input/types.d.ts +66 -0
  140. package/dist/components/elements/pagination/index.cjs +1 -0
  141. package/dist/components/elements/pagination/index.d.ts +80 -0
  142. package/dist/components/elements/pagination/index.html.cjs +1 -0
  143. package/dist/components/elements/pagination/index.html.js +1 -0
  144. package/dist/components/elements/pagination/index.js +1 -0
  145. package/dist/components/elements/pagination/style.css.cjs +1 -0
  146. package/dist/components/elements/pagination/style.css.js +1 -0
  147. package/dist/components/elements/pagination/types.d.ts +28 -0
  148. package/dist/components/elements/progress/index.cjs +1 -0
  149. package/dist/components/elements/progress/index.d.ts +42 -0
  150. package/dist/components/elements/progress/index.html.cjs +1 -0
  151. package/dist/components/elements/progress/index.html.js +1 -0
  152. package/dist/components/elements/progress/index.js +1 -0
  153. package/dist/components/elements/progress/style.css.cjs +1 -0
  154. package/dist/components/elements/progress/style.css.js +1 -0
  155. package/dist/components/elements/progress/types.d.ts +21 -0
  156. package/dist/components/elements/radio/index.cjs +1 -0
  157. package/dist/components/elements/radio/index.d.ts +42 -0
  158. package/dist/components/elements/radio/index.html.cjs +1 -0
  159. package/dist/components/elements/radio/index.html.js +1 -0
  160. package/dist/components/elements/radio/index.js +1 -0
  161. package/dist/components/elements/radio/style.css.cjs +1 -0
  162. package/dist/components/elements/radio/style.css.js +1 -0
  163. package/dist/components/elements/radio/types.d.ts +29 -0
  164. package/dist/components/elements/rate/index.cjs +1 -0
  165. package/dist/components/elements/rate/index.d.ts +47 -0
  166. package/dist/components/elements/rate/index.html.cjs +1 -0
  167. package/dist/components/elements/rate/index.html.js +1 -0
  168. package/dist/components/elements/rate/index.js +1 -0
  169. package/dist/components/elements/rate/style.css.cjs +1 -0
  170. package/dist/components/elements/rate/style.css.js +1 -0
  171. package/dist/components/elements/rate/types.d.ts +19 -0
  172. package/dist/components/elements/select/index.cjs +1 -0
  173. package/dist/components/elements/select/index.d.ts +74 -0
  174. package/dist/components/elements/select/index.html.cjs +1 -0
  175. package/dist/components/elements/select/index.html.js +1 -0
  176. package/dist/components/elements/select/index.js +1 -0
  177. package/dist/components/elements/select/style.css.cjs +1 -0
  178. package/dist/components/elements/select/style.css.js +1 -0
  179. package/dist/components/elements/select/types.d.ts +30 -0
  180. package/dist/components/elements/skeleton/index.cjs +1 -0
  181. package/dist/components/elements/skeleton/index.d.ts +26 -0
  182. package/dist/components/elements/skeleton/index.html.cjs +1 -0
  183. package/dist/components/elements/skeleton/index.html.js +1 -0
  184. package/dist/components/elements/skeleton/index.js +1 -0
  185. package/dist/components/elements/skeleton/style.css.cjs +1 -0
  186. package/dist/components/elements/skeleton/style.css.js +1 -0
  187. package/dist/components/elements/skeleton/types.d.ts +23 -0
  188. package/dist/components/elements/slider/index.cjs +1 -0
  189. package/dist/components/elements/slider/index.d.ts +76 -0
  190. package/dist/components/elements/slider/index.html.cjs +1 -0
  191. package/dist/components/elements/slider/index.html.js +1 -0
  192. package/dist/components/elements/slider/index.js +1 -0
  193. package/dist/components/elements/slider/style.css.cjs +1 -0
  194. package/dist/components/elements/slider/style.css.js +1 -0
  195. package/dist/components/elements/slider/types.d.ts +25 -0
  196. package/dist/components/elements/steps/index.cjs +1 -0
  197. package/dist/components/elements/steps/index.d.ts +31 -0
  198. package/dist/components/elements/steps/index.html.cjs +1 -0
  199. package/dist/components/elements/steps/index.html.js +1 -0
  200. package/dist/components/elements/steps/index.js +1 -0
  201. package/dist/components/elements/steps/style.css.cjs +1 -0
  202. package/dist/components/elements/steps/style.css.js +1 -0
  203. package/dist/components/elements/steps/types.d.ts +18 -0
  204. package/dist/components/elements/switch/index.cjs +1 -0
  205. package/dist/components/elements/switch/index.d.ts +62 -0
  206. package/dist/components/elements/switch/index.html.cjs +1 -0
  207. package/dist/components/elements/switch/index.html.js +1 -0
  208. package/dist/components/elements/switch/index.js +1 -0
  209. package/dist/components/elements/switch/style.css.cjs +1 -0
  210. package/dist/components/elements/switch/style.css.js +1 -0
  211. package/dist/components/elements/switch/types.d.ts +28 -0
  212. package/dist/components/elements/table/index.cjs +1 -0
  213. package/dist/components/elements/table/index.d.ts +46 -0
  214. package/dist/components/elements/table/index.html.cjs +1 -0
  215. package/dist/components/elements/table/index.html.js +1 -0
  216. package/dist/components/elements/table/index.js +1 -0
  217. package/dist/components/elements/table/style.css.cjs +1 -0
  218. package/dist/components/elements/table/style.css.js +1 -0
  219. package/dist/components/elements/table/types.d.ts +38 -0
  220. package/dist/components/elements/tabs/index.cjs +1 -0
  221. package/dist/components/elements/tabs/index.d.ts +54 -0
  222. package/dist/components/elements/tabs/index.html.cjs +1 -0
  223. package/dist/components/elements/tabs/index.html.js +1 -0
  224. package/dist/components/elements/tabs/index.js +1 -0
  225. package/dist/components/elements/tabs/style.css.cjs +1 -0
  226. package/dist/components/elements/tabs/style.css.js +1 -0
  227. package/dist/components/elements/tabs/types.d.ts +30 -0
  228. package/dist/components/elements/tag/index.cjs +1 -0
  229. package/dist/components/elements/tag/index.d.ts +22 -0
  230. package/dist/components/elements/tag/index.html.cjs +1 -0
  231. package/dist/components/elements/tag/index.html.js +1 -0
  232. package/dist/components/elements/tag/index.js +1 -0
  233. package/dist/components/elements/tag/style.css.cjs +1 -0
  234. package/dist/components/elements/tag/style.css.js +1 -0
  235. package/dist/components/elements/tag/types.d.ts +21 -0
  236. package/dist/components/elements/timeline/index.cjs +1 -0
  237. package/dist/components/elements/timeline/index.d.ts +25 -0
  238. package/dist/components/elements/timeline/index.html.cjs +1 -0
  239. package/dist/components/elements/timeline/index.html.js +1 -0
  240. package/dist/components/elements/timeline/index.js +1 -0
  241. package/dist/components/elements/timeline/style.css.cjs +1 -0
  242. package/dist/components/elements/timeline/style.css.js +1 -0
  243. package/dist/components/elements/timeline/types.d.ts +23 -0
  244. package/dist/components/elements/tree/index.cjs +1 -0
  245. package/dist/components/elements/tree/index.d.ts +127 -0
  246. package/dist/components/elements/tree/index.html.cjs +1 -0
  247. package/dist/components/elements/tree/index.html.js +1 -0
  248. package/dist/components/elements/tree/index.js +1 -0
  249. package/dist/components/elements/tree/style.css.cjs +1 -0
  250. package/dist/components/elements/tree/style.css.js +1 -0
  251. package/dist/components/elements/tree/types.d.ts +47 -0
  252. package/dist/components/elements/upload/index.cjs +1 -0
  253. package/dist/components/elements/upload/index.d.ts +74 -0
  254. package/dist/components/elements/upload/index.html.cjs +1 -0
  255. package/dist/components/elements/upload/index.html.js +1 -0
  256. package/dist/components/elements/upload/index.js +1 -0
  257. package/dist/components/elements/upload/style.css.cjs +1 -0
  258. package/dist/components/elements/upload/style.css.js +1 -0
  259. package/dist/components/elements/upload/types.d.ts +48 -0
  260. package/dist/components/elements/utils/helpers.cjs +1 -0
  261. package/dist/components/elements/utils/helpers.d.ts +24 -0
  262. package/dist/components/elements/utils/helpers.js +1 -0
  263. package/dist/components/index.cjs +1 -0
  264. package/dist/components/index.d.ts +21 -0
  265. package/dist/components/index.js +1 -0
  266. package/dist/components/theme/index.cjs +1 -0
  267. package/dist/components/theme/index.d.ts +45 -0
  268. package/dist/components/theme/index.js +1 -0
  269. package/dist/components/theme/variables.css +274 -0
  270. package/dist/index.cjs +1 -1
  271. package/dist/index.js +1 -1
  272. package/dist/plugin.cjs +1 -1
  273. package/dist/plugins/solely-vite-plugin.cjs +1 -1
  274. package/dist/plugins/solely-vite-plugin.js +1 -1
  275. package/dist/router/core.cjs +1 -1
  276. package/dist/router/core.js +1 -1
  277. package/dist/router/router-link.cjs +1 -1
  278. package/dist/router/router-link.js +1 -1
  279. package/dist/router/router-view.cjs +1 -1
  280. package/dist/router/router-view.js +1 -1
  281. package/dist/runtime/component/base-element.cjs +1 -1
  282. package/dist/runtime/component/base-element.d.ts +12 -0
  283. package/dist/runtime/component/base-element.js +1 -1
  284. package/dist/runtime/component/decorators.cjs +1 -1
  285. package/dist/runtime/component/decorators.js +1 -1
  286. package/dist/runtime/index.cjs +1 -1
  287. package/dist/runtime/index.js +1 -1
  288. package/dist/runtime/reactivity/observe.cjs +1 -1
  289. package/dist/runtime/reactivity/observe.js +1 -1
  290. package/dist/runtime/renderer/html-decode.cjs +1 -1
  291. package/dist/runtime/renderer/html-decode.js +1 -1
  292. package/dist/runtime/renderer/renderIR.cjs +1 -1
  293. package/dist/runtime/renderer/renderIR.js +1 -1
  294. package/dist/shared/env.cjs +1 -1
  295. package/dist/shared/env.js +1 -1
  296. package/dist/shared/event-listeners.cjs +1 -1
  297. package/dist/shared/gen-function.cjs +1 -1
  298. package/dist/shared/gen-function.js +1 -1
  299. package/dist/shared/index.cjs +1 -1
  300. package/dist/shared/is-object.js +1 -1
  301. package/dist/shared/templateError.cjs +1 -1
  302. package/dist/shared/templateError.js +1 -1
  303. package/dist/shared/url.cjs +1 -1
  304. package/dist/shared/url.js +1 -1
  305. package/dist/types/index.cjs +1 -1
  306. package/dist/types/lifecycle.cjs +1 -1
  307. package/package.json +43 -1
@@ -0,0 +1 @@
1
+ const n='<div :class="this.getContainerClasses()">\n <If condition="$data.type === \'latitude\' || $data.type === \'both\'">\n <div class="coordinate-group">\n <If condition="$data.type === \'both\'">\n <span class="coordinate-group__label">纬度</span>\n </If>\n <div class="dms-input" :class="this.getDmsInputClasses(\'latitude\')">\n <div class="dms-input__fields">\n <input\n class="dms-input__field dms-input__field--degrees"\n type="number"\n min="0"\n max="90"\n placeholder="0"\n :value="this.getDmsDisplayValue(\'latitude\', \'degrees\')"\n :disabled="$data.disabled"\n :readonly="$data.readonly"\n @input="this.handleDmsInput(\'latitude\', \'degrees\', event)"\n @change="this.handleDmsChange(\'latitude\', \'degrees\', event)"\n @focus="this.handleFocus(\'latitude\', event)"\n @blur="this.handleBlur(\'latitude\', event)"\n ref="latitudeDegreesInput"\n />\n <span class="dms-input__unit">°</span>\n <input\n class="dms-input__field"\n type="number"\n min="0"\n max="59"\n placeholder="00"\n :value="this.getDmsDisplayValue(\'latitude\', \'minutes\')"\n :disabled="$data.disabled"\n :readonly="$data.readonly"\n @input="this.handleDmsInput(\'latitude\', \'minutes\', event)"\n @change="this.handleDmsChange(\'latitude\', \'minutes\', event)"\n @focus="this.handleFocus(\'latitude\', event)"\n @blur="this.handleBlur(\'latitude\', event)"\n ref="latitudeMinutesInput"\n />\n <span class="dms-input__unit">′</span>\n <input\n class="dms-input__field dms-input__field--seconds"\n type="text"\n inputmode="decimal"\n :placeholder="this.getSecondsPlaceholder()"\n :disabled="$data.disabled"\n :readonly="$data.readonly"\n @blur="this.handleSecondsBlur(\'latitude\', event)"\n @change="this.handleSecondsChange(\'latitude\', event)"\n @keydown="this.handleSecondsKeyDown(\'latitude\', event)"\n ref="latitudeSecondsInput"\n />\n <span class="dms-input__unit">″</span>\n </div>\n <If test="$data.showDirection">\n <div\n :class="this.getDirectionClasses(\'latitude\')"\n :disabled="$data.disabled"\n @click="this.toggleDirection(\'latitude\')"\n ref="latitudeDirectionInput"\n >\n <span class="dms-input__direction-value">{{this.getDmsDisplayValue(\'latitude\', \'direction\')}}</span>\n <span class="dms-input__direction-arrow">▼</span>\n <If test="$data.latitudeDirectionOpen">\n <div class="dms-input__direction-dropdown" @click="this.handleDropdownClick(event)">\n <div\n :class="this.getDirectionOptionClasses(\'latitude\', \'N\')"\n @click="this.selectDirection(\'latitude\', \'N\')"\n >N</div>\n <div\n :class="this.getDirectionOptionClasses(\'latitude\', \'S\')"\n @click="this.selectDirection(\'latitude\', \'S\')"\n >S</div>\n </div>\n </If>\n </div>\n </If>\n </div>\n <If condition="$data.showDecimal">\n <span class="coordinate-decimal">{{this.getDecimalDisplayValue(\'latitude\')}}</span>\n </If>\n </div>\n </If>\n\n <If condition="$data.type === \'longitude\' || $data.type === \'both\'">\n <div class="coordinate-group">\n <If condition="$data.type === \'both\'">\n <span class="coordinate-group__label">经度</span>\n </If>\n <div class="dms-input" :class="this.getDmsInputClasses(\'longitude\')">\n <div class="dms-input__fields">\n <input\n class="dms-input__field dms-input__field--degrees"\n type="number"\n min="0"\n max="180"\n placeholder="0"\n :value="this.getDmsDisplayValue(\'longitude\', \'degrees\')"\n :disabled="$data.disabled"\n :readonly="$data.readonly"\n @input="this.handleDmsInput(\'longitude\', \'degrees\', event)"\n @change="this.handleDmsChange(\'longitude\', \'degrees\', event)"\n @focus="this.handleFocus(\'longitude\', event)"\n @blur="this.handleBlur(\'longitude\', event)"\n ref="longitudeDegreesInput"\n />\n <span class="dms-input__unit">°</span>\n <input\n class="dms-input__field"\n type="number"\n min="0"\n max="59"\n placeholder="00"\n :value="this.getDmsDisplayValue(\'longitude\', \'minutes\')"\n :disabled="$data.disabled"\n :readonly="$data.readonly"\n @input="this.handleDmsInput(\'longitude\', \'minutes\', event)"\n @change="this.handleDmsChange(\'longitude\', \'minutes\', event)"\n @focus="this.handleFocus(\'longitude\', event)"\n @blur="this.handleBlur(\'longitude\', event)"\n ref="longitudeMinutesInput"\n />\n <span class="dms-input__unit">′</span>\n <input\n class="dms-input__field dms-input__field--seconds"\n type="text"\n inputmode="decimal"\n :placeholder="this.getSecondsPlaceholder()"\n :disabled="$data.disabled"\n :readonly="$data.readonly"\n @blur="this.handleSecondsBlur(\'longitude\', event)"\n @change="this.handleSecondsChange(\'longitude\', event)"\n @keydown="this.handleSecondsKeyDown(\'longitude\', event)"\n ref="longitudeSecondsInput"\n />\n <span class="dms-input__unit">″</span>\n </div>\n <If test="$data.showDirection">\n <div\n :class="this.getDirectionClasses(\'longitude\')"\n :disabled="$data.disabled"\n @click="this.toggleDirection(\'longitude\')"\n ref="longitudeDirectionInput"\n >\n <span class="dms-input__direction-value">{{this.getDmsDisplayValue(\'longitude\', \'direction\')}}</span>\n <span class="dms-input__direction-arrow">▼</span>\n <If test="$data.longitudeDirectionOpen">\n <div class="dms-input__direction-dropdown" @click="this.handleDropdownClick(event)">\n <div\n :class="this.getDirectionOptionClasses(\'longitude\', \'E\')"\n @click="this.selectDirection(\'longitude\', \'E\')"\n >E</div>\n <div\n :class="this.getDirectionOptionClasses(\'longitude\', \'W\')"\n @click="this.selectDirection(\'longitude\', \'W\')"\n >W</div>\n </div>\n </If>\n </div>\n </If>\n </div>\n <If condition="$data.showDecimal">\n <span class="coordinate-decimal">{{this.getDecimalDisplayValue(\'longitude\')}}</span>\n </If>\n </div>\n </If>\n</div>\n';export{n as default};
@@ -0,0 +1 @@
1
+ import t from"./style.css.js";import e from"./index.html.js";import i from"../../../runtime/component/base-element.js";import{CustomElement as s}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;var a,n,o,d,r=t=>{throw TypeError(t)},l=(t,e,i)=>e.has(t)||r("Cannot "+i),u=(t,e,i)=>(l(t,e,"read from private field"),i?i.call(t):e.get(t)),h=(t,e,i)=>e.has(t)?r("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),c=(t,e,i,s)=>(l(t,e,"write to private field"),e.set(t,i),i);let p=class extends i{constructor(){super(...arguments),h(this,a,{degrees:0,minutes:0,seconds:0,direction:"N"}),h(this,n,{degrees:0,minutes:0,seconds:0,direction:"E"}),h(this,o,{latitude:!1,longitude:!1}),h(this,d,null)}mounted(){this.initializeValues()}beforeUnmount(){u(this,d)&&(document.removeEventListener("click",u(this,d)),c(this,d,null))}registerCloseHandler(){u(this,d)&&document.removeEventListener("click",u(this,d)),c(this,d,t=>{const e=t.target;this.contains(e)&&e.closest(".dms-input__direction")||((this.$data.latitudeDirectionOpen||this.$data.longitudeDirectionOpen)&&(this.$data.latitudeDirectionOpen=!1,this.$data.longitudeDirectionOpen=!1,this.refresh()),u(this,d)&&(document.removeEventListener("click",u(this,d)),c(this,d,null)))}),setTimeout(()=>{u(this,d)&&document.addEventListener("click",u(this,d))},0)}onPropChange(t,e){"latitude"===t&&"number"==typeof e?(c(this,a,this.decimalToDms(e,"latitude")),this.refresh(),this.updateSecondsInputs()):"longitude"===t&&"number"==typeof e&&(c(this,n,this.decimalToDms(e,"longitude")),this.refresh(),this.updateSecondsInputs())}initializeValues(){void 0===this.$data.latitude||isNaN(this.$data.latitude)||c(this,a,this.decimalToDms(this.$data.latitude,"latitude")),void 0===this.$data.longitude||isNaN(this.$data.longitude)||c(this,n,this.decimalToDms(this.$data.longitude,"longitude")),this.refresh(),this.updateSecondsInputs()}updateSecondsInputs(){const t=this.$refs.latitudeSecondsInput,e=this.$refs.longitudeSecondsInput;if(t){const e=u(this,a).seconds;if(e>0){const i=this.$data.precision??3;e===Math.floor(e)?t.value=String(Math.floor(e)):t.value=e.toFixed(i)}else t.value=""}if(e){const t=u(this,n).seconds;if(t>0){const i=this.$data.precision??3;t===Math.floor(t)?e.value=String(Math.floor(t)):e.value=t.toFixed(i)}else e.value=""}}getContainerClasses(){const t=[],e=this.$data.size||"medium",i=this.$data.type||"both";return"small"===e?t.push("coordinate-input--sm"):"large"===e?t.push("coordinate-input--lg"):t.push("coordinate-input--md"),"both"===i&&t.push("coordinate-input--horizontal"),t.join(" ")}getDmsInputClasses(t){const e=[],i=u(this,o)[t],s=this.$data.disabled,a=this.$data.readonly;return i&&e.push("dms-input--focused"),s&&e.push("dms-input--disabled"),a&&e.push("dms-input--readonly"),e.join(" ")}getDirectionClasses(t){const e=["dms-input__direction"];return("latitude"===t?this.$data.latitudeDirectionOpen:this.$data.longitudeDirectionOpen)&&e.push("dms-input__direction--open"),e.join(" ")}getDirectionOptionClasses(t,e){const i=["dms-input__direction-option"];return("latitude"===t?u(this,a).direction:u(this,n).direction)===e&&i.push("dms-input__direction-option--selected"),i.join(" ")}getSecondsPlaceholder(){const t=this.$data.precision??3;return 0===t?"00":"00."+"0".repeat(t)}getSecondsStep(){const t=this.$data.precision??3;return 0===t?"1":"0."+"0".repeat(t-1)+"1"}getDmsDisplayValue(t,e){const i=u(this,"latitude"===t?a:n)[e];if("seconds"===e){const t=this.$data.precision??3;return"number"==typeof i&&!isNaN(i)&&i>0?i===Math.floor(i)?String(Math.floor(i)):i.toFixed(t):""}return"direction"===e?i:null!=i&&!isNaN(Number(i))&&Number(i)>0?String(i):""}getDecimalDisplayValue(t){const e="latitude"===t?this.$data.latitude:this.$data.longitude;return void 0===e||isNaN(e)?"-":e.toFixed(6)}handleDmsInput(t,e,i){if(this.$data.disabled||this.$data.readonly)return;const s=i.target;let o=parseFloat(s.value);const d=this.getFieldLimits(t,e);isNaN(o)?o=0:o<d.min?o=d.min:o>d.max&&(o=d.max),u(this,"latitude"===t?a:n)[e]=o,this.updateDecimalValue(t),!1!==this.$data.autoTab&&this.shouldAutoTab(e,o,d.max)&&this.focusNextInput(t,e)}handleDmsChange(t,e,i){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}handleSecondsChange(t,e){const i=e.target;let s=parseFloat(i.value);const o=this.getFieldLimits(t,"seconds");isNaN(s)?s=0:s<o.min?s=o.min:s>o.max&&(s=o.max);const d=this.$data.precision??3;s=parseFloat(s.toFixed(d)),u(this,"latitude"===t?a:n).seconds=s,this.updateDecimalValue(t),this.refresh(),this.updateSecondsInputs(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}shouldAutoTab(t,e,i){if("seconds"!==t){const t=String(Math.floor(e)),s=String(Math.floor(i));return t.length>=s.length}const s=this.$data.precision??3,a=String(e),n=a.indexOf(".");if(-1===n){const t=Math.floor(e),s=String(t),a=String(Math.floor(i));return s.length>=a.length}return a.length-n-1>=s}focusNextInput(t,e){const i={degrees:"Minutes",minutes:"Seconds",seconds:"Direction"}[e];if(!i)return;const s=`${t}${i}Input`,a=this.$refs[s];a&&(a.focus(),a instanceof HTMLInputElement&&a.select())}toggleDirection(t){if(this.$data.disabled||this.$data.readonly)return;const e="latitude"===t?"latitudeDirectionOpen":"longitudeDirectionOpen",i=this.$data[e]||!1;this.$data.latitudeDirectionOpen=!1,this.$data.longitudeDirectionOpen=!1,this.$data[e]=!i,this.refresh(),this.$data[e]&&this.registerCloseHandler()}handleDropdownClick(t){t.stopPropagation()}selectDirection(t,e){if(this.$data.disabled||this.$data.readonly)return;u(this,"latitude"===t?a:n).direction=e;const i="latitude"===t?"latitudeDirectionOpen":"longitudeDirectionOpen";this.$data[i]=!1,this.updateDecimalValue(t),this.refresh()}handleFocus(t,e){u(this,o)[t]=!0,this.refresh()}handleBlur(t,e){u(this,o)[t]=!1,this.refresh()}handleSecondsBlur(t,e){u(this,o)[t]=!1;const i=e.target;let s=parseFloat(i.value);const d=this.getFieldLimits(t,"seconds");isNaN(s)?s=0:s<d.min?s=d.min:s>d.max&&(s=d.max);const r=this.$data.precision??3;s=parseFloat(s.toFixed(r)),u(this,"latitude"===t?a:n).seconds=s,this.updateDecimalValue(t),this.refresh(),this.updateSecondsInputs()}handleSecondsKeyDown(t,e){const i=e.target,s=this.$data.precision??3,a=e.key;if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"].includes(a))return;if((e.ctrlKey||e.metaKey)&&["a","c","v","x"].includes(a.toLowerCase()))return;if(!/[0-9.]/.test(a))return void e.preventDefault();if("."===a)return i.value.includes(".")||0===s?void e.preventDefault():void 0;const n=i.value,o=i.selectionStart??0,d=i.selectionEnd??0,r=n.slice(0,o)+a+n.slice(d),l=parseFloat(r);if(!isNaN(l)&&l>59)return void e.preventDefault();const u=n.indexOf(".");-1!==u&&o>u&&n.length-u-1>=s&&e.preventDefault()}getFieldLimits(t,e){const i="latitude"===t;switch(e){case"degrees":return{min:0,max:i?90:180};case"minutes":case"seconds":return{min:0,max:59};default:return{min:0,max:0}}}updateDecimalValue(t){const e=u(this,"latitude"===t?a:n),i=this.dmsToDecimal(e);"latitude"===t?this.$data.latitude=i:this.$data.longitude=i,this.refresh()}dmsToDecimal(t){let e=t.degrees+t.minutes/60+t.seconds/3600;return"S"!==t.direction&&"W"!==t.direction||(e=-e),e}decimalToDms(t,e){const i="latitude"===e;let s=i?"N":"E";t<0&&(t=-t,s=i?"S":"W");const a=Math.floor(t),n=60*(t-a),o=Math.floor(n);return{degrees:a,minutes:o,seconds:parseFloat((60*(n-o)).toFixed(3)),direction:s}}getValue(){return{latitude:this.$data.latitude||0,longitude:this.$data.longitude||0}}getDmsCoordinateValue(){return{latitude:{...u(this,a)},longitude:{...u(this,n)}}}setValue(t,e){this.$data.latitude=t,this.$data.longitude=e,c(this,a,this.decimalToDms(t,"latitude")),c(this,n,this.decimalToDms(e,"longitude")),this.refresh()}clear(){this.$data.latitude=0,this.$data.longitude=0,c(this,a,{degrees:0,minutes:0,seconds:0,direction:"N"}),c(this,n,{degrees:0,minutes:0,seconds:0,direction:"E"}),this.refresh(),this.dispatchEvent(new Event("clear",{bubbles:!0,composed:!0}))}get value(){return this.getValue()}set value(t){Array.isArray(t)?this.setValue(t[0],t[1]):this.setValue(t.latitude,t.longitude)}};a=new WeakMap,n=new WeakMap,o=new WeakMap,d=new WeakMap,p=((t,e)=>{for(var i,s=e,a=t.length-1;a>=0;a--)(i=t[a])&&(s=i(s)||s);return s})([s({tagName:"solely-coordinate-input",template:e,styles:t,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"both"},{name:"latitude",type:"number"},{name:"longitude",type:"number"},{name:"disabled",type:"boolean",default:!1},{name:"readonly",type:"boolean",default:!1},{name:"placeholder",type:"string",default:""},{name:"size",type:"string",default:"medium"},{name:"showDirection",type:"boolean",default:!1},{name:"precision",type:"number",default:3},{name:"showDecimal",type:"boolean",default:!1},{name:"autoTab",type:"boolean",default:!1},{name:"latitudeDirectionOpen",type:"boolean",default:!1},{name:"longitudeDirectionOpen",type:"boolean",default:!1},{name:"block",type:"boolean",default:!1}]})],p);export{p as SolelyCoordinateInput};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:inline-block}:host([block]){display:block;width:100%}.coordinate-input{display:flex;flex-direction:column;gap:var(--solely-spacing-md);font-family:var(--solely-font-family)}.coordinate-input--horizontal{flex-direction:row;gap:var(--solely-spacing-lg);flex-wrap:wrap}.coordinate-group{display:flex;align-items:center;gap:var(--solely-spacing-sm);flex:1;min-width:0}.coordinate-group__label{font-size:var(--solely-font-size-md);color:var(--solely-text-secondary);min-width:40px;text-align:right;flex-shrink:0;font-weight:500}.dms-input{display:flex;align-items:center;flex:1;min-width:0;height:var(--solely-height-md);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);transition:all var(--solely-transition-duration) var(--solely-transition-timing);overflow:hidden}.dms-input:has(.dms-input__direction--open){overflow:visible}.dms-input:hover:not(.dms-input--disabled):not(.dms-input--readonly){border-color:var(--solely-primary-hover)}.dms-input--focused{border-color:var(--solely-primary);box-shadow:0 0 0 2px var(--solely-primary-light)}.dms-input--disabled{background-color:var(--solely-gray-3);cursor:not-allowed;opacity:.6}.dms-input--readonly{background-color:var(--solely-gray-2);cursor:default}.dms-input--error{border-color:var(--solely-error)}.dms-input--error.dms-input--focused{box-shadow:0 0 0 2px var(--solely-error-light)}.dms-input__fields{display:flex;align-items:center;justify-content:space-around;flex:1;min-width:0;padding:0 var(--solely-spacing-sm);gap:2px}.dms-input__field{flex:1;min-width:24px;max-width:56px;height:100%;padding:0 2px;border:none;background:transparent;text-align:center;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);outline:none;-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}.dms-input__field::-webkit-outer-spin-button,.dms-input__field::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}.dms-input__field--degrees{max-width:48px}.dms-input__field--seconds{max-width:64px}.dms-input__field::placeholder{color:var(--solely-text-quaternary)}.dms-input__field:disabled{cursor:not-allowed;color:var(--solely-text-tertiary)}.dms-input__field:read-only{cursor:default}.dms-input__unit{font-size:var(--solely-font-size-sm);color:var(--solely-text-secondary);-webkit-user-select:none;user-select:none;flex-shrink:0;padding:0 1px;font-weight:500}.dms-input__direction{height:100%;width:48px;flex-shrink:0;padding:0 var(--solely-spacing-sm);border:none;border-left:1px solid var(--solely-border-color);background:var(--solely-gray-2);font-size:var(--solely-font-size-sm);font-weight:600;color:var(--solely-text-primary);cursor:pointer;outline:none;display:flex;align-items:center;justify-content:space-between;position:relative;-webkit-user-select:none;user-select:none}.dms-input__direction-value{flex:1;text-align:center}.dms-input__direction-arrow{font-size:10px;color:var(--solely-text-secondary);transition:transform .2s}.dms-input__direction--open .dms-input__direction-arrow{transform:rotate(180deg)}.dms-input__direction-dropdown{position:absolute;top:100%;left:-1px;right:-1px;background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-top:none;border-radius:0 0 var(--solely-border-radius-md) var(--solely-border-radius-md);box-shadow:var(--solely-shadow-2);z-index:var(--solely-z-index-dropdown);overflow:hidden}.dms-input__direction-option{padding:8px var(--solely-spacing-sm);text-align:center;cursor:pointer;transition:background-color .2s,color .2s}.dms-input__direction-option:hover:not(.dms-input__direction-option--selected){background-color:var(--solely-primary-light)}.dms-input__direction-option--selected{background-color:var(--solely-primary-light);color:var(--solely-primary);font-weight:500}.dms-input__direction:disabled{cursor:not-allowed;color:var(--solely-text-tertiary)}.dms-input__direction:disabled .dms-input__direction-arrow{color:var(--solely-text-tertiary)}.coordinate-input--sm .dms-input{height:var(--solely-height-sm)}.coordinate-input--sm .dms-input__fields{padding:0 var(--solely-spacing-xs);gap:1px}.coordinate-input--sm .dms-input__field{font-size:var(--solely-font-size-sm);min-width:20px;max-width:44px}.coordinate-input--sm .dms-input__field--degrees{max-width:38px}.coordinate-input--sm .dms-input__field--seconds{max-width:50px}.coordinate-input--sm .dms-input__unit{font-size:var(--solely-font-size-sm)}.coordinate-input--sm .dms-input__direction{width:40px;padding:0 var(--solely-spacing-xs);font-size:var(--solely-font-size-sm)}.coordinate-input--sm .coordinate-group__label{font-size:var(--solely-font-size-sm);min-width:36px}.coordinate-input--md .dms-input{height:var(--solely-height-md)}.coordinate-input--md .dms-input__fields{padding:0 var(--solely-spacing-sm);gap:2px}.coordinate-input--md .dms-input__field{font-size:var(--solely-font-size-md);min-width:24px;max-width:56px}.coordinate-input--md .dms-input__field--degrees{max-width:48px}.coordinate-input--md .dms-input__field--seconds{max-width:64px}.coordinate-input--md .dms-input__direction{width:48px;padding:0 var(--solely-spacing-sm);font-size:var(--solely-font-size-sm)}.coordinate-input--lg .dms-input{height:var(--solely-height-lg)}.coordinate-input--lg .dms-input__fields{padding:0 var(--solely-spacing-md);gap:4px}.coordinate-input--lg .dms-input__field{font-size:var(--solely-font-size-lg);min-width:28px;max-width:68px}.coordinate-input--lg .dms-input__field--degrees{max-width:56px}.coordinate-input--lg .dms-input__field--seconds{max-width:76px}.coordinate-input--lg .dms-input__unit{font-size:var(--solely-font-size-md)}.coordinate-input--lg .dms-input__direction{width:56px;padding:0 10px;font-size:var(--solely-font-size-md)}.coordinate-input--lg .coordinate-group__label{font-size:var(--solely-font-size-lg);min-width:44px}.coordinate-decimal{font-size:var(--solely-font-size-sm);color:var(--solely-text-secondary);margin-left:var(--solely-spacing-sm);font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;white-space:nowrap;flex-shrink:0;background:var(--solely-gray-2);padding:2px 8px;border-radius:var(--solely-border-radius-sm);min-width:90px;text-align:right}.coordinate-input--horizontal .coordinate-decimal{margin-left:var(--solely-spacing-sm)}@media (max-width: 576px){.coordinate-input--horizontal{flex-direction:column}.coordinate-group{width:100%}}:host([block]) .coordinate-input{width:100%}:host([block]) .coordinate-group{width:100%;flex:1}:host([block]) .dms-input{flex:1}";
@@ -0,0 +1 @@
1
+ const o="*,*:before,*:after{box-sizing:border-box}:host{display:inline-block}:host([block]){display:block;width:100%}.coordinate-input{display:flex;flex-direction:column;gap:var(--solely-spacing-md);font-family:var(--solely-font-family)}.coordinate-input--horizontal{flex-direction:row;gap:var(--solely-spacing-lg);flex-wrap:wrap}.coordinate-group{display:flex;align-items:center;gap:var(--solely-spacing-sm);flex:1;min-width:0}.coordinate-group__label{font-size:var(--solely-font-size-md);color:var(--solely-text-secondary);min-width:40px;text-align:right;flex-shrink:0;font-weight:500}.dms-input{display:flex;align-items:center;flex:1;min-width:0;height:var(--solely-height-md);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);transition:all var(--solely-transition-duration) var(--solely-transition-timing);overflow:hidden}.dms-input:has(.dms-input__direction--open){overflow:visible}.dms-input:hover:not(.dms-input--disabled):not(.dms-input--readonly){border-color:var(--solely-primary-hover)}.dms-input--focused{border-color:var(--solely-primary);box-shadow:0 0 0 2px var(--solely-primary-light)}.dms-input--disabled{background-color:var(--solely-gray-3);cursor:not-allowed;opacity:.6}.dms-input--readonly{background-color:var(--solely-gray-2);cursor:default}.dms-input--error{border-color:var(--solely-error)}.dms-input--error.dms-input--focused{box-shadow:0 0 0 2px var(--solely-error-light)}.dms-input__fields{display:flex;align-items:center;justify-content:space-around;flex:1;min-width:0;padding:0 var(--solely-spacing-sm);gap:2px}.dms-input__field{flex:1;min-width:24px;max-width:56px;height:100%;padding:0 2px;border:none;background:transparent;text-align:center;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);outline:none;-webkit-appearance:textfield;appearance:textfield;-moz-appearance:textfield}.dms-input__field::-webkit-outer-spin-button,.dms-input__field::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}.dms-input__field--degrees{max-width:48px}.dms-input__field--seconds{max-width:64px}.dms-input__field::placeholder{color:var(--solely-text-quaternary)}.dms-input__field:disabled{cursor:not-allowed;color:var(--solely-text-tertiary)}.dms-input__field:read-only{cursor:default}.dms-input__unit{font-size:var(--solely-font-size-sm);color:var(--solely-text-secondary);-webkit-user-select:none;user-select:none;flex-shrink:0;padding:0 1px;font-weight:500}.dms-input__direction{height:100%;width:48px;flex-shrink:0;padding:0 var(--solely-spacing-sm);border:none;border-left:1px solid var(--solely-border-color);background:var(--solely-gray-2);font-size:var(--solely-font-size-sm);font-weight:600;color:var(--solely-text-primary);cursor:pointer;outline:none;display:flex;align-items:center;justify-content:space-between;position:relative;-webkit-user-select:none;user-select:none}.dms-input__direction-value{flex:1;text-align:center}.dms-input__direction-arrow{font-size:10px;color:var(--solely-text-secondary);transition:transform .2s}.dms-input__direction--open .dms-input__direction-arrow{transform:rotate(180deg)}.dms-input__direction-dropdown{position:absolute;top:100%;left:-1px;right:-1px;background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-top:none;border-radius:0 0 var(--solely-border-radius-md) var(--solely-border-radius-md);box-shadow:var(--solely-shadow-2);z-index:var(--solely-z-index-dropdown);overflow:hidden}.dms-input__direction-option{padding:8px var(--solely-spacing-sm);text-align:center;cursor:pointer;transition:background-color .2s,color .2s}.dms-input__direction-option:hover:not(.dms-input__direction-option--selected){background-color:var(--solely-primary-light)}.dms-input__direction-option--selected{background-color:var(--solely-primary-light);color:var(--solely-primary);font-weight:500}.dms-input__direction:disabled{cursor:not-allowed;color:var(--solely-text-tertiary)}.dms-input__direction:disabled .dms-input__direction-arrow{color:var(--solely-text-tertiary)}.coordinate-input--sm .dms-input{height:var(--solely-height-sm)}.coordinate-input--sm .dms-input__fields{padding:0 var(--solely-spacing-xs);gap:1px}.coordinate-input--sm .dms-input__field{font-size:var(--solely-font-size-sm);min-width:20px;max-width:44px}.coordinate-input--sm .dms-input__field--degrees{max-width:38px}.coordinate-input--sm .dms-input__field--seconds{max-width:50px}.coordinate-input--sm .dms-input__unit{font-size:var(--solely-font-size-sm)}.coordinate-input--sm .dms-input__direction{width:40px;padding:0 var(--solely-spacing-xs);font-size:var(--solely-font-size-sm)}.coordinate-input--sm .coordinate-group__label{font-size:var(--solely-font-size-sm);min-width:36px}.coordinate-input--md .dms-input{height:var(--solely-height-md)}.coordinate-input--md .dms-input__fields{padding:0 var(--solely-spacing-sm);gap:2px}.coordinate-input--md .dms-input__field{font-size:var(--solely-font-size-md);min-width:24px;max-width:56px}.coordinate-input--md .dms-input__field--degrees{max-width:48px}.coordinate-input--md .dms-input__field--seconds{max-width:64px}.coordinate-input--md .dms-input__direction{width:48px;padding:0 var(--solely-spacing-sm);font-size:var(--solely-font-size-sm)}.coordinate-input--lg .dms-input{height:var(--solely-height-lg)}.coordinate-input--lg .dms-input__fields{padding:0 var(--solely-spacing-md);gap:4px}.coordinate-input--lg .dms-input__field{font-size:var(--solely-font-size-lg);min-width:28px;max-width:68px}.coordinate-input--lg .dms-input__field--degrees{max-width:56px}.coordinate-input--lg .dms-input__field--seconds{max-width:76px}.coordinate-input--lg .dms-input__unit{font-size:var(--solely-font-size-md)}.coordinate-input--lg .dms-input__direction{width:56px;padding:0 10px;font-size:var(--solely-font-size-md)}.coordinate-input--lg .coordinate-group__label{font-size:var(--solely-font-size-lg);min-width:44px}.coordinate-decimal{font-size:var(--solely-font-size-sm);color:var(--solely-text-secondary);margin-left:var(--solely-spacing-sm);font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;white-space:nowrap;flex-shrink:0;background:var(--solely-gray-2);padding:2px 8px;border-radius:var(--solely-border-radius-sm);min-width:90px;text-align:right}.coordinate-input--horizontal .coordinate-decimal{margin-left:var(--solely-spacing-sm)}@media (max-width: 576px){.coordinate-input--horizontal{flex-direction:column}.coordinate-group{width:100%}}:host([block]) .coordinate-input{width:100%}:host([block]) .coordinate-group{width:100%;flex:1}:host([block]) .dms-input{flex:1}";export{o as default};
@@ -0,0 +1,112 @@
1
+ /**
2
+ * 经纬度输入框组件类型定义
3
+ * 支持度分秒(DMS)格式输入
4
+ */
5
+ /**
6
+ * 坐标类型
7
+ */
8
+ export type CoordinateType = 'latitude' | 'longitude' | 'both';
9
+ /**
10
+ * 方向类型
11
+ */
12
+ export type Direction = 'N' | 'S' | 'E' | 'W';
13
+ /**
14
+ * 度分秒对象
15
+ */
16
+ export interface DMS {
17
+ /** 度 */
18
+ degrees: number;
19
+ /** 分 */
20
+ minutes: number;
21
+ /** 秒 */
22
+ seconds: number;
23
+ /** 方向(N/S/E/W) */
24
+ direction: Direction;
25
+ }
26
+ /**
27
+ * 经纬度坐标对象
28
+ */
29
+ export interface Coordinate {
30
+ /** 纬度 */
31
+ latitude: number;
32
+ /** 经度 */
33
+ longitude: number;
34
+ }
35
+ /**
36
+ * DMS 格式的经纬度
37
+ */
38
+ export interface DMSCoordinate {
39
+ /** 纬度 DMS */
40
+ latitude: DMS;
41
+ /** 经度 DMS */
42
+ longitude: DMS;
43
+ }
44
+ /**
45
+ * 坐标输入框组件属性接口
46
+ */
47
+ export interface CoordinateInputProps {
48
+ /** 坐标类型:latitude(纬度)、longitude(经度)、both(两者) */
49
+ type?: CoordinateType;
50
+ /** 纬度值(十进制) */
51
+ latitude?: number;
52
+ /** 经度值(十进制) */
53
+ longitude?: number;
54
+ /** 是否禁用 */
55
+ disabled?: boolean;
56
+ /** 是否只读 */
57
+ readonly?: boolean;
58
+ /** 占位符 */
59
+ placeholder?: string;
60
+ /** 尺寸 */
61
+ size?: 'small' | 'medium' | 'large';
62
+ /** 是否显示方向选择 */
63
+ showDirection?: boolean;
64
+ /**
65
+ * 精度(小数位数)
66
+ * 控制秒输入的小数位数,也影响自动跳转行为
67
+ * 默认3位小数
68
+ */
69
+ precision?: number;
70
+ /** 是否显示十进制值 */
71
+ showDecimal?: boolean;
72
+ /** 是否自动跳转到下一个输入框 */
73
+ autoTab?: boolean;
74
+ /** 纬度方向下拉框是否打开 */
75
+ latitudeDirectionOpen?: boolean;
76
+ /** 经度方向下拉框是否打开 */
77
+ longitudeDirectionOpen?: boolean;
78
+ /** 是否块级显示 */
79
+ block?: boolean;
80
+ }
81
+ /**
82
+ * 坐标输入框组件 Refs 接口
83
+ */
84
+ export interface CoordinateInputRefs extends Record<string, Element> {
85
+ /** 纬度度输入框 */
86
+ latitudeDegreesInput: HTMLInputElement;
87
+ /** 纬度分输入框 */
88
+ latitudeMinutesInput: HTMLInputElement;
89
+ /** 纬度秒输入框 */
90
+ latitudeSecondsInput: HTMLInputElement;
91
+ /** 纬度方向选择 */
92
+ latitudeDirectionSelect: HTMLSelectElement;
93
+ /** 经度度输入框 */
94
+ longitudeDegreesInput: HTMLInputElement;
95
+ /** 经度分输入框 */
96
+ longitudeMinutesInput: HTMLInputElement;
97
+ /** 经度秒输入框 */
98
+ longitudeSecondsInput: HTMLInputElement;
99
+ /** 经度方向选择 */
100
+ longitudeDirectionSelect: HTMLSelectElement;
101
+ }
102
+ /**
103
+ * 输入事件数据
104
+ */
105
+ export interface CoordinateInputEvent {
106
+ /** 坐标类型 */
107
+ type: 'latitude' | 'longitude';
108
+ /** DMS 值 */
109
+ dms: DMS;
110
+ /** 十进制值 */
111
+ decimal: number;
112
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./style.css.cjs"),t=require("./index.html.cjs"),a=require("../../../runtime/component/base-element.cjs"),o=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelyDivider=class extends a.default{getDividerClasses(){const e={};return this.$data.type&&(e[`divider--${this.$data.type}`]=!0),this.$data.orientation&&(e[`divider--${this.$data.orientation}`]=!0),e["divider--dashed"]=!!this.$data.dashed,e}mounted(){this.$data.hasSlotContent=this.childNodes.length>0}},exports.SolelyDivider=((e,t)=>{for(var a,o=t,r=e.length-1;r>=0;r--)(a=e[r])&&(o=a(o)||o);return o})([o.CustomElement({tagName:"solely-divider",template:t.default,styles:e.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"horizontal"},{name:"orientation",type:"string",default:"center"},{name:"dashed",type:"boolean",default:!1},{name:"content",type:"string",default:""},{name:"hasSlotContent",type:"boolean",default:!1}]})],exports.SolelyDivider);
@@ -0,0 +1,13 @@
1
+ import { BaseElement } from '../../../runtime/component';
2
+ import { DividerProps } from './types';
3
+ declare class SolelyDivider extends BaseElement<DividerProps & {
4
+ hasSlotContent: boolean;
5
+ }> {
6
+ /**
7
+ * 获取 divider class 对象
8
+ */
9
+ getDividerClasses(): Record<string, boolean>;
10
+ mounted(): void;
11
+ }
12
+ export default SolelyDivider;
13
+ export { SolelyDivider };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default='<div\n class="divider"\n :class="this.getDividerClasses()"\n>\n <If test="$data.content || $data.hasSlotContent">\n <span class="divider__content">\n <slot>{{$data.content}}</slot>\n </span>\n </If>\n</div>\n';
@@ -0,0 +1 @@
1
+ const n='<div\n class="divider"\n :class="this.getDividerClasses()"\n>\n <If test="$data.content || $data.hasSlotContent">\n <span class="divider__content">\n <slot>{{$data.content}}</slot>\n </span>\n </If>\n</div>\n';export{n as default};
@@ -0,0 +1 @@
1
+ import t from"./style.css.js";import e from"./index.html.js";import o from"../../../runtime/component/base-element.js";import{CustomElement as a}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let n=class extends o{getDividerClasses(){const t={};return this.$data.type&&(t[`divider--${this.$data.type}`]=!0),this.$data.orientation&&(t[`divider--${this.$data.orientation}`]=!0),t["divider--dashed"]=!!this.$data.dashed,t}mounted(){this.$data.hasSlotContent=this.childNodes.length>0}};n=((t,e)=>{for(var o,a=e,n=t.length-1;n>=0;n--)(o=t[n])&&(a=o(a)||a);return a})([a({tagName:"solely-divider",template:e,styles:t,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"horizontal"},{name:"orientation",type:"string",default:"center"},{name:"dashed",type:"boolean",default:!1},{name:"content",type:"string",default:""},{name:"hasSlotContent",type:"boolean",default:!1}]})],n);export{n as SolelyDivider};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default='*,*:before,*:after{box-sizing:border-box}:host{display:block;width:100%}:host([type="vertical"]){display:inline-block;width:auto}.divider{font-family:var(--solely-font-family);font-size:var(--solely-font-size-md);color:var(--solely-text-secondary)}.divider--horizontal{display:flex;align-items:center;margin:var(--solely-spacing-md) 0;clear:both;width:100%}.divider--horizontal:before,.divider--horizontal:after{content:"";flex:1;border-top:1px solid var(--solely-border-color);display:block}.divider--horizontal.divider--dashed:before,.divider--horizontal.divider--dashed:after{border-top-style:dashed}.divider--vertical{display:inline-block;width:1px;height:.9em;margin:0 var(--solely-spacing-sm);vertical-align:middle;border-left:1px solid var(--solely-border-color)}.divider--vertical.divider--dashed{border-left-style:dashed}.divider__content{padding:0 var(--solely-spacing-md);font-size:var(--solely-font-size-md);font-weight:500;color:var(--solely-text-primary);white-space:nowrap}.divider--left:before{flex:0 0 5%}.divider--right:after{flex:0 0 5%}';
@@ -0,0 +1 @@
1
+ const e='*,*:before,*:after{box-sizing:border-box}:host{display:block;width:100%}:host([type="vertical"]){display:inline-block;width:auto}.divider{font-family:var(--solely-font-family);font-size:var(--solely-font-size-md);color:var(--solely-text-secondary)}.divider--horizontal{display:flex;align-items:center;margin:var(--solely-spacing-md) 0;clear:both;width:100%}.divider--horizontal:before,.divider--horizontal:after{content:"";flex:1;border-top:1px solid var(--solely-border-color);display:block}.divider--horizontal.divider--dashed:before,.divider--horizontal.divider--dashed:after{border-top-style:dashed}.divider--vertical{display:inline-block;width:1px;height:.9em;margin:0 var(--solely-spacing-sm);vertical-align:middle;border-left:1px solid var(--solely-border-color)}.divider--vertical.divider--dashed{border-left-style:dashed}.divider__content{padding:0 var(--solely-spacing-md);font-size:var(--solely-font-size-md);font-weight:500;color:var(--solely-text-primary);white-space:nowrap}.divider--left:before{flex:0 0 5%}.divider--right:after{flex:0 0 5%}';export{e as default};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Divider 组件类型定义
3
+ */
4
+ export type DividerType = 'horizontal' | 'vertical';
5
+ export type DividerOrientation = 'left' | 'right' | 'center';
6
+ export interface DividerProps {
7
+ /** 水平还是垂直类型 */
8
+ type: DividerType;
9
+ /** 分割线标题的位置 */
10
+ orientation: DividerOrientation;
11
+ /** 是否虚线 */
12
+ dashed: boolean;
13
+ /** 标题文字 */
14
+ content: string;
15
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./style.css.cjs"),t=require("./index.html.cjs"),r=require("../../../runtime/component/base-element.cjs"),s=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelyEmpty=class extends r.default{setDescription(e){this.$data.description=e}},exports.SolelyEmpty=((e,t)=>{for(var r,s=t,o=e.length-1;o>=0;o--)(r=e[o])&&(s=r(s)||s);return s})([s.CustomElement({tagName:"solely-empty",template:t.default,styles:e.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"description",type:"string",default:""},{name:"image",type:"string",default:""}]})],exports.SolelyEmpty);
@@ -0,0 +1,10 @@
1
+ import { BaseElement } from '../../../runtime/component';
2
+ import { EmptyProps } from './types';
3
+ declare class SolelyEmpty extends BaseElement<EmptyProps> {
4
+ /**
5
+ * 设置描述文字
6
+ */
7
+ setDescription(description: string): void;
8
+ }
9
+ export default SolelyEmpty;
10
+ export { SolelyEmpty };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default='<div class="empty">\n <div class="empty__image">\n <If test="$data.image">\n <img :src="$data.image" alt="empty" />\n </If>\n <If test="!$data.image">\n <span class="empty__icon">📭</span>\n </If>\n </div>\n <p class="empty__description">{{$data.description || \'暂无数据\'}}</p>\n <div class="empty__footer">\n <slot></slot>\n </div>\n</div>\n';
@@ -0,0 +1 @@
1
+ const t='<div class="empty">\n <div class="empty__image">\n <If test="$data.image">\n <img :src="$data.image" alt="empty" />\n </If>\n <If test="!$data.image">\n <span class="empty__icon">📭</span>\n </If>\n </div>\n <p class="empty__description">{{$data.description || \'暂无数据\'}}</p>\n <div class="empty__footer">\n <slot></slot>\n </div>\n</div>\n';export{t as default};
@@ -0,0 +1 @@
1
+ import e from"./style.css.js";import t from"./index.html.js";import r from"../../../runtime/component/base-element.js";import{CustomElement as o}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let s=class extends r{setDescription(e){this.$data.description=e}};s=((e,t)=>{for(var r,o=t,s=e.length-1;s>=0;s--)(r=e[s])&&(o=r(o)||o);return o})([o({tagName:"solely-empty",template:t,styles:e,shadowDOM:{use:!0,mode:"open"},props:[{name:"description",type:"string",default:""},{name:"image",type:"string",default:""}]})],s);export{s as SolelyEmpty};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:flex;width:100%;align-items:center;justify-content:center}.empty{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;padding:var(--solely-spacing-xl);font-family:var(--solely-font-family);text-align:center}.empty__image{width:120px;height:120px;margin-bottom:var(--solely-spacing-md);display:flex;align-items:center;justify-content:center}.empty__image img{max-width:100%;max-height:100%}.empty__icon{font-size:64px;color:var(--solely-text-tertiary)}.empty__description{font-size:var(--solely-font-size-md);color:var(--solely-text-tertiary);line-height:var(--solely-line-height-md)}.empty__footer{margin-top:var(--solely-spacing-md)}";
@@ -0,0 +1 @@
1
+ const e="*,*:before,*:after{box-sizing:border-box}:host{display:flex;width:100%;align-items:center;justify-content:center}.empty{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center;padding:var(--solely-spacing-xl);font-family:var(--solely-font-family);text-align:center}.empty__image{width:120px;height:120px;margin-bottom:var(--solely-spacing-md);display:flex;align-items:center;justify-content:center}.empty__image img{max-width:100%;max-height:100%}.empty__icon{font-size:64px;color:var(--solely-text-tertiary)}.empty__description{font-size:var(--solely-font-size-md);color:var(--solely-text-tertiary);line-height:var(--solely-line-height-md)}.empty__footer{margin-top:var(--solely-spacing-md)}";export{e as default};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Empty 组件类型定义
3
+ */
4
+ export interface EmptyProps {
5
+ /** 描述文字 */
6
+ description: string;
7
+ /** 图片的 URL */
8
+ image: string;
9
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./style.css.cjs"),t=require("./index.html.cjs"),a=require("../../../runtime/component/base-element.cjs"),s=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelyFab=class extends a.default{getFabClasses(){const e={};e[`fab--${this.$data.type||"primary"}`]=!0;const t=this.$data.size||"medium";return"small"===t?e["fab--sm"]=!0:"large"===t?e["fab--lg"]=!0:e["fab--md"]=!0,e[`fab--${this.$data.shape||"circle"}`]=!0,e[`fab--${this.$data.position||"bottom-right"}`]=!0,e["fab--hidden"]=!this.$data.visible,e["fab--absolute"]=!!this.$data.absolute,e}getFabStyles(){const e={};return e["--fab-offset-x"]=`${this.$data.offsetX||24}px`,e["--fab-offset-y"]=`${this.$data.offsetY||24}px`,this.$data.zIndex&&(e["z-index"]=String(this.$data.zIndex)),e}hasIconSlot(){return null!==this.querySelector('[slot="icon"]')}handleClick(e){if(this.$data.disabled)return e.preventDefault(),void e.stopPropagation();this.$data.hideOnClick&&this.hide()}show(){this.$data.visible=!0}hide(){this.$data.visible=!1}toggle(){this.$data.visible=!this.$data.visible}setPosition(e){this.$data.position=e}setOffset(e,t){this.$data.offsetX=e,this.$data.offsetY=t}focus(){var e;null==(e=this.$refs.buttonRef)||e.focus()}blur(){var e;null==(e=this.$refs.buttonRef)||e.blur()}},exports.SolelyFab=((e,t)=>{for(var a,s=t,i=e.length-1;i>=0;i--)(a=e[i])&&(s=a(s)||s);return s})([s.CustomElement({tagName:"solely-fab",template:t.default,styles:e.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"primary"},{name:"size",type:"string",default:"medium"},{name:"shape",type:"string",default:"circle"},{name:"position",type:"string",default:"bottom-right"},{name:"offsetX",type:"number",default:24},{name:"offsetY",type:"number",default:24},{name:"disabled",type:"boolean",default:!1},{name:"icon",type:"string",default:""},{name:"visible",type:"boolean",default:!0},{name:"hideOnClick",type:"boolean",default:!1},{name:"zIndex",type:"number",default:1e3},{name:"absolute",type:"boolean",default:!1}]})],exports.SolelyFab);
@@ -0,0 +1,50 @@
1
+ import { BaseElement } from '../../../runtime/component';
2
+ import { FabProps, FabRefs, FabPosition } from './types';
3
+ declare class SolelyFab extends BaseElement<FabProps, FabRefs> {
4
+ /**
5
+ * 获取 FAB class 对象
6
+ */
7
+ getFabClasses(): Record<string, boolean>;
8
+ /**
9
+ * 获取 FAB 内联样式
10
+ */
11
+ getFabStyles(): Record<string, string>;
12
+ /**
13
+ * 检查是否有图标插槽内容
14
+ */
15
+ hasIconSlot(): boolean;
16
+ /**
17
+ * 点击事件处理
18
+ */
19
+ handleClick(event: MouseEvent): void;
20
+ /**
21
+ * 显示 FAB
22
+ */
23
+ show(): void;
24
+ /**
25
+ * 隐藏 FAB
26
+ */
27
+ hide(): void;
28
+ /**
29
+ * 切换显示/隐藏
30
+ */
31
+ toggle(): void;
32
+ /**
33
+ * 设置位置
34
+ */
35
+ setPosition(position: FabPosition): void;
36
+ /**
37
+ * 设置偏移
38
+ */
39
+ setOffset(x: number, y: number): void;
40
+ /**
41
+ * 聚焦按钮
42
+ */
43
+ focus(): void;
44
+ /**
45
+ * 失焦按钮
46
+ */
47
+ blur(): void;
48
+ }
49
+ export default SolelyFab;
50
+ export { SolelyFab };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default='<button\n ref="buttonRef"\n class="fab"\n :class="this.getFabClasses()"\n :style="this.getFabStyles()"\n :disabled="$data.disabled"\n @click="this.handleClick(event)"\n>\n <If test="this.hasIconSlot()">\n <span class="fab__icon">\n <slot name="icon"></slot>\n </span>\n </If>\n <ElseIf test="$data.icon">\n <span class="fab__icon">{{$data.icon}}</span>\n </ElseIf>\n <Else>\n \x3c!-- 默认图标:加号 --\x3e\n <span class="fab__icon">\n <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2">\n <path d="M12 5v14M5 12h14"/>\n </svg>\n </span>\n </Else>\n</button>\n';
@@ -0,0 +1 @@
1
+ const n='<button\n ref="buttonRef"\n class="fab"\n :class="this.getFabClasses()"\n :style="this.getFabStyles()"\n :disabled="$data.disabled"\n @click="this.handleClick(event)"\n>\n <If test="this.hasIconSlot()">\n <span class="fab__icon">\n <slot name="icon"></slot>\n </span>\n </If>\n <ElseIf test="$data.icon">\n <span class="fab__icon">{{$data.icon}}</span>\n </ElseIf>\n <Else>\n \x3c!-- 默认图标:加号 --\x3e\n <span class="fab__icon">\n <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2">\n <path d="M12 5v14M5 12h14"/>\n </svg>\n </span>\n </Else>\n</button>\n';export{n as default};
@@ -0,0 +1 @@
1
+ import t from"./style.css.js";import e from"./index.html.js";import a from"../../../runtime/component/base-element.js";import{CustomElement as s}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let i=class extends a{getFabClasses(){const t={};t[`fab--${this.$data.type||"primary"}`]=!0;const e=this.$data.size||"medium";return"small"===e?t["fab--sm"]=!0:"large"===e?t["fab--lg"]=!0:t["fab--md"]=!0,t[`fab--${this.$data.shape||"circle"}`]=!0,t[`fab--${this.$data.position||"bottom-right"}`]=!0,t["fab--hidden"]=!this.$data.visible,t["fab--absolute"]=!!this.$data.absolute,t}getFabStyles(){const t={};return t["--fab-offset-x"]=`${this.$data.offsetX||24}px`,t["--fab-offset-y"]=`${this.$data.offsetY||24}px`,this.$data.zIndex&&(t["z-index"]=String(this.$data.zIndex)),t}hasIconSlot(){return null!==this.querySelector('[slot="icon"]')}handleClick(t){if(this.$data.disabled)return t.preventDefault(),void t.stopPropagation();this.$data.hideOnClick&&this.hide()}show(){this.$data.visible=!0}hide(){this.$data.visible=!1}toggle(){this.$data.visible=!this.$data.visible}setPosition(t){this.$data.position=t}setOffset(t,e){this.$data.offsetX=t,this.$data.offsetY=e}focus(){var t;null==(t=this.$refs.buttonRef)||t.focus()}blur(){var t;null==(t=this.$refs.buttonRef)||t.blur()}};i=((t,e)=>{for(var a,s=e,i=t.length-1;i>=0;i--)(a=t[i])&&(s=a(s)||s);return s})([s({tagName:"solely-fab",template:e,styles:t,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"primary"},{name:"size",type:"string",default:"medium"},{name:"shape",type:"string",default:"circle"},{name:"position",type:"string",default:"bottom-right"},{name:"offsetX",type:"number",default:24},{name:"offsetY",type:"number",default:24},{name:"disabled",type:"boolean",default:!1},{name:"icon",type:"string",default:""},{name:"visible",type:"boolean",default:!0},{name:"hideOnClick",type:"boolean",default:!1},{name:"zIndex",type:"number",default:1e3},{name:"absolute",type:"boolean",default:!1}]})],i);export{i as SolelyFab};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default=':host{display:contents}.fab,.fab:before,.fab:after{box-sizing:border-box}.fab{position:fixed;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;box-shadow:0 4px 12px #00000026;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:var(--solely-z-index-fixed);outline:none;padding:0}.fab--absolute{position:absolute}.fab:hover{box-shadow:0 6px 20px #0003;transform:var(--fab-position-transform, none) scale(1.05)}.fab:active{transform:var(--fab-position-transform, none) scale(.95)}.fab:disabled{opacity:.6;cursor:not-allowed;box-shadow:0 2px 8px #0000001a}.fab:disabled:hover{transform:var(--fab-position-transform, none)}.fab__icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.fab__icon svg{width:60%;height:60%}.fab--sm{width:40px;height:40px}.fab--sm .fab__icon{font-size:16px}.fab--md{width:56px;height:56px}.fab--md .fab__icon{font-size:24px}.fab--lg{width:72px;height:72px}.fab--lg .fab__icon{font-size:32px}.fab--circle{border-radius:50%}.fab--square{border-radius:8px}.fab--rounded{border-radius:16px}.fab--primary{background:linear-gradient(135deg,var(--solely-primary) 0%,var(--solely-primary-hover) 100%);color:#fff}.fab--primary:hover{background:linear-gradient(135deg,var(--solely-primary-hover) 0%,var(--solely-primary-active) 100%)}.fab--secondary{background:linear-gradient(135deg,var(--solely-secondary) 0%,var(--solely-secondary-hover) 100%);color:#fff}.fab--secondary:hover{background:linear-gradient(135deg,var(--solely-secondary-hover) 0%,var(--solely-secondary-active) 100%)}.fab--success{background:linear-gradient(135deg,var(--solely-success) 0%,var(--solely-success-hover) 100%);color:#fff}.fab--success:hover{background:linear-gradient(135deg,var(--solely-success-hover) 0%,var(--solely-success-active) 100%)}.fab--warning{background:linear-gradient(135deg,var(--solely-warning) 0%,var(--solely-warning-hover) 100%);color:#fff}.fab--warning:hover{background:linear-gradient(135deg,var(--solely-warning-hover) 0%,var(--solely-warning-active) 100%)}.fab--error{background:linear-gradient(135deg,var(--solely-error) 0%,var(--solely-error-hover) 100%);color:#fff}.fab--error:hover{background:linear-gradient(135deg,var(--solely-error-hover) 0%,var(--solely-error-active) 100%)}.fab--default{background:var(--solely-component-bg);color:var(--solely-text-primary);border:1px solid var(--solely-border-color)}.fab--default:hover{color:var(--solely-primary);border-color:var(--solely-primary)}.fab--top-left{top:var(--fab-offset-y, 24px);left:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--top-center{top:var(--fab-offset-y, 24px);left:50%;--fab-position-transform: translateX(-50%);transform:translate(-50%)}.fab--top-right{top:var(--fab-offset-y, 24px);right:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--left-center{left:var(--fab-offset-x, 24px);top:50%;--fab-position-transform: translateY(-50%);transform:translateY(-50%)}.fab--center{left:50%;top:50%;--fab-position-transform: translate(-50%, -50%);transform:translate(-50%,-50%)}.fab--right-center{right:var(--fab-offset-x, 24px);top:50%;--fab-position-transform: translateY(-50%);transform:translateY(-50%)}.fab--bottom-left{bottom:var(--fab-offset-y, 24px);left:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--bottom-center{bottom:var(--fab-offset-y, 24px);left:50%;--fab-position-transform: translateX(-50%);transform:translate(-50%)}.fab--bottom-right{bottom:var(--fab-offset-y, 24px);right:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--hidden{opacity:0;pointer-events:none}.fab:after{content:"";position:absolute;top:50%;left:50%;width:0;height:0;background:var(--solely-component-bg);opacity:.3;border-radius:50%;transform:translate(-50%,-50%);transition:width .6s,height .6s}.fab:active:after{width:200%;height:200%}';
@@ -0,0 +1 @@
1
+ const r=':host{display:contents}.fab,.fab:before,.fab:after{box-sizing:border-box}.fab{position:fixed;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;box-shadow:0 4px 12px #00000026;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:var(--solely-z-index-fixed);outline:none;padding:0}.fab--absolute{position:absolute}.fab:hover{box-shadow:0 6px 20px #0003;transform:var(--fab-position-transform, none) scale(1.05)}.fab:active{transform:var(--fab-position-transform, none) scale(.95)}.fab:disabled{opacity:.6;cursor:not-allowed;box-shadow:0 2px 8px #0000001a}.fab:disabled:hover{transform:var(--fab-position-transform, none)}.fab__icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.fab__icon svg{width:60%;height:60%}.fab--sm{width:40px;height:40px}.fab--sm .fab__icon{font-size:16px}.fab--md{width:56px;height:56px}.fab--md .fab__icon{font-size:24px}.fab--lg{width:72px;height:72px}.fab--lg .fab__icon{font-size:32px}.fab--circle{border-radius:50%}.fab--square{border-radius:8px}.fab--rounded{border-radius:16px}.fab--primary{background:linear-gradient(135deg,var(--solely-primary) 0%,var(--solely-primary-hover) 100%);color:#fff}.fab--primary:hover{background:linear-gradient(135deg,var(--solely-primary-hover) 0%,var(--solely-primary-active) 100%)}.fab--secondary{background:linear-gradient(135deg,var(--solely-secondary) 0%,var(--solely-secondary-hover) 100%);color:#fff}.fab--secondary:hover{background:linear-gradient(135deg,var(--solely-secondary-hover) 0%,var(--solely-secondary-active) 100%)}.fab--success{background:linear-gradient(135deg,var(--solely-success) 0%,var(--solely-success-hover) 100%);color:#fff}.fab--success:hover{background:linear-gradient(135deg,var(--solely-success-hover) 0%,var(--solely-success-active) 100%)}.fab--warning{background:linear-gradient(135deg,var(--solely-warning) 0%,var(--solely-warning-hover) 100%);color:#fff}.fab--warning:hover{background:linear-gradient(135deg,var(--solely-warning-hover) 0%,var(--solely-warning-active) 100%)}.fab--error{background:linear-gradient(135deg,var(--solely-error) 0%,var(--solely-error-hover) 100%);color:#fff}.fab--error:hover{background:linear-gradient(135deg,var(--solely-error-hover) 0%,var(--solely-error-active) 100%)}.fab--default{background:var(--solely-component-bg);color:var(--solely-text-primary);border:1px solid var(--solely-border-color)}.fab--default:hover{color:var(--solely-primary);border-color:var(--solely-primary)}.fab--top-left{top:var(--fab-offset-y, 24px);left:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--top-center{top:var(--fab-offset-y, 24px);left:50%;--fab-position-transform: translateX(-50%);transform:translate(-50%)}.fab--top-right{top:var(--fab-offset-y, 24px);right:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--left-center{left:var(--fab-offset-x, 24px);top:50%;--fab-position-transform: translateY(-50%);transform:translateY(-50%)}.fab--center{left:50%;top:50%;--fab-position-transform: translate(-50%, -50%);transform:translate(-50%,-50%)}.fab--right-center{right:var(--fab-offset-x, 24px);top:50%;--fab-position-transform: translateY(-50%);transform:translateY(-50%)}.fab--bottom-left{bottom:var(--fab-offset-y, 24px);left:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--bottom-center{bottom:var(--fab-offset-y, 24px);left:50%;--fab-position-transform: translateX(-50%);transform:translate(-50%)}.fab--bottom-right{bottom:var(--fab-offset-y, 24px);right:var(--fab-offset-x, 24px);--fab-position-transform: none}.fab--hidden{opacity:0;pointer-events:none}.fab:after{content:"";position:absolute;top:50%;left:50%;width:0;height:0;background:var(--solely-component-bg);opacity:.3;border-radius:50%;transform:translate(-50%,-50%);transition:width .6s,height .6s}.fab:active:after{width:200%;height:200%}';export{r as default};
@@ -0,0 +1,52 @@
1
+ /**
2
+ * FAB (Floating Action Button) 悬浮按钮类型定义
3
+ */
4
+ /**
5
+ * FAB 位置类型
6
+ */
7
+ export type FabPosition = 'top-left' | 'top-center' | 'top-right' | 'left-center' | 'center' | 'right-center' | 'bottom-left' | 'bottom-center' | 'bottom-right';
8
+ /**
9
+ * FAB 尺寸类型
10
+ */
11
+ export type FabSize = 'small' | 'medium' | 'large';
12
+ /**
13
+ * FAB 形状类型
14
+ */
15
+ export type FabShape = 'circle' | 'square' | 'rounded';
16
+ /**
17
+ * FAB 组件属性接口
18
+ */
19
+ export interface FabProps {
20
+ /** 按钮类型 */
21
+ type?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'default';
22
+ /** 按钮尺寸 */
23
+ size?: FabSize;
24
+ /** 按钮形状 */
25
+ shape?: FabShape;
26
+ /** 悬浮位置 */
27
+ position?: FabPosition;
28
+ /** 水平偏移距离(像素) */
29
+ offsetX?: number;
30
+ /** 垂直偏移距离(像素) */
31
+ offsetY?: number;
32
+ /** 是否禁用 */
33
+ disabled?: boolean;
34
+ /** 图标内容 */
35
+ icon?: string;
36
+ /** 是否可见 */
37
+ visible?: boolean;
38
+ /** 点击时是否隐藏 */
39
+ hideOnClick?: boolean;
40
+ /** 自定义 z-index */
41
+ zIndex?: number;
42
+ /** 是否在容器内使用(使用绝对定位代替 fixed) */
43
+ absolute?: boolean;
44
+ }
45
+ /**
46
+ * FAB 组件 Refs 接口
47
+ */
48
+ export interface FabRefs {
49
+ /** 按钮元素引用 */
50
+ buttonRef: HTMLButtonElement;
51
+ [key: string]: Element;
52
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./button/index.cjs"),r=require("./input/index.cjs"),t=require("./fab/index.cjs"),l=require("./card/index.cjs"),o=require("./tag/index.cjs"),i=require("./badge/index.cjs"),n=require("./alert/index.cjs"),y=require("./switch/index.cjs"),d=require("./checkbox/index.cjs"),p=require("./radio/index.cjs"),b=require("./select/index.cjs"),c=require("./progress/index.cjs"),s=require("./divider/index.cjs"),a=require("./tabs/index.cjs"),u=require("./table/index.cjs"),S=require("./skeleton/index.cjs"),x=require("./empty/index.cjs"),j=require("./pagination/index.cjs"),g=require("./breadcrumb/index.cjs"),m=require("./steps/index.cjs"),P=require("./timeline/index.cjs"),f=require("./backtop/index.cjs"),O=require("./upload/index.cjs"),q=require("./rate/index.cjs"),T=require("./slider/index.cjs"),k=require("./tree/index.cjs"),B=require("./coordinate-input/index.cjs");Object.defineProperty(exports,"SolelyButton",{enumerable:!0,get:()=>e.SolelyButton}),Object.defineProperty(exports,"SolelyInput",{enumerable:!0,get:()=>r.SolelyInput}),Object.defineProperty(exports,"SolelyFab",{enumerable:!0,get:()=>t.SolelyFab}),Object.defineProperty(exports,"SolelyCard",{enumerable:!0,get:()=>l.SolelyCard}),Object.defineProperty(exports,"SolelyTag",{enumerable:!0,get:()=>o.SolelyTag}),Object.defineProperty(exports,"SolelyBadge",{enumerable:!0,get:()=>i.SolelyBadge}),Object.defineProperty(exports,"SolelyAlert",{enumerable:!0,get:()=>n.SolelyAlert}),Object.defineProperty(exports,"SolelySwitch",{enumerable:!0,get:()=>y.SolelySwitch}),Object.defineProperty(exports,"SolelyCheckbox",{enumerable:!0,get:()=>d.SolelyCheckbox}),Object.defineProperty(exports,"SolelyRadio",{enumerable:!0,get:()=>p.SolelyRadio}),Object.defineProperty(exports,"SolelySelect",{enumerable:!0,get:()=>b.SolelySelect}),Object.defineProperty(exports,"SolelyProgress",{enumerable:!0,get:()=>c.SolelyProgress}),Object.defineProperty(exports,"SolelyDivider",{enumerable:!0,get:()=>s.SolelyDivider}),Object.defineProperty(exports,"SolelyTabs",{enumerable:!0,get:()=>a.SolelyTabs}),Object.defineProperty(exports,"SolelyTable",{enumerable:!0,get:()=>u.SolelyTable}),Object.defineProperty(exports,"SolelySkeleton",{enumerable:!0,get:()=>S.SolelySkeleton}),Object.defineProperty(exports,"SolelyEmpty",{enumerable:!0,get:()=>x.SolelyEmpty}),Object.defineProperty(exports,"SolelyPagination",{enumerable:!0,get:()=>j.SolelyPagination}),Object.defineProperty(exports,"SolelyBreadcrumb",{enumerable:!0,get:()=>g.SolelyBreadcrumb}),Object.defineProperty(exports,"SolelySteps",{enumerable:!0,get:()=>m.SolelySteps}),Object.defineProperty(exports,"SolelyTimeline",{enumerable:!0,get:()=>P.SolelyTimeline}),Object.defineProperty(exports,"SolelyBackTop",{enumerable:!0,get:()=>f.SolelyBackTop}),Object.defineProperty(exports,"SolelyUpload",{enumerable:!0,get:()=>O.SolelyUpload}),Object.defineProperty(exports,"SolelyRate",{enumerable:!0,get:()=>q.SolelyRate}),Object.defineProperty(exports,"SolelySlider",{enumerable:!0,get:()=>T.SolelySlider}),Object.defineProperty(exports,"SolelyTree",{enumerable:!0,get:()=>k.SolelyTree}),Object.defineProperty(exports,"SolelyCoordinateInput",{enumerable:!0,get:()=>B.SolelyCoordinateInput});
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Solely 组件库 - 自定义元素组件统一导出
3
+ */
4
+ export { SolelyButton } from './button';
5
+ export { SolelyInput } from './input';
6
+ export { SolelyFab } from './fab';
7
+ export { SolelyCard } from './card';
8
+ export { SolelyTag } from './tag';
9
+ export { SolelyBadge } from './badge';
10
+ export { SolelyAlert } from './alert';
11
+ export { SolelySwitch } from './switch';
12
+ export { SolelyCheckbox } from './checkbox';
13
+ export { SolelyRadio } from './radio';
14
+ export { SolelySelect } from './select';
15
+ export { SolelyProgress } from './progress';
16
+ export { SolelyDivider } from './divider';
17
+ export { SolelyTabs } from './tabs';
18
+ export { SolelyTable } from './table';
19
+ export { SolelySkeleton } from './skeleton';
20
+ export { SolelyEmpty } from './empty';
21
+ export { SolelyPagination } from './pagination';
22
+ export { SolelyBreadcrumb } from './breadcrumb';
23
+ export { SolelySteps } from './steps';
24
+ export { SolelyTimeline } from './timeline';
25
+ export { SolelyBackTop } from './backtop';
26
+ export { SolelyUpload } from './upload';
27
+ export { SolelyRate } from './rate';
28
+ export { SolelySlider } from './slider';
29
+ export { SolelyTree } from './tree';
30
+ export { SolelyCoordinateInput } from './coordinate-input';
31
+ export type { ButtonProps, ButtonType, ButtonSize, ButtonShape } from './button/types';
32
+ export type { InputProps, InputType, InputSize } from './input/types';
33
+ export type { FabProps, FabPosition, FabSize, FabShape } from './fab/types';
34
+ export type { CardProps, CardSize } from './card/types';
35
+ export type { TagProps, TagType, TagSize } from './tag/types';
36
+ export type { BadgeProps, BadgeStatus } from './badge/types';
37
+ export type { AlertProps, AlertType } from './alert/types';
38
+ export type { SwitchProps, SwitchSize } from './switch/types';
39
+ export type { CheckboxProps, CheckboxSize, CheckboxType, CheckboxRefs } from './checkbox/types';
40
+ export type { RadioProps, RadioGroupProps } from './radio/types';
41
+ export type { SelectProps, SelectOption, SelectSize } from './select/types';
42
+ export type { ProgressProps, ProgressType, ProgressStatus } from './progress/types';
43
+ export type { DividerProps, DividerType, DividerOrientation } from './divider/types';
44
+ export type { TabsProps, TabsType, TabsPosition, TabsSize, TabItem } from './tabs/types';
45
+ export type { TableProps, TableSize, TableColumn } from './table/types';
46
+ export type { SkeletonProps, SkeletonAvatarShape, SkeletonElement } from './skeleton/types';
47
+ export type { EmptyProps } from './empty/types';
48
+ export type { PaginationProps, PaginationSize } from './pagination/types';
49
+ export type { BreadcrumbProps, BreadcrumbItem } from './breadcrumb/types';
50
+ export type { StepsProps, StepsDirection, StepsSize, StepItem, StepStatus } from './steps/types';
51
+ export type { TimelineProps, TimelineMode, TimelineItem, TimelineItemPosition } from './timeline/types';
52
+ export type { BackTopProps } from './backtop/types';
53
+ export type { UploadProps, UploadFile, UploadListType } from './upload/types';
54
+ export type { RateProps } from './rate/types';
55
+ export type { SliderProps } from './slider/types';
56
+ export type { TreeProps, TreeNode } from './tree/types';
57
+ export type { CoordinateInputProps, CoordinateType, DMS, Coordinate, DMSCoordinate } from './coordinate-input/types';
@@ -0,0 +1 @@
1
+ import{SolelyButton as r}from"./button/index.js";import{SolelyInput as i}from"./input/index.js";import{SolelyFab as o}from"./fab/index.js";import{SolelyCard as m}from"./card/index.js";import{SolelyTag as e}from"./tag/index.js";import{SolelyBadge as t}from"./badge/index.js";import{SolelyAlert as d}from"./alert/index.js";import{SolelySwitch as p}from"./switch/index.js";import{SolelyCheckbox as s}from"./checkbox/index.js";import{SolelyRadio as n}from"./radio/index.js";import{SolelySelect as x}from"./select/index.js";import{SolelyProgress as f}from"./progress/index.js";import{SolelyDivider as j}from"./divider/index.js";import{SolelyTabs as a}from"./tabs/index.js";import{SolelyTable as b}from"./table/index.js";import{SolelySkeleton as c}from"./skeleton/index.js";import{SolelyEmpty as l}from"./empty/index.js";import{SolelyPagination as u}from"./pagination/index.js";import{SolelyBreadcrumb as g}from"./breadcrumb/index.js";import{SolelySteps as k}from"./steps/index.js";import{SolelyTimeline as h}from"./timeline/index.js";import{SolelyBackTop as v}from"./backtop/index.js";import{SolelyUpload as w}from"./upload/index.js";import{SolelyRate as y}from"./rate/index.js";import{SolelySlider as q}from"./slider/index.js";import{SolelyTree as z}from"./tree/index.js";import{SolelyCoordinateInput as A}from"./coordinate-input/index.js";export{d as SolelyAlert,v as SolelyBackTop,t as SolelyBadge,g as SolelyBreadcrumb,r as SolelyButton,m as SolelyCard,s as SolelyCheckbox,A as SolelyCoordinateInput,j as SolelyDivider,l as SolelyEmpty,o as SolelyFab,i as SolelyInput,u as SolelyPagination,f as SolelyProgress,n as SolelyRadio,y as SolelyRate,x as SolelySelect,c as SolelySkeleton,q as SolelySlider,k as SolelySteps,p as SolelySwitch,b as SolelyTable,a as SolelyTabs,e as SolelyTag,h as SolelyTimeline,z as SolelyTree,w as SolelyUpload};
@@ -0,0 +1 @@
1
+ "use strict";var e=Object.defineProperty,t=(t,a,s)=>((t,a,s)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s)(t,"symbol"!=typeof a?a+"":a,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./style.css.cjs"),s=require("./index.html.cjs"),r=require("../../../runtime/component/base-element.cjs"),n=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelyInput=class extends r.default{constructor(){super(...arguments),t(this,"_filteredSuggestions",[]),t(this,"inputElement"),t(this,"searchDebounceTimer")}get filteredSuggestions(){return this._filteredSuggestions}mounted(){this.$data.autofocus&&this.focus()}afterMount(){var e;this.inputElement=null==(e=this.shadowRoot)?void 0:e.querySelector("input, textarea")}getWrapperClasses(){const e={};return"small"===this.$data.size?e["form-control--sm"]=!0:"large"===this.$data.size&&(e["form-control--lg"]=!0),"error"===this.$data.status?e["is-error"]=!0:"warning"===this.$data.status?e["is-warning"]=!0:"success"===this.$data.status&&(e["is-success"]=!0),"textarea"===this.$data.type&&(e["form-control--textarea"]=!0),e["is-focused"]=!!this.$data.focused,e["is-disabled"]=!!this.$data.disabled,e["is-readonly"]=!!this.$data.readonly,e["form-control--block"]=!!this.$data.block,e}getCharCount(){var e;return(null==(e=this.$data.value)?void 0:e.length)||0}formatValue(e){if(!e)return"";switch(this.$data.format){case"phone":return e.replace(/(\d{3})(\d{4})(\d{4})/,"$1 $2 $3").trim();case"bankcard":return e.replace(/(\d{4})(?=\d)/g,"$1 ").trim();case"idcard":return e.replace(/(\d{6})(\d{4})(\d{4})(\d{4})(\d{0,4})/,"$1 $2 $3 $4 $5").trim();default:return e}}unformatValue(e){return e?e.replace(/\s/g,""):""}handleInput(e){const t=e.target;let a=t.value;if("none"!==this.$data.format&&"textarea"!==this.$data.type){const e=this.unformatValue(a),s=this.formatValue(e);s!==a&&(t.value=s,a=s)}this.$data.value=a,this.$data.suggestions&&this.$data.suggestions.length>0&&this.updateSuggestions(a)}handleFocus(e){this.$data.focused=!0,this.$data.selectall&&this.$data.value&&this.select()}handleBlur(e){this.$data.focused=!1}handleChange(e){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}handleKeydown(e){"Enter"===e.key&&"search"===this.$data.type&&this.emit("search",{value:this.$data.value})}handleClear(){this.$data.value="",this.dispatchEvent(new Event("clear",{bubbles:!0,composed:!0})),this.focus()}togglePassword(){this.$data.passwordVisible=!this.$data.passwordVisible}async handleCopy(){try{const e=this.unformatValue(this.$data.value);await navigator.clipboard.writeText(e),this.emit("copy",{value:e})}catch(e){this.emit("copy-error",{error:e})}}updateSuggestions(e){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{this._updateSuggestionsImpl(e),this.searchDebounceTimer=void 0},300)}_updateSuggestionsImpl(e){if(!e||!this.$data.suggestions)return this._filteredSuggestions=[],void this.refresh();this._filteredSuggestions=this.$data.suggestions.filter(t=>t.toLowerCase().includes(e.toLowerCase())),this.refresh()}selectSuggestion(e){this.$data.value=e,this._filteredSuggestions=[],this.refresh(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(){var e;null==(e=this.inputElement)||e.focus(),this.$data.focused=!0}blur(){var e;null==(e=this.inputElement)||e.blur(),this.$data.focused=!1}setValue(e){this.$data.value=e}getValue(){return this.unformatValue(this.$data.value)}get value(){return this.getValue()}set value(e){this.setValue(e)}select(){var e;null==(e=this.inputElement)||e.select()}},exports.SolelyInput=((e,t)=>{for(var a,s=t,r=e.length-1;r>=0;r--)(a=e[r])&&(s=a(s)||s);return s})([n.CustomElement({tagName:"solely-input",template:s.default,styles:a.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"text"},{name:"size",type:"string",default:""},{name:"value",type:"string",default:""},{name:"placeholder",type:"string",default:""},{name:"disabled",type:"boolean",default:!1},{name:"readonly",type:"boolean",default:!1},{name:"required",type:"boolean",default:!1},{name:"maxlength",type:"number"},{name:"minlength",type:"number"},{name:"clearable",type:"boolean",default:!1},{name:"showpassword",type:"boolean",default:!1},{name:"passwordVisible",type:"boolean",default:!1},{name:"focused",type:"boolean",default:!1},{name:"prefix",type:"string",default:""},{name:"suffix",type:"string",default:""},{name:"status",type:"string",default:""},{name:"message",type:"string",default:""},{name:"showcount",type:"boolean",default:!1},{name:"rows",type:"number",default:3},{name:"autofocus",type:"boolean",default:!1},{name:"selectall",type:"boolean",default:!1},{name:"copyable",type:"boolean",default:!1},{name:"format",type:"string",default:"none"},{name:"suggestions",type:"array",default:[]},{name:"block",type:"boolean",default:!1}]})],exports.SolelyInput);