litos-ui 0.23.1 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/lib/base.d.ts +3 -2
  2. package/lib/base.js +11 -8
  3. package/lib/button/index.d.ts +21 -5
  4. package/lib/button/index.js +115 -62
  5. package/lib/button/index.less_inline.js +2 -3
  6. package/lib/button/style.js +1 -2
  7. package/lib/calendar/index.js +22 -24
  8. package/lib/calendar/index.less_inline.js +1 -2
  9. package/lib/calendar/langs.js +1 -2
  10. package/lib/card/index.js +8 -9
  11. package/lib/card/index.less_inline.js +1 -2
  12. package/lib/carousel/index.js +10 -11
  13. package/lib/carousel/index.less_inline.js +1 -2
  14. package/lib/carousel/item.js +1 -2
  15. package/lib/carousel/item.less_inline.js +1 -2
  16. package/lib/carousel/timer.js +1 -2
  17. package/lib/check/check.d.ts +40 -8
  18. package/lib/check/check.js +200 -65
  19. package/lib/check/check.less_inline.js +2 -3
  20. package/lib/check/checkbox.js +2 -3
  21. package/lib/check/checkbox.less_inline.js +2 -3
  22. package/lib/check/checkbox_group.js +1 -2
  23. package/lib/check/index.d.ts +28 -8
  24. package/lib/check/index.js +151 -46
  25. package/lib/check/index.less_inline.js +1 -2
  26. package/lib/check/radio.js +2 -3
  27. package/lib/check/radio.less_inline.js +1 -2
  28. package/lib/check/radio_group.js +2 -3
  29. package/lib/collapse/index.d.ts +12 -4
  30. package/lib/collapse/index.js +80 -46
  31. package/lib/collapse/index.less_inline.js +2 -3
  32. package/lib/collapse/item.d.ts +35 -9
  33. package/lib/collapse/item.js +219 -57
  34. package/lib/collapse/item.less_inline.js +2 -3
  35. package/lib/collapse/types.d.ts +17 -3
  36. package/lib/color_picker/index.d.ts +4 -2
  37. package/lib/color_picker/index.js +26 -17
  38. package/lib/color_picker/index.less_inline.js +1 -2
  39. package/lib/date_picker/index.d.ts +5 -1
  40. package/lib/date_picker/index.js +39 -23
  41. package/lib/date_picker/index.less_inline.js +1 -2
  42. package/lib/date_picker_ori/index.d.ts +7 -2
  43. package/lib/date_picker_ori/index.js +123 -47
  44. package/lib/date_picker_ori/index.less_inline.js +1 -2
  45. package/lib/description_panel/index.js +2 -10
  46. package/lib/description_panel/index.less_inline.js +1 -2
  47. package/lib/dialog/dialog_box.js +28 -29
  48. package/lib/dialog/dialog_container.css_inline.js +1 -2
  49. package/lib/dialog/dialog_container.js +13 -14
  50. package/lib/dialog/dialog_container_style.js +1 -2
  51. package/lib/dialog/index.js +1 -2
  52. package/lib/dropdown/index.d.ts +39 -0
  53. package/lib/dropdown/index.js +98 -0
  54. package/lib/entries/base.js +1 -2
  55. package/lib/entries/button.js +5 -6
  56. package/lib/entries/calendar.js +5 -6
  57. package/lib/entries/card.js +5 -6
  58. package/lib/entries/carousel-item.js +5 -6
  59. package/lib/entries/carousel.js +5 -6
  60. package/lib/entries/checkbox-group.js +5 -6
  61. package/lib/entries/checkbox.js +5 -6
  62. package/lib/entries/collapse-item.d.ts +0 -1
  63. package/lib/entries/collapse-item.js +6 -6
  64. package/lib/entries/collapse.d.ts +0 -1
  65. package/lib/entries/collapse.js +11 -6
  66. package/lib/entries/color-picker.js +5 -6
  67. package/lib/entries/date-picker-ori.js +5 -6
  68. package/lib/entries/date-picker.js +5 -6
  69. package/lib/entries/description-panel.js +5 -6
  70. package/lib/entries/dialog-box.js +1 -2
  71. package/lib/entries/dialog-container.js +5 -6
  72. package/lib/entries/dialog.js +1 -2
  73. package/lib/entries/dropdown.d.ts +2 -0
  74. package/lib/entries/dropdown.js +1 -0
  75. package/lib/entries/form-item.js +5 -6
  76. package/lib/entries/form.js +5 -6
  77. package/lib/entries/icon-arrow-down.js +5 -6
  78. package/lib/entries/icon-arrow-left.js +5 -6
  79. package/lib/entries/icon-arrow-right.js +5 -6
  80. package/lib/entries/icon-arrow-up.js +5 -6
  81. package/lib/entries/icon-base.js +5 -6
  82. package/lib/entries/icon-calendar.js +5 -6
  83. package/lib/entries/icon-caret-bottom.js +5 -6
  84. package/lib/entries/icon-caret-top.js +5 -6
  85. package/lib/entries/icon-close-filled.js +5 -6
  86. package/lib/entries/icon-close.js +5 -6
  87. package/lib/entries/icon-copy.js +5 -6
  88. package/lib/entries/icon-d-arrow-left.js +5 -6
  89. package/lib/entries/icon-d-arrow-right.js +5 -6
  90. package/lib/entries/icon-delete.js +5 -6
  91. package/lib/entries/icon-eye-outline.js +5 -6
  92. package/lib/entries/icon-font-icon.js +5 -6
  93. package/lib/entries/icon-info.js +5 -6
  94. package/lib/entries/icon-loading.js +5 -6
  95. package/lib/entries/icon-minus.js +5 -6
  96. package/lib/entries/icon-moon.js +5 -6
  97. package/lib/entries/icon-more.js +5 -6
  98. package/lib/entries/icon-picture.js +5 -6
  99. package/lib/entries/icon-plus.js +5 -6
  100. package/lib/entries/icon-reduction.js +5 -6
  101. package/lib/entries/icon-refresh-left.js +5 -6
  102. package/lib/entries/icon-refresh-right.js +5 -6
  103. package/lib/entries/icon-refresh.js +5 -6
  104. package/lib/entries/icon-search.js +5 -6
  105. package/lib/entries/icon-select.js +5 -6
  106. package/lib/entries/icon-sort.js +5 -6
  107. package/lib/entries/icon-success.js +5 -6
  108. package/lib/entries/icon-sun.js +5 -6
  109. package/lib/entries/icon-theme-default.js +5 -6
  110. package/lib/entries/icon-warn.js +5 -6
  111. package/lib/entries/icon-zoom-in.js +5 -6
  112. package/lib/entries/icon-zoom-out.js +5 -6
  113. package/lib/entries/image-preview.js +5 -6
  114. package/lib/entries/image.js +5 -6
  115. package/lib/entries/input-number.js +5 -6
  116. package/lib/entries/input.js +5 -6
  117. package/lib/entries/list.js +5 -6
  118. package/lib/entries/loading.js +1 -2
  119. package/lib/entries/mask.js +5 -6
  120. package/lib/entries/md-input.js +5 -6
  121. package/lib/entries/menu.js +5 -6
  122. package/lib/entries/message.js +1 -2
  123. package/lib/entries/modal-box.js +1 -2
  124. package/lib/entries/modal.js +5 -6
  125. package/lib/entries/notification-box.js +1 -2
  126. package/lib/entries/notification.js +1 -2
  127. package/lib/entries/page-header.js +5 -6
  128. package/lib/entries/pagination.js +5 -6
  129. package/lib/entries/polygon.js +5 -6
  130. package/lib/entries/popconfirm.js +1 -2
  131. package/lib/entries/popover.js +1 -2
  132. package/lib/entries/qrcode.js +5 -6
  133. package/lib/entries/radio-group.js +5 -6
  134. package/lib/entries/radio.js +5 -6
  135. package/lib/entries/select-ori.js +5 -6
  136. package/lib/entries/select.js +5 -6
  137. package/lib/entries/space.js +5 -6
  138. package/lib/entries/switch.js +5 -6
  139. package/lib/entries/tabbar-item.js +5 -6
  140. package/lib/entries/tabbar.js +5 -6
  141. package/lib/entries/table.js +5 -6
  142. package/lib/entries/tabs.js +1 -2
  143. package/lib/entries/tag.js +5 -6
  144. package/lib/entries/theme-color.js +5 -6
  145. package/lib/entries/theme.js +5 -6
  146. package/lib/entries/transition.js +1 -2
  147. package/lib/entries/upload.js +5 -6
  148. package/lib/entries/utils.js +1 -3
  149. package/lib/form/accessibility.d.ts +15 -0
  150. package/lib/form/accessibility.js +56 -0
  151. package/lib/form/autocomplete.d.ts +21 -0
  152. package/lib/form/autocomplete.js +59 -0
  153. package/lib/form/context.d.ts +157 -0
  154. package/lib/form/context.js +88 -0
  155. package/lib/form/form_inner.d.ts +99 -24
  156. package/lib/form/form_inner.js +424 -72
  157. package/lib/form/form_item.d.ts +35 -11
  158. package/lib/form/form_item.js +210 -78
  159. package/lib/form/form_item.less_inline.js +2 -3
  160. package/lib/form/form_item_style.d.ts +3 -0
  161. package/lib/form/form_item_style.js +7 -0
  162. package/lib/form/index.d.ts +69 -15
  163. package/lib/form/index.js +501 -101
  164. package/lib/form/index.less_inline.js +1 -2
  165. package/lib/form/owner.d.ts +78 -0
  166. package/lib/form/owner.js +138 -0
  167. package/lib/form/style.d.ts +3 -0
  168. package/lib/form/style.js +7 -0
  169. package/lib/icon/arrow_down.js +1 -2
  170. package/lib/icon/arrow_left.js +1 -2
  171. package/lib/icon/arrow_right.js +1 -2
  172. package/lib/icon/arrow_up.js +1 -2
  173. package/lib/icon/base.js +1 -2
  174. package/lib/icon/calendar.js +1 -2
  175. package/lib/icon/caret_bottom.js +1 -2
  176. package/lib/icon/caret_top.js +1 -2
  177. package/lib/icon/close.js +1 -2
  178. package/lib/icon/close_filled.js +1 -2
  179. package/lib/icon/copy.js +1 -2
  180. package/lib/icon/d_arrow_left.js +1 -2
  181. package/lib/icon/d_arrow_right.js +1 -2
  182. package/lib/icon/delete.js +1 -2
  183. package/lib/icon/eye_outline.js +1 -2
  184. package/lib/icon/font_icon.js +1 -2
  185. package/lib/icon/icon_style.js +1 -2
  186. package/lib/icon/index.less_inline.js +1 -2
  187. package/lib/icon/info.js +1 -2
  188. package/lib/icon/loading.js +1 -2
  189. package/lib/icon/minus.js +1 -2
  190. package/lib/icon/moon.js +1 -2
  191. package/lib/icon/more.js +1 -2
  192. package/lib/icon/picture.js +1 -2
  193. package/lib/icon/plus.js +1 -2
  194. package/lib/icon/reduction.js +1 -2
  195. package/lib/icon/refresh.js +1 -2
  196. package/lib/icon/refresh_left.js +1 -2
  197. package/lib/icon/refresh_right.js +1 -2
  198. package/lib/icon/search.js +1 -2
  199. package/lib/icon/select.js +1 -2
  200. package/lib/icon/sort.js +1 -2
  201. package/lib/icon/success.js +1 -2
  202. package/lib/icon/sun.js +1 -2
  203. package/lib/icon/theme_default.js +1 -2
  204. package/lib/icon/warn.js +1 -2
  205. package/lib/icon/zoom_in.js +1 -2
  206. package/lib/icon/zoom_out.js +1 -2
  207. package/lib/image/image_preview.js +1 -2
  208. package/lib/image/image_preview.less_inline.js +1 -2
  209. package/lib/image/index.js +1 -2
  210. package/lib/image/index.less_inline.js +1 -2
  211. package/lib/index.d.ts +2 -1
  212. package/lib/index.js +91 -91
  213. package/lib/input/index.d.ts +14 -0
  214. package/lib/input/index.js +126 -31
  215. package/lib/input/index.less_inline.js +2 -3
  216. package/lib/input/input_inner.less_inline.js +1 -2
  217. package/lib/input/style.d.ts +1 -0
  218. package/lib/input/style.js +5 -7
  219. package/lib/input_number/index.d.ts +7 -0
  220. package/lib/input_number/index.js +70 -48
  221. package/lib/input_number/index.less_inline.js +1 -2
  222. package/lib/input_number/style.js +1 -2
  223. package/lib/list/index.js +4 -5
  224. package/lib/list/index.less_inline.js +1 -2
  225. package/lib/loading/index.js +1 -2
  226. package/lib/mask/index.js +2 -7
  227. package/lib/mask/index.less_inline.js +1 -2
  228. package/lib/md_input/index.d.ts +11 -2
  229. package/lib/md_input/index.js +63 -27
  230. package/lib/md_input/index.less_inline.js +2 -3
  231. package/lib/menu/index.js +2 -7
  232. package/lib/menu/index.less_inline.js +1 -2
  233. package/lib/message/index.js +1 -2
  234. package/lib/modal/index.js +15 -16
  235. package/lib/modal/index.less_inline.js +1 -2
  236. package/lib/modal/modal_box.js +24 -25
  237. package/lib/notification/index.js +15 -29
  238. package/lib/notification/index.less_inline.js +1 -2
  239. package/lib/notification/notification_box.js +2 -3
  240. package/lib/notification/placement.js +1 -2
  241. package/lib/notification/style.js +1 -2
  242. package/lib/page_header/index.js +1 -2
  243. package/lib/page_header/index.less_inline.js +1 -2
  244. package/lib/pagination/index.js +2 -7
  245. package/lib/pagination/index.less_inline.js +1 -2
  246. package/lib/polygon/index.js +1 -2
  247. package/lib/polygon/index.less_inline.js +1 -2
  248. package/lib/qrcode/index.js +1 -2
  249. package/lib/qrcode/index.less_inline.js +1 -2
  250. package/lib/select/index.d.ts +19 -2
  251. package/lib/select/index.js +128 -74
  252. package/lib/select/index.less_inline.js +1 -2
  253. package/lib/select_ori/index.d.ts +9 -1
  254. package/lib/select_ori/index.js +36 -24
  255. package/lib/select_ori/index.less_inline.js +1 -2
  256. package/lib/space/index.js +1 -2
  257. package/lib/space/index.less_inline.js +1 -2
  258. package/lib/styles/animation/index.css_inline.js +1 -2
  259. package/lib/styles/animation/index.js +1 -2
  260. package/lib/styles/mask/index.css_inline.js +1 -2
  261. package/lib/styles/mask/index.js +1 -2
  262. package/lib/switch/index.d.ts +6 -0
  263. package/lib/switch/index.js +31 -16
  264. package/lib/switch/index.less_inline.js +1 -2
  265. package/lib/tabbar/index.js +1 -2
  266. package/lib/tabbar/index.less_inline.js +1 -2
  267. package/lib/tabbar/item.js +1 -2
  268. package/lib/tabbar/item.less_inline.js +1 -2
  269. package/lib/table/index.js +1 -2
  270. package/lib/table/index.less_inline.js +1 -2
  271. package/lib/tabs/index.js +1 -2
  272. package/lib/tag/index.d.ts +11 -3
  273. package/lib/tag/index.js +25 -24
  274. package/lib/tag/index.less_inline.js +2 -3
  275. package/lib/theme/appearance.d.ts +5 -0
  276. package/lib/theme/appearance.js +34 -0
  277. package/lib/theme/index.js +83 -39
  278. package/lib/theme/index.less_inline.js +1 -2
  279. package/lib/theme/theme_color.js +1 -2
  280. package/lib/upload/index.js +28 -41
  281. package/lib/upload/index.less_inline.js +2 -3
  282. package/lib/upload/style.js +1 -2
  283. package/lib/utils/clickoutside.js +1 -2
  284. package/lib/utils/event.js +1 -2
  285. package/lib/utils/index.d.ts +27 -6
  286. package/lib/utils/index.js +26 -6
  287. package/lib/utils/popover.js +7 -16
  288. package/lib/utils/transition.js +1 -2
  289. package/package.json +16 -13
  290. package/styles/dark.css +10 -2
  291. package/styles/dropdown.css +46 -0
  292. package/styles/reset.css +0 -1
  293. package/styles/select.css +5 -0
  294. package/styles/themes/apple.css +47 -0
  295. package/styles/{theme-coral.css → themes/coral.css} +5 -3
  296. package/styles/themes/deep-sea-blue.css +12 -0
  297. package/styles/themes/gamboge.css +15 -0
  298. package/styles/{theme-jade.css → themes/jade.css} +5 -3
  299. package/styles/themes/lotus-seed.css +12 -0
  300. package/styles/{theme-tangerine.css → themes/tangerine.css} +5 -3
  301. package/styles/themes.css +8 -0
  302. package/styles/vars.css +8 -2
  303. package/types/preact.d.ts +42 -0
  304. package/lib/form/types.d.ts +0 -7
  305. package/lib/utils/context_provide.d.ts +0 -10
  306. package/lib/utils/context_provide.js +0 -22
  307. package/lib/utils/locale.d.ts +0 -6
  308. package/lib/utils/locale.js +0 -34
  309. package/lib/utils/signal_types.d.ts +0 -5
@@ -5,6 +5,11 @@ type ActionRenderFn = (cfg: {
5
5
  export default class Switch extends FormInner {
6
6
  #private;
7
7
  static baseName: string;
8
+ static get observedAttributes(): string[];
9
+ protected _ignoreInitAttrs: string[];
10
+ protected get intrinsicDefaultValue(): boolean;
11
+ protected parseDefaultValue(value: string | null): boolean;
12
+ protected formatDefaultValue(value: any): string;
8
13
  actionRender?: ActionRenderFn;
9
14
  checkedText?: string;
10
15
  uncheckedText?: string;
@@ -12,6 +17,7 @@ export default class Switch extends FormInner {
12
17
  disconnectedCallback(): void;
13
18
  render(): string;
14
19
  setValue(value: boolean): void;
20
+ protected disabledChange(): void;
15
21
  setActionRender(render: ActionRenderFn): void;
16
22
  }
17
23
  export {};
@@ -1,18 +1,31 @@
1
- import { initAttr as e } from "../utils/index.js";
2
- import t from "../form/form_inner.js";
3
- import n from "./index.less_inline.js";
4
- import { $one as r, addClass as i, off as a, on as o, removeClass as s } from "utilane/browser";
5
- //#region src/components/switch/index.ts
6
- var c = class extends t {
1
+ import e from "../form/form_inner.js";
2
+ import { initAttr as t, parseAttrValue as n } from "../utils/index.js";
3
+ import r from "./index.less_inline.js";
4
+ import { $one as i, addClass as a, off as o, on as s, removeClass as c } from "utilane/browser";
5
+ // src/components/switch/index.ts
6
+ var l = class extends e {
7
7
  static baseName = "switch";
8
+ static get observedAttributes() {
9
+ return [...new Set(e.observedAttributes)];
10
+ }
11
+ _ignoreInitAttrs = ["value"];
12
+ get intrinsicDefaultValue() {
13
+ return !1;
14
+ }
15
+ parseDefaultValue(e) {
16
+ return e === null ? this.intrinsicDefaultValue : n(e, !1, "value");
17
+ }
18
+ formatDefaultValue(e) {
19
+ return String(typeof e == "string" ? n(e, !1, "value") : !!e);
20
+ }
8
21
  actionRender;
9
22
  checkedText;
10
23
  uncheckedText;
11
24
  connectedCallback() {
12
- e(this), this.loadStyleText(n), super.connectedCallback(), this.pushValueChange(), this.#t(), o(this, "click", this.#e);
25
+ t(this), this.loadStyleText(r), super.connectedCallback(), this.#t(), s(this, "click", this.#e);
13
26
  }
14
27
  disconnectedCallback() {
15
- super.disconnectedCallback(), a(this, "click", this.#e), this.actionRender = void 0;
28
+ super.disconnectedCallback(), o(this, "click", this.#e), this.actionRender = void 0;
16
29
  }
17
30
  render() {
18
31
  this.isDisabled() && this.classList.add("l-switch--disabled"), this.value && this.classList.add("l-switch--checked");
@@ -24,28 +37,30 @@ var c = class extends t {
24
37
  return e.join("");
25
38
  }
26
39
  #e = (e) => {
27
- this.isDisabled() || (this.setValue(!this.value), this.emit("change"));
40
+ this.isDisabled() || (this.setValue(!this.value), this.validateInput(), this.emit("change"));
28
41
  };
29
42
  setValue(e) {
30
- super.setValue(e), e ? i(this, "l-switch--checked") : s(this, "l-switch--checked");
31
- let t = r(".l-switch-text", this.root);
43
+ e = typeof e == "string" ? n(e, !1, "value") : !!e, super.setValue(e), e ? a(this, "l-switch--checked") : c(this, "l-switch--checked");
44
+ let t = i(".l-switch-text", this.root);
32
45
  t && (t.textContent = this.value ? this.checkedText || "" : this.uncheckedText || ""), this.#t();
33
46
  }
47
+ disabledChange() {
48
+ this.classList.toggle("l-switch--disabled", this.isDisabled()), this.setAttribute("aria-disabled", String(this.isDisabled()));
49
+ }
34
50
  setActionRender(e) {
35
51
  this.actionRender = e, this.#t();
36
52
  }
37
53
  #t() {
38
- let e = r(".l-switch-action", this.root);
54
+ let e = i(".l-switch-action", this.root);
39
55
  if (e) {
40
56
  if (this.actionRender) {
41
57
  let t = this.actionRender({ checked: this.value });
42
58
  e.innerHTML = typeof t == "string" ? t : t.outerHTML;
43
59
  } else {
44
- let t = r("[slot=\"checked-action\"]", this), n = r("[slot=\"unchecked-action\"]", this);
45
- this.value && t ? e.innerHTML = "<slot name=\"checked-action\"></slot>" : !this.value && n && (e.innerHTML = "<slot name=\"unchecked-action\"></slot>");
60
+ let t = i("[slot=\"checked-action\"]", this), n = i("[slot=\"unchecked-action\"]", this);
61
+ e.innerHTML = this.value && t ? "<slot name=\"checked-action\"></slot>" : !this.value && n ? "<slot name=\"unchecked-action\"></slot>" : "";
46
62
  }
47
63
  }
48
64
  }
49
65
  };
50
- //#endregion
51
- export { c as default };
66
+ export { l as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/switch/index.less?inline
1
+ // src/components/switch/index.less?inline
2
2
  var e = ":host{box-sizing:border-box;--l-switch-height:22px;--l-switch-width:40px;width:auto;width:var(--l-switch-width);height:var(--l-switch-height);border-radius:calc(var(--l-switch-height) / 2);cursor:pointer;vertical-align:middle;background-color:#dcdfe6;border:1px solid #c2c2c2;justify-content:flex-start;align-items:center;padding:2px;transition:all .3s ease-in-out;display:inline-flex;position:relative}:host(:hover),:host(.l-switch--checked):hover{border-color:var(--l-primary-color,#722ed1)}:host(.l-switch--checked){background-color:var(--l-primary-color,#722ed1);border-color:var(--l-primary-color,#722ed1)}.l-switch-action{width:calc(var(--l-switch-height) - 6px);box-sizing:border-box;background-color:#fff;border-radius:50%;justify-content:center;align-items:center;padding:2px;font-size:12px;transition:all .3s ease-in-out;display:flex;position:absolute;top:2px;bottom:2px;left:2px}.l-switch-text{color:#fff;padding-left:calc(var(--l-switch-width) - 20px);transition:padding-left .3s ease-in-out}:host(.l-switch--checked) .l-switch-action{left:calc(var(--l-switch-width) - var(--l-switch-height) + 3px)}:host(.l-switch--checked) .l-switch-text{padding-left:5px}";
3
- //#endregion
4
3
  export { e as default };
@@ -3,7 +3,7 @@ import { parseAttrValue as t } from "../utils/index.js";
3
3
  import n from "./index.less_inline.js";
4
4
  import { $$ as r, $one as i, addClass as a, create as o, isVisible as s, off as c, on as l, removeClass as u, shouldEventNext as d } from "utilane/browser";
5
5
  import { isBlank as f, isNumeric as p } from "utilane";
6
- //#region src/components/tabbar/index.ts
6
+ // src/components/tabbar/index.ts
7
7
  var m = class extends e {
8
8
  static baseName = "tabbar";
9
9
  type = "nav";
@@ -93,5 +93,4 @@ var m = class extends e {
93
93
  }
94
94
  }
95
95
  };
96
- //#endregion
97
96
  export { m as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/tabbar/index.less?inline
1
+ // src/components/tabbar/index.less?inline
2
2
  var e = ":host{--l-tabbar-hover-color:var(--l-primary-color-light1,#9254de);--l-tabbar-active-color:var(--l-primary-color,#722ed1);--l-tabbar-item-gap:0;--l-tabbar-height:38px;height:var(--l-tabbar-height);align-items:stretch;gap:var(--l-tabbar-item-gap);box-sizing:border-box;background-color:#fff;flex-wrap:nowrap;display:flex;position:relative;overflow:hidden}:host(.l-tabbar--nav){--l-tabbar-height:50px;--l-tabbar-item-grow:1;width:100%}:host(.l-tabbar--bar){--l-tabbar-bar-vertical-padding:10px;--l-tabbar-item-gap:30px;--l-tabbar-line-color:var(--l-primary-color,#722ed1);white-space:nowrap;overflow:auto}.l-tabbar--bar-line{background-color:var(--l-tabbar-line-color);border-radius:1px;width:32px;height:2px;transition:all .3s ease-in-out;position:absolute;bottom:0;left:0}:host(.l-tabbar--card){--l-tabbar-card-border-color:#f5f7fa;--l-tabbar-line-color:#fff;--l-tabbar-item-gap:0;--l-tabbar-card-border-radius:5px}.l-tabbar-card-border{background-color:var(--l-tabbar-card-border-color);height:1px;position:absolute;bottom:0;left:0;right:0}";
3
- //#endregion
4
3
  export { e as default };
@@ -2,7 +2,7 @@ import e from "../base.js";
2
2
  import { parseAttrValue as t } from "../utils/index.js";
3
3
  import n from "./item.less_inline.js";
4
4
  import { $$ as r, $one as i, addClass as a, removeClass as o } from "utilane/browser";
5
- //#region src/components/tabbar/item.ts
5
+ // src/components/tabbar/item.ts
6
6
  var s = class extends e {
7
7
  static baseName = "tabbar-item";
8
8
  name;
@@ -57,5 +57,4 @@ var s = class extends e {
57
57
  return e;
58
58
  }
59
59
  };
60
- //#endregion
61
60
  export { s as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/tabbar/item.less?inline
1
+ // src/components/tabbar/item.less?inline
2
2
  var e = ":host{color:#666;cursor:pointer;flex-direction:column;flex-grow:var(--l-tabbar-item-grow,0);box-sizing:border-box;justify-content:center;align-items:center;line-height:1;transition:all .3s ease-in-out;display:inline-flex}:host(:hover){color:var(--l-tabbar-hover-color)}:host(.active){color:var(--l-tabbar-active-color)}.icon-wrapper{justify-content:center;align-items:center;margin-bottom:3px;font-size:18px;display:flex}.icon-wrapper.only{margin-bottom:0;font-size:24px}:host(.l-item--card){background:#f5f7fa;border:1px solid #f0f0f0;padding:0 15px}:host(.l-item--card:first-child){border-top-left-radius:var(--l-tabbar-card-border-radius)}:host(.l-item--card:last-child){border-top-right-radius:var(--l-tabbar-card-border-radius)}:host(.l-item--card.active){background:#fff}:host(.l-item--gap){border-top-left-radius:var(--l-tabbar-card-border-radius);border-top-right-radius:var(--l-tabbar-card-border-radius)}";
3
- //#endregion
4
3
  export { e as default };
@@ -3,7 +3,7 @@ import { kebabToCamel as t, parseAttrValue as n } from "../utils/index.js";
3
3
  import r from "./index.less_inline.js";
4
4
  import { $$ as i, $one as a, formatStyle as o, iterate as s, off as c, on as l, shouldEventNext as u } from "utilane/browser";
5
5
  import { random as d } from "utilane";
6
- //#region src/components/table/index.ts
6
+ // src/components/table/index.ts
7
7
  var f = class extends e {
8
8
  static baseName = "table";
9
9
  constructor() {
@@ -239,5 +239,4 @@ var f = class extends e {
239
239
  });
240
240
  }
241
241
  };
242
- //#endregion
243
242
  export { f as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/table/index.less?inline
1
+ // src/components/table/index.less?inline
2
2
  var e = ":host{width:100%;max-height:var(--l-table-max-height,100%);font-size:var(--l-table-font-size,14px);display:inline-block;overflow:auto}.l-table{border-collapse:collapse;border-spacing:0;table-layout:var(--l-table-layout,auto);width:100%}.l-table th,.l-table td{border-bottom:1px solid var(--l-table-border-color,#e6e6e6)}.l-table th{padding:var(--l-table-th-padding,10px);text-align:left;background-color:var(--l-table-th-bg,#f2f2f2);color:var(--l-table-th-color,#000)}.l-table td{background-color:var(--l-table-td-bg,#fff);color:var(--l-table-td-color,#000);padding:var(--l-table-td-padding,10px);transition:background-color .3s}.l-table tr:hover td{background-color:var(--l-table-row-hover-bg,#f2f2f2)}.l-table .l-table__empty-col{color:var(--l-table-empty-color,#999);text-align:center}.l-table-stripe tr:nth-child(2n) td{background-color:var(--l-table-stripe-bg,#fafafa)}.l-table-stripe tr:nth-child(2n):hover td{background-color:var(--l-table-row-hover-bg,#f2f2f2)}.l-table-border th,.l-table-border td{border:1px solid var(--l-table-border-color,#e6e6e6)}.l-table-fixed{--l-table-layout:fixed}.l-table-fixed .l-fixed{z-index:1;box-sizing:border-box;position:-webkit-sticky;position:sticky}.l-table-fixed thead.l-fixed,.l-table-fixed tfoot.l-fixed{z-index:2}.l-table .caret-wrapper{vertical-align:middle;justify-content:center;align-items:center;width:20px;height:14px;display:inline-flex;position:relative}.l-table .caret-wrapper .ascending{border-bottom-color:var(--l-table-sort-inactive-color,#c0c4cc);top:-5px}.l-table .caret-wrapper .descending{border-top-color:var(--l-table-sort-inactive-color,#c0c4cc);bottom:-3px}.l-table .sort-caret{border:5px solid #0000;border-radius:3px;width:0;height:0;display:inline-block;position:absolute}.l-table .sort-column{cursor:pointer}.l-table .sort-asc .ascending{border-bottom-color:var(--l-primary-color,#52c41a)}.l-table .sort-desc .descending{border-top-color:var(--l-primary-color,#52c41a)}";
3
- //#endregion
4
3
  export { e as default };
package/lib/tabs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as e, $one as t, iterate as n, off as r, on as i } from "utilane/browser";
2
- //#region src/components/tabs/index.ts
2
+ // src/components/tabs/index.ts
3
3
  function a() {
4
4
  let a = e(".l-tabs");
5
5
  function o(e) {
@@ -37,5 +37,4 @@ function a() {
37
37
  return { destroy: s };
38
38
  }
39
39
  var o = { init: a };
40
- //#endregion
41
40
  export { o as default };
@@ -1,13 +1,21 @@
1
1
  import BaseComponent from "../base";
2
- export default class Tag extends BaseComponent {
2
+ import type { TagColor } from "../utils";
3
+ type TagState = {
4
+ color?: TagColor;
5
+ };
6
+ export default class Tag extends BaseComponent<TagState> {
3
7
  #private;
4
8
  static baseName: string;
9
+ get color(): TagColor | undefined;
10
+ set color(value: TagColor | undefined);
11
+ /** 替换颜色变量,传入 undefined 或空对象恢复默认配色。 */
12
+ setColor(value?: TagColor): void;
5
13
  connectedCallback(): void;
6
14
  static get observedAttributes(): string[];
7
- attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
15
+ attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
8
16
  render(): DocumentFragment;
9
17
  afterInit(): void;
10
18
  _toggleTypeClass(type: string): void;
11
- _toggleColorStyle(color?: string | null): void;
12
19
  beforeDestroy(): void;
13
20
  }
21
+ export {};
package/lib/tag/index.js CHANGED
@@ -1,33 +1,38 @@
1
1
  import e from "../base.js";
2
2
  import { parseAttrValue as t } from "../utils/index.js";
3
3
  import n from "./index.less_inline.js";
4
- import { $$ as r, $one as i, off as a, on as o, shouldEventNext as s } from "utilane/browser";
5
- import { adjust as c, isBlank as l } from "utilane";
6
- //#region src/components/tag/index.ts
7
- var u = class extends e {
4
+ import { $$ as r, $one as i, formatStyle as a, off as o, on as s, shouldEventNext as c } from "utilane/browser";
5
+ // src/components/tag/index.ts
6
+ var l = class extends e {
8
7
  static baseName = "tag";
8
+ get color() {
9
+ return this._state.color;
10
+ }
11
+ set color(e) {
12
+ this.setColor(e);
13
+ }
14
+ setColor(e) {
15
+ let t = this._state.color;
16
+ this._state.color = e;
17
+ for (let e of Object.keys(t || {})) this.style.removeProperty(e);
18
+ let n = a(e || {});
19
+ n && (this.style.cssText += n);
20
+ }
9
21
  connectedCallback() {
10
22
  this.loadStyleText(n), super.connectedCallback();
11
23
  }
12
24
  static get observedAttributes() {
13
- return [
14
- "type",
15
- "color",
16
- "closeable"
17
- ];
25
+ return ["type", "closeable"];
18
26
  }
19
27
  attributeChangedCallback(e, n, r) {
20
- let a = r.trim();
28
+ let a = r?.trim() ?? "";
21
29
  switch (e) {
22
30
  case "type":
23
- this._toggleTypeClass(a);
31
+ this._toggleTypeClass(a || "info");
24
32
  break;
25
- case "color":
26
- this._toggleColorStyle(a);
27
- break;
28
- case "closable":
33
+ case "closeable":
29
34
  if (!this.rendered) return;
30
- let e = t(a, !1, "closeable"), n = i(".l-tag-close", this.root);
35
+ let e = r !== null && t(a, !1, "closeable"), n = i(".l-tag-close", this.root);
31
36
  if (n) {
32
37
  if (e) return;
33
38
  n.remove();
@@ -49,11 +54,11 @@ var u = class extends e {
49
54
  });
50
55
  }
51
56
  #t = (e) => {
52
- let [t, n, r] = s(e, "data-action", this);
57
+ let [t, n, r] = c(e, "data-action", this);
53
58
  t && n === "close" && this.emit("close", { detail: { ...r.dataset } });
54
59
  };
55
60
  afterInit() {
56
- this.classList.add(`l-tag--${this.getAttr("type", "info")}`), this._toggleColorStyle(), o(this.root, "click", this.#t);
61
+ this._toggleTypeClass(this.getAttr("type", "info") || "info"), s(this.root, "click", this.#t);
57
62
  }
58
63
  _toggleTypeClass(e) {
59
64
  if (!this.rendered) return;
@@ -64,12 +69,8 @@ var u = class extends e {
64
69
  }
65
70
  t || this.classList.add(`l-tag--${e}`);
66
71
  }
67
- _toggleColorStyle(e) {
68
- this.rendered && (l(e) ? (this.style.removeProperty("--l-tag-color"), this.style.removeProperty("--l-tag-border-color"), this.style.removeProperty("--l-tag-background")) : (this.style.setProperty("--l-tag-color", e), this.style.setProperty("--l-tag-border-color", e), this.style.setProperty("--l-tag-background", c(e, 5, !0))));
69
- }
70
72
  beforeDestroy() {
71
- a(this.root, "click", this.#t);
73
+ o(this.root, "click", this.#t);
72
74
  }
73
75
  };
74
- //#endregion
75
- export { u as default };
76
+ export { l as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/tag/index.less?inline
2
- var e = ":host{box-sizing:border-box;vertical-align:middle;height:var(--l-tag-height,22px);border:1px solid var(--l-tag-border-color,var(--l-border-color,#dedede));background:var(--l-tag-background,#fff);white-space:nowrap;color:var(--l-tag-color,#333);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:12px;line-height:1;display:inline-flex}:host(.l-tag--primary){--l-tag-border-color:var(--l-primary-color-light3,#d3adf7);--l-tag-background:var(--l-primary-color-light5,#f9f0ff);--l-tag-color:var(--l-primary-color-light3,#d3adf7)}:host(.l-tag--error){--l-tag-color:var(--l-error-color,#ed3f13);--l-tag-background:var(--l-error-color-light5,#fff1f0);--l-tag-border-color:var(--l-error-color,#ed3f13)}:host(.l-tag--success){--l-tag-color:var(--l-success-color,#a0d911);--l-tag-background:var(--l-success-color-light5,#fcffe6);--l-tag-border-color:var(--l-success-color,#a0d911)}:host(.l-tag--info){--l-tag-color:var(--l-text-color,#999);--l-tag-background:var(--l-text-secondary-color,#f5f5f5);--l-tag-border-color:var(--l-border-color,#dedede)}:host(.l-tag--warning){--l-tag-color:var(--l-warning-color,#f90);--l-tag-background:var(--l-warning-color-light5,#fff5e6);--l-tag-border-color:var(--l-warning-color,#f90)}.l-tag-close{cursor:pointer;border-radius:50%;justify-content:center;align-items:center;width:14px;height:14px;margin-left:3px;font-size:12px;transition:color .3s,background-color .3s;display:inline-flex}.l-tag-close:hover{background-color:var(--l-tag-color,#1890ff);color:#fff}";
3
- //#endregion
1
+ // src/components/tag/index.less?inline
2
+ var e = ":host{box-sizing:border-box;vertical-align:middle;height:var(--l-tag-height,22px);border:1px solid var(--l-tag-border-color,var(--l-border-color,#dedede));background:var(--l-tag-background,#fff);white-space:nowrap;color:var(--l-tag-color,#333);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:12px;line-height:1;display:inline-flex}:host(.l-tag--primary){--l-tag-border-color:var(--l-primary-color-light3,#d3adf7);--l-tag-background:var(--l-primary-color-light5,#f9f0ff);--l-tag-color:var(--l-primary-color-light3,#d3adf7)}:host(.l-tag--error){--l-tag-color:var(--l-error-color,#ed3f13);--l-tag-background:var(--l-error-color-light5,#fff1f0);--l-tag-border-color:var(--l-error-color,#ed3f13)}:host(.l-tag--success){--l-tag-color:var(--l-success-color,#a0d911);--l-tag-background:var(--l-success-color-light5,#fcffe6);--l-tag-border-color:var(--l-success-color,#a0d911)}:host(.l-tag--info){--l-tag-color:var(--l-text-color,#595959);--l-tag-background:var(--l-fill-secondary-color,#f5f5f5);--l-tag-border-color:var(--l-border-color,#dedede)}:host(.l-tag--warning){--l-tag-color:var(--l-warning-color,#f90);--l-tag-background:var(--l-warning-color-light5,#fff5e6);--l-tag-border-color:var(--l-warning-color,#f90)}.l-tag-close{cursor:pointer;border-radius:50%;justify-content:center;align-items:center;width:14px;height:14px;margin-left:3px;font-size:12px;transition:color .3s,background-color .3s;display:inline-flex}.l-tag-close:hover{background-color:var(--l-tag-color,#1890ff);color:#fff}";
4
3
  export { e as default };
@@ -0,0 +1,5 @@
1
+ export type ThemeMode = "auto" | "light" | "dark";
2
+ type ThemeListener = (mode: string) => void;
3
+ export declare function observeTheme(document: Document, listener: ThemeListener): () => void;
4
+ export declare function applyThemeMode(document: Document, mode: ThemeMode): Promise<void>;
5
+ export {};
@@ -0,0 +1,34 @@
1
+ import { applyTheme as e, getTheme as t } from "utilane/browser";
2
+ // src/components/theme/appearance.ts
3
+ var n = /* @__PURE__ */ new WeakMap();
4
+ function r(e) {
5
+ let r = n.get(e);
6
+ if (!r) return;
7
+ let i = t();
8
+ if (r.mode !== i) {
9
+ r.mode = i;
10
+ for (let e of r.listeners) e(i);
11
+ }
12
+ }
13
+ function i(e, i) {
14
+ let a = n.get(e);
15
+ if (!a) {
16
+ let i = new MutationObserver(() => r(e));
17
+ i.observe(e.documentElement, {
18
+ attributes: !0,
19
+ attributeFilter: ["class"]
20
+ }), a = {
21
+ mode: t(),
22
+ listeners: /* @__PURE__ */ new Set(),
23
+ observer: i
24
+ }, n.set(e, a);
25
+ }
26
+ let { listeners: o, observer: s } = a;
27
+ return o.add(i), () => {
28
+ o.delete(i), o.size || (s.disconnect(), n.delete(e));
29
+ };
30
+ }
31
+ async function a(t, n) {
32
+ await e(n, !0, !1), r(t);
33
+ }
34
+ export { a as applyThemeMode, i as observeTheme };
@@ -1,9 +1,10 @@
1
1
  import e from "../base.js";
2
2
  import { initAttr as t } from "../utils/index.js";
3
- import n from "./index.less_inline.js";
4
- import { $one as r, applyTheme as i, create as a, getTheme as o, off as s, on as c } from "utilane/browser";
5
- //#region src/components/theme/index.ts
6
- var l = [
3
+ import { applyThemeMode as n, observeTheme as r } from "./appearance.js";
4
+ import i from "./index.less_inline.js";
5
+ import { $one as a, create as o, getTheme as s, off as c, on as l } from "utilane/browser";
6
+ // src/components/theme/index.ts
7
+ var u = [
7
8
  {
8
9
  value: "auto",
9
10
  text: "跟随系统",
@@ -19,68 +20,111 @@ var l = [
19
20
  text: "深色模式",
20
21
  icon: "l-moon-icon"
21
22
  }
22
- ], u = class extends e {
23
+ ], d = /* @__PURE__ */ new WeakMap();
24
+ function f(e, t) {
25
+ let n = d.get(e);
26
+ if (n?.pending) {
27
+ n.pending = t;
28
+ return;
29
+ }
30
+ if (n || !e.startViewTransition) {
31
+ t.apply().catch(console.error);
32
+ return;
33
+ }
34
+ let r = { pending: t };
35
+ d.set(e, r);
36
+ let i = e.startViewTransition(() => {
37
+ let e = r.pending;
38
+ return r.pending = void 0, e?.apply();
39
+ });
40
+ i.ready.catch(() => {}), i.finished.then(() => d.delete(e), (t) => {
41
+ d.delete(e), console.error(t);
42
+ });
43
+ }
44
+ var p = class extends e {
23
45
  static baseName = "theme";
24
46
  type = "button";
25
47
  label = "text";
26
48
  theme;
27
49
  #e;
50
+ #t;
28
51
  connectedCallback() {
29
- t(this), this.theme = o(), this.loadStyleText(n), super.connectedCallback(), this.#s();
52
+ t(this), this.theme = s(), this.loadStyleText(i), super.connectedCallback(), this.#l(), this.#t = r(this.ownerDocument, this.#s);
30
53
  }
31
54
  disconnectedCallback() {
32
- super.disconnectedCallback(), this.#c();
55
+ this.#t?.(), this.#t = void 0, super.disconnectedCallback(), this.#u();
33
56
  }
34
57
  render() {
35
58
  switch (this.type) {
36
- case "select": return this.#r();
37
- case "radio": return this.#a();
38
- case "switch": return this.#i();
39
- default: return this.#t();
59
+ case "select": return this.#i();
60
+ case "radio": return this.#o();
61
+ case "switch": return this.#a();
62
+ default: return this.#n();
40
63
  }
41
64
  }
42
- #t() {
43
- let e = a("l-button", { class: "l-theme-btn l-theme-inner" });
44
- return this.#n(e), e;
65
+ #n() {
66
+ let e = o("l-button", { class: "l-theme-btn l-theme-inner" });
67
+ return this.#r(e), e;
45
68
  }
46
- #n(e) {
69
+ #r(e) {
47
70
  let t = this.theme === "auto" ? "sun" : "moon";
48
71
  e.innerHTML = `<l-${t}-icon></l-${t}-icon>`;
49
72
  }
50
- #r() {
51
- let e = a("l-select-ori", { class: "l-theme-inner" });
52
- return e.value = this.theme, e.innerHTML = [
53
- "<option value=\"auto\">跟随系统</option>",
54
- "<option value=\"light\">浅色模式</option>",
55
- "<option value=\"dark\">深色模式</option>"
56
- ].join(""), e;
57
- }
58
73
  #i() {
59
- let e = a("l-switch", { class: "l-theme-switch l-theme-inner" });
60
- return e.value = this.theme === "dark", e.innerHTML = "<l-sun-icon slot=\"unchecked-action\"></l-sun-icon><l-moon-icon slot=\"checked-action\"></l-moon-icon>", e;
74
+ let e = o("l-select-ori", { class: "l-theme-inner" });
75
+ return e.value = this.theme, e.innerHTML = "<option value=\"auto\">跟随系统</option><option value=\"light\">浅色模式</option><option value=\"dark\">深色模式</option>", e;
61
76
  }
62
77
  #a() {
63
- let e = a("l-radio-group", { class: "l-theme-inner" });
64
- return e.value = this.theme, e.innerHTML = l.map((e) => {
78
+ let e = o("l-switch", { class: "l-theme-switch l-theme-inner" });
79
+ return e.value = this.theme === "dark", e.innerHTML = "<l-sun-icon slot=\"unchecked-action\"></l-sun-icon><l-moon-icon slot=\"checked-action\"></l-moon-icon>", e;
80
+ }
81
+ #o() {
82
+ let e = o("l-radio-group", { class: "l-theme-inner" });
83
+ return e.value = this.theme, e.innerHTML = u.map((e) => {
65
84
  let t = "";
66
85
  return t = this.label === "icon" ? `<${e.icon}></${e.icon}>` : e.text, `<l-radio value="${e.value}" button>${t}</l-radio>`;
67
86
  }).join(""), e;
68
87
  }
69
- #o = async (e) => {
70
- let t;
71
- if (this.type === "button") t = this.theme === "dark" ? "auto" : "dark";
88
+ #s = (e) => {
89
+ let t = this.#e;
90
+ if (t) {
91
+ if (this.theme = e, this.type === "button") this.#r(t);
92
+ else {
93
+ let n = this.type === "switch" ? e === "dark" : e;
94
+ t.value !== n && (t.value = n);
95
+ }
96
+ }
97
+ };
98
+ #c = (e) => {
99
+ e.type === "change" && e.stopPropagation();
100
+ let t = this.#e;
101
+ if (!t) return;
102
+ let r = this.ownerDocument, i = d.get(r)?.pending?.value ?? s(), a;
103
+ if (this.type === "button") a = i === "dark" ? "auto" : "dark";
72
104
  else {
73
- let n = e.target.value;
74
- t = this.type === "switch" ? n ? "dark" : "light" : n;
105
+ let e = t.value;
106
+ a = this.type === "switch" ? e ? "dark" : "light" : e;
75
107
  }
76
- await i(t), this.theme = t, this.type === "button" && this.#n(this.#e), this.emit("change", { detail: t });
108
+ if (a !== "auto" && a !== "light" && a !== "dark") return;
109
+ let o = a;
110
+ o !== i && f(r, {
111
+ value: o,
112
+ apply: async () => {
113
+ let e = s() !== o;
114
+ e && await n(r, o), this.isConnected && this.#e === t && e && this.emit("change", { detail: o });
115
+ }
116
+ });
77
117
  };
78
- #s() {
79
- this.#e = r(".l-theme-inner", this.root), this.type === "button" ? c(this.#e, "click", this.#o) : c(this.#e, "change", this.#o);
118
+ #l() {
119
+ if (this.#e = a(".l-theme-inner", this.root), this.type === "button") l(this.#e, "click", this.#c);
120
+ else {
121
+ this.keepChangeLocal(this.#e);
122
+ for (let e of this.#e.querySelectorAll("l-radio")) this.keepChangeLocal(e);
123
+ l(this.#e, "change", this.#c);
124
+ }
80
125
  }
81
- #c() {
82
- this.#e &&= (this.type === "button" ? s(this.#e, "click", this.#o) : s(this.#e, "change", this.#o), void 0);
126
+ #u() {
127
+ this.#e &&= (this.type === "button" ? c(this.#e, "click", this.#c) : c(this.#e, "change", this.#c), void 0);
83
128
  }
84
129
  };
85
- //#endregion
86
- export { u as default };
130
+ export { p as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/theme/index.less?inline
1
+ // src/components/theme/index.less?inline
2
2
  var e = ":host{box-sizing:border-box;width:auto;display:inline-flex}.l-theme-btn::part(default){--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-text-color:#9ca3af;--l-btn-hover-text-color:#666;width:var(--l-form-control-height,32px);padding:0;font-size:18px}.l-theme-switch.l-switch--checked{background-color:#65757129;border-color:#3c3f44}.l-theme-switch.l-switch--checked::part(action){color:#fff;background-color:#000}html.dark .l-theme-btn{--l-btn-hover-text-color:#fff}";
3
- //#endregion
4
3
  export { e as default };
@@ -1,6 +1,6 @@
1
1
  import e from "../base.js";
2
2
  import { $one as t, applyColorTheme as n, getColorTheme as r, on as i } from "utilane/browser";
3
- //#region src/components/theme/theme_color.ts
3
+ // src/components/theme/theme_color.ts
4
4
  var a = class extends e {
5
5
  static baseName = "theme-color";
6
6
  constructor() {
@@ -18,5 +18,4 @@ var a = class extends e {
18
18
  this._state.color = t, await n(t), this.emit("change", { detail: t });
19
19
  };
20
20
  };
21
- //#endregion
22
21
  export { a as default };