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
@@ -1,4 +1,3 @@
1
- //#region src/components/mask/index.less?inline
1
+ // src/components/mask/index.less?inline
2
2
  var e = ":host{display:none;position:relative}:host(.open){display:block}.l-mask,.l-panel{opacity:1;position:fixed;inset:0}.l-mask{z-index:var(--l-mask-zindex,100);background-color:#00000080}.l-panel{z-index:calc(var(--l-mask-zindex,100) + 1);color:#fff}";
3
- //#endregion
4
3
  export { e as default };
@@ -2,14 +2,23 @@ import FormInner from "../form/form_inner";
2
2
  export default class MdInput extends FormInner {
3
3
  #private;
4
4
  static baseName: string;
5
+ protected _ignoreInitAttrs: string[];
5
6
  /** 是否显示四周边框 */
6
7
  outline: boolean;
7
- htmlType: "text" | "number" | "password" | "tel";
8
+ get htmlType(): "text" | "number" | "password" | "tel";
9
+ set htmlType(value: "text" | "number" | "password" | "tel");
8
10
  inputmode?: "text" | "numeric" | "decimal" | "tel";
9
11
  label?: string;
12
+ protected get formStateRestorationEnabled(): boolean;
13
+ protected get acceptsAutocompleteText(): boolean;
10
14
  static get observedAttributes(): string[];
15
+ protected attributeChange(name: string, _oldValue: string, _newValue: string): void;
16
+ private syncEditorValue;
11
17
  connectedCallback(): void;
12
- disconnectedCallback(): void;
13
18
  render(): DocumentFragment;
14
19
  setValue(value: any): void;
20
+ protected disabledChange(): void;
21
+ protected innerBlockChange(innerBlock: boolean): void;
22
+ afterInit(): void;
23
+ beforeDestroy(): void;
15
24
  }
@@ -1,30 +1,59 @@
1
- import { initAttr as e } from "../utils/index.js";
2
- import t from "../form/form_inner.js";
1
+ import e from "../form/form_inner.js";
2
+ import { initAttr as t } from "../utils/index.js";
3
3
  import n from "./index.less_inline.js";
4
- import { $$ as r, $one as i, addClass as a, off as o, on as s, removeClass as c } from "utilane/browser";
5
- import { isBlank as l, random as u } from "utilane";
6
- //#region src/components/md_input/index.ts
7
- var d = class extends t {
4
+ import { $$ as r, $one as i, addClass as a, off as o, on as s } from "utilane/browser";
5
+ import { isBlank as c, random as l } from "utilane";
6
+ // src/components/md_input/index.ts
7
+ var u = class extends e {
8
8
  static baseName = "md-input";
9
+ _ignoreInitAttrs = [
10
+ "value",
11
+ "autocomplete",
12
+ "htmlType"
13
+ ];
9
14
  outline = !1;
10
- htmlType = "text";
15
+ get htmlType() {
16
+ let e = (this.getAttribute("html-type") || "text").toLowerCase();
17
+ return e === "number" || e === "password" || e === "tel" ? e : "text";
18
+ }
19
+ set htmlType(e) {
20
+ this.setAttribute("html-type", e);
21
+ }
11
22
  inputmode;
12
23
  label;
24
+ get formStateRestorationEnabled() {
25
+ return this.htmlType !== "password";
26
+ }
27
+ get acceptsAutocompleteText() {
28
+ return !0;
29
+ }
13
30
  static get observedAttributes() {
14
- return ["disabled"];
31
+ return [.../* @__PURE__ */ new Set([
32
+ ...e.observedAttributes,
33
+ "disabled",
34
+ "html-type",
35
+ "autocomplete"
36
+ ])];
15
37
  }
16
- connectedCallback() {
17
- e(this), this.loadStyleText(n), super.connectedCallback(), this.#e();
38
+ attributeChange(e, t, n) {
39
+ let r = i("input", this.root);
40
+ e === "html-type" && r && (r.type = this.htmlType, this.syncEditorValue(r));
18
41
  }
19
- disconnectedCallback() {
20
- super.disconnectedCallback(), this.#t();
42
+ syncEditorValue(e) {
43
+ if (e.value === this.value) return;
44
+ let t = this.dirtyValue;
45
+ this.setValue(e.value), this.dirtyValue = t;
46
+ }
47
+ connectedCallback() {
48
+ t(this), this.loadStyleText(n), super.connectedCallback();
21
49
  }
22
50
  render() {
23
- l(this.value) || a(this, "l-has-value"), this.outline && a(this, "l-md-input-outline");
24
- let e = document.createDocumentFragment(), t = `l-md-input-${u(8)}`, n = r("input", {
51
+ c(this.value) || a(this, "l-has-value"), this.outline && a(this, "l-md-input-outline");
52
+ let e = document.createDocumentFragment(), t = `l-md-input-${l(8)}`, n = r("input", {
25
53
  class: "l-md-input__inner",
26
54
  type: this.htmlType,
27
- name: this.getName(),
55
+ value: this.value ?? "",
56
+ disabled: this.isDisabled(),
28
57
  inputmode: this.inputmode,
29
58
  id: t
30
59
  });
@@ -38,22 +67,29 @@ var d = class extends t {
38
67
  return e;
39
68
  }
40
69
  setValue(e) {
41
- super.setValue(e);
42
- let t = i("input", this.root);
43
- t && (t.value = e);
70
+ let t = String(e ?? ""), n = i("input", this.root), r = this.htmlType, a = n ?? (r === "number" ? this.ownerDocument.createElement("input") : null);
71
+ a && !n && (a.type = r), a && a.value !== t && (a.value = t);
72
+ let o = a?.value ?? t;
73
+ this.classList.toggle("l-has-value", !c(o)), super.setValue(o);
74
+ }
75
+ disabledChange() {
76
+ let e = i("input", this.root);
77
+ e && (e.disabled = this.isDisabled());
78
+ }
79
+ innerBlockChange(e) {
80
+ this.classList.toggle("is-block", e);
44
81
  }
45
- #e() {
82
+ afterInit() {
46
83
  let e = i("input", this.root);
47
- e && s(e, "input", this.#n);
84
+ e && (this.syncEditorValue(e), this.syncAutocomplete(), s(e, "input", this.#e));
48
85
  }
49
- #t() {
86
+ beforeDestroy() {
50
87
  let e = i("input", this.root);
51
- e && o(e, "input", this.#n);
88
+ e && o(e, "input", this.#e);
52
89
  }
53
- #n = (e) => {
54
- let t = e.target.value;
55
- this.setValue(t), l(t) ? c(this, "l-has-value") : a(this, "l-has-value");
90
+ #e = (e) => {
91
+ let t = e.target;
92
+ this.setValue(t.value), this.validateInput();
56
93
  };
57
94
  };
58
- //#endregion
59
- export { d as default };
95
+ export { u as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/md_input/index.less?inline
2
- var e = ":host{--l-input-width:180px;width:var(--l-input-width,180px);height:var(--l-form-control-height,32px);display:inline-block;position:relative}.l-md-input__inner{box-sizing:border-box;background:0 0;border:0 solid silver;border-bottom-width:1px;outline:none;width:100%;height:100%;transition:border-color .3s}.l-md-input__inner:focus{border-color:var(--l-primary-color,#722ed1)}:host(.l-has-value) .l-md-input__label,.l-md-input__inner:focus+.l-md-input__label{font-size:12px;transform:translateY(-150%)}.l-md-input__inner:focus+.l-md-input__label{color:var(--nt-primary-color,#722ed1)}.l-md-input__label{color:#8c8c8c;cursor:text;align-items:center;font-size:13px;line-height:1;transition:color .3s,transform .3s;display:flex;position:absolute;top:50%;bottom:0;left:0;transform:translateY(-50%)}:host(.l-md-input-outline){--l-input-label-background:#fff}:host(.l-md-input-outline) .l-md-input__inner{border-width:1px;border-radius:4px;padding:0 10px}:host(.l-md-input-outline) .l-md-input__label{left:10px}:host(.l-md-input-outline) .l-md-input__inner:focus{border-width:2px}:host(.l-md-input-outline) .l-md-input__inner:focus+.l-md-input__label,:host(.l-md-input-outline.l-has-value) .l-md-input__label{background-color:#fff;padding-left:4px;padding-right:4px}";
3
- //#endregion
1
+ // src/components/md_input/index.less?inline
2
+ var e = ":host{--l-input-width:180px;width:var(--l-input-width,180px);height:var(--l-form-control-height,32px);display:inline-block;position:relative}:host(.is-block){flex:1;width:100%}.l-md-input__inner{box-sizing:border-box;background:0 0;border:0 solid silver;border-bottom-width:1px;outline:none;width:100%;height:100%;transition:border-color .3s}.l-md-input__inner:focus{border-color:var(--l-primary-color,#722ed1)}:host(.l-has-value) .l-md-input__label,.l-md-input__inner:focus+.l-md-input__label{font-size:12px;transform:translateY(-150%)}.l-md-input__inner:focus+.l-md-input__label{color:var(--nt-primary-color,#722ed1)}.l-md-input__label{color:#8c8c8c;cursor:text;align-items:center;font-size:13px;line-height:1;transition:color .3s,transform .3s;display:flex;position:absolute;top:50%;bottom:0;left:0;transform:translateY(-50%)}:host(.l-md-input-outline){--l-input-label-background:#fff}:host(.l-md-input-outline) .l-md-input__inner{border-width:1px;border-radius:4px;padding:0 10px}:host(.l-md-input-outline) .l-md-input__label{left:10px}:host(.l-md-input-outline) .l-md-input__inner:focus{border-width:2px}:host(.l-md-input-outline) .l-md-input__inner:focus+.l-md-input__label,:host(.l-md-input-outline.l-has-value) .l-md-input__label{background-color:#fff;padding-left:4px;padding-right:4px}";
4
3
  export { e as default };
package/lib/menu/index.js CHANGED
@@ -2,7 +2,7 @@ import e from "../base.js";
2
2
  import { kebabToCamel as t, parseAttrValue as n, unitNumberStr as r } from "../utils/index.js";
3
3
  import i from "./index.less_inline.js";
4
4
  import { $ as a, $$ as o, $one as s, iterate as c, off as l, on as u } from "utilane/browser";
5
- //#region src/components/menu/index.ts
5
+ // src/components/menu/index.ts
6
6
  var d = 350, f = class extends e {
7
7
  static baseName = "menu";
8
8
  _items;
@@ -187,11 +187,7 @@ var d = 350, f = class extends e {
187
187
  let r = n.getAttribute("index") || "", i = this.#n.get(r);
188
188
  i && (clearTimeout(i), this.#n.delete(r));
189
189
  let a = this.#t.get(r);
190
- if (a && a.expand !== n.hasAttribute("expanded")) {
191
- this.#t.delete(r);
192
- return;
193
- }
194
- this.#t.delete(r), t.style.removeProperty("height"), n.hasAttribute("expanded") || t.classList.add("l-menu--collapsed");
190
+ a && a.expand !== n.hasAttribute("expanded") ? this.#t.delete(r) : (this.#t.delete(r), t.style.removeProperty("height"), n.hasAttribute("expanded") || t.classList.add("l-menu--collapsed"));
195
191
  };
196
192
  set items(e) {
197
193
  this._items = e, this._menuEl && this._menuEl.replaceChildren(this._renderItems());
@@ -271,5 +267,4 @@ var d = 350, f = class extends e {
271
267
  return n(e, []);
272
268
  }
273
269
  };
274
- //#endregion
275
270
  export { f as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/menu/index.less?inline
1
+ // src/components/menu/index.less?inline
2
2
  var e = ":host{--l-menu-width:240px;--l-menu-height:auto;--l-menu-level:0;--l-menu-item-height:40px;--l-menu-item-padding-x:10px;--l-menu-item-indent:15px;--l-menu-item-radius:0;--l-menu-item-hover-background:var(--l-primary-color-light5,#f9f0ff);--l-menu-item-active-color:var(--l-primary-color,#722ed1);--l-menu-item-active-background:var(--l-primary-color-light5,#f9f0ff);--l-menu-border-color:transparent;--l-menu-border-width:0px;--l-menu-arrow-color:var(--l-text-color,#8c8c8c);--l-menu-collapsed-width:40px;--l-menu-icon-size:1.8rem;--l-menu-collapsed-icon-size:1.8rem;width:var(--l-menu-width);height:var(--l-menu-height);box-sizing:border-box;transition:width .3s;display:block}.l-menu{min-width:0;color:inherit;box-sizing:border-box;border-right:var(--l-menu-border-width) solid var(--l-menu-border-color);font-size:14px;transition:height .3s,width .3s;display:block;position:relative;overflow:hidden}.l-menu .l-menu{--l-menu-border-color:transparent}.l-menu-item,.l-submenu-title{padding:0 var(--l-menu-item-padding-x) 0 calc(var(--l-menu-item-padding-x) + var(--l-menu-level) * var(--l-menu-item-indent));height:var(--l-menu-item-height);cursor:pointer;box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;border-radius:var(--l-menu-item-radius);border-right:2px solid #0000;align-items:center;gap:6px;transition:color .3s,background-color .3s,border-color .3s,transform .2s;display:flex;position:relative;overflow:hidden}.l-menu-item:hover,.l-submenu-title:hover{background-color:var(--l-menu-item-hover-background)}.l-menu-item.active{background-color:var(--l-menu-item-active-background);color:var(--l-menu-item-active-color);box-shadow:inset 3px 0 var(--l-primary-color-light1,#39f);font-weight:500}.l-menu-icon-wrap{font-size:var(--l-menu-icon-size);flex:none;align-items:center;line-height:1;display:inline-flex}.l-menu-submenu{width:100%;display:block;overflow:hidden}.l-submenu-arrow-icon{color:var(--l-menu-arrow-color);transition:transform .3s;position:absolute;top:50%;right:10px;transform:translateY(-50%)rotate(90deg)}.l-menu-submenu.collapsed .l-submenu-arrow-icon{transform:translateY(-50%)rotate(0)}.l-menu--collapsed{display:none}.l-menu--hide{visibility:hidden;pointer-events:none;position:absolute}.l-menu-submenu.active .l-submenu-title{color:var(--l-menu-item-active-color)}:host(.menu--collapsed){width:var(--l-menu-collapsed-width)}:host(.menu--collapsed) .l-submenu-arrow-icon,:host(.menu--collapsed) .l-menu-item--label{display:none}:host(.menu--collapsed) .l-menu-icon-wrap{font-size:var(--l-menu-collapsed-icon-size,var(--l-menu-icon-size,1.8rem))}@media (prefers-reduced-motion:reduce){.l-menu,.l-menu-item,.l-submenu-title,.l-submenu-arrow-icon{transition:none}}";
3
- //#endregion
4
3
  export { e as default };
@@ -4,7 +4,7 @@ import r from "../icon/success.js";
4
4
  import i from "../icon/warn.js";
5
5
  import a from "../icon/info.js";
6
6
  import { transition as o } from "utilane/browser";
7
- //#region src/components/message/index.ts
7
+ // src/components/message/index.ts
8
8
  var s = [], c = [[
9
9
  "opacity",
10
10
  "0",
@@ -69,5 +69,4 @@ var m = {
69
69
  show: (e) => p(e),
70
70
  close: u
71
71
  };
72
- //#endregion
73
72
  export { m as default };
@@ -1,9 +1,9 @@
1
1
  import e from "../base.js";
2
- import { kebabToCamel as t, parseAttrValue as n, unitNumberStr as r } from "../utils/index.js";
3
- import i from "./index.less_inline.js";
4
- import a from "../styles/mask/index.js";
2
+ import t from "./index.less_inline.js";
3
+ import n from "../styles/mask/index.js";
4
+ import { kebabToCamel as r, parseAttrValue as i, unitNumberStr as a } from "../utils/index.js";
5
5
  import { $$ as o, $one as s, off as c, on as l, shouldEventNext as u, transition as d } from "utilane/browser";
6
- //#region src/components/modal/index.ts
6
+ // src/components/modal/index.ts
7
7
  var f = class extends e {
8
8
  static baseName = "modal";
9
9
  _bodyOverflow = "";
@@ -44,7 +44,7 @@ var f = class extends e {
44
44
  "header-title"
45
45
  ];
46
46
  }
47
- attributeChanged(e, i, a) {
47
+ attributeChanged(e, t, n) {
48
48
  switch (e) {
49
49
  case "show":
50
50
  case "confirm-loading":
@@ -55,27 +55,27 @@ var f = class extends e {
55
55
  case "mobile":
56
56
  case "header":
57
57
  case "footer":
58
- this._state[t(e)] = n(a, !1, e);
58
+ this._state[r(e)] = i(n, !1, e);
59
59
  break;
60
60
  case "cancel-text":
61
- this._state.cancelText = n(a, "取消");
61
+ this._state.cancelText = i(n, "取消");
62
62
  break;
63
63
  case "ok-text":
64
- this._state.okText = n(a, "确定");
64
+ this._state.okText = i(n, "确定");
65
65
  break;
66
66
  case "close":
67
- this._state.close = n(a, 1);
67
+ this._state.close = i(n, 1);
68
68
  break;
69
69
  case "width":
70
- this._state[e] = r(a);
70
+ this._state[e] = a(n);
71
71
  break;
72
72
  case "vertical-align":
73
- this._state.verticalAlign = n(a, "top");
73
+ this._state.verticalAlign = i(n, "top");
74
74
  break;
75
75
  case "z-index":
76
- this._state.zIndex = a;
76
+ this._state.zIndex = n;
77
77
  break;
78
- case "header-title": this._state.headerTitle = a;
78
+ case "header-title": this._state.headerTitle = n;
79
79
  }
80
80
  }
81
81
  updateDOM(e) {
@@ -90,8 +90,8 @@ var f = class extends e {
90
90
  }
91
91
  render_v2() {
92
92
  return {
93
- style: [i],
94
- styleSheets: [a]
93
+ style: [t],
94
+ styleSheets: [n]
95
95
  };
96
96
  }
97
97
  _setZIndex() {
@@ -195,5 +195,4 @@ var f = class extends e {
195
195
  }
196
196
  };
197
197
  };
198
- //#endregion
199
198
  export { f as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/modal/index.less?inline
1
+ // src/components/modal/index.less?inline
2
2
  var e = ":host{display:none}:host(.open){display:block}.l-modal-mask{z-index:var(--l-modal-zindex,100)}.l-modal-wrapper{width:100%;height:100%;z-index:calc(var(--l-modal-zindex,100) + 1);position:fixed;top:0;left:0}.l-modal{--l-modal-translate:translate3d(0, 80px, 0);border-radius:var(--l-modal-border-radius,5px);width:var(--l-modal-width,27%);opacity:1;transform:var(--l-modal-translate) scale3d(1, 1, 1);background-color:#fff;margin:auto;transition:opacity .3s,transform .3s;position:relative;box-shadow:0 0 8px #0000001a}.l-modal-header{padding:var(--l-modal-header-padding,10px);border-bottom:1px solid var(--l-modal-line-color,#0000000f);align-items:center;gap:5px;font-size:16px;font-weight:600;display:flex}.l-modal-footer{padding:var(--l-modal-footer-padding,10px);border-top:1px solid var(--l-modal-line-color,#0000000f);justify-content:flex-end;gap:10px;display:flex}.l-modal-container{padding:var(--l-modal-container-padding,15px 10px);font-size:14px}.l-btn-modal-close{--l-form-control-height:auto;position:absolute}.l-modal-close1{top:8px;right:5px}.l-modal-close1::part(default){border:none;width:auto;height:auto;padding:5px;font-size:16px}.l-modal-close2{top:-10px;right:-10px}.l-modal-close2::part(default){background-color:#fff;width:20px;height:20px;padding:0}.mask-transition-enter-from,.mask-transition-leave-to{opacity:0}.modal-transition-enter-from,.modal-transition-leave-to{transform:translate(0,0)scale3d(0,0,0)}.l-modal--mobile{border-radius:10px}.l-modal--mobile .l-modal-header{text-align:center;border-bottom-color:#0000;justify-content:center;padding:20px 10px 5px;display:flex}.l-modal--mobile .l-modal-container{--l-modal-container-padding:5px 15px 20px;text-align:center}.l-modal--mobile .l-modal-footer{text-align:center;justify-content:stretch;align-items:stretch;gap:0;height:50px;padding:0;display:flex}.l-modal--mobile .l-modal-footer-btn{flex-grow:1;height:100%}.l-modal--mobile .l-modal-footer-btn+.l-modal-footer-btn{border-left:1px solid var(--l-modal-line-color,#0000000f)}.l-modal--middle{--l-modal-translate:translate3d(0, -50%, 0);top:50%}.l-modal--bottom{--l-modal-translate:translate3d(0, -100%, 0);border-bottom-right-radius:0;border-bottom-left-radius:0;width:100%;top:100%}@media screen and (width<=768px){:host{--l-modal-width:80%}}";
3
- //#endregion
4
3
  export { e as default };
@@ -1,12 +1,12 @@
1
- import { regist as e } from "../utils/index.js";
2
- import t from "../icon/info.js";
3
- import n from "../button/index.js";
4
- import r from "../icon/close.js";
5
- import i from "../form/form_item.js";
6
- import a from "../input/index.js";
7
- import o from "./index.js";
1
+ import e from "./index.js";
2
+ import t from "../button/index.js";
3
+ import n from "../icon/close.js";
4
+ import r from "../icon/info.js";
5
+ import { regist as i } from "../utils/index.js";
6
+ import a from "../form/form_item.js";
7
+ import o from "../input/index.js";
8
8
  import { $$ as s, $one as c, on as l } from "utilane/browser";
9
- //#region src/components/modal/modal_box.ts
9
+ // src/components/modal/modal_box.ts
10
10
  function u(e, t, n, r = "alert") {
11
11
  return new Promise((i) => {
12
12
  let a = [];
@@ -33,27 +33,27 @@ function u(e, t, n, r = "alert") {
33
33
  }, { once: !0 }), document.body.appendChild(o);
34
34
  });
35
35
  }
36
- function d(t, i, a) {
37
- e([
38
- r,
36
+ function d(r, a, o) {
37
+ i([
39
38
  n,
40
- o
39
+ t,
40
+ e
41
41
  ]);
42
42
  let s = {
43
43
  showCancel: !1,
44
44
  close: 0,
45
45
  maskClosable: !1,
46
46
  icon: void 0,
47
- ...a
47
+ ...o
48
48
  };
49
- return u(i || "提示", t, s, "alert").then((e) => e === !0);
49
+ return u(a || "提示", r, s, "alert").then((e) => e === !0);
50
50
  }
51
- function f(i, a, c) {
52
- e([
51
+ function f(a, o, c) {
52
+ i([
53
+ n,
53
54
  r,
54
55
  t,
55
- n,
56
- o
56
+ e
57
57
  ]);
58
58
  let l = {
59
59
  showCancel: !0,
@@ -62,16 +62,16 @@ function f(i, a, c) {
62
62
  icon: () => s("l-info-icon", { style: "color:#1890ff;" }),
63
63
  ...c
64
64
  };
65
- return u(a || "提示", i, l, "confirm");
65
+ return u(o || "提示", a, l, "confirm");
66
66
  }
67
67
  function p(s, c, l) {
68
- e([
68
+ i([
69
+ n,
69
70
  r,
70
- t,
71
- i,
72
71
  a,
73
- n,
74
- o
72
+ o,
73
+ t,
74
+ e
75
75
  ]);
76
76
  let d = {
77
77
  showCancel: !0,
@@ -87,5 +87,4 @@ var m = {
87
87
  confirm: f,
88
88
  prompt: p
89
89
  };
90
- //#endregion
91
90
  export { m as default };
@@ -1,9 +1,9 @@
1
1
  import e from "../base.js";
2
2
  import { kebabToCamel as t, parseAttrValue as n, unitNumberStr as r } from "../utils/index.js";
3
- import { DEFAULT_ZINDEX as i, getGroupSize as a, getOldestNotification as o, layoutGroup as s, normalizePlacement as c, registerNotification as l, unregisterNotification as u } from "./placement.js";
4
- import d from "./style.js";
3
+ import i from "./style.js";
4
+ import { DEFAULT_ZINDEX as a, getGroupSize as o, getOldestNotification as s, layoutGroup as c, normalizePlacement as l, registerNotification as u, unregisterNotification as d } from "./placement.js";
5
5
  import { $$ as f, $one as p, off as m, on as h } from "utilane/browser";
6
- //#region src/components/notification/index.ts
6
+ // src/components/notification/index.ts
7
7
  var g = {
8
8
  info: "info",
9
9
  success: "success",
@@ -40,7 +40,7 @@ var g = {
40
40
  showIcon: !0,
41
41
  width: "",
42
42
  offset: 16,
43
- zIndex: i,
43
+ zIndex: a,
44
44
  maxCount: 0,
45
45
  action: "",
46
46
  customClass: ""
@@ -98,7 +98,7 @@ var g = {
98
98
  this._state.customClass = a || "";
99
99
  break;
100
100
  case "placement":
101
- this._state.placement = c(a);
101
+ this._state.placement = l(a);
102
102
  break;
103
103
  case "width":
104
104
  this._state.width = r(a) || "";
@@ -118,11 +118,11 @@ var g = {
118
118
  (e.has("type") || e.has("show-icon")) && this._syncIcon(), (e.has("title") || e.has("message")) && this._syncSections(), e.has("action") && this._syncActions(), e.has("closable") && this._syncClose(), e.has("width") && this._syncWidth(), e.has("custom-class") && this._syncCustomClass(), (e.has("offset") || e.has("z-index")) && this._syncOffset(), e.has("placement") && this._updatePlacement(), e.has("duration") && this._visible && this._startTimer(), e.has("open") && this._toggleOpen();
119
119
  }
120
120
  disconnectedCallback() {
121
- super.disconnectedCallback(), u(this), this._cancelPendingAnimation(), this._unobserveSize(), this._clearTimer(), this._visible = !1;
121
+ super.disconnectedCallback(), d(this), this._cancelPendingAnimation(), this._unobserveSize(), this._clearTimer(), this._visible = !1;
122
122
  }
123
123
  render_v2() {
124
124
  return this._changedProperties.clear(), {
125
- styleSheets: [d],
125
+ styleSheets: [i],
126
126
  template: this.render()
127
127
  };
128
128
  }
@@ -142,20 +142,7 @@ var g = {
142
142
  part: "icon"
143
143
  }));
144
144
  let t = f("div", { class: "l-notification-content" });
145
- return t.innerHTML = [
146
- "<div class=\"l-notification-title\" part=\"title\">",
147
- "<span class=\"l-notification-title-text\"></span>",
148
- "<slot name=\"title\"></slot>",
149
- "</div>",
150
- "<div class=\"l-notification-message\" part=\"message\">",
151
- "<span class=\"l-notification-message-text\"></span>",
152
- "<slot></slot>",
153
- "</div>",
154
- "<div class=\"l-notification-actions\" part=\"actions\">",
155
- "<button type=\"button\" class=\"l-notification-action\" part=\"action\"></button>",
156
- "<slot name=\"action\"></slot>",
157
- "</div>"
158
- ].join(""), e.appendChild(t), e.appendChild(f("button", {
145
+ return t.innerHTML = "<div class=\"l-notification-title\" part=\"title\"><span class=\"l-notification-title-text\"></span><slot name=\"title\"></slot></div><div class=\"l-notification-message\" part=\"message\"><span class=\"l-notification-message-text\"></span><slot></slot></div><div class=\"l-notification-actions\" part=\"actions\"><button type=\"button\" class=\"l-notification-action\" part=\"action\"></button><slot name=\"action\"></slot></div>", e.appendChild(t), e.appendChild(f("button", {
159
146
  class: "l-notification-close",
160
147
  part: "close",
161
148
  type: "button",
@@ -216,7 +203,7 @@ var g = {
216
203
  this._state.width ? this.style.setProperty("--l-notification-width", this._state.width) : this.style.removeProperty("--l-notification-width");
217
204
  }
218
205
  _syncOffset() {
219
- this.style.setProperty("--l-notification-offset", `${this._state.offset}px`), this.style.setProperty("--l-notification-zindex", `${this._state.zIndex}`), this._visible && s(this._state.placement);
206
+ this.style.setProperty("--l-notification-offset", `${this._state.offset}px`), this.style.setProperty("--l-notification-zindex", `${this._state.zIndex}`), this._visible && c(this._state.placement);
220
207
  }
221
208
  _syncCustomClass() {
222
209
  for (let e of this._appliedClasses) this.classList.remove(e);
@@ -227,16 +214,16 @@ var g = {
227
214
  return e ? e.assignedNodes().some((e) => e.nodeType !== 3 || (e.textContent || "").trim() !== "") : !1;
228
215
  }
229
216
  _updatePlacement() {
230
- this._visible && l(this, this._state.placement);
217
+ this._visible && u(this, this._state.placement);
231
218
  }
232
219
  _toggleOpen() {
233
220
  this.rendered && (this._state.open ? this._show() : this._hide());
234
221
  }
235
222
  _show() {
236
- this._visible || (this._visible = !0, this.removeAttribute("hidden"), l(this, this._state.placement), this._observeSize(), this._enter(), this._startTimer(), this._enforceMaxCount());
223
+ this._visible || (this._visible = !0, this.removeAttribute("hidden"), u(this, this._state.placement), this._observeSize(), this._enter(), this._startTimer(), this._enforceMaxCount());
237
224
  }
238
225
  _hide() {
239
- this._visible && (this._visible = !1, this._clearTimer(), this._unobserveSize(), u(this), this.emit("close", { detail: { id: this.id } }), this._leave(() => {
226
+ this._visible && (this._visible = !1, this._clearTimer(), this._unobserveSize(), d(this), this.emit("close", { detail: { id: this.id } }), this._leave(() => {
240
227
  this.removeOnClose ? this.remove() : this.setAttribute("hidden", "");
241
228
  }));
242
229
  }
@@ -244,8 +231,8 @@ var g = {
244
231
  let e = this._state.maxCount;
245
232
  if (e <= 0) return;
246
233
  let t = this._state.placement;
247
- for (; a(t) > e;) {
248
- let e = o(t);
234
+ for (; o(t) > e;) {
235
+ let e = s(t);
249
236
  if (!e || e === this) break;
250
237
  e.close();
251
238
  }
@@ -282,7 +269,7 @@ var g = {
282
269
  }
283
270
  _observeSize() {
284
271
  this._resizeObserver || typeof ResizeObserver > "u" || (this._resizeObserver = new ResizeObserver(() => {
285
- this._visible && s(this._state.placement);
272
+ this._visible && c(this._state.placement);
286
273
  }), this._resizeObserver.observe(this));
287
274
  }
288
275
  _unobserveSize() {
@@ -322,5 +309,4 @@ var g = {
322
309
  this._syncSections(), this._syncActions();
323
310
  };
324
311
  };
325
- //#endregion
326
312
  export { _ as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/notification/index.less?inline
1
+ // src/components/notification/index.less?inline
2
2
  var e = ":host{--l-notification-width:330px;--l-notification-gap:16px;--l-notification-offset:16px;--l-notification-zindex:2000;--l-notification-padding:16px;--l-notification-radius:8px;--l-notification-background:#fff;--l-notification-shadow:0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;--l-notification-title-color:#000000e0;--l-notification-message-color:#000000a6;--l-notification-icon-size:22px;--l-notification-anim-duration:.3s;--l-notification-enter-offset:-20px;--l-notification-color:var(--l-primary-color,#007bff);--l-notification-action-hover-background:#0000000a;--l-notification-close-hover-background:#0000000f;z-index:var(--l-notification-zindex,2000);width:var(--l-notification-width);box-sizing:border-box;max-width:calc(100vw - 32px);color:var(--l-notification-title-color);transition:top var(--l-notification-anim-duration) ease, bottom var(--l-notification-anim-duration) ease;font-size:14px;line-height:1.5715;position:fixed}:host([placement=topLeft]),:host([placement=bottomLeft]){left:var(--l-notification-offset,16px);right:auto}:host([placement=topRight]),:host([placement=bottomRight]){right:var(--l-notification-offset,16px);left:auto}:host([placement=bottomLeft]),:host([placement=bottomRight]){--l-notification-enter-offset:20px}:host([hidden]){display:none}:host([type=info]){--l-notification-color:var(--l-primary-color,#007bff)}:host([type=success]){--l-notification-color:var(--l-success-color,#52c41a)}:host([type=error]){--l-notification-color:var(--l-error-color,#f5222d)}:host([type=warning]){--l-notification-color:var(--l-warning-color,#faad14)}:host(.l-notification-enter),:host(.l-notification-leave){opacity:0;transform:translateY(var(--l-notification-enter-offset)) scale(.95)}:host(.l-notification-enter-active),:host(.l-notification-leave-active){transition:top var(--l-notification-anim-duration) ease, bottom var(--l-notification-anim-duration) ease, opacity var(--l-notification-anim-duration) ease, transform var(--l-notification-anim-duration) ease}.l-notification{padding:var(--l-notification-padding);background:var(--l-notification-background);border-radius:var(--l-notification-radius);box-shadow:var(--l-notification-shadow);border-left:4px solid var(--l-notification-color);box-sizing:border-box;align-items:flex-start;gap:10px;display:flex;position:relative}.l-notification-icon{height:calc(var(--l-notification-icon-size) * 1.4);font-size:var(--l-notification-icon-size);color:var(--l-notification-color);flex:none;justify-content:center;align-items:center;display:inline-flex}.l-notification-content{flex:1;min-width:0}.l-notification-title{color:var(--l-notification-title-color);word-break:break-word;margin-bottom:4px;font-size:16px;font-weight:500}.l-notification-message{color:var(--l-notification-message-color);word-break:break-word}.l-notification-message-text{display:block}.l-notification-actions{align-items:center;gap:8px;margin-top:12px;display:flex}.l-notification-action{border:1px solid var(--l-notification-color);border-radius:var(--l-border-radius,3px);height:28px;color:var(--l-notification-color);cursor:pointer;background:0 0;justify-content:center;align-items:center;padding:0 12px;font-size:14px;line-height:1;transition:opacity .3s,background-color .3s;display:inline-flex}.l-notification-action:hover{opacity:.8;background:var(--l-notification-action-hover-background)}.l-notification-close{width:22px;height:22px;color:var(--l-notification-message-color);cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;justify-content:center;align-items:center;margin-left:auto;padding:0;font-size:14px;transition:color .3s,background-color .3s;display:inline-flex}.l-notification-close:hover{color:var(--l-notification-title-color);background:var(--l-notification-close-hover-background)}.l-notification-title[hidden],.l-notification-message[hidden],.l-notification-actions[hidden],.l-notification-icon[hidden],.l-notification-close[hidden],.l-notification-title-text[hidden],.l-notification-message-text[hidden]{display:none}";
3
- //#endregion
4
3
  export { e as default };
@@ -1,7 +1,7 @@
1
1
  import { useId as e } from "../utils/index.js";
2
2
  import { normalizePlacement as t } from "./placement.js";
3
3
  import { on as n } from "utilane/browser";
4
- //#region src/components/notification/notification_box.ts
4
+ // src/components/notification/notification_box.ts
5
5
  var r = "l-notification", i = 4500, a = {};
6
6
  function o(e) {
7
7
  a = {
@@ -27,7 +27,7 @@ function l(e) {
27
27
  let n = e ? [t(e)] : void 0, i = document.querySelectorAll(r);
28
28
  for (let e of Array.from(i)) {
29
29
  let t = e;
30
- typeof t.close == "function" && (n && !n.includes(t.placement) || t.close());
30
+ typeof t.close == "function" && (!n || n.includes(t.placement)) && t.close();
31
31
  }
32
32
  }
33
33
  function u(e) {
@@ -53,5 +53,4 @@ var m = {
53
53
  closeAll: l,
54
54
  config: o
55
55
  };
56
- //#endregion
57
56
  export { m as default };
@@ -1,4 +1,4 @@
1
- //#region src/components/notification/placement.ts
1
+ // src/components/notification/placement.ts
2
2
  var e = [
3
3
  "topLeft",
4
4
  "topRight",
@@ -44,5 +44,4 @@ function m(e) {
44
44
  let n = o(e), r = n ? "top" : "bottom", i = n ? "bottom" : "top", s = 0;
45
45
  for (let e of n ? t : [...t].reverse()) e.style.setProperty(r, `${e.notificationOffset + s}px`), e.style.removeProperty(i), s += e.offsetHeight + e.notificationGap;
46
46
  }
47
- //#endregion
48
47
  export { i as DEFAULT_GAP, n as DEFAULT_OFFSET, t as DEFAULT_PLACEMENT, r as DEFAULT_ZINDEX, e as PLACEMENTS, l as findPlacement, u as getGroupSize, d as getOldestNotification, s as isLeftPlacement, o as isTopPlacement, m as layoutGroup, c as normalizePlacement, f as registerNotification, p as unregisterNotification };
@@ -1,8 +1,7 @@
1
1
  import e from "./index.less_inline.js";
2
- //#region src/components/notification/style.ts
2
+ // src/components/notification/style.ts
3
3
  var t = /* @__PURE__ */ (() => {
4
4
  let t = new CSSStyleSheet();
5
5
  return t.replaceSync(e), t;
6
6
  })();
7
- //#endregion
8
7
  export { t 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, off as a, on as o, shouldEventNext as s } from "utilane/browser";
5
5
  import { isBlank as c } from "utilane";
6
- //#region src/components/page_header/index.ts
6
+ // src/components/page_header/index.ts
7
7
  var l = class extends e {
8
8
  static baseName = "page-header";
9
9
  showLeft = !0;
@@ -96,5 +96,4 @@ var l = class extends e {
96
96
  a(this.root, "click", this.#e);
97
97
  }
98
98
  };
99
- //#endregion
100
99
  export { l as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/page_header/index.less?inline
1
+ // src/components/page_header/index.less?inline
2
2
  var e = ":host{box-sizing:border-box;height:var(--l-page-header-height,auto);align-items:center;display:flex;position:relative}.l-page-header-left,.l-page-header-right{z-index:1;flex:none;align-items:center;display:flex}.l-page-header-back{height:auto}.l-page-header-back::part(default){--l-btn-padding:5px 0}.l-page-header-content{align-items:center;line-height:1;display:flex}.l-page-header-title{font-size:16px;font-weight:600}.l-page-header-sub-title{color:#999;margin-left:10px;font-size:14px;font-weight:500}:host(.l-page-header-align-left) .l-page-header-left{margin-right:15px}:host(.l-page-header-align-left) .l-page-header-content{flex:1 0 auto}:host(.l-page-header-align-left) .l-page-header-right{margin-left:15px}:host(.l-page-header-align-center){justify-content:space-between}:host(.l-page-header-align-center) .l-page-header-content{justify-content:center;position:absolute;inset:0}:host(.l-page-header-align-center) .l-page-header-back::part(default){--l-btn-padding:8px 0;--l-btn-gap:0}:host(.l-page-header-border){border-bottom:1px solid var(--l-border-color,#dedede)}";
3
- //#endregion
4
3
  export { e as default };
@@ -2,7 +2,7 @@ import e from "../base.js";
2
2
  import { kebabToCamel as t, parseAttrValue as n, tagAttr as r } from "../utils/index.js";
3
3
  import i from "./index.less_inline.js";
4
4
  import { $one as a, clsx as o, off as s, on as c, shouldEventNext as l } from "utilane/browser";
5
- //#region src/components/pagination/index.ts
5
+ // src/components/pagination/index.ts
6
6
  var u = class extends e {
7
7
  static baseName = "pagination";
8
8
  constructor() {
@@ -182,11 +182,7 @@ var u = class extends e {
182
182
  }
183
183
  #a = (e) => {
184
184
  let t = e.target, n = t.value;
185
- if (!n) {
186
- t.value = `${this._state.currentPage}`;
187
- return;
188
- }
189
- this._state.currentPage = Number(n), this.rerender();
185
+ n ? (this._state.currentPage = Number(n), this.rerender()) : t.value = `${this._state.currentPage}`;
190
186
  };
191
187
  #o = (e) => {
192
188
  if (e.key === "Enter") {
@@ -216,5 +212,4 @@ var u = class extends e {
216
212
  return `<${e}${n.join("")}>${i}</${e}>`;
217
213
  }
218
214
  };
219
- //#endregion
220
215
  export { u as default };
@@ -1,4 +1,3 @@
1
- //#region src/components/pagination/index.less?inline
1
+ // src/components/pagination/index.less?inline
2
2
  var e = ":host{white-space:nowrap;color:#333;font-size:14px;line-height:1}.l-pagination{align-items:center;justify-content:var(--l-pagination-justify-content,flex-start);display:flex}.l-pagination-item{box-sizing:border-box;width:30px;height:30px}.l-pagination-item+.l-pagination-item{margin-left:5px}.l-pagination--btn{--l-btn-padding:0}.l-pagination--link{font:inherit;color:#666;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:3px;justify-content:center;align-items:center;padding:0;text-decoration:none;transition:color .3s,border-color .3s;display:inline-flex}.l-pagination--link.active{color:var(--l-primary-color,#722ed1);border-color:var(--l-primary-color,#722ed1)}.darrow-icon{display:none}.more-icon{display:inline-block}.l-pagination--link:hover{color:var(--l-primary-color-light1,#9254de)}.l-pagination--link:hover .darrow-icon{display:inline-block}.l-pagination--link:hover .more-icon{display:none}.l-pagination--link:active{color:var(--l-primary-color-light1,#9254de)}.l-pagination-simple-layout{align-items:center;width:auto;display:inline-flex}.l-pagination-simple-input{--l-form-control-height:30px;box-sizing:border-box;text-align:center;width:60px}.l-pagination-simple-divide{margin:0 5px}.l-pagination-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}";
3
- //#endregion
4
3
  export { e as default };