solely 0.7.0 → 0.8.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/README.md +46 -4
- package/dist/compiler/index.d.ts +2 -2
- package/dist/compiler/ir/buildIR.d.ts +1 -1
- package/dist/compiler/ir/index.d.ts +1 -1
- package/dist/compiler/parser/index.d.ts +1 -1
- package/dist/compiler/parser/parser.d.ts +1 -1
- package/dist/components/commands/drawer/index.cjs +1 -1
- package/dist/components/commands/drawer/index.d.ts +1 -1
- package/dist/components/commands/drawer/index.js +1 -1
- package/dist/components/commands/drawer/style.css.cjs +1 -1
- package/dist/components/commands/drawer/style.css.js +1 -1
- package/dist/components/commands/index.d.ts +12 -12
- package/dist/components/commands/message/index.cjs +1 -1
- package/dist/components/commands/message/index.d.ts +1 -1
- package/dist/components/commands/message/index.js +1 -1
- package/dist/components/commands/message/style.css.cjs +1 -1
- package/dist/components/commands/message/style.css.js +1 -1
- package/dist/components/commands/message/types.d.ts +1 -1
- package/dist/components/commands/modal/index.cjs +1 -1
- package/dist/components/commands/modal/index.d.ts +1 -1
- package/dist/components/commands/modal/index.js +1 -1
- package/dist/components/commands/modal/style.css.cjs +1 -1
- package/dist/components/commands/modal/style.css.js +1 -1
- package/dist/components/commands/modal/types.d.ts +8 -3
- package/dist/components/commands/popconfirm/index.cjs +1 -1
- package/dist/components/commands/popconfirm/index.d.ts +1 -1
- package/dist/components/commands/popconfirm/index.js +1 -1
- package/dist/components/commands/popconfirm/style.css.cjs +1 -1
- package/dist/components/commands/popconfirm/style.css.js +1 -1
- package/dist/components/commands/popconfirm/types.d.ts +10 -3
- package/dist/components/commands/tooltip/index.cjs +1 -1
- package/dist/components/commands/tooltip/index.d.ts +1 -1
- package/dist/components/commands/tooltip/index.js +1 -1
- package/dist/components/commands/tooltip/style.css.cjs +1 -1
- package/dist/components/commands/tooltip/style.css.js +1 -1
- package/dist/components/commands/tooltip/types.d.ts +1 -3
- package/dist/components/commands/utils.cjs +1 -1
- package/dist/components/commands/utils.d.ts +11 -0
- package/dist/components/commands/utils.js +1 -1
- package/dist/components/elements/alert/index.cjs +1 -1
- package/dist/components/elements/alert/index.d.ts +68 -6
- package/dist/components/elements/alert/index.html.cjs +1 -1
- package/dist/components/elements/alert/index.html.js +1 -1
- package/dist/components/elements/alert/index.js +1 -1
- package/dist/components/elements/alert/style.css.cjs +1 -1
- package/dist/components/elements/alert/style.css.js +1 -1
- package/dist/components/elements/alert/types.d.ts +5 -1
- package/dist/components/elements/backtop/index.cjs +1 -1
- package/dist/components/elements/backtop/index.d.ts +14 -2
- package/dist/components/elements/backtop/index.html.cjs +1 -1
- package/dist/components/elements/backtop/index.html.js +1 -1
- package/dist/components/elements/backtop/index.js +1 -1
- package/dist/components/elements/backtop/style.css.cjs +1 -1
- package/dist/components/elements/backtop/style.css.js +1 -1
- package/dist/components/elements/badge/index.cjs +1 -1
- package/dist/components/elements/badge/index.d.ts +12 -6
- package/dist/components/elements/badge/index.html.cjs +1 -1
- package/dist/components/elements/badge/index.html.js +1 -1
- package/dist/components/elements/badge/index.js +1 -1
- package/dist/components/elements/badge/types.d.ts +2 -4
- package/dist/components/elements/breadcrumb/index.cjs +1 -1
- package/dist/components/elements/breadcrumb/index.d.ts +13 -3
- package/dist/components/elements/breadcrumb/index.html.cjs +1 -1
- package/dist/components/elements/breadcrumb/index.html.js +1 -1
- package/dist/components/elements/breadcrumb/index.js +1 -1
- package/dist/components/elements/breadcrumb/style.css.cjs +1 -1
- package/dist/components/elements/breadcrumb/style.css.js +1 -1
- package/dist/components/elements/breadcrumb/types.d.ts +2 -0
- package/dist/components/elements/button/index.cjs +1 -1
- package/dist/components/elements/button/index.d.ts +14 -2
- package/dist/components/elements/button/index.html.cjs +1 -1
- package/dist/components/elements/button/index.html.js +1 -1
- package/dist/components/elements/button/index.js +1 -1
- package/dist/components/elements/button/style.css.cjs +1 -1
- package/dist/components/elements/button/style.css.js +1 -1
- package/dist/components/elements/button/types.d.ts +4 -0
- package/dist/components/elements/card/index.cjs +1 -1
- package/dist/components/elements/card/index.d.ts +22 -2
- package/dist/components/elements/card/index.html.cjs +1 -1
- package/dist/components/elements/card/index.html.js +1 -1
- package/dist/components/elements/card/index.js +1 -1
- package/dist/components/elements/card/style.css.cjs +1 -1
- package/dist/components/elements/card/style.css.js +1 -1
- package/dist/components/elements/card/types.d.ts +4 -2
- package/dist/components/elements/checkbox/index.cjs +1 -1
- package/dist/components/elements/checkbox/index.d.ts +56 -3
- package/dist/components/elements/checkbox/index.html.cjs +1 -1
- package/dist/components/elements/checkbox/index.html.js +1 -1
- package/dist/components/elements/checkbox/index.js +1 -1
- package/dist/components/elements/checkbox/style.css.cjs +1 -1
- package/dist/components/elements/checkbox/style.css.js +1 -1
- package/dist/components/elements/checkbox/types.d.ts +10 -0
- package/dist/components/elements/coordinate-input/index.cjs +1 -1
- package/dist/components/elements/coordinate-input/index.d.ts +27 -2
- package/dist/components/elements/coordinate-input/index.html.cjs +1 -1
- package/dist/components/elements/coordinate-input/index.html.js +1 -1
- package/dist/components/elements/coordinate-input/index.js +1 -1
- package/dist/components/elements/coordinate-input/style.css.cjs +1 -1
- package/dist/components/elements/coordinate-input/style.css.js +1 -1
- package/dist/components/elements/coordinate-input/types.d.ts +4 -4
- package/dist/components/elements/divider/index.cjs +1 -1
- package/dist/components/elements/divider/index.d.ts +11 -2
- package/dist/components/elements/divider/index.js +1 -1
- package/dist/components/elements/empty/index.cjs +1 -1
- package/dist/components/elements/empty/index.d.ts +14 -2
- package/dist/components/elements/empty/index.html.cjs +1 -1
- package/dist/components/elements/empty/index.html.js +1 -1
- package/dist/components/elements/empty/index.js +1 -1
- package/dist/components/elements/empty/style.css.cjs +1 -1
- package/dist/components/elements/empty/style.css.js +1 -1
- package/dist/components/elements/empty/types.d.ts +4 -2
- package/dist/components/elements/fab/index.cjs +1 -1
- package/dist/components/elements/fab/index.d.ts +12 -3
- package/dist/components/elements/fab/index.html.cjs +1 -1
- package/dist/components/elements/fab/index.html.js +1 -1
- package/dist/components/elements/fab/index.js +1 -1
- package/dist/components/elements/fab/style.css.cjs +1 -1
- package/dist/components/elements/fab/style.css.js +1 -1
- package/dist/components/elements/icon/index.cjs +1 -1
- package/dist/components/elements/icon/index.d.ts +23 -2
- package/dist/components/elements/icon/index.js +1 -1
- package/dist/components/elements/icon/style.css.cjs +1 -1
- package/dist/components/elements/icon/style.css.js +1 -1
- package/dist/components/elements/index.cjs +1 -1
- package/dist/components/elements/index.d.ts +61 -60
- package/dist/components/elements/index.js +1 -1
- package/dist/components/elements/input/index.cjs +1 -1
- package/dist/components/elements/input/index.d.ts +120 -5
- package/dist/components/elements/input/index.html.cjs +1 -1
- package/dist/components/elements/input/index.html.js +1 -1
- package/dist/components/elements/input/index.js +1 -1
- package/dist/components/elements/input/style.css.cjs +1 -1
- package/dist/components/elements/input/style.css.js +1 -1
- package/dist/components/elements/input/types.d.ts +46 -7
- package/dist/components/elements/not-found/index.cjs +1 -1
- package/dist/components/elements/not-found/index.d.ts +38 -2
- package/dist/components/elements/not-found/index.html.cjs +1 -1
- package/dist/components/elements/not-found/index.html.js +1 -1
- package/dist/components/elements/not-found/index.js +1 -1
- package/dist/components/elements/not-found/style.css.cjs +1 -1
- package/dist/components/elements/not-found/style.css.js +1 -1
- package/dist/components/elements/not-found/types.d.ts +2 -0
- package/dist/components/elements/pagination/index.cjs +1 -1
- package/dist/components/elements/pagination/index.d.ts +52 -7
- package/dist/components/elements/pagination/index.html.cjs +1 -1
- package/dist/components/elements/pagination/index.html.js +1 -1
- package/dist/components/elements/pagination/index.js +1 -1
- package/dist/components/elements/pagination/style.css.cjs +1 -1
- package/dist/components/elements/pagination/style.css.js +1 -1
- package/dist/components/elements/pagination/types.d.ts +1 -1
- package/dist/components/elements/progress/index.cjs +1 -1
- package/dist/components/elements/progress/index.d.ts +16 -7
- package/dist/components/elements/progress/index.html.cjs +1 -1
- package/dist/components/elements/progress/index.html.js +1 -1
- package/dist/components/elements/progress/index.js +1 -1
- package/dist/components/elements/progress/style.css.cjs +1 -1
- package/dist/components/elements/progress/style.css.js +1 -1
- package/dist/components/elements/progress/types.d.ts +4 -2
- package/dist/components/elements/radio/index.cjs +1 -1
- package/dist/components/elements/radio/index.d.ts +82 -3
- package/dist/components/elements/radio/index.html.cjs +1 -1
- package/dist/components/elements/radio/index.html.js +1 -1
- package/dist/components/elements/radio/index.js +1 -1
- package/dist/components/elements/radio/style.css.cjs +1 -1
- package/dist/components/elements/radio/style.css.js +1 -1
- package/dist/components/elements/radio/types.d.ts +6 -0
- package/dist/components/elements/rate/index.cjs +1 -1
- package/dist/components/elements/rate/index.d.ts +75 -3
- package/dist/components/elements/rate/index.html.cjs +1 -1
- package/dist/components/elements/rate/index.html.js +1 -1
- package/dist/components/elements/rate/index.js +1 -1
- package/dist/components/elements/rate/style.css.cjs +1 -1
- package/dist/components/elements/rate/style.css.js +1 -1
- package/dist/components/elements/rate/types.d.ts +2 -0
- package/dist/components/elements/select/index.cjs +1 -1
- package/dist/components/elements/select/index.d.ts +197 -22
- package/dist/components/elements/select/index.html.cjs +1 -1
- package/dist/components/elements/select/index.html.js +1 -1
- package/dist/components/elements/select/index.js +1 -1
- package/dist/components/elements/select/option.cjs +1 -0
- package/dist/components/elements/select/option.d.ts +2 -2
- package/dist/components/elements/select/option.js +1 -0
- package/dist/components/elements/select/style.css.cjs +1 -1
- package/dist/components/elements/select/style.css.js +1 -1
- package/dist/components/elements/select/types.d.ts +42 -6
- package/dist/components/elements/skeleton/index.cjs +1 -1
- package/dist/components/elements/skeleton/index.d.ts +15 -2
- package/dist/components/elements/skeleton/index.html.cjs +1 -1
- package/dist/components/elements/skeleton/index.html.js +1 -1
- package/dist/components/elements/skeleton/index.js +1 -1
- package/dist/components/elements/skeleton/style.css.cjs +1 -1
- package/dist/components/elements/skeleton/style.css.js +1 -1
- package/dist/components/elements/skeleton/types.d.ts +2 -1
- package/dist/components/elements/slider/index.cjs +1 -1
- package/dist/components/elements/slider/index.d.ts +115 -11
- package/dist/components/elements/slider/index.html.cjs +1 -1
- package/dist/components/elements/slider/index.html.js +1 -1
- package/dist/components/elements/slider/index.js +1 -1
- package/dist/components/elements/slider/style.css.cjs +1 -1
- package/dist/components/elements/slider/style.css.js +1 -1
- package/dist/components/elements/slider/types.d.ts +15 -4
- package/dist/components/elements/steps/index.cjs +1 -1
- package/dist/components/elements/steps/index.d.ts +73 -10
- package/dist/components/elements/steps/index.html.cjs +1 -1
- package/dist/components/elements/steps/index.html.js +1 -1
- package/dist/components/elements/steps/index.js +1 -1
- package/dist/components/elements/steps/style.css.cjs +1 -1
- package/dist/components/elements/steps/style.css.js +1 -1
- package/dist/components/elements/steps/types.d.ts +9 -2
- package/dist/components/elements/switch/index.cjs +1 -1
- package/dist/components/elements/switch/index.d.ts +52 -9
- package/dist/components/elements/switch/index.html.cjs +1 -1
- package/dist/components/elements/switch/index.html.js +1 -1
- package/dist/components/elements/switch/index.js +1 -1
- package/dist/components/elements/switch/types.d.ts +12 -0
- package/dist/components/elements/table/index.cjs +1 -1
- package/dist/components/elements/table/index.d.ts +251 -4
- package/dist/components/elements/table/index.html.cjs +1 -1
- package/dist/components/elements/table/index.html.js +1 -1
- package/dist/components/elements/table/index.js +1 -1
- package/dist/components/elements/table/style.css.cjs +1 -1
- package/dist/components/elements/table/style.css.js +1 -1
- package/dist/components/elements/table/types.d.ts +152 -7
- package/dist/components/elements/tabs/index.cjs +1 -1
- package/dist/components/elements/tabs/index.d.ts +47 -4
- package/dist/components/elements/tabs/index.html.cjs +1 -1
- package/dist/components/elements/tabs/index.html.js +1 -1
- package/dist/components/elements/tabs/index.js +1 -1
- package/dist/components/elements/tabs/style.css.cjs +1 -1
- package/dist/components/elements/tabs/style.css.js +1 -1
- package/dist/components/elements/tabs/types.d.ts +10 -0
- package/dist/components/elements/tag/index.cjs +1 -1
- package/dist/components/elements/tag/index.d.ts +11 -3
- package/dist/components/elements/tag/index.html.cjs +1 -1
- package/dist/components/elements/tag/index.html.js +1 -1
- package/dist/components/elements/tag/index.js +1 -1
- package/dist/components/elements/tag/style.css.cjs +1 -1
- package/dist/components/elements/tag/style.css.js +1 -1
- package/dist/components/elements/timeline/index.cjs +1 -1
- package/dist/components/elements/timeline/index.d.ts +8 -2
- package/dist/components/elements/timeline/index.js +1 -1
- package/dist/components/elements/timeline/style.css.cjs +1 -1
- package/dist/components/elements/timeline/style.css.js +1 -1
- package/dist/components/elements/timeline/types.d.ts +0 -1
- package/dist/components/elements/tooltip/index.cjs +1 -1
- package/dist/components/elements/tooltip/index.d.ts +78 -5
- package/dist/components/elements/tooltip/index.html.cjs +1 -1
- package/dist/components/elements/tooltip/index.html.js +1 -1
- package/dist/components/elements/tooltip/index.js +1 -1
- package/dist/components/elements/tooltip/style.css.cjs +1 -1
- package/dist/components/elements/tooltip/style.css.js +1 -1
- package/dist/components/elements/tooltip/types.d.ts +1 -1
- package/dist/components/elements/tree/index.cjs +1 -1
- package/dist/components/elements/tree/index.d.ts +163 -13
- package/dist/components/elements/tree/index.html.cjs +1 -1
- package/dist/components/elements/tree/index.html.js +1 -1
- package/dist/components/elements/tree/index.js +1 -1
- package/dist/components/elements/tree/style.css.cjs +1 -1
- package/dist/components/elements/tree/style.css.js +1 -1
- package/dist/components/elements/tree/types.d.ts +18 -4
- package/dist/components/elements/upload/index.cjs +1 -1
- package/dist/components/elements/upload/index.d.ts +59 -8
- package/dist/components/elements/upload/index.html.cjs +1 -1
- package/dist/components/elements/upload/index.html.js +1 -1
- package/dist/components/elements/upload/index.js +1 -1
- package/dist/components/elements/upload/style.css.cjs +1 -1
- package/dist/components/elements/upload/style.css.js +1 -1
- package/dist/components/elements/upload/types.d.ts +89 -5
- package/dist/components/elements/utils/helpers.cjs +1 -1
- package/dist/components/elements/utils/helpers.d.ts +10 -0
- package/dist/components/elements/utils/helpers.js +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +3 -21
- package/dist/components/index.js +1 -1
- package/dist/components/theme/auto-inject.cjs +1 -0
- package/dist/components/theme/auto-inject.d.ts +23 -0
- package/dist/components/theme/auto-inject.js +1 -0
- package/dist/components/theme/index.cjs +1 -1
- package/dist/components/theme/index.d.ts +7 -1
- package/dist/components/theme/index.js +1 -1
- package/dist/components/theme/variables.css +25 -0
- package/dist/components/theme/variables.css.cjs +1 -0
- package/dist/components/theme/variables.css.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/plugin.d.ts +2 -2
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/solely-vite-plugin.d.ts +1 -1
- package/dist/router/core.cjs +1 -1
- package/dist/router/core.d.ts +31 -1
- package/dist/router/core.js +1 -1
- package/dist/router/index.d.ts +4 -4
- package/dist/router/router-link.d.ts +1 -1
- package/dist/router/router-view.cjs +1 -1
- package/dist/router/router-view.d.ts +12 -2
- package/dist/router/router-view.js +1 -1
- package/dist/router/types.d.ts +3 -1
- package/dist/runtime/component/base-element.cjs +1 -1
- package/dist/runtime/component/base-element.d.ts +7 -0
- package/dist/runtime/component/base-element.js +1 -1
- package/dist/runtime/component/decorators.d.ts +7 -2
- package/dist/runtime/component/index.d.ts +2 -2
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/reactivity/computed.d.ts +1 -1
- package/dist/runtime/reactivity/index.d.ts +6 -6
- package/dist/runtime/reactivity/watch.d.ts +1 -1
- package/dist/runtime/renderer/index.d.ts +2 -2
- package/dist/runtime/renderer/renderIR.cjs +1 -1
- package/dist/runtime/renderer/renderIR.d.ts +1 -1
- package/dist/runtime/renderer/renderIR.js +1 -1
- package/dist/shared/aria.cjs +1 -0
- package/dist/shared/aria.d.ts +67 -0
- package/dist/shared/aria.js +1 -0
- package/dist/shared/boolean.cjs +1 -0
- package/dist/shared/boolean.d.ts +9 -0
- package/dist/shared/boolean.js +1 -0
- package/dist/shared/enum.cjs +1 -0
- package/dist/shared/enum.d.ts +10 -0
- package/dist/shared/enum.js +1 -0
- package/dist/shared/env.cjs +1 -1
- package/dist/shared/env.js +1 -1
- package/dist/shared/floating/overlay-stack.cjs +1 -0
- package/dist/shared/floating/overlay-stack.d.ts +56 -0
- package/dist/shared/floating/overlay-stack.js +1 -0
- package/dist/shared/floating/position.cjs +1 -0
- package/dist/shared/floating/position.d.ts +32 -0
- package/dist/shared/floating/position.js +1 -0
- package/dist/shared/floating/types.d.ts +112 -0
- package/dist/shared/form-associated.cjs +1 -0
- package/dist/shared/form-associated.d.ts +253 -0
- package/dist/shared/form-associated.js +1 -0
- package/dist/shared/gen-function.d.ts +1 -1
- package/dist/shared/icons.cjs +1 -0
- package/dist/shared/icons.d.ts +31 -0
- package/dist/shared/icons.js +1 -0
- package/dist/shared/index.cjs +1 -1
- package/dist/shared/index.d.ts +11 -9
- package/dist/shared/index.js +1 -1
- package/dist/shared/size.cjs +1 -0
- package/dist/shared/size.d.ts +17 -0
- package/dist/shared/size.js +1 -0
- package/dist/shared/templateError.d.ts +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/ir.d.ts +1 -1
- package/package.json +27 -11
- package/dist/solely.svg +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sanitizeSvg as t}from"../../../shared/svg-sanitize.js";import e from"./style.css.js";import{__SOLELY_IR__ as
|
|
1
|
+
import{sanitizeSvg as t}from"../../../shared/svg-sanitize.js";import{IS_DEV as e}from"../../../shared/env.js";import s from"./style.css.js";import{__SOLELY_IR__ as n}from"./index.html.js";import i from"../../../runtime/component/base-element.js";import{CustomElement as o}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;const r=new Map,a=new Map;let c=null;const l=new Set;async function d(t){return c||(a.size>0?Promise.resolve():(c=(async()=>{try{const e=await fetch(t),s=await e.text();(new DOMParser).parseFromString(s,"image/svg+xml").querySelectorAll("symbol").forEach(t=>{const e=t.id,s=t.getAttribute("viewBox")||"0 0 16 16",n=t.innerHTML;e&&n&&a.set(e,{viewBox:s,content:n})}),console.info(`[Solely Icon] Loaded ${a.size} icons from sprite`)}catch(e){console.warn("[Solely Icon] Failed to load icon sprite:",e)}})(),c))}function u(t,e){r.set(t,e)}function p(t){Object.entries(t).forEach(([t,e])=>{r.set(t,e)})}function h(t){const e=r.get(t);if(e)return e;const s=a.get(t);return s?s.content:""}function m(t){const e=a.get(t);return e?e.viewBox:"0 0 16 16"}function f(t){return r.has(t)||a.has(t)}function g(){return Array.from(new Set([...r.keys(),...a.keys()]))}function y(t){if(!0===t)return"clockwise";if(!1===t||null==t)return!1;if("string"==typeof t){const e=t.trim().toLowerCase();return"false"!==e&&"0"!==e&&("counterclockwise"===e?"counterclockwise":"clockwise")}return!1}let v=class extends i{get size(){const t=this.$data.size;return"middle"===t||"default"===t?"medium":t??"medium"}set size(t){this.$data.size="middle"===t||"default"===t?"medium":t}get spin(){return y(this.$data.spin)}set spin(t){this.$data.spin=y(t)}getIconContent(){return this.$data.name?h(this.$data.name)||this.getDefaultIcon():""}getViewBox(){return this.$data.name?m(this.$data.name):"0 0 16 16"}getDefaultIcon(){return'<rect x="2" y="2" width="12" height="12" rx="2" fill="none" stroke="currentColor" stroke-width="1.5"/><line x1="6" y1="8" x2="10" y2="8" stroke="currentColor" stroke-width="1.5"/><circle cx="8" cy="11.5" r="0.75" fill="currentColor"/>'}getIconSize(){const t=this.size||"medium",e={small:"12px",medium:"16px",large:"24px"}[t];if(e)return e;const s=Number(t);return!isNaN(s)&&s>0?`${s}px`:String(t)}getSizeStyle(){return`--icon-size: ${this.getIconSize()};`}getSpinStyle(){const t=this.spin;return t?`--spin-direction: ${"counterclockwise"===t?"reverse":"normal"}; --spin-duration: ${this.$data.spinDuration||1}s;`:""}getColorStyle(){const t=this.$data.color;return t?`--icon-color: ${t};`:""}getIconClasses(){const t={icon:!0,"is-spinning":!!this.spin},e=this.$data.size;return"small"!==e&&"medium"!==e&&"large"!==e||(t[`icon--${e}`]=!0),t}hasIcon(){return!(!this.$data.name||!f(this.$data.name)&&!c&&!this.$data.sprite&&(this.warnMissingIcon(this.$data.name),1))}warnMissingIcon(t){e&&!l.has(t)&&(l.add(t),console.warn(`[Solely Icon] 图标 "${t}" 未注册,也未配置 sprite,当前渲染为占位空白。\n请使用 registerIcon('${t}', svgContent) 注册,或调用 setIconSpritePath('/icons/bootstrap-icons.svg'),或在该元素上设置 sprite="<路径>"。`))}updateHostStyles(){this.style.setProperty("--icon-size",this.getIconSize());const t=this.$data.color;t?this.style.setProperty("--icon-color",t):this.style.removeProperty("--icon-color");const e=this.spin;if(e){const t=this.$data.spinDuration||1,s="counterclockwise"===e?"reverse":"normal";this.style.setProperty("--spin-duration",`${t}s`),this.style.setProperty("--spin-direction",s)}else this.style.removeProperty("--spin-duration"),this.style.removeProperty("--spin-direction");this.classList.remove("icon--small","icon--medium","icon--large");const s=this.$data.size;"small"!==s&&"medium"!==s&&"large"!==s||this.classList.add(`icon--${s}`)}async mounted(){this.refresh(),this.updateHostStyles();const t=this.$data.sprite;if(t)try{await d(t),this.updateSvgContent(),this.dispatchEvent(new Event("sprite-loaded",{bubbles:!0,composed:!0}))}catch{this.updateSvgContent(),this.dispatchEvent(new Event("sprite-error",{bubbles:!0,composed:!0}))}else if(c)try{await c,this.updateSvgContent(),this.dispatchEvent(new Event("sprite-loaded",{bubbles:!0,composed:!0}))}catch{this.updateSvgContent(),this.dispatchEvent(new Event("sprite-error",{bubbles:!0,composed:!0}))}else this.updateSvgContent()}updated(){this.updateHostStyles(),this.updateSvgContent()}updateSvgContent(){const e=this.$refs.svgRef;e&&this.hasIcon()&&(e.innerHTML=t(this.getIconContent()))}handleClick(t){if(this.$data.disabled)return t.preventDefault(),void t.stopPropagation()}focus(){this.$refs.svgRef?.focus()}blur(){this.$refs.svgRef?.blur()}};v=((t,e)=>{for(var s,n=e,i=t.length-1;i>=0;i--)(s=t[i])&&(n=s(n)||n);return n})([o({tagName:"solely-icon",template:n,styles:s,shadowDOM:{use:!0,mode:"open"},props:[{name:"name",type:"string",default:""},{name:"size",type:"string",default:"medium"},{name:"color",type:"string",default:"currentColor"},{name:"spin",type:"string",default:!1},{name:"spinDuration",type:"number",default:1},{name:"disabled",type:"boolean",default:!1},{name:"sprite",type:"string",default:""}]})],v);export{v as SolelyIcon,h as getIcon,m as getIconViewBox,g as getRegisteredIcons,f as hasIcon,d as loadIconSprite,u as registerIcon,p as registerIcons};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default=
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default=':host{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-size, 16px);height:var(--icon-size, 16px);color:var(--icon-color, currentColor);font-size:var(--icon-size, 16px);line-height:1;vertical-align:middle}:host([hidden]){display:none!important}.icon-svg{width:100%;height:100%;fill:currentColor;transition:transform var(--solely-transition-duration, .2s) var(--solely-transition-timing, ease)}:host(.icon--small){--icon-size: 12px}:host(.icon--medium){--icon-size: 16px}:host(.icon--large){--icon-size: 24px}.is-spinning{animation:icon-spin var(--spin-duration, 1s) linear infinite;animation-direction:var(--spin-direction, normal)}@keyframes icon-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([disabled]:not([disabled="false" i]):not([disabled="0" i])){cursor:not-allowed;opacity:var(--solely-disabled-opacity, .6)}.icon-placeholder{display:inline-block;width:100%;height:100%}.icon-svg:not([disabled]){cursor:pointer}.icon-svg:not([disabled]):hover{opacity:.8}';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const i=
|
|
1
|
+
const i=':host{display:inline-flex;align-items:center;justify-content:center;width:var(--icon-size, 16px);height:var(--icon-size, 16px);color:var(--icon-color, currentColor);font-size:var(--icon-size, 16px);line-height:1;vertical-align:middle}:host([hidden]){display:none!important}.icon-svg{width:100%;height:100%;fill:currentColor;transition:transform var(--solely-transition-duration, .2s) var(--solely-transition-timing, ease)}:host(.icon--small){--icon-size: 12px}:host(.icon--medium){--icon-size: 16px}:host(.icon--large){--icon-size: 24px}.is-spinning{animation:icon-spin var(--spin-duration, 1s) linear infinite;animation-direction:var(--spin-direction, normal)}@keyframes icon-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([disabled]:not([disabled="false" i]):not([disabled="0" i])){cursor:not-allowed;opacity:var(--solely-disabled-opacity, .6)}.icon-placeholder{display:inline-block;width:100%;height:100%}.icon-svg:not([disabled]){cursor:pointer}.icon-svg:not([disabled]):hover{opacity:.8}';export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./button/index.cjs"),r=require("./icon/index.cjs"),t=require("./input/index.cjs"),o=require("./fab/index.cjs"),l=require("./card/index.cjs"),i=require("./tag/index.cjs"),n=require("./badge/index.cjs"),s=require("./alert/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./button/index.cjs"),r=require("./icon/index.cjs"),t=require("./input/index.cjs"),o=require("./fab/index.cjs"),l=require("./card/index.cjs"),i=require("./tag/index.cjs"),n=require("./badge/index.cjs"),s=require("./alert/index.cjs"),c=require("./switch/index.cjs"),y=require("./checkbox/index.cjs"),p=require("./radio/index.cjs"),d=require("./select/index.cjs"),b=require("./select/option.cjs"),u=require("./progress/index.cjs"),a=require("./divider/index.cjs"),S=require("./tabs/index.cjs"),x=require("./table/index.cjs"),j=require("./skeleton/index.cjs"),g=require("./empty/index.cjs"),m=require("./pagination/index.cjs"),P=require("./breadcrumb/index.cjs"),f=require("./steps/index.cjs"),O=require("./timeline/index.cjs"),q=require("./backtop/index.cjs"),I=require("./upload/index.cjs"),T=require("./rate/index.cjs"),k=require("./slider/index.cjs"),h=require("./tree/index.cjs"),B=require("./coordinate-input/index.cjs"),C=require("./tooltip/index.cjs"),R=require("./not-found/index.cjs");Object.defineProperty(exports,"SolelyButton",{enumerable:!0,get:()=>e.SolelyButton}),Object.defineProperty(exports,"SolelyIcon",{enumerable:!0,get:()=>r.SolelyIcon}),exports.getIcon=r.getIcon,exports.getRegisteredIcons=r.getRegisteredIcons,exports.hasIcon=r.hasIcon,exports.registerIcon=r.registerIcon,exports.registerIcons=r.registerIcons,Object.defineProperty(exports,"SolelyInput",{enumerable:!0,get:()=>t.SolelyInput}),Object.defineProperty(exports,"SolelyFab",{enumerable:!0,get:()=>o.SolelyFab}),Object.defineProperty(exports,"SolelyCard",{enumerable:!0,get:()=>l.SolelyCard}),Object.defineProperty(exports,"SolelyTag",{enumerable:!0,get:()=>i.SolelyTag}),Object.defineProperty(exports,"SolelyBadge",{enumerable:!0,get:()=>n.SolelyBadge}),Object.defineProperty(exports,"SolelyAlert",{enumerable:!0,get:()=>s.SolelyAlert}),Object.defineProperty(exports,"SolelySwitch",{enumerable:!0,get:()=>c.SolelySwitch}),Object.defineProperty(exports,"SolelyCheckbox",{enumerable:!0,get:()=>y.SolelyCheckbox}),Object.defineProperty(exports,"SolelyRadio",{enumerable:!0,get:()=>p.SolelyRadio}),Object.defineProperty(exports,"SolelySelect",{enumerable:!0,get:()=>d.SolelySelect}),Object.defineProperty(exports,"SolelySelectOption",{enumerable:!0,get:()=>b.SelectOption}),Object.defineProperty(exports,"SolelyProgress",{enumerable:!0,get:()=>u.SolelyProgress}),Object.defineProperty(exports,"SolelyDivider",{enumerable:!0,get:()=>a.SolelyDivider}),Object.defineProperty(exports,"SolelyTabs",{enumerable:!0,get:()=>S.SolelyTabs}),Object.defineProperty(exports,"SolelyTable",{enumerable:!0,get:()=>x.SolelyTable}),Object.defineProperty(exports,"SolelySkeleton",{enumerable:!0,get:()=>j.SolelySkeleton}),Object.defineProperty(exports,"SolelyEmpty",{enumerable:!0,get:()=>g.SolelyEmpty}),Object.defineProperty(exports,"SolelyPagination",{enumerable:!0,get:()=>m.SolelyPagination}),Object.defineProperty(exports,"SolelyBreadcrumb",{enumerable:!0,get:()=>P.SolelyBreadcrumb}),Object.defineProperty(exports,"SolelySteps",{enumerable:!0,get:()=>f.SolelySteps}),Object.defineProperty(exports,"SolelyTimeline",{enumerable:!0,get:()=>O.SolelyTimeline}),Object.defineProperty(exports,"SolelyBackTop",{enumerable:!0,get:()=>q.SolelyBackTop}),Object.defineProperty(exports,"SolelyUpload",{enumerable:!0,get:()=>I.SolelyUpload}),Object.defineProperty(exports,"SolelyRate",{enumerable:!0,get:()=>T.SolelyRate}),Object.defineProperty(exports,"SolelySlider",{enumerable:!0,get:()=>k.SolelySlider}),Object.defineProperty(exports,"SolelyTree",{enumerable:!0,get:()=>h.SolelyTree}),Object.defineProperty(exports,"SolelyCoordinateInput",{enumerable:!0,get:()=>B.SolelyCoordinateInput}),Object.defineProperty(exports,"SolelyTooltip",{enumerable:!0,get:()=>C.SolelyTooltip}),Object.defineProperty(exports,"SolelyNotFound",{enumerable:!0,get:()=>R.SolelyNotFound});
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Solely 组件库 - 自定义元素组件统一导出
|
|
3
3
|
*/
|
|
4
|
-
export { SolelyButton } from './button';
|
|
5
|
-
export { SolelyIcon, registerIcon, registerIcons, getIcon, hasIcon, getRegisteredIcons } from './icon';
|
|
6
|
-
export { SolelyInput } from './input';
|
|
7
|
-
export { SolelyFab } from './fab';
|
|
8
|
-
export { SolelyCard } from './card';
|
|
9
|
-
export { SolelyTag } from './tag';
|
|
10
|
-
export { SolelyBadge } from './badge';
|
|
11
|
-
export { SolelyAlert } from './alert';
|
|
12
|
-
export { SolelySwitch } from './switch';
|
|
13
|
-
export { SolelyCheckbox } from './checkbox';
|
|
14
|
-
export { SolelyRadio } from './radio';
|
|
15
|
-
export { SolelySelect } from './select';
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export
|
|
35
|
-
export type {
|
|
36
|
-
export type {
|
|
37
|
-
export type {
|
|
38
|
-
export type {
|
|
39
|
-
export type {
|
|
40
|
-
export type {
|
|
41
|
-
export type {
|
|
42
|
-
export type {
|
|
43
|
-
export type {
|
|
44
|
-
export type {
|
|
45
|
-
export type {
|
|
46
|
-
export type {
|
|
47
|
-
export type {
|
|
48
|
-
export type {
|
|
49
|
-
export type {
|
|
50
|
-
export type {
|
|
51
|
-
export type {
|
|
52
|
-
export type {
|
|
53
|
-
export type {
|
|
54
|
-
export type {
|
|
55
|
-
export type {
|
|
56
|
-
export type {
|
|
57
|
-
export type {
|
|
58
|
-
export type {
|
|
59
|
-
export type {
|
|
60
|
-
export type {
|
|
61
|
-
export type {
|
|
62
|
-
export type {
|
|
63
|
-
export type {
|
|
4
|
+
export { SolelyButton } from './button/index.js';
|
|
5
|
+
export { SolelyIcon, registerIcon, registerIcons, getIcon, hasIcon, getRegisteredIcons } from './icon/index.js';
|
|
6
|
+
export { SolelyInput } from './input/index.js';
|
|
7
|
+
export { SolelyFab } from './fab/index.js';
|
|
8
|
+
export { SolelyCard } from './card/index.js';
|
|
9
|
+
export { SolelyTag } from './tag/index.js';
|
|
10
|
+
export { SolelyBadge } from './badge/index.js';
|
|
11
|
+
export { SolelyAlert } from './alert/index.js';
|
|
12
|
+
export { SolelySwitch } from './switch/index.js';
|
|
13
|
+
export { SolelyCheckbox } from './checkbox/index.js';
|
|
14
|
+
export { SolelyRadio } from './radio/index.js';
|
|
15
|
+
export { SolelySelect } from './select/index.js';
|
|
16
|
+
export { SolelySelectOption } from './select/option.js';
|
|
17
|
+
export { SolelyProgress } from './progress/index.js';
|
|
18
|
+
export { SolelyDivider } from './divider/index.js';
|
|
19
|
+
export { SolelyTabs } from './tabs/index.js';
|
|
20
|
+
export { SolelyTable } from './table/index.js';
|
|
21
|
+
export { SolelySkeleton } from './skeleton/index.js';
|
|
22
|
+
export { SolelyEmpty } from './empty/index.js';
|
|
23
|
+
export { SolelyPagination } from './pagination/index.js';
|
|
24
|
+
export { SolelyBreadcrumb } from './breadcrumb/index.js';
|
|
25
|
+
export { SolelySteps } from './steps/index.js';
|
|
26
|
+
export { SolelyTimeline } from './timeline/index.js';
|
|
27
|
+
export { SolelyBackTop } from './backtop/index.js';
|
|
28
|
+
export { SolelyUpload } from './upload/index.js';
|
|
29
|
+
export { SolelyRate } from './rate/index.js';
|
|
30
|
+
export { SolelySlider } from './slider/index.js';
|
|
31
|
+
export { SolelyTree } from './tree/index.js';
|
|
32
|
+
export { SolelyCoordinateInput } from './coordinate-input/index.js';
|
|
33
|
+
export { SolelyTooltip } from './tooltip/index.js';
|
|
34
|
+
export { SolelyNotFound } from './not-found/index.js';
|
|
35
|
+
export type { ButtonProps, ButtonType, ButtonSize, ButtonShape } from './button/types.js';
|
|
36
|
+
export type { IconProps, IconSize, IconSpin, IconRefs } from './icon/types.js';
|
|
37
|
+
export type { InputProps, InputType, InputSize } from './input/types.js';
|
|
38
|
+
export type { FabProps, FabPosition, FabSize, FabShape } from './fab/types.js';
|
|
39
|
+
export type { CardProps, CardSize } from './card/types.js';
|
|
40
|
+
export type { TagProps, TagType, TagSize } from './tag/types.js';
|
|
41
|
+
export type { BadgeProps, BadgeStatus } from './badge/types.js';
|
|
42
|
+
export type { AlertProps, AlertType } from './alert/types.js';
|
|
43
|
+
export type { SwitchProps, SwitchSize } from './switch/types.js';
|
|
44
|
+
export type { CheckboxProps, CheckboxSize, CheckboxType, CheckboxRefs } from './checkbox/types.js';
|
|
45
|
+
export type { RadioProps, RadioGroupProps } from './radio/types.js';
|
|
46
|
+
export type { SelectProps, SelectOption, SelectSize, SelectValue, SelectMethods } from './select/types.js';
|
|
47
|
+
export type { ProgressProps, ProgressType, ProgressStatus } from './progress/types.js';
|
|
48
|
+
export type { DividerProps, DividerType, DividerOrientation } from './divider/types.js';
|
|
49
|
+
export type { TabsProps, TabsType, TabsPosition, TabsSize, TabItem } from './tabs/types.js';
|
|
50
|
+
export type { TableProps, TableSize, TableColumn } from './table/types.js';
|
|
51
|
+
export type { SkeletonProps, SkeletonAvatarShape, SkeletonElement } from './skeleton/types.js';
|
|
52
|
+
export type { EmptyProps } from './empty/types.js';
|
|
53
|
+
export type { PaginationProps, PaginationSize } from './pagination/types.js';
|
|
54
|
+
export type { BreadcrumbProps, BreadcrumbItem } from './breadcrumb/types.js';
|
|
55
|
+
export type { StepsProps, StepsDirection, StepsSize, StepItem, StepStatus } from './steps/types.js';
|
|
56
|
+
export type { TimelineProps, TimelineMode, TimelineItem, TimelineItemPosition } from './timeline/types.js';
|
|
57
|
+
export type { BackTopProps } from './backtop/types.js';
|
|
58
|
+
export type { UploadProps, UploadFile, UploadListType } from './upload/types.js';
|
|
59
|
+
export type { RateProps } from './rate/types.js';
|
|
60
|
+
export type { SliderProps } from './slider/types.js';
|
|
61
|
+
export type { TreeProps, TreeNode } from './tree/types.js';
|
|
62
|
+
export type { CoordinateInputProps, CoordinateType, DMS, Coordinate, DMSCoordinate } from './coordinate-input/types.js';
|
|
63
|
+
export type { TooltipProps, TooltipPlacement, TooltipTrigger } from './tooltip/types.js';
|
|
64
|
+
export type { NotFoundProps } from './not-found/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SolelyButton as o}from"./button/index.js";import{SolelyIcon as i,getIcon as r,getRegisteredIcons as m,hasIcon as t,registerIcon as e,registerIcons as n}from"./icon/index.js";import{SolelyInput as
|
|
1
|
+
import{SolelyButton as o}from"./button/index.js";import{SolelyIcon as i,getIcon as r,getRegisteredIcons as m,hasIcon as t,registerIcon as e,registerIcons as n}from"./icon/index.js";import{SolelyInput as p}from"./input/index.js";import{SolelyFab as s}from"./fab/index.js";import{SolelyCard as d}from"./card/index.js";import{SolelyTag as f}from"./tag/index.js";import{SolelyBadge as x}from"./badge/index.js";import{SolelyAlert as j}from"./alert/index.js";import{SolelySwitch as a}from"./switch/index.js";import{SolelyCheckbox as l}from"./checkbox/index.js";import{SolelyRadio as c}from"./radio/index.js";import{SolelySelect as b}from"./select/index.js";import{SelectOption as u}from"./select/option.js";import{SolelyProgress as g}from"./progress/index.js";import{SolelyDivider as k}from"./divider/index.js";import{SolelyTabs as h}from"./tabs/index.js";import{SolelyTable as y}from"./table/index.js";import{SolelySkeleton as S}from"./skeleton/index.js";import{SolelyEmpty as v}from"./empty/index.js";import{SolelyPagination as w}from"./pagination/index.js";import{SolelyBreadcrumb as O}from"./breadcrumb/index.js";import{SolelySteps as q}from"./steps/index.js";import{SolelyTimeline as z}from"./timeline/index.js";import{SolelyBackTop as A}from"./backtop/index.js";import{SolelyUpload as B}from"./upload/index.js";import{SolelyRate as C}from"./rate/index.js";import{SolelySlider as D}from"./slider/index.js";import{SolelyTree as E}from"./tree/index.js";import{SolelyCoordinateInput as F}from"./coordinate-input/index.js";import{SolelyTooltip as G}from"./tooltip/index.js";import{SolelyNotFound as H}from"./not-found/index.js";export{j as SolelyAlert,A as SolelyBackTop,x as SolelyBadge,O as SolelyBreadcrumb,o as SolelyButton,d as SolelyCard,l as SolelyCheckbox,F as SolelyCoordinateInput,k as SolelyDivider,v as SolelyEmpty,s as SolelyFab,i as SolelyIcon,p as SolelyInput,H as SolelyNotFound,w as SolelyPagination,g as SolelyProgress,c as SolelyRadio,C as SolelyRate,b as SolelySelect,u as SolelySelectOption,S as SolelySkeleton,D as SolelySlider,q as SolelySteps,a as SolelySwitch,y as SolelyTable,h as SolelyTabs,f as SolelyTag,z as SolelyTimeline,G as SolelyTooltip,E as SolelyTree,B as SolelyUpload,r as getIcon,m as getRegisteredIcons,t as hasIcon,e as registerIcon,n as registerIcons};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./style.css.cjs"),t=require("./index.html.cjs"),a=require("../../../runtime/component/base-element.cjs"),s=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelyInput=class extends a.default{_filteredSuggestions=[];inputElement;searchDebounceTimer;get filteredSuggestions(){return this._filteredSuggestions}mounted(){this.refresh(),this.inputElement=this.shadowRoot?.querySelector("input, textarea"),this.$data.autofocus&&this.focus()}unmounted(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=void 0)}hasPrefixSlot(){return null!==this.querySelector('[slot="prefix"]')}hasSuffixSlot(){return null!==this.querySelector('[slot="suffix"]')}getWrapperClasses(){const e={};return"small"===this.$data.size?e["form-control--sm"]=!0:"large"===this.$data.size&&(e["form-control--lg"]=!0),"error"===this.$data.status?e["is-error"]=!0:"warning"===this.$data.status?e["is-warning"]=!0:"success"===this.$data.status&&(e["is-success"]=!0),"textarea"===this.$data.type&&(e["form-control--textarea"]=!0),e["is-focused"]=!!this.$data.focused,e["is-disabled"]=!!this.$data.disabled,e["is-readonly"]=!!this.$data.readonly,e["form-control--block"]=!!this.$data.block,e}getCharCount(){return this.$data.value?.length||0}formatValue(e){if(!e)return"";switch(this.$data.format){case"phone":return e.replace(/(\d{3})(\d{4})(\d{4})/,"$1 $2 $3").trim();case"bankcard":return e.replace(/(\d{4})(?=\d)/g,"$1 ").trim();case"idcard":return e.replace(/(\d{6})(\d{4})(\d{4})(\d{4})(\d{0,4})/,"$1 $2 $3 $4 $5").trim();default:return e}}unformatValue(e){return e?e.replace(/\s/g,""):""}handleInput(e){const t=e.target;let a=t.value;if("none"!==this.$data.format&&"textarea"!==this.$data.type){const e=this.unformatValue(a),s=this.formatValue(e);s!==a&&(t.value=s,a=s)}this.$data.value=a,this.$data.suggestions&&this.$data.suggestions.length>0&&this.updateSuggestions(a)}handleFocus(e){this.$data.focused=!0,this.$data.selectall&&this.$data.value&&this.select()}handleBlur(e){this.$data.focused=!1}handleChange(e){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}handleKeydown(e){"Enter"===e.key&&"search"===this.$data.type&&this.emit("search",{value:this.$data.value})}handleClear(){this.$data.value="",this.dispatchEvent(new Event("clear",{bubbles:!0,composed:!0})),this.focus()}togglePassword(){this.$data.passwordVisible=!this.$data.passwordVisible}async handleCopy(){try{const e=this.unformatValue(this.$data.value);await navigator.clipboard.writeText(e),this.emit("copy",{value:e})}catch(e){this.emit("copy-error",{error:e})}}updateSuggestions(e){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{this._updateSuggestionsImpl(e),this.searchDebounceTimer=void 0},300)}_updateSuggestionsImpl(e){if(!e||!this.$data.suggestions)return this._filteredSuggestions=[],void this.refresh();this._filteredSuggestions=this.$data.suggestions.filter(t=>t.toLowerCase().includes(e.toLowerCase())),this.refresh()}selectSuggestion(e){this.$data.value=e,this._filteredSuggestions=[],this.refresh(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}focus(){const e=this.inputElement||this.shadowRoot?.querySelector("input, textarea");e?.focus(),this.$data.focused=!0}blur(){const e=this.inputElement||this.shadowRoot?.querySelector("input, textarea");e?.blur(),this.$data.focused=!1}setValue(e){this.$data.value=e}getValue(){return this.unformatValue(this.$data.value)}get value(){return this.getValue()}set value(e){this.setValue(e)}select(){const e=this.inputElement||this.shadowRoot?.querySelector("input, textarea");e?.select()}},exports.SolelyInput=((e,t)=>{for(var a,s=t,r=e.length-1;r>=0;r--)(a=e[r])&&(s=a(s)||s);return s})([s.CustomElement({tagName:"solely-input",template:t.__SOLELY_IR__,styles:e.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"text"},{name:"size",type:"string",default:"medium"},{name:"value",type:"string",default:""},{name:"placeholder",type:"string",default:""},{name:"disabled",type:"boolean",default:!1},{name:"readonly",type:"boolean",default:!1},{name:"required",type:"boolean",default:!1},{name:"maxlength",type:"number"},{name:"minlength",type:"number"},{name:"clearable",type:"boolean",default:!1},{name:"showpassword",type:"boolean",default:!1},{name:"passwordVisible",type:"boolean",default:!1},{name:"focused",type:"boolean",default:!1},{name:"prefix",type:"string",default:""},{name:"suffix",type:"string",default:""},{name:"status",type:"string",default:""},{name:"message",type:"string",default:""},{name:"showcount",type:"boolean",default:!1},{name:"rows",type:"number",default:3},{name:"autofocus",type:"boolean",default:!1},{name:"selectall",type:"boolean",default:!1},{name:"copyable",type:"boolean",default:!1},{name:"format",type:"string",default:"none"},{name:"suggestions",type:"array",default:[]},{name:"block",type:"boolean",default:!1}]})],exports.SolelyInput);
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../shared/size.cjs"),t=require("../../../shared/boolean.cjs"),a=require("../../../shared/enum.cjs"),s=require("../../../shared/form-associated.cjs"),i=require("./style.css.cjs"),r=require("./index.html.cjs"),l=require("../../../runtime/component/base-element.cjs"),o=require("../../../runtime/component/decorators.cjs");var n=Object.defineProperty;Object.getOwnPropertyDescriptor;let u=0;const d=["error","warning","success",""];var h,c,m;exports.SolelyInput=class extends l.default{get size(){return e.normalizeSize(this.$data.size)}set size(t){this.$data.size=e.normalizeSize(t)}get showpassword(){return!!this.$data.showPassword}set showpassword(e){this.$data.showPassword=!!e}get showcount(){return!!this.$data.showCount}set showcount(e){this.$data.showCount=!!e}get selectall(){return!!this.$data.selectAll}set selectall(e){this.$data.selectAll=!!e}_filteredSuggestions=[];inputElement;searchDebounceTimer;valueBeforeChange;_messageId="solely-input-message-"+ ++u;created(){s.initFormAssociation(this,{family:"scalar",read:()=>this.getValue(),write:(e,t)=>this.setValue(String(e),!0),encode:e=>[String(e)],name:()=>this.formFieldName(),disabled:()=>!!this.$data.disabled,required:()=>!!this.$data.required,ariaTarget:()=>this.getNativeControl(),tabTargets:()=>this.getNativeControl(),anchors:()=>{const e=this.getNativeControl();return e?[e]:null},validate:e=>this.validateValue(String(e)),invalidMessage:()=>this.$data.invalidMessage||"",messageContext:()=>this.buildMessageContext(),hasVisualError:()=>"error"===this.getStatus(),readDefault:()=>this.readExplicitDefaultValue(),changeDetail:(e,t,a)=>({name:this.formFieldName(),value:e,previousValue:t,source:a})})}formAssociatedCallback(){s.handleFormAssociatedCallback(this)}formResetCallback(){s.handleFormResetCallback(this)}formDisabledCallback(e){s.handleFormDisabledCallback(this,e)}get validity(){return s.formValidity(this)}get validationMessage(){return s.formValidationMessage(this)}get willValidate(){return!s.effectiveDisabled(this)&&!this.$data.readonly}checkValidity(){return s.checkFormValidity(this)}reportValidity(){return s.reportFormValidity(this)}setCustomValidity(e){s.setCustomValidity(this,e)}syncFormState(){s.syncFormValue(this),s.syncValidity(this),s.syncAria(this)}getNativeControl(){return this.inputElement?.isConnected?this.inputElement:this.shadowRoot?.querySelector("input, textarea")??null}readExplicitDefaultValue(){const e=this.getAttribute("default-value");if(null!==e)return e;const t=this.$data.defaultValue;return"string"==typeof t&&""!==t?t:void 0}formFieldName(){return this.$data.name||this.getAttribute("name")||""}validateValue(e){if(this.$data.readonly)return null;const t={},a=Number(this.$data.minlength),s=Number(this.$data.maxlength);this.$data.required&&""===e?t.valueMissing=!0:(a>0&&e.length<a&&(t.tooShort=!0),s>0&&e.length>s&&(t.tooLong=!0));const i=this.getNativeControl()?.validity;return i&&(i.typeMismatch&&(t.typeMismatch=!0),i.patternMismatch&&(t.patternMismatch=!0),i.badInput&&(t.badInput=!0)),Object.values(t).some(Boolean)?{flags:t,anchor:this.getNativeControl()??void 0}:null}buildMessageContext(){const e={type:this.$data.type},t=Number(this.$data.minlength),a=Number(this.$data.maxlength);return t>0&&(e.minlength=t),a>0&&(e.maxlength=a),e}get filteredSuggestions(){return this._filteredSuggestions}mounted(){this.refresh(),this.inputElement=this.shadowRoot?.querySelector("input, textarea"),this.$data.autofocus&&this.focus(),this.syncNativeAttributes(),this.adjustAutosize()}unmounted(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=void 0)}updated(){this.syncNativeAttributes(),this.syncFormState(),this.adjustAutosize()}getMessageId(){return this.$data.message?this._messageId:void 0}getGroupClasses(){const e={};return this.$data.addonBefore&&(e["form-control-group--addon-before"]=!0),this.$data.addonAfter&&(e["form-control-group--addon-after"]=!0),e}syncNativeAttributes(){const e=this.getNativeControl();if(!e)return;const t=[["autocomplete",this.$data.autocomplete],["inputmode",this.$data.inputmode],["enterkeyhint",this.$data.enterkeyhint]];for(const[i,r]of t)""===r||null==r?e.removeAttribute(i):e.setAttribute(i,r);const a=this.$data.spellcheck;""===a||null==a?e.hasAttribute("spellcheck")&&e.removeAttribute("spellcheck"):e.setAttribute("spellcheck","false"===a?"false":"true");const s=[["min",this.$data.min],["max",this.$data.max],["step",this.$data.step]];for(const[i,r]of s)"number"==typeof r&&Number.isFinite(r)?e.setAttribute(i,String(r)):e.removeAttribute(i)}adjustAutosize(){if(!this.$data.autosize||"textarea"!==this.$data.type)return;const e=this.getNativeControl();if(!e||"TEXTAREA"!==e.tagName)return;const t=e;t.style.height="auto",t.style.height=`${t.scrollHeight}px`}hasPrefixSlot(){return null!==this.querySelector('[slot="prefix"]')}hasSuffixSlot(){return null!==this.querySelector('[slot="suffix"]')}isEffectivelyDisabled(){return s.effectiveDisabled(this)}hasActions(){const e=this.isEffectivelyDisabled(),t=!!this.$data.value,a="password"===this.$data.type&&!!this.$data.showPassword,s=!!this.$data.copyable&&t&&!e,i=!!this.$data.clearable&&t&&!this.$data.readonly&&!e;return a||s||i}getStatus(){return a.oneOf(this.$data.status,d,"")}getWrapperClasses(){const e={};"small"===this.$data.size?e["form-control--sm"]=!0:"large"===this.$data.size&&(e["form-control--lg"]=!0);const t=this.getStatus();return"error"===t?e["is-error"]=!0:"warning"===t?e["is-warning"]=!0:"success"===t&&(e["is-success"]=!0),"textarea"===this.$data.type&&(e["form-control--textarea"]=!0),this.$data.autosize&&"textarea"===this.$data.type&&(e["form-control--autosize"]=!0),e["is-focused"]=!!this.$data.focused,e["is-disabled"]=this.isEffectivelyDisabled(),e["is-readonly"]=!!this.$data.readonly,e["form-control--block"]=!!this.$data.block,e}getCharCount(){return this.$data.value?.length||0}formatValue(e){if(!e)return"";switch(this.$data.format){case"phone":return e.replace(/(\d{3})(\d{4})(\d{4})/,"$1 $2 $3").trim();case"bankcard":return e.replace(/(\d{4})(?=\d)/g,"$1 ").trim();case"idcard":return e.replace(/(\d{6})(\d{4})(\d{4})(\d{4})(\d{0,4})/,"$1 $2 $3 $4 $5").trim();default:return e}}unformatValue(e){return e?e.replace(/\s/g,""):""}handleInput(e){const t=e.target;let a=t.value;if("none"!==this.$data.format&&"textarea"!==this.$data.type){const e=this.unformatValue(a),s=this.formatValue(e);s!==a&&(t.value=s,a=s)}this.$data.value=a,this.syncFormState(),this.$data.suggestions&&this.$data.suggestions.length>0&&this.updateSuggestions(a)}handleFocus(e){this.$data.focused=!0,this.valueBeforeChange=this.getValue(),this.$data.selectAll&&this.$data.value&&this.select()}handleBlur(e){this.$data.focused=!1}handleChange(e){e.stopPropagation();const t=this.getValue(),a=this.valueBeforeChange??t;this.valueBeforeChange=t,s.emitChange(this,{name:this.formFieldName(),value:t,previousValue:a,source:"user"})}handleKeydown(e){"Enter"===e.key&&(this.emit("press-enter",{value:this.$data.value}),"search"===this.$data.type&&this.emit("search",{value:this.$data.value}))}handleActionKeydown(e,t){"Enter"!==e.key&&" "!==e.key||this.isEffectivelyDisabled()||(e.preventDefault(),"clear"===t?this.handleClear():"password"===t?this.togglePassword():this.handleCopy())}handleSuggestionKeydown(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.selectSuggestion(t))}handleClear(){this.isEffectivelyDisabled()||this.$data.readonly||(this.$data.value="",this.syncFormState(),this.dispatchEvent(new Event("clear",{bubbles:!0,composed:!0})),this.focus())}togglePassword(){this.isEffectivelyDisabled()||(this.$data.passwordVisible=!this.$data.passwordVisible)}async handleCopy(){if(!this.isEffectivelyDisabled())try{const e=this.unformatValue(this.$data.value);await navigator.clipboard.writeText(e),this.emit("copy",{value:e})}catch(e){this.emit("copy-error",{error:e})}}updateSuggestions(e){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{this._updateSuggestionsImpl(e),this.searchDebounceTimer=void 0},300)}_updateSuggestionsImpl(e){if(!e||!this.$data.suggestions)return this._filteredSuggestions=[],void this.refresh();this._filteredSuggestions=this.$data.suggestions.filter(t=>t.toLowerCase().includes(e.toLowerCase())),this.refresh()}selectSuggestion(e){if(this.isEffectivelyDisabled())return;const t=this.getValue();this.$data.value=e,this._filteredSuggestions=[],this.syncFormState(),this.refresh(),s.emitChange(this,{name:this.formFieldName(),value:this.getValue(),previousValue:t,source:"user"})}focus(){const e=this.inputElement||this.shadowRoot?.querySelector("input, textarea");e?.focus(),this.$data.focused=!0}blur(){const e=this.inputElement||this.shadowRoot?.querySelector("input, textarea");e?.blur(),this.$data.focused=!1}setValue(e,t=!1){const a=this.getValue();this.$data.value=e,this.syncFormState(),t||s.emitChange(this,{name:this.formFieldName(),value:this.getValue(),previousValue:a,source:"api"})}getValue(){return this.unformatValue(this.$data.value)}get value(){return this.getValue()}set value(e){this.setValue(e,!0)}get defaultValue(){return this.$data.defaultValue}set defaultValue(e){this.$data.defaultValue=e,this.isSyncingProps||s.setFormDefault(this,e||"")}readBooleanAlias(...e){return e.some(e=>t.parseBooleanAttribute(this.getAttribute(e)))}attributeChanged(e,t,a){switch(e){case"show-password":case"showpassword":this.$data.showPassword=this.readBooleanAlias("show-password","showpassword");break;case"show-count":case"showcount":this.$data.showCount=this.readBooleanAlias("show-count","showcount");break;case"select-all":case"selectall":this.$data.selectAll=this.readBooleanAlias("select-all","selectall");break;case"default-value":s.setFormDefault(this,this.$data.defaultValue||"")}}select(){const e=this.inputElement||this.shadowRoot?.querySelector("input, textarea");e?.select()}},h=exports.SolelyInput,m=!0,(c="formAssociated")in h?n(h,c,{enumerable:!0,configurable:!0,writable:!0,value:m}):h[c]=m,exports.SolelyInput=((e,t)=>{for(var a,s=t,i=e.length-1;i>=0;i--)(a=e[i])&&(s=a(s)||s);return s})([o.CustomElement({tagName:"solely-input",template:r.__SOLELY_IR__,styles:i.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"type",type:"string",default:"text"},{name:"size",type:"string",default:"medium"},{name:"ariaLabel",type:"string",default:""},{name:"name",type:"string",default:""},{name:"value",type:"string",default:""},{name:"defaultValue",type:"string",default:""},{name:"placeholder",type:"string",default:""},{name:"disabled",type:"boolean",default:!1,reflect:!0},{name:"readonly",type:"boolean",default:!1,reflect:!0},{name:"required",type:"boolean",default:!1,reflect:!0},{name:"invalidMessage",type:"string",default:""},{name:"maxlength",type:"number"},{name:"minlength",type:"number"},{name:"clearable",type:"boolean",default:!1},{name:"showPassword",type:"boolean",default:!1},{name:"showpassword",type:"boolean"},{name:"prefix",type:"string",default:""},{name:"suffix",type:"string",default:""},{name:"status",type:"string",default:""},{name:"message",type:"string",default:""},{name:"showCount",type:"boolean",default:!1},{name:"showcount",type:"boolean"},{name:"rows",type:"number",default:3},{name:"autofocus",type:"boolean",default:!1},{name:"selectAll",type:"boolean",default:!1},{name:"selectall",type:"boolean"},{name:"copyable",type:"boolean",default:!1},{name:"format",type:"string",default:"none"},{name:"suggestions",type:"array",default:[]},{name:"block",type:"boolean",default:!1},{name:"addonBefore",type:"string",default:""},{name:"addonAfter",type:"string",default:""},{name:"autosize",type:"boolean",default:!1},{name:"autocomplete",type:"string",default:""},{name:"inputmode",type:"string",default:""},{name:"enterkeyhint",type:"string",default:""},{name:"spellcheck",type:"string",default:""},{name:"min",type:"number"},{name:"max",type:"number"},{name:"step",type:"number"}]})],exports.SolelyInput);
|
|
@@ -1,12 +1,60 @@
|
|
|
1
|
-
import { BaseElement } from '../../../runtime/component';
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { BaseElement } from '../../../runtime/component/index.js';
|
|
2
|
+
import { SizeInput } from '../../../shared/size.js';
|
|
3
|
+
import { InputInternalState, InputProps, InputRefs, InputSize, InputStatus } from './types.js';
|
|
4
|
+
declare class SolelyInput extends BaseElement<InputProps & InputInternalState, InputRefs> {
|
|
5
|
+
/** 统一尺寸语义:middle / default 归一为 medium */
|
|
6
|
+
get size(): InputSize;
|
|
7
|
+
set size(value: SizeInput);
|
|
8
|
+
/** 表单关联自定义元素(C-FORM-01);必须声明在原始类上,装饰器生成的子类会自动继承 */
|
|
9
|
+
static readonly formAssociated = true;
|
|
10
|
+
/** @deprecated 旧属性名兼容,请使用 showPassword */
|
|
11
|
+
get showpassword(): boolean;
|
|
12
|
+
set showpassword(value: boolean);
|
|
13
|
+
/** @deprecated 旧属性名兼容,请使用 showCount */
|
|
14
|
+
get showcount(): boolean;
|
|
15
|
+
set showcount(value: boolean);
|
|
16
|
+
/** @deprecated 旧属性名兼容,请使用 selectAll */
|
|
17
|
+
get selectall(): boolean;
|
|
18
|
+
set selectall(value: boolean);
|
|
4
19
|
/** 过滤后的搜索建议 */
|
|
5
20
|
private _filteredSuggestions;
|
|
6
21
|
/** 缓存输入框 DOM 引用 */
|
|
7
22
|
private inputElement?;
|
|
8
23
|
/** 搜索防抖定时器 */
|
|
9
24
|
private searchDebounceTimer?;
|
|
25
|
+
/** 聚焦时的值快照,供原生 change 事件计算 previousValue */
|
|
26
|
+
private valueBeforeChange?;
|
|
27
|
+
/** 消息区唯一 id(aria-describedby 目标) */
|
|
28
|
+
private readonly _messageId;
|
|
29
|
+
/**
|
|
30
|
+
* 接入表单关联基座(C-FORM-02 / C-FORM-09)
|
|
31
|
+
*/
|
|
32
|
+
created(): void;
|
|
33
|
+
formAssociatedCallback(): void;
|
|
34
|
+
formResetCallback(): void;
|
|
35
|
+
formDisabledCallback(disabled: boolean): void;
|
|
36
|
+
/** 公开有效性代理(C-FORM-16) */
|
|
37
|
+
get validity(): ValidityState;
|
|
38
|
+
get validationMessage(): string;
|
|
39
|
+
/** disabled / readonly 时不参与约束校验 */
|
|
40
|
+
get willValidate(): boolean;
|
|
41
|
+
checkValidity(): boolean;
|
|
42
|
+
reportValidity(): boolean;
|
|
43
|
+
setCustomValidity(message: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* 同步值 / 有效性 / ARIA(C-FORM-04)
|
|
46
|
+
*/
|
|
47
|
+
private syncFormState;
|
|
48
|
+
/** 获取 shadow DOM 内的原生输入控件 */
|
|
49
|
+
private getNativeControl;
|
|
50
|
+
/** 读取显式 defaultValue;未显式设置时返回 undefined,由基座捕获初始值 */
|
|
51
|
+
private readExplicitDefaultValue;
|
|
52
|
+
/** 字段名:property 优先,其次 attribute */
|
|
53
|
+
private formFieldName;
|
|
54
|
+
/** 计算约束校验(C-FORM-18:只使用组件真正支持的标志) */
|
|
55
|
+
private validateValue;
|
|
56
|
+
/** 内置消息占位符 */
|
|
57
|
+
private buildMessageContext;
|
|
10
58
|
/**
|
|
11
59
|
* 获取过滤后的搜索建议(供模板使用)
|
|
12
60
|
*/
|
|
@@ -16,6 +64,27 @@ declare class SolelyInput extends BaseElement<InputProps, InputRefs> {
|
|
|
16
64
|
*/
|
|
17
65
|
mounted(): void;
|
|
18
66
|
unmounted(): void;
|
|
67
|
+
/**
|
|
68
|
+
* 每次状态变化后统一同步(含 name / required / status / readonly 等 attribute 路径)
|
|
69
|
+
*/
|
|
70
|
+
updated(): void;
|
|
71
|
+
/**
|
|
72
|
+
* 消息区 id:仅在展示 message 时交给 aria-describedby
|
|
73
|
+
*/
|
|
74
|
+
getMessageId(): string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* 外层分组(addonBefore / addonAfter)class
|
|
77
|
+
*/
|
|
78
|
+
getGroupClasses(): Record<string, boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* 把 input / textarea 通用的原生属性透传到真实控件。
|
|
81
|
+
* 走 setAttribute 而不是模板绑定,避免自定义元素属性名与 DOM property 命名差异。
|
|
82
|
+
*/
|
|
83
|
+
private syncNativeAttributes;
|
|
84
|
+
/**
|
|
85
|
+
* textarea 随内容自动增高(autosize)
|
|
86
|
+
*/
|
|
87
|
+
private adjustAutosize;
|
|
19
88
|
/**
|
|
20
89
|
* 检查是否有 prefix 插槽
|
|
21
90
|
*/
|
|
@@ -24,6 +93,20 @@ declare class SolelyInput extends BaseElement<InputProps, InputRefs> {
|
|
|
24
93
|
* 检查是否有 suffix 插槽
|
|
25
94
|
*/
|
|
26
95
|
hasSuffixSlot(): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* 模板与交互统一读取:作者 disabled 与 fieldset 级联禁用的合并结果。
|
|
98
|
+
*/
|
|
99
|
+
isEffectivelyDisabled(): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* 右侧动作区是否存在任一装饰按钮(密码显示 / 复制 / 清空)。
|
|
102
|
+
* 模板据此决定是否渲染 .form-control__actions 容器,
|
|
103
|
+
* 避免容器为空时也占用 margin 与布局位置,导致输入框右内边距视觉不齐。
|
|
104
|
+
*/
|
|
105
|
+
hasActions(): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* 归一化状态:只接受 error / warning / success,其它值一律视为“无状态”
|
|
108
|
+
*/
|
|
109
|
+
getStatus(): InputStatus;
|
|
27
110
|
/**
|
|
28
111
|
* 获取 wrapper class 对象
|
|
29
112
|
*/
|
|
@@ -55,11 +138,19 @@ declare class SolelyInput extends BaseElement<InputProps, InputRefs> {
|
|
|
55
138
|
/**
|
|
56
139
|
* 值改变事件处理(失焦或回车时触发)
|
|
57
140
|
*/
|
|
58
|
-
handleChange(
|
|
141
|
+
handleChange(event: Event): void;
|
|
59
142
|
/**
|
|
60
143
|
* 键盘事件处理
|
|
61
144
|
*/
|
|
62
145
|
handleKeydown(event: KeyboardEvent): void;
|
|
146
|
+
/**
|
|
147
|
+
* 操作件键盘激活:Enter / Space 等价点击,禁用态不响应。
|
|
148
|
+
*/
|
|
149
|
+
handleActionKeydown(event: KeyboardEvent, action: 'clear' | 'password' | 'copy'): void;
|
|
150
|
+
/**
|
|
151
|
+
* 联想项键盘激活
|
|
152
|
+
*/
|
|
153
|
+
handleSuggestionKeydown(event: KeyboardEvent, suggestion: string): void;
|
|
63
154
|
/**
|
|
64
155
|
* 清除输入
|
|
65
156
|
*/
|
|
@@ -94,8 +185,10 @@ declare class SolelyInput extends BaseElement<InputProps, InputRefs> {
|
|
|
94
185
|
blur(): void;
|
|
95
186
|
/**
|
|
96
187
|
* 设置值
|
|
188
|
+
* @param value - 新值
|
|
189
|
+
* @param silent - 为 true 时不派发 change 事件(与 select/slider 等同类组件保持一致)
|
|
97
190
|
*/
|
|
98
|
-
setValue(value: string): void;
|
|
191
|
+
setValue(value: string, silent?: boolean): void;
|
|
99
192
|
/**
|
|
100
193
|
* 获取值
|
|
101
194
|
*/
|
|
@@ -106,8 +199,30 @@ declare class SolelyInput extends BaseElement<InputProps, InputRefs> {
|
|
|
106
199
|
get value(): string;
|
|
107
200
|
/**
|
|
108
201
|
* value 属性 setter
|
|
202
|
+
*
|
|
203
|
+
* 契约 D3:property 赋值一律静默,需要事件时显式调用 `setValue(value, false)`。
|
|
109
204
|
*/
|
|
110
205
|
set value(val: string);
|
|
206
|
+
/**
|
|
207
|
+
* defaultValue:property 写入时同步 form reset 目标。
|
|
208
|
+
*
|
|
209
|
+
* property → attribute 的镜像会被基座的 reflectingAttrs 保护跳过
|
|
210
|
+
* attributeChangedCallback,组件钩子拿不到这次变更,必须在 setter 中直连。
|
|
211
|
+
*/
|
|
212
|
+
get defaultValue(): string;
|
|
213
|
+
set defaultValue(val: string);
|
|
214
|
+
/**
|
|
215
|
+
* 读取多个别名属性,任一为 true 即返回 true。
|
|
216
|
+
* 显式 "false" / "0" 会被解析为 false,与框架属性语义一致。
|
|
217
|
+
*/
|
|
218
|
+
private readBooleanAlias;
|
|
219
|
+
/**
|
|
220
|
+
* attribute 写入后的状态校正
|
|
221
|
+
*
|
|
222
|
+
* 新旧属性名(show-password/showpassword 等)任一为 true 即视为 true,
|
|
223
|
+
* 两个都为 false(含显式 "false"/"0"、或都被移除)才置为 false。
|
|
224
|
+
*/
|
|
225
|
+
attributeChanged(name: string, _oldValue: unknown, _newValue: unknown): void;
|
|
111
226
|
/**
|
|
112
227
|
* 选择文本
|
|
113
228
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getWrapperClasses()},function(t){const{$data:a}=this;return this.hasPrefixSlot()},function(t){const{$data:a}=this;return a.prefix},function(t){const{$data:a}=this;return`${a.prefix}`},function(t){const{$data:a}=this;return"textarea"===a.type},function(t){const{$data:a}=this;return a.value},function(t){const{$data:a}=this;return a.placeholder},function(t){const{$data:a}=this;return a.disabled},function(t){const{$data:a}=this;return a.readonly},function(t){const{$data:a}=this;return a.maxlength},function(t){const{$data:a}=this;return a.minlength},function(t){const{$data:a}=this;return a.rows},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t){const{$data:a}=this;return a.readonly?"true":"false"},function(t){const{$data:a}=this;return"error"===a.status?"true":"false"},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleInput(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleFocus(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleBlur(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleChange(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleKeydown(t)},function(t){const{$data:a}=this;return a.passwordVisible&&"password"===a.type?"text":a.type},function(t){const{$data:a}=this;return a.clearable&&a.value&&!a.disabled},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleClear(t)},function(t){const{$data:a}=this;return"password"===a.type&&a.showpassword},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.togglePassword(t)},function(t){const{$data:a}=this;return a.passwordVisible?"🙈":"👁"},function(t){const{$data:a}=this;return a.copyable&&a.value},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleCopy(t)},function(t){const{$data:a}=this;return this.hasSuffixSlot()},function(t){const{$data:a}=this;return a.suffix},function(t){const{$data:a}=this;return`${a.suffix}`},function(t){const{$data:a}=this;return a.suggestions&&a.suggestions.length>0&&this.filteredSuggestions&&this.filteredSuggestions.length>0},function(t){const{$data:a}=this;return this.filteredSuggestions},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};var[e]=a.map(t=>t.itmVal),[o]=a.map(t=>t.idxVal);this.selectSuggestion(e)},function(t){const{$data:a}=this;var[n]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return`${n}`},function(t){const{$data:a}=this;return a.showcount&&a.maxlength},function(t){const{$data:a}=this;return`${this.getCharCount()}`},function(t){const{$data:a}=this;return`${a.maxlength}`},function(t){const{$data:a}=this;return a.message},function(t){const{$data:a}=this;return`${a.message}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"form-control",d:0},{k:":class",f:1,d:1}],c:[{t:2,d:0,x:" prefix 插槽 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:2,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"prefix",d:0}],c:[]}]}]},{f:3,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:1,d:1,f:4}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:5,c:[{t:0,d:1,g:"textarea",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input form-control__textarea",d:0},{k:":value",f:6,d:1},{k:":placeholder",f:7,d:1},{k:":disabled",f:8,d:1},{k:":readonly",f:9,d:1},{k:":maxlength",f:10,d:1},{k:":minlength",f:11,d:1},{k:":rows",f:12,d:1},{k:":aria-disabled",f:13,d:1},{k:":aria-readonly",f:14,d:1},{k:":aria-invalid",f:15,d:1},{k:"@input",f:16,d:1},{k:"@focus",f:17,d:1},{k:"@blur",f:18,d:1},{k:"@change",f:19,d:1},{k:"@keydown",f:20,d:1}],c:[]}]},{f:null,c:[{t:0,d:1,g:"input",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input",d:0},{k:":type",f:21,d:1},{k:":value",f:6,d:1},{k:":placeholder",f:7,d:1},{k:":disabled",f:8,d:1},{k:":readonly",f:9,d:1},{k:":maxlength",f:10,d:1},{k:":minlength",f:11,d:1},{k:":aria-disabled",f:13,d:1},{k:":aria-readonly",f:14,d:1},{k:":aria-invalid",f:15,d:1},{k:"@input",f:16,d:1},{k:"@focus",f:17,d:1},{k:"@blur",f:18,d:1},{k:"@change",f:19,d:1},{k:"@keydown",f:20,d:1}],c:[]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:22,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"clear",d:0},{k:"class",v:"close-btn form-control__clear",d:0},{k:"@click",f:23,d:1}],c:[{t:1,d:0,s:1,x:"×"}]}]},{f:24,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"password-toggle",d:0},{k:"class",v:"form-control__password-toggle",d:0},{k:"@click",f:25,d:1}],c:[{t:1,d:1,f:26}]}]},{f:27,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"copy",d:0},{k:"class",v:"form-control__copy",d:0},{k:"@click",f:28,d:1}],c:[{t:1,d:0,s:1,x:"📋"}]}]},{f:29,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"suffix",d:0}],c:[]}]}]},{f:30,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:1,d:1,f:31}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:32,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"dropdown",d:0},{k:"class",v:"dropdown",d:0}],c:[{t:6,d:1,f:33,i:"suggestion",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"dropdown-item",d:0},{k:"class",v:"dropdown__item",d:0},{k:"@click",f:34,d:1}],c:[{t:1,d:1,f:35}]}]}]}]}]}]},{t:7,d:1,b:[{f:36,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"count",d:0},{k:"class",v:"form-control__count",d:0}],c:[{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-current",d:0}],c:[{t:1,d:1,f:37}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"span",a:[{k:"class",v:"form-control__count-separator",d:0}],c:[{t:1,d:0,s:1,x:"/"}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-max",d:0}],c:[{t:1,d:1,f:38}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:39,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"message",d:0},{k:"class",v:"form-control__message form-control__message--{{$data.status || 'default'}}",d:0}],c:[{t:1,d:1,f:40}]}]}]}],s:{tf:40,cf:40,dn:3,tn:4,sn:1}};exports.__SOLELY_IR__=t,exports.default=t;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getGroupClasses()},function(t){const{$data:a}=this;return a.addonBefore},function(t){const{$data:a}=this;return`${a.addonBefore}`},function(t){const{$data:a}=this;return this.getWrapperClasses()},function(t){const{$data:a}=this;return this.hasPrefixSlot()},function(t){const{$data:a}=this;return a.prefix},function(t){const{$data:a}=this;return`${a.prefix}`},function(t){const{$data:a}=this;return"textarea"===a.type},function(t){const{$data:a}=this;return a.value},function(t){const{$data:a}=this;return a.placeholder},function(t){const{$data:a}=this;return this.isEffectivelyDisabled()},function(t){const{$data:a}=this;return a.readonly},function(t){const{$data:a}=this;return a.maxlength},function(t){const{$data:a}=this;return a.minlength},function(t){const{$data:a}=this;return a.rows},function(t){const{$data:a}=this;return a.ariaLabel||void 0},function(t){const{$data:a}=this;return this.isEffectivelyDisabled()?"true":"false"},function(t){const{$data:a}=this;return a.readonly?"true":"false"},function(t){const{$data:a}=this;return"error"===this.getStatus()?"true":"false"},function(t){const{$data:a}=this;return this.getMessageId()},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleInput(t)},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleFocus(t)},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleBlur(t)},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleChange(t)},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleKeydown(t)},function(t){const{$data:a}=this;return a.passwordVisible&&"password"===a.type?"text":a.type},function(t){const{$data:a}=this;return this.hasSuffixSlot()},function(t){const{$data:a}=this;return a.suffix},function(t){const{$data:a}=this;return`${a.suffix}`},function(t){const{$data:a}=this;return a.showCount&&"textarea"!==a.type},function(t){const{$data:a}=this;return`${this.getCharCount()}`},function(t){const{$data:a}=this;return`${a.maxlength}`},function(t){const{$data:a}=this;return this.hasActions()},function(t){const{$data:a}=this;return"password"===a.type&&a.showPassword},function(t){const{$data:a}=this;return this.isEffectivelyDisabled()?"-1":"0"},function(t){const{$data:a}=this;return a.passwordVisible?"true":"false"},function(t){const{$data:a}=this;return a.passwordVisible?"隐藏密码":"显示密码"},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.togglePassword()},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleActionKeydown(t,"password")},function(t){const{$data:a}=this;return a.passwordVisible},function(t){const{$data:a}=this;return a.copyable&&a.value&&!this.isEffectivelyDisabled()},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleCopy()},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleActionKeydown(t,"copy")},function(t){const{$data:a}=this;return a.clearable&&a.value&&!a.readonly&&!this.isEffectivelyDisabled()},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleClear()},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleActionKeydown(t,"clear")},function(t){const{$data:a}=this;return a.suggestions&&a.suggestions.length>0&&!this.isEffectivelyDisabled()&&this.filteredSuggestions&&this.filteredSuggestions.length>0},function(t){const{$data:a}=this;return this.filteredSuggestions},function(t){const{$data:a}=this;var[d]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return d},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};var[o]=a.map(t=>t.itmVal),[c]=a.map(t=>t.idxVal);this.selectSuggestion(o)},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};var[o]=a.map(t=>t.itmVal),[c]=a.map(t=>t.idxVal);this.handleSuggestionKeydown(t,o)},function(t){const{$data:a}=this;var[d]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return`${d}`},function(t){const{$data:a}=this;return a.addonAfter},function(t){const{$data:a}=this;return`${a.addonAfter}`},function(t){const{$data:a}=this;return a.showCount&&"textarea"===a.type},function(t){const{$data:a}=this;return a.message},function(t){const{$data:a}=this;return"form-control__message--"+(this.getStatus()||"default")},function(t){const{$data:a}=this;return`${a.message}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"group",d:0},{k:"class",v:"form-control-group",d:0},{k:":class",f:1,d:1}],c:[{t:2,d:0,x:" 前置附加内容 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:2,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"addon-before",d:0},{k:"class",v:"form-control__addon form-control__addon--before",d:0}],c:[{t:1,d:1,f:3}]}]}]},{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"form-control",d:0},{k:":class",f:4,d:1}],c:[{t:2,d:0,x:" prefix 插槽 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:5,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"prefix",d:0}],c:[]}]}]},{f:6,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:1,d:1,f:7}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:8,c:[{t:0,d:1,g:"textarea",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input form-control__textarea",d:0},{k:":value",f:9,d:1},{k:":placeholder",f:10,d:1},{k:":disabled",f:11,d:1},{k:":readonly",f:12,d:1},{k:":maxlength",f:13,d:1},{k:":minlength",f:14,d:1},{k:":rows",f:15,d:1},{k:":aria-label",f:16,d:1},{k:":aria-disabled",f:17,d:1},{k:":aria-readonly",f:18,d:1},{k:":aria-invalid",f:19,d:1},{k:":aria-describedby",f:20,d:1},{k:"@input",f:21,d:1},{k:"@focus",f:22,d:1},{k:"@blur",f:23,d:1},{k:"@change",f:24,d:1},{k:"@keydown",f:25,d:1}],c:[]}]},{f:null,c:[{t:0,d:1,g:"input",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input",d:0},{k:":type",f:26,d:1},{k:":value",f:9,d:1},{k:":placeholder",f:10,d:1},{k:":disabled",f:11,d:1},{k:":readonly",f:12,d:1},{k:":maxlength",f:13,d:1},{k:":minlength",f:14,d:1},{k:":aria-label",f:16,d:1},{k:":aria-disabled",f:17,d:1},{k:":aria-readonly",f:18,d:1},{k:":aria-invalid",f:19,d:1},{k:":aria-describedby",f:20,d:1},{k:"@input",f:21,d:1},{k:"@focus",f:22,d:1},{k:"@blur",f:23,d:1},{k:"@change",f:24,d:1},{k:"@keydown",f:25,d:1}],c:[]}]}]},{t:1,d:0,s:1,x:" "},{t:2,d:0,x:" 后缀单位:紧贴输入内容右侧,位于动作区左侧 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:27,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"suffix",d:0}],c:[]}]}]},{f:28,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:1,d:1,f:29}]}]}]},{t:1,d:0,s:1,x:" "},{t:2,d:0,x:" 单行输入的字数统计放在动作区左侧,与输入内容同行右对齐,不再另占一行;多行文本域见模板末尾的 block 版本 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:30,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"count",d:0},{k:"class",v:"form-control__count",d:0}],c:[{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-current",d:0}],c:[{t:1,d:1,f:31}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:13,c:[{t:0,d:0,s:1,g:"span",a:[{k:"class",v:"form-control__count-separator",d:0}],c:[{t:1,d:0,s:1,x:"/"}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-max",d:0}],c:[{t:1,d:1,f:32}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:2,d:0,x:" 动作区:密码切换 / 复制 / 清空三个装饰按钮收敛到同一容器,\n 顺序固定为 密码 → 复制 → 清空,清空始终最右、紧贴输入框右内边缘;\n 按钮垂直居中由容器 flex 统一完成、间距由 gap 控制,\n 容器只在存在按钮时渲染,避免空容器占位 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:33,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"actions",d:0},{k:"class",v:"form-control__actions",d:0}],c:[{t:7,d:1,b:[{f:34,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"password-toggle",d:0},{k:"class",v:"form-control__action form-control__password-toggle",d:0},{k:"role",v:"button",d:0},{k:":tabindex",f:35,d:1},{k:":aria-disabled",f:17,d:1},{k:":aria-pressed",f:36,d:1},{k:":aria-label",f:37,d:1},{k:"@click",f:38,d:1},{k:"@keydown",f:39,d:1}],c:[{t:7,d:1,b:[{f:40,c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M1.5 8S3.9 4.2 8 4.2s6.5 3.8 6.5 3.8-2.4 3.8-6.5 3.8S1.5 8 1.5 8Z",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"circle",a:[{k:"cx",v:"8",d:0},{k:"cy",v:"8",d:0},{k:"r",v:"2.1",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M2.6 2.6 13.4 13.4",d:0}],c:[]}]}]},{f:null,c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M1.5 8S3.9 4.2 8 4.2s6.5 3.8 6.5 3.8-2.4 3.8-6.5 3.8S1.5 8 1.5 8Z",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"circle",a:[{k:"cx",v:"8",d:0},{k:"cy",v:"8",d:0},{k:"r",v:"2.1",d:0}],c:[]}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:41,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"copy",d:0},{k:"class",v:"form-control__action form-control__copy",d:0},{k:"role",v:"button",d:0},{k:":tabindex",f:35,d:1},{k:":aria-disabled",f:17,d:1},{k:"aria-label",v:"复制内容",d:0},{k:"@click",f:42,d:1},{k:"@keydown",f:43,d:1}],c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"rect",a:[{k:"x",v:"5.5",d:0},{k:"y",v:"5.5",d:0},{k:"width",v:"8.2",d:0},{k:"height",v:"9",d:0},{k:"rx",v:"1.4",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M10.6 3.6H4a1.5 1.5 0 0 0-1.5 1.5v7.3",d:0}],c:[]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:44,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"clear",d:0},{k:"class",v:"form-control__action form-control__clear",d:0},{k:"role",v:"button",d:0},{k:":tabindex",f:35,d:1},{k:":aria-disabled",f:17,d:1},{k:"aria-label",v:"清除内容",d:0},{k:"@click",f:45,d:1},{k:"@keydown",f:46,d:1}],c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M4.4 4.4 11.6 11.6 M11.6 4.4 4.4 11.6",d:0}],c:[]}]}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:47,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"dropdown",d:0},{k:"class",v:"dropdown",d:0},{k:"role",v:"listbox",d:0},{k:"aria-label",v:"输入建议",d:0}],c:[{t:6,d:1,f:48,i:"suggestion",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"dropdown-item",d:0},{k:"class",v:"dropdown__item",d:0},{k:"role",v:"option",d:0},{k:"tabindex",v:"0",d:0},{k:":aria-label",f:49,d:1},{k:"@click",f:50,d:1},{k:"@keydown",f:51,d:1}],c:[{t:1,d:1,f:52}]}]}]}]}]}]},{t:2,d:0,x:" 后置附加内容 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:53,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"addon-after",d:0},{k:"class",v:"form-control__addon form-control__addon--after",d:0}],c:[{t:1,d:1,f:54}]}]}]}]},{t:2,d:0,x:" 多行文本域高度不固定,字数统计仍放在输入框下方右对齐 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:55,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"count",d:0},{k:"class",v:"form-control__count form-control__count--block",d:0}],c:[{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-current",d:0}],c:[{t:1,d:1,f:31}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:13,c:[{t:0,d:0,s:1,g:"span",a:[{k:"class",v:"form-control__count-separator",d:0}],c:[{t:1,d:0,s:1,x:"/"}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-max",d:0}],c:[{t:1,d:1,f:32}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:56,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"message",d:0},{k:"class",v:"form-control__message",d:0},{k:":class",f:57,d:1},{k:":id",f:20,d:1}],c:[{t:1,d:1,f:58}]}]}]}],s:{tf:58,cf:58,dn:3,tn:6,sn:2}};exports.__SOLELY_IR__=t,exports.default=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getWrapperClasses()},function(t){const{$data:a}=this;return this.hasPrefixSlot()},function(t){const{$data:a}=this;return a.prefix},function(t){const{$data:a}=this;return`${a.prefix}`},function(t){const{$data:a}=this;return"textarea"===a.type},function(t){const{$data:a}=this;return a.value},function(t){const{$data:a}=this;return a.placeholder},function(t){const{$data:a}=this;return a.disabled},function(t){const{$data:a}=this;return a.readonly},function(t){const{$data:a}=this;return a.maxlength},function(t){const{$data:a}=this;return a.minlength},function(t){const{$data:a}=this;return a.rows},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t){const{$data:a}=this;return a.readonly?"true":"false"},function(t){const{$data:a}=this;return"error"===a.status?"true":"false"},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleInput(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleFocus(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleBlur(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleChange(t)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleKeydown(t)},function(t){const{$data:a}=this;return a.passwordVisible&&"password"===a.type?"text":a.type},function(t){const{$data:a}=this;return a.clearable&&a.value&&!a.disabled},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleClear(t)},function(t){const{$data:a}=this;return"password"===a.type&&a.showpassword},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.togglePassword(t)},function(t){const{$data:a}=this;return a.passwordVisible?"🙈":"👁"},function(t){const{$data:a}=this;return a.copyable&&a.value},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleCopy(t)},function(t){const{$data:a}=this;return this.hasSuffixSlot()},function(t){const{$data:a}=this;return a.suffix},function(t){const{$data:a}=this;return`${a.suffix}`},function(t){const{$data:a}=this;return a.suggestions&&a.suggestions.length>0&&this.filteredSuggestions&&this.filteredSuggestions.length>0},function(t){const{$data:a}=this;return this.filteredSuggestions},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};var[c]=a.map(t=>t.itmVal),[o]=a.map(t=>t.idxVal);this.selectSuggestion(c)},function(t){const{$data:a}=this;var[n]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return`${n}`},function(t){const{$data:a}=this;return a.showcount&&a.maxlength},function(t){const{$data:a}=this;return`${this.getCharCount()}`},function(t){const{$data:a}=this;return`${a.maxlength}`},function(t){const{$data:a}=this;return a.message},function(t){const{$data:a}=this;return`${a.message}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"form-control",d:0},{k:":class",f:1,d:1}],c:[{t:2,d:0,x:" prefix 插槽 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:2,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"prefix",d:0}],c:[]}]}]},{f:3,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:1,d:1,f:4}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:5,c:[{t:0,d:1,g:"textarea",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input form-control__textarea",d:0},{k:":value",f:6,d:1},{k:":placeholder",f:7,d:1},{k:":disabled",f:8,d:1},{k:":readonly",f:9,d:1},{k:":maxlength",f:10,d:1},{k:":minlength",f:11,d:1},{k:":rows",f:12,d:1},{k:":aria-disabled",f:13,d:1},{k:":aria-readonly",f:14,d:1},{k:":aria-invalid",f:15,d:1},{k:"@input",f:16,d:1},{k:"@focus",f:17,d:1},{k:"@blur",f:18,d:1},{k:"@change",f:19,d:1},{k:"@keydown",f:20,d:1}],c:[]}]},{f:null,c:[{t:0,d:1,g:"input",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input",d:0},{k:":type",f:21,d:1},{k:":value",f:6,d:1},{k:":placeholder",f:7,d:1},{k:":disabled",f:8,d:1},{k:":readonly",f:9,d:1},{k:":maxlength",f:10,d:1},{k:":minlength",f:11,d:1},{k:":aria-disabled",f:13,d:1},{k:":aria-readonly",f:14,d:1},{k:":aria-invalid",f:15,d:1},{k:"@input",f:16,d:1},{k:"@focus",f:17,d:1},{k:"@blur",f:18,d:1},{k:"@change",f:19,d:1},{k:"@keydown",f:20,d:1}],c:[]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:22,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"clear",d:0},{k:"class",v:"close-btn form-control__clear",d:0},{k:"@click",f:23,d:1}],c:[{t:1,d:0,s:1,x:"×"}]}]},{f:24,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"password-toggle",d:0},{k:"class",v:"form-control__password-toggle",d:0},{k:"@click",f:25,d:1}],c:[{t:1,d:1,f:26}]}]},{f:27,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"copy",d:0},{k:"class",v:"form-control__copy",d:0},{k:"@click",f:28,d:1}],c:[{t:1,d:0,s:1,x:"📋"}]}]},{f:29,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"suffix",d:0}],c:[]}]}]},{f:30,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:1,d:1,f:31}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:32,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"dropdown",d:0},{k:"class",v:"dropdown",d:0}],c:[{t:6,d:1,f:33,i:"suggestion",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"dropdown-item",d:0},{k:"class",v:"dropdown__item",d:0},{k:"@click",f:34,d:1}],c:[{t:1,d:1,f:35}]}]}]}]}]}]},{t:7,d:1,b:[{f:36,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"count",d:0},{k:"class",v:"form-control__count",d:0}],c:[{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-current",d:0}],c:[{t:1,d:1,f:37}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"span",a:[{k:"class",v:"form-control__count-separator",d:0}],c:[{t:1,d:0,s:1,x:"/"}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-max",d:0}],c:[{t:1,d:1,f:38}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:39,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"message",d:0},{k:"class",v:"form-control__message form-control__message--{{$data.status || 'default'}}",d:0}],c:[{t:1,d:1,f:40}]}]}]}],s:{tf:40,cf:40,dn:3,tn:4,sn:1}};export{t as __SOLELY_IR__,t as default};
|
|
1
|
+
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getGroupClasses()},function(t){const{$data:a}=this;return a.addonBefore},function(t){const{$data:a}=this;return`${a.addonBefore}`},function(t){const{$data:a}=this;return this.getWrapperClasses()},function(t){const{$data:a}=this;return this.hasPrefixSlot()},function(t){const{$data:a}=this;return a.prefix},function(t){const{$data:a}=this;return`${a.prefix}`},function(t){const{$data:a}=this;return"textarea"===a.type},function(t){const{$data:a}=this;return a.value},function(t){const{$data:a}=this;return a.placeholder},function(t){const{$data:a}=this;return this.isEffectivelyDisabled()},function(t){const{$data:a}=this;return a.readonly},function(t){const{$data:a}=this;return a.maxlength},function(t){const{$data:a}=this;return a.minlength},function(t){const{$data:a}=this;return a.rows},function(t){const{$data:a}=this;return a.ariaLabel||void 0},function(t){const{$data:a}=this;return this.isEffectivelyDisabled()?"true":"false"},function(t){const{$data:a}=this;return a.readonly?"true":"false"},function(t){const{$data:a}=this;return"error"===this.getStatus()?"true":"false"},function(t){const{$data:a}=this;return this.getMessageId()},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleInput(t)},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleFocus(t)},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleBlur(t)},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleChange(t)},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleKeydown(t)},function(t){const{$data:a}=this;return a.passwordVisible&&"password"===a.type?"text":a.type},function(t){const{$data:a}=this;return this.hasSuffixSlot()},function(t){const{$data:a}=this;return a.suffix},function(t){const{$data:a}=this;return`${a.suffix}`},function(t){const{$data:a}=this;return a.showCount&&"textarea"!==a.type},function(t){const{$data:a}=this;return`${this.getCharCount()}`},function(t){const{$data:a}=this;return`${a.maxlength}`},function(t){const{$data:a}=this;return this.hasActions()},function(t){const{$data:a}=this;return"password"===a.type&&a.showPassword},function(t){const{$data:a}=this;return this.isEffectivelyDisabled()?"-1":"0"},function(t){const{$data:a}=this;return a.passwordVisible?"true":"false"},function(t){const{$data:a}=this;return a.passwordVisible?"隐藏密码":"显示密码"},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.togglePassword()},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleActionKeydown(t,"password")},function(t){const{$data:a}=this;return a.passwordVisible},function(t){const{$data:a}=this;return a.copyable&&a.value&&!this.isEffectivelyDisabled()},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleCopy()},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleActionKeydown(t,"copy")},function(t){const{$data:a}=this;return a.clearable&&a.value&&!a.readonly&&!this.isEffectivelyDisabled()},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleClear()},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};this.handleActionKeydown(t,"clear")},function(t){const{$data:a}=this;return a.suggestions&&a.suggestions.length>0&&!this.isEffectivelyDisabled()&&this.filteredSuggestions&&this.filteredSuggestions.length>0},function(t){const{$data:a}=this;return this.filteredSuggestions},function(t){const{$data:a}=this;var[d]=t.map(t=>t.itmVal),[n]=t.map(t=>t.idxVal);return d},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};var[o]=a.map(t=>t.itmVal),[c]=a.map(t=>t.idxVal);this.selectSuggestion(o)},function(t,a){const{$data:d}=this,{value:n,checked:s}=t?.target||{};var[o]=a.map(t=>t.itmVal),[c]=a.map(t=>t.idxVal);this.handleSuggestionKeydown(t,o)},function(t){const{$data:a}=this;var[d]=t.map(t=>t.itmVal),[n]=t.map(t=>t.idxVal);return`${d}`},function(t){const{$data:a}=this;return a.addonAfter},function(t){const{$data:a}=this;return`${a.addonAfter}`},function(t){const{$data:a}=this;return a.showCount&&"textarea"===a.type},function(t){const{$data:a}=this;return a.message},function(t){const{$data:a}=this;return"form-control__message--"+(this.getStatus()||"default")},function(t){const{$data:a}=this;return`${a.message}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"group",d:0},{k:"class",v:"form-control-group",d:0},{k:":class",f:1,d:1}],c:[{t:2,d:0,x:" 前置附加内容 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:2,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"addon-before",d:0},{k:"class",v:"form-control__addon form-control__addon--before",d:0}],c:[{t:1,d:1,f:3}]}]}]},{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"form-control",d:0},{k:":class",f:4,d:1}],c:[{t:2,d:0,x:" prefix 插槽 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:5,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"prefix",d:0}],c:[]}]}]},{f:6,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"prefix",d:0},{k:"class",v:"form-control__prefix",d:0}],c:[{t:1,d:1,f:7}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:8,c:[{t:0,d:1,g:"textarea",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input form-control__textarea",d:0},{k:":value",f:9,d:1},{k:":placeholder",f:10,d:1},{k:":disabled",f:11,d:1},{k:":readonly",f:12,d:1},{k:":maxlength",f:13,d:1},{k:":minlength",f:14,d:1},{k:":rows",f:15,d:1},{k:":aria-label",f:16,d:1},{k:":aria-disabled",f:17,d:1},{k:":aria-readonly",f:18,d:1},{k:":aria-invalid",f:19,d:1},{k:":aria-describedby",f:20,d:1},{k:"@input",f:21,d:1},{k:"@focus",f:22,d:1},{k:"@blur",f:23,d:1},{k:"@change",f:24,d:1},{k:"@keydown",f:25,d:1}],c:[]}]},{f:null,c:[{t:0,d:1,g:"input",a:[{k:"part",v:"input",d:0},{k:"class",v:"form-control__input",d:0},{k:":type",f:26,d:1},{k:":value",f:9,d:1},{k:":placeholder",f:10,d:1},{k:":disabled",f:11,d:1},{k:":readonly",f:12,d:1},{k:":maxlength",f:13,d:1},{k:":minlength",f:14,d:1},{k:":aria-label",f:16,d:1},{k:":aria-disabled",f:17,d:1},{k:":aria-readonly",f:18,d:1},{k:":aria-invalid",f:19,d:1},{k:":aria-describedby",f:20,d:1},{k:"@input",f:21,d:1},{k:"@focus",f:22,d:1},{k:"@blur",f:23,d:1},{k:"@change",f:24,d:1},{k:"@keydown",f:25,d:1}],c:[]}]}]},{t:1,d:0,s:1,x:" "},{t:2,d:0,x:" 后缀单位:紧贴输入内容右侧,位于动作区左侧 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:27,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"suffix",d:0}],c:[]}]}]},{f:28,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"suffix",d:0},{k:"class",v:"form-control__suffix",d:0}],c:[{t:1,d:1,f:29}]}]}]},{t:1,d:0,s:1,x:" "},{t:2,d:0,x:" 单行输入的字数统计放在动作区左侧,与输入内容同行右对齐,不再另占一行;多行文本域见模板末尾的 block 版本 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:30,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"count",d:0},{k:"class",v:"form-control__count",d:0}],c:[{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-current",d:0}],c:[{t:1,d:1,f:31}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:13,c:[{t:0,d:0,s:1,g:"span",a:[{k:"class",v:"form-control__count-separator",d:0}],c:[{t:1,d:0,s:1,x:"/"}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-max",d:0}],c:[{t:1,d:1,f:32}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:2,d:0,x:" 动作区:密码切换 / 复制 / 清空三个装饰按钮收敛到同一容器,\n 顺序固定为 密码 → 复制 → 清空,清空始终最右、紧贴输入框右内边缘;\n 按钮垂直居中由容器 flex 统一完成、间距由 gap 控制,\n 容器只在存在按钮时渲染,避免空容器占位 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:33,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"actions",d:0},{k:"class",v:"form-control__actions",d:0}],c:[{t:7,d:1,b:[{f:34,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"password-toggle",d:0},{k:"class",v:"form-control__action form-control__password-toggle",d:0},{k:"role",v:"button",d:0},{k:":tabindex",f:35,d:1},{k:":aria-disabled",f:17,d:1},{k:":aria-pressed",f:36,d:1},{k:":aria-label",f:37,d:1},{k:"@click",f:38,d:1},{k:"@keydown",f:39,d:1}],c:[{t:7,d:1,b:[{f:40,c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M1.5 8S3.9 4.2 8 4.2s6.5 3.8 6.5 3.8-2.4 3.8-6.5 3.8S1.5 8 1.5 8Z",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"circle",a:[{k:"cx",v:"8",d:0},{k:"cy",v:"8",d:0},{k:"r",v:"2.1",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M2.6 2.6 13.4 13.4",d:0}],c:[]}]}]},{f:null,c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M1.5 8S3.9 4.2 8 4.2s6.5 3.8 6.5 3.8-2.4 3.8-6.5 3.8S1.5 8 1.5 8Z",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"circle",a:[{k:"cx",v:"8",d:0},{k:"cy",v:"8",d:0},{k:"r",v:"2.1",d:0}],c:[]}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:41,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"copy",d:0},{k:"class",v:"form-control__action form-control__copy",d:0},{k:"role",v:"button",d:0},{k:":tabindex",f:35,d:1},{k:":aria-disabled",f:17,d:1},{k:"aria-label",v:"复制内容",d:0},{k:"@click",f:42,d:1},{k:"@keydown",f:43,d:1}],c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"rect",a:[{k:"x",v:"5.5",d:0},{k:"y",v:"5.5",d:0},{k:"width",v:"8.2",d:0},{k:"height",v:"9",d:0},{k:"rx",v:"1.4",d:0}],c:[]},{t:1,d:0,s:1,x:" "},{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M10.6 3.6H4a1.5 1.5 0 0 0-1.5 1.5v7.3",d:0}],c:[]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:44,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"clear",d:0},{k:"class",v:"form-control__action form-control__clear",d:0},{k:"role",v:"button",d:0},{k:":tabindex",f:35,d:1},{k:":aria-disabled",f:17,d:1},{k:"aria-label",v:"清除内容",d:0},{k:"@click",f:45,d:1},{k:"@keydown",f:46,d:1}],c:[{t:0,d:0,s:1,g:"svg",a:[{k:"class",v:"form-control__action-icon",d:0},{k:"viewBox",v:"0 0 16 16",d:0},{k:"aria-hidden",v:"true",d:0},{k:"focusable",v:"false",d:0}],c:[{t:0,d:0,s:1,g:"path",a:[{k:"d",v:"M4.4 4.4 11.6 11.6 M11.6 4.4 4.4 11.6",d:0}],c:[]}]}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:47,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"dropdown",d:0},{k:"class",v:"dropdown",d:0},{k:"role",v:"listbox",d:0},{k:"aria-label",v:"输入建议",d:0}],c:[{t:6,d:1,f:48,i:"suggestion",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"dropdown-item",d:0},{k:"class",v:"dropdown__item",d:0},{k:"role",v:"option",d:0},{k:"tabindex",v:"0",d:0},{k:":aria-label",f:49,d:1},{k:"@click",f:50,d:1},{k:"@keydown",f:51,d:1}],c:[{t:1,d:1,f:52}]}]}]}]}]}]},{t:2,d:0,x:" 后置附加内容 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:53,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"addon-after",d:0},{k:"class",v:"form-control__addon form-control__addon--after",d:0}],c:[{t:1,d:1,f:54}]}]}]}]},{t:2,d:0,x:" 多行文本域高度不固定,字数统计仍放在输入框下方右对齐 "},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:55,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"count",d:0},{k:"class",v:"form-control__count form-control__count--block",d:0}],c:[{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-current",d:0}],c:[{t:1,d:1,f:31}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:13,c:[{t:0,d:0,s:1,g:"span",a:[{k:"class",v:"form-control__count-separator",d:0}],c:[{t:1,d:0,s:1,x:"/"}]},{t:1,d:0,s:1,x:" "},{t:0,d:0,g:"span",a:[{k:"class",v:"form-control__count-max",d:0}],c:[{t:1,d:1,f:32}]}]}]}]}]}]},{t:1,d:0,s:1,x:" "},{t:7,d:1,b:[{f:56,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"message",d:0},{k:"class",v:"form-control__message",d:0},{k:":class",f:57,d:1},{k:":id",f:20,d:1}],c:[{t:1,d:1,f:58}]}]}]}],s:{tf:58,cf:58,dn:3,tn:6,sn:2}};export{t as __SOLELY_IR__,t as default};
|