litos-ui 0.12.1 → 0.13.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.
package/lib/base.d.ts CHANGED
@@ -2,12 +2,13 @@ export default class BaseComponent extends HTMLElement {
2
2
  static baseName: string;
3
3
  /** 组件是否渲染完成, 是否已经调用 connectedCallback */
4
4
  rendered: boolean;
5
- constructor(shadow?: boolean);
5
+ constructor(shadow?: boolean, init?: Partial<ShadowRootInit>);
6
6
  /**
7
7
  * 返回一个数组,表示观察的属性列表
8
8
  */
9
9
  static get observedAttributes(): string[] | undefined | null;
10
10
  attributeChangedCallback(_name: string, _oldValue: string, _newValue: string): void;
11
+ /** @deprecated */
11
12
  get shadow(): ShadowRoot;
12
13
  get root(): ShadowRoot | HTMLElement;
13
14
  createStyle(text: string): void;
@@ -44,4 +45,11 @@ export default class BaseComponent extends HTMLElement {
44
45
  */
45
46
  removeEvents(): void;
46
47
  beforeDestroy(): void;
48
+ /**
49
+ * 触发自定义事件
50
+ * @param name 事件名称
51
+ * @param eventOption 自定义事件配置选项, 默认: bubbles: true
52
+ * @returns 是否成功触发事件
53
+ */
54
+ emit(name: string, eventOption: Partial<CustomEventInit>): boolean;
47
55
  }
package/lib/base.js CHANGED
@@ -3,8 +3,8 @@ class i extends HTMLElement {
3
3
  static baseName = "base-component";
4
4
  /** 组件是否渲染完成, 是否已经调用 connectedCallback */
5
5
  rendered = !1;
6
- constructor(t = !0) {
7
- super(), t && this.attachShadow({ mode: "open" });
6
+ constructor(t = !0, e = {}) {
7
+ super(), t && this.attachShadow({ mode: "open", ...e });
8
8
  }
9
9
  /**
10
10
  * 返回一个数组,表示观察的属性列表
@@ -13,8 +13,9 @@ class i extends HTMLElement {
13
13
  return [];
14
14
  }
15
15
  // 当属性发生变化时调用的回调函数
16
- attributeChangedCallback(t, e, n) {
16
+ attributeChangedCallback(t, e, o) {
17
17
  }
18
+ /** @deprecated */
18
19
  get shadow() {
19
20
  return this.shadowRoot;
20
21
  }
@@ -68,6 +69,17 @@ class i extends HTMLElement {
68
69
  }
69
70
  beforeDestroy() {
70
71
  }
72
+ /**
73
+ * 触发自定义事件
74
+ * @param name 事件名称
75
+ * @param eventOption 自定义事件配置选项, 默认: bubbles: true
76
+ * @returns 是否成功触发事件
77
+ */
78
+ emit(t, e) {
79
+ return this.dispatchEvent(
80
+ new CustomEvent(t, { bubbles: !0, composed: !1, ...e })
81
+ );
82
+ }
71
83
  }
72
84
  export {
73
85
  i as default
@@ -1,7 +1,7 @@
1
1
  import { $one as i, on as s, off as a } from "ph-utils/dom";
2
2
  import c from "../form/form_inner.js";
3
3
  import { initAttr as r, setAttrs as n } from "../utils/index.js";
4
- import { i as l } from "../index-391POYEJ.js";
4
+ import { i as l } from "../index-dwS1N2uN.js";
5
5
  const o = ":host{--l-input-width: 60px}";
6
6
  class m extends c {
7
7
  static baseName = "color-picker";
@@ -15,7 +15,7 @@ class A extends n {
15
15
  * @param firstPushValue 是否第一次赋值 value 时, 推送数据到 Form, 默认: true
16
16
  */
17
17
  constructor(t = !0) {
18
- super(), this._firstPushValue = t;
18
+ super(!0, { delegatesFocus: !0 }), this._firstPushValue = t;
19
19
  }
20
20
  set value(t) {
21
21
  this.setValue(t);
@@ -1,6 +1,6 @@
1
1
  import e from "./base.js";
2
2
  class t extends e {
3
- static baseName = "mask-close-icon";
3
+ static baseName = "close-filled-icon";
4
4
  constructor() {
5
5
  super(), this.viewBox = "0 0 24 24";
6
6
  }
@@ -0,0 +1,4 @@
1
+ const r = ":host{--l-input-border-color: var(--l-border-color, #dedede);display:inline-flex;width:var(--l-input-width, 170px);height:var(--l-form-edit-height, 32px);align-items:center;padding:0 7px;border:1px solid var(--l-input-border-color, #dedede);transition:border-color .3s;border-radius:4px;vertical-align:middle}:host(:focus){--l-input-border-color: var(--l-primary-color, #722ed1)}:host(.is-disabled){background-color:var(--l-disabled-color, #f5f7fa)}:host(.is-error){--l-input-border-color: #ed3f13}.l-input__prefix,.l-input__suffix{color:#a8abb2;font-size:14px;display:inline-flex;flex-shrink:0}.l-input__prefix{margin-right:5px}.l-input__suffix{margin-left:5px}.l-clearable{cursor:pointer}.l-clearable:hover{color:#999}.l-input__inner{outline:none;border:none;box-sizing:border-box;width:100%;max-width:100%;height:100%;flex-grow:1;text-align:inherit}.l-input__inner:disabled{background-color:transparent}";
2
+ export {
3
+ r as i
4
+ };
package/lib/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export { default as CloseIcon } from "./icon/close";
29
29
  export { default as InfoIcon } from "./icon/info";
30
30
  export { default as SuccessIcon } from "./icon/success";
31
31
  export { default as WarnIcon } from "./icon/warn";
32
+ export { default as CloseFilledIcon } from "./icon/close_filled";
32
33
  export { default as Form } from "./form";
33
34
  export { default as FormItem } from "./form/form_item";
34
35
  export { default as Radio } from "./radio";
@@ -79,6 +80,7 @@ declare global {
79
80
  "l-info-icon": import("./icon/info").default
80
81
  "l-success-icon": import("./icon/success").default
81
82
  "l-warn-icon": import("./icon/warn").default
83
+ "l-close-filled-icon": import("./icon/close_filled").default
82
84
  "l-form": import("./form").default
83
85
  "l-form-item": import("./form/form_item").default
84
86
  "l-radio": import("./radio").default
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { createTransition as t, getPopoverOffsetX as r, getPopoverOffsetY as a, impactDetect as f, initAttr as s, parseAttrValue as m, regist as u, setAttrs as p, tagAttr as l, tagAttrs as d, useId as x } from "./utils/index.js";
1
+ import { createTransition as t, getPopoverOffsetX as r, getPopoverOffsetY as a, impactDetect as f, initAttr as s, parseAttrValue as l, regist as m, setAttrs as u, tagAttr as p, tagAttrs as d, useId as x } from "./utils/index.js";
2
2
  import { set as c, remove as I } from "./utils/clickoutside.js";
3
3
  import { default as g } from "./base.js";
4
- import { default as C } from "./message/index.js";
4
+ import { default as h } from "./message/index.js";
5
5
  import { default as M } from "./popover/index.js";
6
6
  import { default as S } from "./popconfirm/index.js";
7
7
  import { default as D } from "./dialog/index.js";
@@ -22,32 +22,33 @@ import { default as $ } from "./icon/sun.js";
22
22
  import { default as eo } from "./icon/moon.js";
23
23
  import { default as ro } from "./icon/reduction.js";
24
24
  import { default as fo } from "./icon/refresh_left.js";
25
- import { default as mo } from "./icon/refresh_right.js";
26
- import { default as po } from "./icon/sort.js";
25
+ import { default as lo } from "./icon/refresh_right.js";
26
+ import { default as uo } from "./icon/sort.js";
27
27
  import { default as xo } from "./icon/theme_default.js";
28
28
  import { default as co } from "./icon/close.js";
29
29
  import { default as io } from "./icon/info.js";
30
- import { default as ho } from "./icon/success.js";
30
+ import { default as Co } from "./icon/success.js";
31
31
  import { default as Ao } from "./icon/warn.js";
32
- import { default as Po } from "./form/index.js";
33
- import { default as wo } from "./form/form_item.js";
34
- import { default as Ro } from "./radio/index.js";
35
- import { default as ko } from "./checkbox/index.js";
36
- import { default as Lo } from "./button/index.js";
37
- import { default as bo } from "./input/index.js";
38
- import { default as Fo } from "./select_ori/index.js";
39
- import { default as Uo } from "./switch/index.js";
40
- import { default as Wo } from "./md_input/index.js";
41
- import { default as Yo } from "./list/index.js";
42
- import { default as qo } from "./polygon/index.js";
43
- import { default as Eo } from "./color_picker/index.js";
44
- import { default as Ho } from "./tabbar/index.js";
45
- import { default as Ko } from "./theme/index.js";
46
- import { default as Qo } from "./theme/theme_color.js";
47
- import { default as _o } from "./date_picker/index.js";
48
- import { default as oe } from "./menu/index.js";
49
- import { default as te } from "./menu/menu_item.js";
50
- import { default as ae } from "./menu/sub_menu.js";
32
+ import { default as Po } from "./icon/close_filled.js";
33
+ import { default as wo } from "./form/index.js";
34
+ import { default as Ro } from "./form/form_item.js";
35
+ import { default as ko } from "./radio/index.js";
36
+ import { default as Lo } from "./checkbox/index.js";
37
+ import { default as bo } from "./button/index.js";
38
+ import { default as Fo } from "./input/index.js";
39
+ import { default as Uo } from "./select_ori/index.js";
40
+ import { default as Wo } from "./switch/index.js";
41
+ import { default as Yo } from "./md_input/index.js";
42
+ import { default as qo } from "./list/index.js";
43
+ import { default as Eo } from "./polygon/index.js";
44
+ import { default as Ho } from "./color_picker/index.js";
45
+ import { default as Ko } from "./tabbar/index.js";
46
+ import { default as Qo } from "./theme/index.js";
47
+ import { default as _o } from "./theme/theme_color.js";
48
+ import { default as oe } from "./date_picker/index.js";
49
+ import { default as te } from "./menu/index.js";
50
+ import { default as ae } from "./menu/menu_item.js";
51
+ import { default as se } from "./menu/sub_menu.js";
51
52
  export {
52
53
  y as ArrowDownIcon,
53
54
  V as ArrowLeftIcon,
@@ -55,46 +56,47 @@ export {
55
56
  j as ArrowUpIcon,
56
57
  g as BaseComponent,
57
58
  B as BaseIcon,
58
- Lo as Button,
59
+ bo as Button,
59
60
  G as CaretBottomIcon,
60
61
  z as CaretTopIcon,
61
- ko as Checkbox,
62
+ Lo as Checkbox,
63
+ Po as CloseFilledIcon,
62
64
  co as CloseIcon,
63
- Eo as ColorPicker,
64
- _o as DatePicker,
65
+ Ho as ColorPicker,
66
+ oe as DatePicker,
65
67
  D as Dialog,
66
68
  T as DialogContainer,
67
69
  J as FontIcon,
68
- Po as Form,
69
- wo as FormItem,
70
+ wo as Form,
71
+ Ro as FormItem,
70
72
  io as InfoIcon,
71
- bo as Input,
72
- Yo as List,
73
+ Fo as Input,
74
+ qo as List,
73
75
  v as Loading,
74
76
  N as LoadingIcon,
75
- Wo as MdInput,
76
- oe as Menu,
77
- te as MenuItem,
78
- C as Message,
77
+ Yo as MdInput,
78
+ te as Menu,
79
+ ae as MenuItem,
80
+ h as Message,
79
81
  O as Modal,
80
82
  eo as MoonIcon,
81
- qo as Polygon,
83
+ Eo as Polygon,
82
84
  S as Popconfirm,
83
85
  M as Popover,
84
- Ro as Radio,
86
+ ko as Radio,
85
87
  ro as ReductionIcon,
86
88
  fo as RefreshLeftIcon,
87
- mo as RefreshRightIcon,
89
+ lo as RefreshRightIcon,
88
90
  Z as SearchIcon,
89
- Fo as SelectOri,
90
- po as SortIcon,
91
- ae as SubMenu,
92
- ho as SuccessIcon,
91
+ Uo as SelectOri,
92
+ uo as SortIcon,
93
+ se as SubMenu,
94
+ Co as SuccessIcon,
93
95
  $ as SunIcon,
94
- Uo as Switch,
95
- Ho as Tabbar,
96
- Ko as Theme,
97
- Qo as ThemeColor,
96
+ Wo as Switch,
97
+ Ko as Tabbar,
98
+ Qo as Theme,
99
+ _o as ThemeColor,
98
100
  xo as ThemeDefaultIcon,
99
101
  Ao as WarnIcon,
100
102
  c as addClickOutside,
@@ -103,11 +105,11 @@ export {
103
105
  a as getPopoverOffsetY,
104
106
  f as impactDetect,
105
107
  s as initAttr,
106
- m as parseAttrValue,
107
- u as regist,
108
+ l as parseAttrValue,
109
+ m as regist,
108
110
  I as removeClickOutside,
109
- p as setAttrs,
110
- l as tagAttr,
111
+ u as setAttrs,
112
+ p as tagAttr,
111
113
  d as tagAttrs,
112
114
  x as useId
113
115
  };
@@ -13,6 +13,7 @@ import FormInner from "../form/form_inner";
13
13
  * @method focus - 输入框获取焦点
14
14
  */
15
15
  export default class Input extends FormInner {
16
+ #private;
16
17
  static baseName: string;
17
18
  /** 原生 input 的 type */
18
19
  type: string;
@@ -27,20 +28,21 @@ export default class Input extends FormInner {
27
28
  /** 宽度铺满 */
28
29
  block: boolean;
29
30
  error: boolean;
30
- private $input;
31
+ /** clearable */
32
+ clearable: boolean;
33
+ $inner?: HTMLInputElement;
31
34
  set value(value: any);
32
35
  get value(): any;
33
36
  static get observedAttributes(): string[];
34
37
  connectedCallback(): void;
35
38
  disconnectedCallback(): void;
36
39
  protected attributeChange(name: string, oldValue: string, newValue: string): void;
37
- render(): void;
40
+ render(): DocumentFragment;
38
41
  /**
39
42
  * 设置自定义的输入解析器
40
43
  * @param cb
41
44
  */
42
45
  setParser(cb: (value: string) => string): void;
43
- focus(): void;
44
46
  _input: (e: Event) => void;
45
47
  disabledChange(): void;
46
48
  private _numberInputParse;
@@ -1,9 +1,9 @@
1
- import { off as u, formatClass as o, $one as h, on as p, formatStyle as d, addClass as c, removeClass as f } from "ph-utils/dom";
2
- import { initAttr as m, parseAttrValue as g, tagAttr as n } from "../utils/index.js";
3
- import v from "../form/form_inner.js";
4
- import { remove as $, add as b } from "../utils/event.js";
5
- import { i as w } from "../index-391POYEJ.js";
6
- class S extends v {
1
+ import { $one as h, on as a, formatStyle as d, addClass as p, off as o, $ as u, $$ as n, toggleClass as f } from "ph-utils/dom";
2
+ import { initAttr as c, parseAttrValue as m } from "../utils/index.js";
3
+ import g from "../form/form_inner.js";
4
+ import { add as b, remove as v } from "../utils/event.js";
5
+ import { i as C } from "../index-dwS1N2uN.js";
6
+ class y extends g {
7
7
  static baseName = "input";
8
8
  /** 原生 input 的 type */
9
9
  type = "text";
@@ -18,9 +18,11 @@ class S extends v {
18
18
  /** 宽度铺满 */
19
19
  block = !1;
20
20
  error = !1;
21
- $input = void 0;
22
- set value(e) {
23
- this.setValue(e), this.$input != null && (this.$input.value = this.value);
21
+ /** clearable */
22
+ clearable = !1;
23
+ $inner;
24
+ set value(t) {
25
+ this.setValue(t), this.$inner && (this.$inner.value = t);
24
26
  }
25
27
  get value() {
26
28
  return this.getValue();
@@ -29,83 +31,132 @@ class S extends v {
29
31
  return ["disabled", "error"];
30
32
  }
31
33
  connectedCallback() {
32
- m(this), super.connectedCallback(), this.loadStyleText([w]);
34
+ c(this), this.loadStyleText([C]), super.connectedCallback(), this.$inner = h(".l-input__inner", this.root), a(this.$inner, "input", this._input), a(this.$inner, "change", this.#i), this.style.cssText = d(this._getStyleObj()) + this.getAttr("style", ""), this.error && p(this, "is-error"), this.getName() && this.formAttrs.id && b(this.formAttrs.id, "validateChange", this._validateChange);
33
35
  }
34
36
  disconnectedCallback() {
35
- super.disconnectedCallback(), this.formAttrs.id && $(this.formAttrs.id, "validateChange", this._validateChange), u(this.$input, "input", this._input), this.$input = void 0;
37
+ super.disconnectedCallback(), this.formAttrs.id && v(this.formAttrs.id, "validateChange", this._validateChange), o(this.$inner, "input", this._input);
36
38
  }
37
- attributeChange(e, s, t) {
38
- if (e === "error") {
39
- const i = g(t, !1, e);
40
- i !== this.error && (this.error = i, this._updateError());
39
+ attributeChange(t, i, e) {
40
+ if (t === "error") {
41
+ const s = m(e, !1, t);
42
+ s !== this.error && (this.error = s, this._updateError());
41
43
  }
42
44
  }
43
45
  render() {
44
- let e = n("value", this.value);
45
- const s = n("placeholder", this.placeholder), t = n("disabled", this.isDisabled()), i = o({
46
- "l-input": !0,
47
- "is-autosize": this.autosize,
48
- "is-error": this.error
49
- }), r = this.getName(), a = n("name", r), l = `${e}${a}${s}${t}`;
50
- this.shadow.innerHTML = `<input part="default" type="${this.type}" class="${i}"${l}></input>`, this.$input = h("input", this.root), p(this.$input, "input", this._input), this.style.cssText = d(this._getStyleObj()) + this.getAttr("style", ""), r && this.formAttrs.id && b(this.formAttrs.id, "validateChange", this._validateChange);
46
+ const t = document.createDocumentFragment();
47
+ if (u('[slot="prefix"]', this).length > 0) {
48
+ const r = n("slot", {
49
+ name: "prefix"
50
+ }), l = n("span", {
51
+ class: "l-input__prefix",
52
+ part: "prefix"
53
+ });
54
+ l.appendChild(r), t.appendChild(l);
55
+ }
56
+ const e = n("input", {
57
+ class: "l-input__inner",
58
+ value: this.value,
59
+ name: this.getName(),
60
+ placeholder: this.placeholder,
61
+ disabled: this.isDisabled(),
62
+ part: "default",
63
+ type: this.type
64
+ });
65
+ if (t.appendChild(e), u('[slot="suffix"]', this).length > 0) {
66
+ const r = n("slot", {
67
+ name: "suffix"
68
+ }), l = n("span", {
69
+ class: "l-input__suffix",
70
+ part: "suffix"
71
+ });
72
+ l.appendChild(r), t.appendChild(l);
73
+ }
74
+ return t;
51
75
  }
52
76
  /**
53
77
  * 设置自定义的输入解析器
54
78
  * @param cb
55
79
  */
56
- setParser(e) {
57
- this.parser = e;
80
+ setParser(t) {
81
+ this.parser = t;
58
82
  }
59
- focus() {
60
- this.$input?.focus();
61
- }
62
- _input = (e) => {
63
- const s = e.target;
64
- let t = s.value;
83
+ _input = (t) => {
84
+ const i = t.target;
85
+ let e = i.value;
65
86
  if (this.allowInput != null) {
66
- let i = this.allowInput.indexOf("."), r = i === -1 ? i : parseInt(this.allowInput.substring(i + 1));
67
- t = this._numberInputParse(t, {
87
+ let s = this.allowInput.indexOf("."), r = s === -1 ? s : parseInt(this.allowInput.substring(s + 1));
88
+ e = this._numberInputParse(e, {
68
89
  integer: this.allowInput.includes("integer"),
69
90
  negative: this.allowInput.startsWith("-"),
70
91
  precition: r
71
- }), t = String(t), s.value = t;
92
+ }), e = String(e), i.value = e;
93
+ }
94
+ this.parser != null && (e = this.parser(e), i.value = e), this.setValue(e), this.#t();
95
+ };
96
+ #t() {
97
+ if (this.clearable) {
98
+ let t = h(".l-clearable", this.root);
99
+ if (this.value.length > 0) {
100
+ if (t == null) {
101
+ t = n("span", {
102
+ class: "l-input__suffix l-clearable"
103
+ });
104
+ const i = n("l-close-filled-icon");
105
+ t.appendChild(i), this.root.appendChild(t), a(t, "click", this.#e);
106
+ }
107
+ } else
108
+ t && (o(t, "click", this.#e), t.remove());
72
109
  }
73
- this.parser != null && (t = this.parser(t), s.value = t), this.setValue(t);
110
+ }
111
+ #e = () => {
112
+ this.value = "", this.dispatchEvent(
113
+ new CustomEvent("input", { bubbles: !0, detail: { value: this.value } })
114
+ ), this.#t();
74
115
  };
75
116
  disabledChange() {
76
- this.$input != null && (this.$input.disabled = this.isDisabled());
117
+ this.isDisabled() ? this.classList.add("is-disabled") : this.classList.remove("is-disabled"), this.$inner && (this.$inner.disabled = this.isDisabled());
77
118
  }
78
- _numberInputParse(e, s) {
79
- let t = e, i = s.negative ? "-?" : "";
80
- if (s.integer) {
81
- const a = t.match(new RegExp(`^(${i}\\d*)`));
82
- return a != null ? a[1] : t.substring(0, t.length - 1);
119
+ _numberInputParse(t, i) {
120
+ let e = t, s = i.negative ? "-?" : "";
121
+ if (i.integer) {
122
+ const l = e.match(new RegExp(`^(${s}\\d*)`));
123
+ return l != null ? l[1] : e.substring(0, e.length - 1);
83
124
  }
84
- const r = t.match(
125
+ const r = e.match(
85
126
  new RegExp(
86
- `(${i}\\d+\\.\\d{0,${s.precition}})|(${i}\\d*)`
127
+ `(${s}\\d+\\.\\d{0,${i.precition}})|(${s}\\d*)`
87
128
  )
88
129
  );
89
- return r != null ? t = r[1] || r[2] : t = "", r != null ? r[1] || r[2] : "";
130
+ return r != null ? e = r[1] || r[2] : e = "", r != null ? r[1] || r[2] : "";
90
131
  }
91
132
  _getStyleObj() {
92
- const e = {};
93
- return this._isBlock() && (e["--l-input-width"] = "100%"), this.width && (e["--l-input-width"] = this.width), e;
133
+ const t = {};
134
+ return this._isBlock() && (t["--l-input-width"] = "100%"), this.width && (t["--l-input-width"] = this.width), t;
94
135
  }
95
136
  _isBlock() {
96
137
  return this.block === !0 || this.formItemAttrs.innerBlock === !0 || this.formAttrs.innerBlock === !0;
97
138
  }
98
139
  _updateError() {
99
- this.$input && (this.error ? c(this.$input, "is-error") : f(this.$input, "is-error"));
140
+ f(this, "is-error");
100
141
  }
101
- _validateChange = (e, s) => {
102
- const t = this.getName();
103
- if (t) {
104
- const i = e === !0 ? !1 : e[t] != null;
105
- (s == null || s === t && this.error != i) && (this.error = i, this._updateError()), Object.keys(e)[0] === t && this.focus();
142
+ _validateChange = (t, i) => {
143
+ const e = this.getName();
144
+ if (e) {
145
+ const s = t === !0 ? !1 : t[e] != null;
146
+ (i == null || i === e && this.error != s) && (this.error = s, this._updateError()), Object.keys(t)[0] === e && this.focus();
106
147
  }
107
148
  };
149
+ #i = (t) => {
150
+ const i = t.target;
151
+ this.dispatchEvent(
152
+ new CustomEvent("change", {
153
+ bubbles: !0,
154
+ composed: !0,
155
+ detail: { value: i.value }
156
+ })
157
+ );
158
+ };
108
159
  }
109
160
  export {
110
- S as default
161
+ y as default
111
162
  };
@@ -1,6 +1,6 @@
1
1
  import { regist as y, useId as p } from "../utils/index.js";
2
2
  import { transition as d } from "ph-utils/dom";
3
- import h from "../icon/mask_close.js";
3
+ import h from "../icon/close_filled.js";
4
4
  import $ from "../icon/success.js";
5
5
  import v from "../icon/warn.js";
6
6
  import w from "../icon/info.js";
@@ -1,7 +1,7 @@
1
1
  import n from "../form/form_inner.js";
2
2
  import { initAttr as c, tagAttrs as r } from "../utils/index.js";
3
3
  import { $one as h, on as o, off as d } from "ph-utils/dom";
4
- import { i as u } from "../index-391POYEJ.js";
4
+ import { i as u } from "../index-dwS1N2uN.js";
5
5
  class g extends n {
6
6
  static baseName = "select-ori";
7
7
  $select;
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "litos-ui",
3
3
  "description": "基于 Web Component 的 UI 组件库",
4
- "version": "0.12.1",
4
+ "version": "0.13.0",
5
5
  "type": "module",
6
6
  "devDependencies": {
7
- "@eslint/js": "^9.24.0",
8
- "@eslint/markdown": "^6.3.0",
9
- "@types/node": "^22.14.0",
10
- "eslint": "^9.24.0",
7
+ "@eslint/js": "^9.25.0",
8
+ "@eslint/markdown": "^6.4.0",
9
+ "@types/node": "^22.14.1",
10
+ "eslint": "^9.25.0",
11
11
  "globals": "^16.0.0",
12
12
  "less": "^4.3.0",
13
13
  "lightningcss": "^1.29.3",
14
14
  "prettier": "^3.5.3",
15
15
  "typescript": "^5.8.3",
16
- "typescript-eslint": "^8.29.1",
17
- "vite": "^6.2.5",
16
+ "typescript-eslint": "^8.30.1",
17
+ "vite": "^6.3.2",
18
18
  "vite-plugin-dts": "^4.5.3",
19
19
  "vitepress": "^1.6.3"
20
20
  },
@@ -54,7 +54,7 @@
54
54
  "dependencies": {
55
55
  "iconify-icon": "^2.3.0",
56
56
  "ph-utils": "^0.15.4",
57
- "shiki": "^3.2.1"
57
+ "shiki": "^3.2.2"
58
58
  },
59
59
  "scripts": {
60
60
  "dev": "vite dev",
package/styles/vars.css CHANGED
@@ -2,7 +2,7 @@
2
2
  /* button、input 元素高度 */
3
3
  --l-form-edit-height: 32px;
4
4
  /** 禁用状态颜色 */
5
- --l-disabled-color: #f5f7fa;
5
+ --l-disabled-color: #e6e6e6;
6
6
  /* 主题(primary)颜色 */
7
7
  --l-primary-color: #722ed1;
8
8
  --l-primary-color-light1: #9254de;
@@ -1,4 +0,0 @@
1
- const r = ":host{display:inline-block;width:var(--l-input-width, auto)}.l-input{outline:none;box-sizing:border-box;width:100%;max-width:100%;height:var(--l-form-edit-height, 32px);border:1px solid var(--l-border-color, #dedede);transition:border-color .3s;text-align:inherit;padding:0 5px;border-radius:3px;vertical-align:middle}.l-input.is-error{--l-border-color: var(--nt-error-color, #ed3f13)}.l-input:not(.is-error):focus{border-color:var(--l-primary-color, #722ed1)}.l-input:disabled{cursor:not-allowed;background:var(--l-disabled-color, #f5f7fa)}";
2
- export {
3
- r as i
4
- };
File without changes