solely 0.5.8 → 0.6.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 +7 -6
- package/dist/compiler/ir/buildIR.cjs +1 -1
- package/dist/compiler/ir/buildIR.js +1 -1
- package/dist/compiler/parser/parser.cjs +1 -1
- package/dist/compiler/parser/parser.js +1 -1
- package/dist/components/commands/drawer/index.cjs +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/message/index.cjs +1 -1
- package/dist/components/commands/message/index.js +1 -1
- package/dist/components/commands/modal/index.cjs +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/popconfirm/index.cjs +1 -1
- package/dist/components/commands/popconfirm/index.js +1 -1
- package/dist/components/commands/tooltip/index.cjs +1 -1
- package/dist/components/commands/tooltip/index.js +1 -1
- package/dist/components/commands/utils.cjs +1 -1
- package/dist/components/commands/utils.js +1 -1
- package/dist/components/elements/alert/index.cjs +1 -1
- 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/backtop/index.cjs +1 -1
- 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/breadcrumb/index.cjs +1 -1
- 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/button/index.cjs +1 -1
- 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/card/index.html.cjs +1 -1
- package/dist/components/elements/card/index.html.js +1 -1
- package/dist/components/elements/checkbox/index.cjs +1 -1
- 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/coordinate-input/index.html.cjs +1 -1
- package/dist/components/elements/coordinate-input/index.html.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/fab/index.cjs +1 -1
- 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/icon/index.cjs +1 -1
- package/dist/components/elements/icon/index.d.ts +8 -0
- package/dist/components/elements/icon/index.html.cjs +1 -1
- package/dist/components/elements/icon/index.html.js +1 -1
- package/dist/components/elements/icon/index.js +1 -1
- package/dist/components/elements/input/index.cjs +1 -1
- 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/not-found/index.html.cjs +1 -1
- package/dist/components/elements/not-found/index.html.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/pagination/index.html.cjs +1 -1
- package/dist/components/elements/pagination/index.html.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/radio/index.cjs +1 -1
- 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/rate/index.cjs +1 -1
- 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/select/index.cjs +1 -1
- 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/slider/index.cjs +1 -1
- 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/steps/index.cjs +1 -1
- 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/switch/index.cjs +1 -1
- 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/table/index.html.cjs +1 -1
- package/dist/components/elements/table/index.html.js +1 -1
- package/dist/components/elements/tabs/index.html.cjs +1 -1
- package/dist/components/elements/tabs/index.html.js +1 -1
- package/dist/components/elements/tag/index.html.cjs +1 -1
- package/dist/components/elements/tag/index.html.js +1 -1
- package/dist/components/elements/timeline/index.cjs +1 -1
- package/dist/components/elements/timeline/index.js +1 -1
- package/dist/components/elements/tooltip/index.cjs +1 -1
- 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/tree/index.cjs +1 -1
- package/dist/components/elements/tree/index.d.ts +5 -0
- 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/upload/index.cjs +1 -1
- 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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/solely-vite-plugin.cjs +1 -1
- package/dist/plugins/solely-vite-plugin.js +1 -1
- package/dist/router/core.cjs +1 -1
- package/dist/router/core.js +1 -1
- package/dist/router/router-link.cjs +1 -1
- package/dist/router/router-link.js +1 -1
- package/dist/router/router-view.cjs +1 -1
- package/dist/router/router-view.js +1 -1
- package/dist/runtime/component/base-element.cjs +1 -1
- package/dist/runtime/component/base-element.js +1 -1
- package/dist/runtime/component/decorators.cjs +1 -1
- package/dist/runtime/component/decorators.js +1 -1
- package/dist/runtime/reactivity/observe.cjs +1 -1
- package/dist/runtime/reactivity/observe.js +1 -1
- package/dist/runtime/renderer/renderIR.cjs +1 -1
- package/dist/runtime/renderer/renderIR.js +1 -1
- package/dist/shared/env.cjs +1 -1
- package/dist/shared/env.js +1 -1
- package/dist/shared/functions.d.ts +2 -2
- package/dist/shared/gen-function.cjs +1 -1
- package/dist/shared/gen-function.js +1 -1
- package/dist/shared/index.cjs +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -1
- package/dist/shared/svg-sanitize.cjs +1 -0
- package/dist/shared/svg-sanitize.d.ts +27 -0
- package/dist/shared/svg-sanitize.js +1 -0
- package/dist/shared/templateError.cjs +1 -1
- package/dist/shared/templateError.js +1 -1
- package/package.json +14 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getPaginationClasses()},function(t){const{$data:a}=this;return a.showTotal},function(t){const{$data:a}=this;return`共 ${a.total} 条`},function(t){const{$data:a}=this;return this.getPrevClasses()},function(t,a){const{$data:n}=this,{value:s,checked:d}=
|
|
1
|
+
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getPaginationClasses()},function(t){const{$data:a}=this;return a.showTotal},function(t){const{$data:a}=this;return`共 ${a.total} 条`},function(t){const{$data:a}=this;return this.getPrevClasses()},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handlePrev(t)},function(t){const{$data:a}=this;return this.calculateVisiblePages()},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;var[n]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return this.getItemClasses(n)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};var[i]=a.map(t=>t.itmVal),[e]=a.map(t=>t.idxVal);this.handlePageClick(i,t)},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;var[n]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return"..."===n},function(t){const{$data:a}=this;return this.getNextClasses()},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleNext(t)},function(t){const{$data:a}=this;return a.showSizeChanger},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleSizeChange(t)},function(t){const{$data:a}=this;return a.parsedPageSizeOptions},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;var[n]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return n===a.pageSize},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.showQuickJumper},function(t){const{$data:a}=this;return a.totalPages},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleJumperKeydown(t)},function(t){const{$data:a}=this;return a.jumperValue},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};n.jumperValue=s},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleJumperStep(1)},function(t,a){const{$data:n}=this,{value:s,checked:d}=t?.target||{};this.handleJumperStep(-1)}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"pagination",d:0},{k:":class",f:1,d:1}],c:[{t:2,d:0,x:" 总数 "},{t:7,d:1,b:[{f:2,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"total",d:0},{k:"class",v:"pagination__total",d:0}],c:[{t:1,d:1,f:3}]}]}]},{t:2,d:0,x:" 上一页 "},{t:0,d:1,g:"span",a:[{k:"part",v:"prev",d:0},{k:"class",v:"pagination__prev",d:0},{k:":class",f:4,d:1},{k:"@click",f:5,d:1}],c:[{t:1,d:0,s:1,x:"<"}]},{t:2,d:0,x:" 页码 "},{t:6,d:1,f:6,i:"page",n:"index",a:[],c:[{t:7,d:1,b:[{f:7,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"item",d:0},{k:"class",v:"pagination__item",d:0},{k:":class",f:8,d:1},{k:"@click",f:9,d:1}],c:[{t:1,d:1,f:10}]}]}]},{t:7,d:1,b:[{f:11,c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"ellipsis",d:0},{k:"class",v:"pagination__ellipsis",d:0}],c:[{t:1,d:0,s:1,x:"..."}]}]}]}]},{t:2,d:0,x:" 下一页 "},{t:0,d:1,g:"span",a:[{k:"part",v:"next",d:0},{k:"class",v:"pagination__next",d:0},{k:":class",f:12,d:1},{k:"@click",f:13,d:1}],c:[{t:1,d:0,s:1,x:">"}]},{t:2,d:0,x:" 每页条数选择器 "},{t:7,d:1,b:[{f:14,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"size-changer",d:0},{k:"class",v:"pagination__size-changer",d:0}],c:[{t:0,d:1,g:"select",a:[{k:"@change",f:15,d:1}],c:[{t:6,d:1,f:16,i:"size",n:"index",a:[],c:[{t:0,d:1,g:"option",a:[{k:":value",f:17,d:1},{k:":selected",f:18,d:1}],c:[{t:1,d:1,f:19}]}]}]}]}]}]},{t:2,d:0,x:" 快速跳转 "},{t:7,d:1,b:[{f:20,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"jumper",d:0},{k:"class",v:"pagination__jumper",d:0}],c:[{t:1,d:0,s:1,x:"跳至"},{t:0,d:0,g:"span",a:[{k:"part",v:"jumper-input-wrapper",d:0},{k:"class",v:"pagination__jumper-input-wrapper",d:0}],c:[{t:0,d:1,g:"input",a:[{k:"part",v:"jumper-input",d:0},{k:"type",v:"number",d:0},{k:"min",v:"1",d:0},{k:":max",f:21,d:1},{k:"@keydown",f:22,d:1},{k:":value",f:23,d:1},{k:"@input",f:24,d:1,r:"model"}],c:[]},{t:0,d:0,g:"span",a:[{k:"part",v:"jumper-controls",d:0},{k:"class",v:"pagination__jumper-controls",d:0}],c:[{t:0,d:1,g:"span",a:[{k:"part",v:"jumper-up",d:0},{k:"class",v:"pagination__jumper-up",d:0},{k:"@click",f:25,d:1}],c:[{t:1,d:0,s:1,x:"▲"}]},{t:0,d:1,g:"span",a:[{k:"part",v:"jumper-down",d:0},{k:"class",v:"pagination__jumper-down",d:0},{k:"@click",f:26,d:1}],c:[{t:1,d:0,s:1,x:"▼"}]}]}]},{t:1,d:0,s:1,x:"页"}]}]}]}]}],s:{tf:26,cf:26,dn:1,tn:1,sn:0}};export{t as __SOLELY_IR__,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:block}.pagination{display:flex;align-items:center;gap:var(--solely-spacing-xs);font-family:var(--solely-font-family);font-size:var(--solely-font-size-md)}.pagination__item{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-primary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__item:hover:not(.pagination__item--disabled):not(.pagination__item--active){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--active{color:var(--solely-white);background-color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--disabled{cursor:not-allowed;color:var(--solely-text-tertiary);background-color:var(--solely-gray-2)}.pagination__prev,.pagination__next{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-secondary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__prev:hover:not(.pagination__item--disabled),.pagination__next:hover:not(.pagination__item--disabled){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);color:var(--solely-text-tertiary);-webkit-user-select:none;user-select:none}.pagination__jumper{display:inline-flex;align-items:center;gap:var(--solely-spacing-xs);margin-left:var(--solely-spacing-md);color:var(--solely-text-secondary)}.pagination__jumper input::-webkit-inner-spin-button,.pagination__jumper input::-webkit-outer-spin-button{-webkit-appearance:none
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:block}.pagination{display:flex;align-items:center;gap:var(--solely-spacing-xs);font-family:var(--solely-font-family);font-size:var(--solely-font-size-md)}.pagination__item{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-primary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__item:hover:not(.pagination__item--disabled):not(.pagination__item--active){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--active{color:var(--solely-white);background-color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--disabled{cursor:not-allowed;color:var(--solely-text-tertiary);background-color:var(--solely-gray-2)}.pagination__prev,.pagination__next{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-secondary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__prev:hover:not(.pagination__item--disabled),.pagination__next:hover:not(.pagination__item--disabled){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);color:var(--solely-text-tertiary);-webkit-user-select:none;user-select:none}.pagination__jumper{display:inline-flex;align-items:center;gap:var(--solely-spacing-xs);margin-left:var(--solely-spacing-md);color:var(--solely-text-secondary)}.pagination__jumper input::-webkit-inner-spin-button,.pagination__jumper input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.pagination__jumper input[type=number]{appearance:none;-moz-appearance:textfield}.pagination__jumper-input-wrapper{position:relative;display:inline-flex;align-items:center}.pagination__jumper-input-wrapper input{width:50px;height:var(--solely-height-md);padding:0 20px 0 var(--solely-spacing-sm);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);text-align:center;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);background-color:var(--solely-component-bg);transition:all var(--solely-transition-duration)}.pagination__jumper-input-wrapper input:focus{outline:none;border-color:var(--solely-primary);box-shadow:0 0 0 2px var(--solely-primary-light)}.pagination__jumper-controls{position:absolute;right:2px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;height:var(--solely-height-sm);width:16px}.pagination__jumper-up,.pagination__jumper-down{flex:1;display:flex;align-items:center;justify-content:center;font-size:8px;color:var(--solely-text-secondary);background-color:var(--solely-component-bg);cursor:pointer;-webkit-user-select:none;user-select:none;line-height:1}.pagination__jumper-up:hover,.pagination__jumper-down:hover{color:var(--solely-primary);background-color:var(--solely-gray-2)}.pagination__jumper-up{border-radius:2px 2px 0 0}.pagination__jumper-down{border-radius:0 0 2px 2px}.pagination__size-changer{margin-left:var(--solely-spacing-md)}.pagination__size-changer select{height:var(--solely-height-md);padding:0 var(--solely-spacing-md) 0 var(--solely-spacing-sm);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);font-size:var(--solely-font-size-md);color:var(--solely-text-primary);background-color:var(--solely-component-bg);cursor:pointer;transition:all var(--solely-transition-duration)}.pagination__size-changer select:focus{outline:none;border-color:var(--solely-primary);box-shadow:0 0 0 2px var(--solely-primary-light)}.pagination__size-changer option{color:var(--solely-text-primary);background-color:var(--solely-component-bg)}.pagination__total{margin-right:var(--solely-spacing-md);color:var(--solely-text-secondary)}.pagination--simple .pagination__item,.pagination--simple .pagination__prev,.pagination--simple .pagination__next{border:none;background:transparent}.pagination--simple .pagination__item--active{color:var(--solely-primary);background:transparent}.pagination--md .pagination__item,.pagination--md .pagination__prev,.pagination--md .pagination__next,.pagination--md .pagination__ellipsis{min-width:var(--solely-height-md);height:var(--solely-height-md);font-size:var(--solely-font-size-md)}.pagination--md .pagination__jumper input,.pagination--md .pagination__size-changer select{height:var(--solely-height-md);font-size:var(--solely-font-size-md)}.pagination--lg .pagination__item,.pagination--lg .pagination__prev,.pagination--lg .pagination__next,.pagination--lg .pagination__ellipsis{min-width:var(--solely-height-lg);height:var(--solely-height-lg);font-size:var(--solely-font-size-lg)}.pagination--lg .pagination__jumper input,.pagination--lg .pagination__size-changer select{height:var(--solely-height-lg);font-size:var(--solely-font-size-lg)}.pagination--sm .pagination__item,.pagination--sm .pagination__prev,.pagination--sm .pagination__next,.pagination--sm .pagination__ellipsis{min-width:var(--solely-height-sm);height:var(--solely-height-sm);font-size:var(--solely-font-size-sm)}.pagination--sm .pagination__jumper input,.pagination--sm .pagination__size-changer select{height:var(--solely-height-sm);font-size:var(--solely-font-size-sm)}.pagination.is-disabled{opacity:.6;pointer-events:none}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const i="*,*:before,*:after{box-sizing:border-box}:host{display:block}.pagination{display:flex;align-items:center;gap:var(--solely-spacing-xs);font-family:var(--solely-font-family);font-size:var(--solely-font-size-md)}.pagination__item{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-primary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__item:hover:not(.pagination__item--disabled):not(.pagination__item--active){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--active{color:var(--solely-white);background-color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--disabled{cursor:not-allowed;color:var(--solely-text-tertiary);background-color:var(--solely-gray-2)}.pagination__prev,.pagination__next{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-secondary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__prev:hover:not(.pagination__item--disabled),.pagination__next:hover:not(.pagination__item--disabled){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);color:var(--solely-text-tertiary);-webkit-user-select:none;user-select:none}.pagination__jumper{display:inline-flex;align-items:center;gap:var(--solely-spacing-xs);margin-left:var(--solely-spacing-md);color:var(--solely-text-secondary)}.pagination__jumper input::-webkit-inner-spin-button,.pagination__jumper input::-webkit-outer-spin-button{-webkit-appearance:none
|
|
1
|
+
const i="*,*:before,*:after{box-sizing:border-box}:host{display:block}.pagination{display:flex;align-items:center;gap:var(--solely-spacing-xs);font-family:var(--solely-font-family);font-size:var(--solely-font-size-md)}.pagination__item{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-primary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__item:hover:not(.pagination__item--disabled):not(.pagination__item--active){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--active{color:var(--solely-white);background-color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__item--disabled{cursor:not-allowed;color:var(--solely-text-tertiary);background-color:var(--solely-gray-2)}.pagination__prev,.pagination__next{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);padding:0 var(--solely-spacing-sm);color:var(--solely-text-secondary);background-color:var(--solely-component-bg);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);cursor:pointer;transition:all var(--solely-transition-duration);-webkit-user-select:none;user-select:none}.pagination__prev:hover:not(.pagination__item--disabled),.pagination__next:hover:not(.pagination__item--disabled){color:var(--solely-primary);border-color:var(--solely-primary)}.pagination__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--solely-height-md);height:var(--solely-height-md);color:var(--solely-text-tertiary);-webkit-user-select:none;user-select:none}.pagination__jumper{display:inline-flex;align-items:center;gap:var(--solely-spacing-xs);margin-left:var(--solely-spacing-md);color:var(--solely-text-secondary)}.pagination__jumper input::-webkit-inner-spin-button,.pagination__jumper input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.pagination__jumper input[type=number]{appearance:none;-moz-appearance:textfield}.pagination__jumper-input-wrapper{position:relative;display:inline-flex;align-items:center}.pagination__jumper-input-wrapper input{width:50px;height:var(--solely-height-md);padding:0 20px 0 var(--solely-spacing-sm);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);text-align:center;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);background-color:var(--solely-component-bg);transition:all var(--solely-transition-duration)}.pagination__jumper-input-wrapper input:focus{outline:none;border-color:var(--solely-primary);box-shadow:0 0 0 2px var(--solely-primary-light)}.pagination__jumper-controls{position:absolute;right:2px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;height:var(--solely-height-sm);width:16px}.pagination__jumper-up,.pagination__jumper-down{flex:1;display:flex;align-items:center;justify-content:center;font-size:8px;color:var(--solely-text-secondary);background-color:var(--solely-component-bg);cursor:pointer;-webkit-user-select:none;user-select:none;line-height:1}.pagination__jumper-up:hover,.pagination__jumper-down:hover{color:var(--solely-primary);background-color:var(--solely-gray-2)}.pagination__jumper-up{border-radius:2px 2px 0 0}.pagination__jumper-down{border-radius:0 0 2px 2px}.pagination__size-changer{margin-left:var(--solely-spacing-md)}.pagination__size-changer select{height:var(--solely-height-md);padding:0 var(--solely-spacing-md) 0 var(--solely-spacing-sm);border:1px solid var(--solely-border-color);border-radius:var(--solely-border-radius-md);font-size:var(--solely-font-size-md);color:var(--solely-text-primary);background-color:var(--solely-component-bg);cursor:pointer;transition:all var(--solely-transition-duration)}.pagination__size-changer select:focus{outline:none;border-color:var(--solely-primary);box-shadow:0 0 0 2px var(--solely-primary-light)}.pagination__size-changer option{color:var(--solely-text-primary);background-color:var(--solely-component-bg)}.pagination__total{margin-right:var(--solely-spacing-md);color:var(--solely-text-secondary)}.pagination--simple .pagination__item,.pagination--simple .pagination__prev,.pagination--simple .pagination__next{border:none;background:transparent}.pagination--simple .pagination__item--active{color:var(--solely-primary);background:transparent}.pagination--md .pagination__item,.pagination--md .pagination__prev,.pagination--md .pagination__next,.pagination--md .pagination__ellipsis{min-width:var(--solely-height-md);height:var(--solely-height-md);font-size:var(--solely-font-size-md)}.pagination--md .pagination__jumper input,.pagination--md .pagination__size-changer select{height:var(--solely-height-md);font-size:var(--solely-font-size-md)}.pagination--lg .pagination__item,.pagination--lg .pagination__prev,.pagination--lg .pagination__next,.pagination--lg .pagination__ellipsis{min-width:var(--solely-height-lg);height:var(--solely-height-lg);font-size:var(--solely-font-size-lg)}.pagination--lg .pagination__jumper input,.pagination--lg .pagination__size-changer select{height:var(--solely-height-lg);font-size:var(--solely-font-size-lg)}.pagination--sm .pagination__item,.pagination--sm .pagination__prev,.pagination--sm .pagination__next,.pagination--sm .pagination__ellipsis{min-width:var(--solely-height-sm);height:var(--solely-height-sm);font-size:var(--solely-font-size-sm)}.pagination--sm .pagination__jumper input,.pagination--sm .pagination__size-changer select{height:var(--solely-height-sm);font-size:var(--solely-font-size-sm)}.pagination.is-disabled{opacity:.6;pointer-events:none}";export{i as default};
|
|
@@ -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.SolelyRadio=class extends a.default{get checked(){return this.$data.checked}set checked(e){this.setChecked(e)}get value(){return this.$data.value}set value(e){this.$data.value=e}getRadioClasses(){return{"is-checked":!!this.$data.checked,"is-disabled":!!this.$data.disabled,[`radio--${this.$data.type}`]:!!this.$data.type,"radio--block":!!this.$data.block}}mounted(){this.refresh(),this.updateAriaAttributes()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){
|
|
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.SolelyRadio=class extends a.default{get checked(){return this.$data.checked}set checked(e){this.setChecked(e)}get value(){return this.$data.value}set value(e){this.$data.value=e}getRadioClasses(){return{"is-checked":!!this.$data.checked,"is-disabled":!!this.$data.disabled,[`radio--${this.$data.type}`]:!!this.$data.type,"radio--block":!!this.$data.block}}mounted(){this.refresh(),this.updateAriaAttributes()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){const e=this.shadowRoot?.querySelector(".radio");e&&(e.setAttribute("aria-checked",this.$data.checked?"true":"false"),e.setAttribute("aria-disabled",this.$data.disabled?"true":"false"))}handleClick(e){this.$data.disabled||this.$data.checked||(this.$data.name&&this.uncheckSameNameRadios(),this.$data.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleKeyDown(e){this.$data.disabled||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick(e))}uncheckSameNameRadios(){const e=this.$data.name;e&&this.getRootNode().querySelectorAll("solely-radio").forEach(t=>{if(t!==this&&t.getAttribute("name")===e){const e=t;"function"==typeof e?.setChecked&&e.setChecked(!1)}})}setChecked(e){this.$data.checked=e}getChecked(){return this.$data.checked}},exports.SolelyRadio=((e,t)=>{for(var a,s=t,d=e.length-1;d>=0;d--)(a=e[d])&&(s=a(s)||s);return s})([s.CustomElement({tagName:"solely-radio",template:t.__SOLELY_IR__,styles:e.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"checked",type:"boolean",default:!1},{name:"disabled",type:"boolean",default:!1},{name:"content",type:"string",default:""},{name:"value",type:"string",default:""},{name:"type",type:"string",default:"primary"},{name:"name",type:"string",default:""},{name:"block",type:"boolean",default:!1}],model:{prop:"checked",event:"change"}})],exports.SolelyRadio);
|
|
@@ -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.getRadioClasses()},function(t){const{$data:a}=this;return a.checked?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:e,checked:d}=
|
|
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.getRadioClasses()},function(t){const{$data:a}=this;return a.checked?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:e,checked:d}=t?.target||{};this.handleClick(t)},function(t){const{$data:a}=this;return`${a.content}`}],n:[{t:0,d:1,g:"label",a:[{k:"part",v:"base",d:0},{k:"class",v:"radio",d:0},{k:":class",f:1,d:1},{k:"role",v:"radio",d:0},{k:":aria-checked",f:2,d:1},{k:":aria-disabled",f:3,d:1},{k:"@click",f:4,d:1}],c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"input",d:0},{k:"class",v:"radio__input",d:0}],c:[]},{t:0,d:0,g:"span",a:[{k:"part",v:"content",d:0},{k:"class",v:"radio__content",d:0}],c:[{t:0,d:0,g:"slot",a:[],c:[{t:1,d:1,f:5}]}]}]}],s:{tf:5,cf:5,dn:1,tn:1,sn:0}};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.getRadioClasses()},function(t){const{$data:a}=this;return a.checked?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:
|
|
1
|
+
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getRadioClasses()},function(t){const{$data:a}=this;return a.checked?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:d,checked:n}=t?.target||{};this.handleClick(t)},function(t){const{$data:a}=this;return`${a.content}`}],n:[{t:0,d:1,g:"label",a:[{k:"part",v:"base",d:0},{k:"class",v:"radio",d:0},{k:":class",f:1,d:1},{k:"role",v:"radio",d:0},{k:":aria-checked",f:2,d:1},{k:":aria-disabled",f:3,d:1},{k:"@click",f:4,d:1}],c:[{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"input",d:0},{k:"class",v:"radio__input",d:0}],c:[]},{t:0,d:0,g:"span",a:[{k:"part",v:"content",d:0},{k:"class",v:"radio__content",d:0}],c:[{t:0,d:0,g:"slot",a:[],c:[{t:1,d:1,f:5}]}]}]}],s:{tf:5,cf:5,dn:1,tn:1,sn:0}};export{t as __SOLELY_IR__,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./style.css.js";import{__SOLELY_IR__ as t}from"./index.html.js";import a from"../../../runtime/component/base-element.js";import{CustomElement as s}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let d=class extends a{get checked(){return this.$data.checked}set checked(e){this.setChecked(e)}get value(){return this.$data.value}set value(e){this.$data.value=e}getRadioClasses(){return{"is-checked":!!this.$data.checked,"is-disabled":!!this.$data.disabled,[`radio--${this.$data.type}`]:!!this.$data.type,"radio--block":!!this.$data.block}}mounted(){this.refresh(),this.updateAriaAttributes()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){
|
|
1
|
+
import e from"./style.css.js";import{__SOLELY_IR__ as t}from"./index.html.js";import a from"../../../runtime/component/base-element.js";import{CustomElement as s}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let d=class extends a{get checked(){return this.$data.checked}set checked(e){this.setChecked(e)}get value(){return this.$data.value}set value(e){this.$data.value=e}getRadioClasses(){return{"is-checked":!!this.$data.checked,"is-disabled":!!this.$data.disabled,[`radio--${this.$data.type}`]:!!this.$data.type,"radio--block":!!this.$data.block}}mounted(){this.refresh(),this.updateAriaAttributes()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){const e=this.shadowRoot?.querySelector(".radio");e&&(e.setAttribute("aria-checked",this.$data.checked?"true":"false"),e.setAttribute("aria-disabled",this.$data.disabled?"true":"false"))}handleClick(e){this.$data.disabled||this.$data.checked||(this.$data.name&&this.uncheckSameNameRadios(),this.$data.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleKeyDown(e){this.$data.disabled||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick(e))}uncheckSameNameRadios(){const e=this.$data.name;e&&this.getRootNode().querySelectorAll("solely-radio").forEach(t=>{if(t!==this&&t.getAttribute("name")===e){const e=t;"function"==typeof e?.setChecked&&e.setChecked(!1)}})}setChecked(e){this.$data.checked=e}getChecked(){return this.$data.checked}};d=((e,t)=>{for(var a,s=t,d=e.length-1;d>=0;d--)(a=e[d])&&(s=a(s)||s);return s})([s({tagName:"solely-radio",template:t,styles:e,shadowDOM:{use:!0,mode:"open"},props:[{name:"checked",type:"boolean",default:!1},{name:"disabled",type:"boolean",default:!1},{name:"content",type:"string",default:""},{name:"value",type:"string",default:""},{name:"type",type:"string",default:"primary"},{name:"name",type:"string",default:""},{name:"block",type:"boolean",default:!1}],model:{prop:"checked",event:"change"}})],d);export{d as SolelyRadio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./style.css.cjs"),a=require("./index.html.cjs"),e=require("../../../runtime/component/base-element.cjs"),s=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelyRate=class extends e.default{getRateClasses(){return{"is-disabled":!!this.$data.disabled,"is-readonly":!!this.$data.readonly}}get value(){return this.$data.value||0}set value(t){this.$data.disabled||this.$data.readonly||this.setValue(t)}getStarClasses(t){const a=this.$data.hoverValue,e=this.$data.value||0,s=void 0!==a?a:e;return{"rate__star--full":t<=s,"rate__star--half":!!this.$data.allowHalf&&t-.5===s,"rate__star--zero":t>s}}mounted(){this.refresh(),this.$data.hoverValue=void 0,this.generateStarCount()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./style.css.cjs"),a=require("./index.html.cjs"),e=require("../../../runtime/component/base-element.cjs"),s=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelyRate=class extends e.default{getRateClasses(){return{"is-disabled":!!this.$data.disabled,"is-readonly":!!this.$data.readonly}}get value(){return this.$data.value||0}set value(t){this.$data.disabled||this.$data.readonly||this.setValue(t)}getStarClasses(t){const a=this.$data.hoverValue,e=this.$data.value||0,s=void 0!==a?a:e;return{"rate__star--full":t<=s,"rate__star--half":!!this.$data.allowHalf&&t-.5===s,"rate__star--zero":t>s}}mounted(){this.refresh(),this.$data.hoverValue=void 0,this.generateStarCount()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){const t=this.shadowRoot?.querySelector(".rate");t&&(t.setAttribute("aria-valuenow",String(this.$data.value||0)),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax",String(this.$data.count||5)),t.setAttribute("aria-disabled",this.$data.disabled?"true":"false"),t.setAttribute("aria-readonly",this.$data.readonly?"true":"false"))}generateStarCount(){const t=this.$data.count||5;this.$data.starCount=Array.from({length:t},(t,a)=>a+1)}handleClick(t){if(this.$data.disabled||this.$data.readonly)return;const a=this.$data.allowHalf&&this.$data.hoverValue||t;this.$data.allowClear&&a===this.$data.value?this.$data.value=0:this.$data.value=a,this.$data.hoverValue=void 0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}handleMouseEnter(t){this.$data.disabled||this.$data.readonly||(this.$data.hoverValue=t)}handleMouseLeave(){this.$data.disabled||this.$data.readonly||(this.$data.hoverValue=void 0)}handleKeyDown(t){if(this.$data.disabled||this.$data.readonly)return;const a=this.$data.count||5,e=this.$data.value||0;if("ArrowRight"===t.key||"ArrowUp"===t.key){t.preventDefault();const s=this.$data.allowHalf?.5:1,l=Math.min(a,e+s);this.$data.value=l,this.dispatchChangeEvent()}else if("ArrowLeft"===t.key||"ArrowDown"===t.key){t.preventDefault();const a=this.$data.allowHalf?.5:1,s=Math.max(0,e-a);this.$data.value=s,this.dispatchChangeEvent()}}dispatchChangeEvent(){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}setValue(t){this.$data.value=t}getValue(){return this.$data.value}},exports.SolelyRate=((t,a)=>{for(var e,s=a,l=t.length-1;l>=0;l--)(e=t[l])&&(s=e(s)||s);return s})([s.CustomElement({tagName:"solely-rate",template:a.__SOLELY_IR__,styles:t.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"value",type:"number",default:0},{name:"count",type:"number"},{name:"allowHalf",type:"boolean",default:!1},{name:"disabled",type:"boolean",default:!1},{name:"allowClear",type:"boolean",default:!1},{name:"character",type:"string"},{name:"readonly",type:"boolean",default:!1}]})],exports.SolelyRate);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a={t:"root",v:"1.2.0",fns:[function(a){const{$data:t}=this;return this.getRateClasses()},function(a){const{$data:t}=this;return"评分,当前 "+(t.value||0)+" 分"},function(a){const{$data:t}=this;return t.disabled?"true":"false"},function(a){const{$data:t}=this;return t.readonly?"true":"false"},function(a){const{$data:t}=this;return t.starCount},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return this.getStarClasses(e)},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return t.character||"★"},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return e===(t.value||0)?"true":"false"},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return e+" 分"},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return 1===e?"0":"-1"},function(a,t){const{$data:e}=this,{value:n,checked:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a={t:"root",v:"1.2.0",fns:[function(a){const{$data:t}=this;return this.getRateClasses()},function(a){const{$data:t}=this;return"评分,当前 "+(t.value||0)+" 分"},function(a){const{$data:t}=this;return t.disabled?"true":"false"},function(a){const{$data:t}=this;return t.readonly?"true":"false"},function(a){const{$data:t}=this;return t.starCount},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return this.getStarClasses(e)},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return t.character||"★"},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return e===(t.value||0)?"true":"false"},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return e+" 分"},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return 1===e?"0":"-1"},function(a,t){const{$data:e}=this,{value:n,checked:r}=a?.target||{};var[s]=t.map(a=>a.itmVal),[i]=t.map(a=>a.idxVal);this.handleClick(s)},function(a,t){const{$data:e}=this,{value:n,checked:r}=a?.target||{};var[s]=t.map(a=>a.itmVal),[i]=t.map(a=>a.idxVal);this.handleMouseEnter(s)},function(a,t){const{$data:e}=this,{value:n,checked:r}=a?.target||{};var[s]=t.map(a=>a.itmVal),[i]=t.map(a=>a.idxVal);this.handleMouseLeave(s)},function(a){const{$data:t}=this;var[e]=a.map(a=>a.itmVal),[n]=a.map(a=>a.idxVal);return`${t.character||"★"}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"rate",d:0},{k:":class",f:1,d:1},{k:"role",v:"radiogroup",d:0},{k:":aria-label",f:2,d:1},{k:":aria-disabled",f:3,d:1},{k:":aria-readonly",f:4,d:1}],c:[{t:6,d:1,f:5,i:"i",n:"index",a:[],c:[{t:0,d:1,g:"span",a:[{k:"part",v:"star",d:0},{k:"class",v:"rate__star",d:0},{k:":class",f:6,d:1},{k:":data-char",f:7,d:1},{k:"role",v:"radio",d:0},{k:":aria-checked",f:8,d:1},{k:":aria-label",f:9,d:1},{k:":tabindex",f:10,d:1},{k:"@click",f:11,d:1},{k:"@mouseenter",f:12,d:1},{k:"@mouseleave",f:13,d:1}],c:[{t:1,d:1,f:14}]}]}]}],s:{tf:14,cf:14,dn:1,tn:1,sn:0}};exports.__SOLELY_IR__=a,exports.default=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a={t:"root",v:"1.2.0",fns:[function(a){const{$data:t}=this;return this.getRateClasses()},function(a){const{$data:t}=this;return"评分,当前 "+(t.value||0)+" 分"},function(a){const{$data:t}=this;return t.disabled?"true":"false"},function(a){const{$data:t}=this;return t.readonly?"true":"false"},function(a){const{$data:t}=this;return t.starCount},function(a){const{$data:t}=this;var[n]=a.map(a=>a.itmVal),[
|
|
1
|
+
const a={t:"root",v:"1.2.0",fns:[function(a){const{$data:t}=this;return this.getRateClasses()},function(a){const{$data:t}=this;return"评分,当前 "+(t.value||0)+" 分"},function(a){const{$data:t}=this;return t.disabled?"true":"false"},function(a){const{$data:t}=this;return t.readonly?"true":"false"},function(a){const{$data:t}=this;return t.starCount},function(a){const{$data:t}=this;var[n]=a.map(a=>a.itmVal),[e]=a.map(a=>a.idxVal);return this.getStarClasses(n)},function(a){const{$data:t}=this;var[n]=a.map(a=>a.itmVal),[e]=a.map(a=>a.idxVal);return t.character||"★"},function(a){const{$data:t}=this;var[n]=a.map(a=>a.itmVal),[e]=a.map(a=>a.idxVal);return n===(t.value||0)?"true":"false"},function(a){const{$data:t}=this;var[n]=a.map(a=>a.itmVal),[e]=a.map(a=>a.idxVal);return n+" 分"},function(a){const{$data:t}=this;var[n]=a.map(a=>a.itmVal),[e]=a.map(a=>a.idxVal);return 1===n?"0":"-1"},function(a,t){const{$data:n}=this,{value:e,checked:i}=a?.target||{};var[d]=t.map(a=>a.itmVal),[r]=t.map(a=>a.idxVal);this.handleClick(d)},function(a,t){const{$data:n}=this,{value:e,checked:i}=a?.target||{};var[d]=t.map(a=>a.itmVal),[r]=t.map(a=>a.idxVal);this.handleMouseEnter(d)},function(a,t){const{$data:n}=this,{value:e,checked:i}=a?.target||{};var[d]=t.map(a=>a.itmVal),[r]=t.map(a=>a.idxVal);this.handleMouseLeave(d)},function(a){const{$data:t}=this;var[n]=a.map(a=>a.itmVal),[e]=a.map(a=>a.idxVal);return`${t.character||"★"}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"rate",d:0},{k:":class",f:1,d:1},{k:"role",v:"radiogroup",d:0},{k:":aria-label",f:2,d:1},{k:":aria-disabled",f:3,d:1},{k:":aria-readonly",f:4,d:1}],c:[{t:6,d:1,f:5,i:"i",n:"index",a:[],c:[{t:0,d:1,g:"span",a:[{k:"part",v:"star",d:0},{k:"class",v:"rate__star",d:0},{k:":class",f:6,d:1},{k:":data-char",f:7,d:1},{k:"role",v:"radio",d:0},{k:":aria-checked",f:8,d:1},{k:":aria-label",f:9,d:1},{k:":tabindex",f:10,d:1},{k:"@click",f:11,d:1},{k:"@mouseenter",f:12,d:1},{k:"@mouseleave",f:13,d:1}],c:[{t:1,d:1,f:14}]}]}]}],s:{tf:14,cf:14,dn:1,tn:1,sn:0}};export{a as __SOLELY_IR__,a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./style.css.js";import{__SOLELY_IR__ as a}from"./index.html.js";import e from"../../../runtime/component/base-element.js";import{CustomElement as s}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let r=class extends e{getRateClasses(){return{"is-disabled":!!this.$data.disabled,"is-readonly":!!this.$data.readonly}}get value(){return this.$data.value||0}set value(t){this.$data.disabled||this.$data.readonly||this.setValue(t)}getStarClasses(t){const a=this.$data.hoverValue,e=this.$data.value||0,s=void 0!==a?a:e;return{"rate__star--full":t<=s,"rate__star--half":!!this.$data.allowHalf&&t-.5===s,"rate__star--zero":t>s}}mounted(){this.refresh(),this.$data.hoverValue=void 0,this.generateStarCount()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){
|
|
1
|
+
import t from"./style.css.js";import{__SOLELY_IR__ as a}from"./index.html.js";import e from"../../../runtime/component/base-element.js";import{CustomElement as s}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let r=class extends e{getRateClasses(){return{"is-disabled":!!this.$data.disabled,"is-readonly":!!this.$data.readonly}}get value(){return this.$data.value||0}set value(t){this.$data.disabled||this.$data.readonly||this.setValue(t)}getStarClasses(t){const a=this.$data.hoverValue,e=this.$data.value||0,s=void 0!==a?a:e;return{"rate__star--full":t<=s,"rate__star--half":!!this.$data.allowHalf&&t-.5===s,"rate__star--zero":t>s}}mounted(){this.refresh(),this.$data.hoverValue=void 0,this.generateStarCount()}updated(){this.updateAriaAttributes()}updateAriaAttributes(){const t=this.shadowRoot?.querySelector(".rate");t&&(t.setAttribute("aria-valuenow",String(this.$data.value||0)),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax",String(this.$data.count||5)),t.setAttribute("aria-disabled",this.$data.disabled?"true":"false"),t.setAttribute("aria-readonly",this.$data.readonly?"true":"false"))}generateStarCount(){const t=this.$data.count||5;this.$data.starCount=Array.from({length:t},(t,a)=>a+1)}handleClick(t){if(this.$data.disabled||this.$data.readonly)return;const a=this.$data.allowHalf&&this.$data.hoverValue||t;this.$data.allowClear&&a===this.$data.value?this.$data.value=0:this.$data.value=a,this.$data.hoverValue=void 0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}handleMouseEnter(t){this.$data.disabled||this.$data.readonly||(this.$data.hoverValue=t)}handleMouseLeave(){this.$data.disabled||this.$data.readonly||(this.$data.hoverValue=void 0)}handleKeyDown(t){if(this.$data.disabled||this.$data.readonly)return;const a=this.$data.count||5,e=this.$data.value||0;if("ArrowRight"===t.key||"ArrowUp"===t.key){t.preventDefault();const s=this.$data.allowHalf?.5:1,r=Math.min(a,e+s);this.$data.value=r,this.dispatchChangeEvent()}else if("ArrowLeft"===t.key||"ArrowDown"===t.key){t.preventDefault();const a=this.$data.allowHalf?.5:1,s=Math.max(0,e-a);this.$data.value=s,this.dispatchChangeEvent()}}dispatchChangeEvent(){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}setValue(t){this.$data.value=t}getValue(){return this.$data.value}};r=((t,a)=>{for(var e,s=a,r=t.length-1;r>=0;r--)(e=t[r])&&(s=e(s)||s);return s})([s({tagName:"solely-rate",template:a,styles:t,shadowDOM:{use:!0,mode:"open"},props:[{name:"value",type:"number",default:0},{name:"count",type:"number"},{name:"allowHalf",type:"boolean",default:!1},{name:"disabled",type:"boolean",default:!1},{name:"allowClear",type:"boolean",default:!1},{name:"character",type:"string"},{name:"readonly",type:"boolean",default:!1}]})],r);export{r as SolelyRate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./style.css.cjs"),e=require("./index.html.cjs"),s=require("../../../runtime/component/base-element.cjs"),a=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelySelect=class extends s.default{clickOutsideHandler;slotObserver;closeTimer;get value(){return this.$data.value||""}set value(t){this.$data.disabled||this.setValue(t)}getSelectClasses(){const t={};return"small"===this.$data.size?t["select--sm"]=!0:"large"===this.$data.size?t["select--lg"]=!0:t["select--md"]=!0,t["is-disabled"]=!!this.$data.disabled,t["is-focused"]=!!this.$data.focused,t["is-open"]=!!this.$data.isOpen,t["use-slot"]=this.$data.useSlot,t}getDropdownClasses(){return{"select__dropdown--closing":!!this.$data.closing,"select__dropdown--top":"top"===this.$data.dropdownPlacement,"select__dropdown--bottom":"bottom"===this.$data.dropdownPlacement}}getOptionClasses(t){return{"select__option--selected":t.value===this.$data.value,"select__option--disabled":!!t.disabled}}calculateDropdownPlacement(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom,s=t.top;this.$data.dropdownPlacement=e<256&&s>e?"top":"bottom"}collectSlotOptions(){const t=Array.from(this.children);this.$data.hasHeaderSlot=t.some(t=>"header"===t.getAttribute("slot")),this.$data.hasFooterSlot=t.some(t=>"footer"===t.getAttribute("slot"));const e=t.filter(t=>!t.getAttribute("slot")&&t.hasAttribute("data-value"));0!==e.length?(this.$data.useSlot=!0,this.$data.slotOptions=e.map(t=>{const e=t;return{value:e.getAttribute("data-value")||"",label:e.getAttribute("data-label")||e.textContent?.trim()||"",disabled:e.hasAttribute("disabled"),element:t}}),this.syncSelectedLabel()):this.$data.useSlot=!1}mounted(){this.collectSlotOptions(),this.$data.useSlot||this.parseOptions(),this.setupSlotObserver(),this.clickOutsideHandler=t=>{t.composedPath().some(t=>t===this)||this.closeDropdown()},document.addEventListener("click",this.clickOutsideHandler)}setupSlotObserver(){this.slotObserver=new MutationObserver(()=>{this.collectSlotOptions()}),this.slotObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["data-value","data-label","disabled"]})}unmounted(){this.clickOutsideHandler&&document.removeEventListener("click",this.clickOutsideHandler),this.slotObserver&&this.slotObserver.disconnect(),this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}updated(){const t=this.$data.selectedLabel,e=this.getCurrentLabel();t!==e&&(this.$data.selectedLabel=e),this.updateAriaAttributes()}updateAriaAttributes(){const t=this.shadowRoot?.querySelector(".select__trigger");t&&(t.setAttribute("aria-expanded",this.$data.isOpen?"true":"false"),t.setAttribute("aria-disabled",this.$data.disabled?"true":"false"))}getCurrentLabel(){if(this.$data.useSlot){const t=this.$data.slotOptions.find(t=>t.value===this.$data.value);return t?.label||""}{const t=this.$data.parsedOptions.find(t=>t.value===this.$data.value);return t?.label||""}}parseOptions(){this.$data.parsedOptions=Array.isArray(this.$data.options)?this.$data.options:[],this.syncSelectedLabel()}syncSelectedLabel(){if(this.$data.useSlot){const t=this.$data.slotOptions?.find(t=>t.value===this.$data.value);this.$data.selectedLabel=t?.label||""}else{const t=this.$data.parsedOptions?.find(t=>t.value===this.$data.value);this.$data.selectedLabel=t?.label||""}}handleClick(){if(this.$data.disabled)return;const t=!this.$data.isOpen;this.$data.isOpen=t,this.$data.focused=t,t&&this.calculateDropdownPlacement()}handleSelect(t,e){t.disabled||(this.$data.value=t.value,this.syncSelectedLabel(),this.closeDropdown(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleSlotClick(t){const e=t.target.closest("[data-value]");if(!e)return;if(e.hasAttribute("data-group"))return void t.stopPropagation();const s=e.getAttribute("data-value")||"",a=e.getAttribute("data-label")||e.textContent?.trim()||"";e.hasAttribute("disabled")||(this.$data.value=s,this.$data.selectedLabel=a,this.closeDropdown(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleHeaderFooterClick(t){t.stopPropagation()}handleClear(t){t.stopPropagation(),this.$data.value="",this.$data.selectedLabel="",this.dispatchEvent(new Event("clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}closeDropdown(){this.$data.isOpen&&(this.$data.closing=!0,this.closeTimer=setTimeout(()=>{this.$data.isOpen=!1,this.$data.closing=!1,this.$data.focused=!1,this.closeTimer=void 0},200))}setValue(t,e=!1){this.$data.value=t,this.syncSelectedLabel(),e||this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}getValue(){return this.$data.value||""}setOptions(t){this.$data.options=t,this.$data.useSlot=!1,this.parseOptions()}},exports.SolelySelect=((t,e)=>{for(var s,a=e,i=t.length-1;i>=0;i--)(s=t[i])&&(a=s(a)||a);return a})([a.CustomElement({tagName:"solely-select",template:e.__SOLELY_IR__,styles:t.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"value",type:"string",default:""},{name:"placeholder",type:"string",default:"请选择"},{name:"disabled",type:"boolean",default:!1},{name:"size",type:"string",default:"medium"},{name:"clearable",type:"boolean",default:!1},{name:"options",type:"array",default:[]},{name:"multiple",type:"boolean",default:!1},{name:"block",type:"boolean",default:!1}]})],exports.SolelySelect);
|
|
@@ -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.getSelectClasses()},function(t){const{$data:a}=this;return a.isOpen?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:e}=this,{value:d,checked:s}=
|
|
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.getSelectClasses()},function(t){const{$data:a}=this;return a.isOpen?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleClick(t)},function(t){const{$data:a}=this;return!a.selectedLabel},function(t){const{$data:a}=this;return`${a.placeholder||"请选择"}`},function(t){const{$data:a}=this;return a.selectedLabel},function(t){const{$data:a}=this;return`${a.selectedLabel}`},function(t){const{$data:a}=this;return a.clearable&&a.selectedLabel&&!a.disabled},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleClear(t)},function(t){const{$data:a}=this;return a.isOpen},function(t){const{$data:a}=this;return this.getDropdownClasses()},function(t){const{$data:a}=this;return a.hasHeaderSlot},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleHeaderFooterClick(t)},function(t){const{$data:a}=this;return!a.useSlot},function(t){const{$data:a}=this;return 0===a.parsedOptions.length},function(t){const{$data:a}=this;return a.parsedOptions},function(t){const{$data:a}=this;var[e]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return this.getOptionClasses(e)},function(t){const{$data:a}=this;var[e]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return e.value===a.value?"true":"false"},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};var[c]=a.map(t=>t.itmVal),[n]=a.map(t=>t.idxVal);this.handleSelect(c,t)},function(t){const{$data:a}=this;var[e]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return`${e.label}`},function(t){const{$data:a}=this;return a.useSlot},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleSlotClick(t)},function(t){const{$data:a}=this;return a.hasFooterSlot}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"select",d:0},{k:":class",f:1,d:1},{k:"role",v:"combobox",d:0},{k:":aria-expanded",f:2,d:1},{k:":aria-disabled",f:3,d:1},{k:"@click",f:4,d:1}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"selector",d:0},{k:"class",v:"select__selector",d:0}],c:[{t:7,d:1,b:[{f:5,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"placeholder",d:0},{k:"class",v:"select__placeholder",d:0}],c:[{t:1,d:1,f:6}]}]}]},{t:7,d:1,b:[{f:7,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"value",d:0},{k:"class",v:"select__value",d:0}],c:[{t:1,d:1,f:8}]}]}]},{t:7,d:1,b:[{f:9,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"clear",d:0},{k:"class",v:"select__clear",d:0},{k:"@click",f:10,d:1}],c:[{t:1,d:0,s:1,x:"×"}]}]}]},{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"arrow",d:0},{k:"class",v:"select__arrow",d:0}],c:[{t:1,d:0,s:1,x:"▼"}]}]},{t:2,d:0,x:" 下拉菜单 "},{t:7,d:1,b:[{f:11,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"dropdown",d:0},{k:"class",v:"select__dropdown",d:0},{k:":class",f:12,d:1},{k:"role",v:"listbox",d:0}],c:[{t:2,d:0,x:" header 插槽 - 固定顶部 "},{t:7,d:1,b:[{f:13,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"header",d:0},{k:"class",v:"select__header",d:0},{k:"@click",f:14,d:1}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"header",d:0}],c:[]}]}]}]},{t:2,d:0,x:" 滚动内容区域 "},{t:0,d:0,g:"div",a:[{k:"part",v:"dropdown-content",d:0},{k:"class",v:"select__dropdown-content",d:0}],c:[{t:2,d:0,x:" 使用 options 属性时的渲染 "},{t:7,d:1,b:[{f:15,c:[{t:7,d:1,b:[{f:16,c:[{t:0,d:0,s:1,g:"div",a:[{k:"part",v:"empty",d:0},{k:"class",v:"select__empty",d:0}],c:[{t:1,d:0,s:1,x:"暂无数据"}]}]}]},{t:6,d:1,f:17,i:"option",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"option",d:0},{k:"class",v:"select__option",d:0},{k:":class",f:18,d:1},{k:"role",v:"option",d:0},{k:":aria-selected",f:19,d:1},{k:"@click",f:20,d:1}],c:[{t:0,d:0,g:"span",a:[{k:"part",v:"option-label",d:0},{k:"class",v:"select__option-label",d:0}],c:[{t:1,d:1,f:21}]}]}]}]}]},{t:2,d:0,x:" 使用插槽时的渲染 "},{t:7,d:1,b:[{f:22,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"slot-options",d:0},{k:"class",v:"select__slot-options",d:0},{k:"@click",f:23,d:1}],c:[{t:0,d:0,s:1,g:"slot",a:[],c:[]}]}]}]}]},{t:2,d:0,x:" footer 插槽 - 固定底部 "},{t:7,d:1,b:[{f:24,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"footer",d:0},{k:"class",v:"select__footer",d:0},{k:"@click",f:14,d:1}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"footer",d:0}],c:[]}]}]}]}]}]}]}]}],s:{tf:24,cf:24,dn:1,tn:1,sn:0}};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.getSelectClasses()},function(t){const{$data:a}=this;return a.isOpen?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:
|
|
1
|
+
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getSelectClasses()},function(t){const{$data:a}=this;return a.isOpen?"true":"false"},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleClick(t)},function(t){const{$data:a}=this;return!a.selectedLabel},function(t){const{$data:a}=this;return`${a.placeholder||"请选择"}`},function(t){const{$data:a}=this;return a.selectedLabel},function(t){const{$data:a}=this;return`${a.selectedLabel}`},function(t){const{$data:a}=this;return a.clearable&&a.selectedLabel&&!a.disabled},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleClear(t)},function(t){const{$data:a}=this;return a.isOpen},function(t){const{$data:a}=this;return this.getDropdownClasses()},function(t){const{$data:a}=this;return a.hasHeaderSlot},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleHeaderFooterClick(t)},function(t){const{$data:a}=this;return!a.useSlot},function(t){const{$data:a}=this;return 0===a.parsedOptions.length},function(t){const{$data:a}=this;return a.parsedOptions},function(t){const{$data:a}=this;var[e]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return this.getOptionClasses(e)},function(t){const{$data:a}=this;var[e]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return e.value===a.value?"true":"false"},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};var[c]=a.map(t=>t.itmVal),[n]=a.map(t=>t.idxVal);this.handleSelect(c,t)},function(t){const{$data:a}=this;var[e]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return`${e.label}`},function(t){const{$data:a}=this;return a.useSlot},function(t,a){const{$data:e}=this,{value:d,checked:s}=t?.target||{};this.handleSlotClick(t)},function(t){const{$data:a}=this;return a.hasFooterSlot}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"select",d:0},{k:":class",f:1,d:1},{k:"role",v:"combobox",d:0},{k:":aria-expanded",f:2,d:1},{k:":aria-disabled",f:3,d:1},{k:"@click",f:4,d:1}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"selector",d:0},{k:"class",v:"select__selector",d:0}],c:[{t:7,d:1,b:[{f:5,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"placeholder",d:0},{k:"class",v:"select__placeholder",d:0}],c:[{t:1,d:1,f:6}]}]}]},{t:7,d:1,b:[{f:7,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"value",d:0},{k:"class",v:"select__value",d:0}],c:[{t:1,d:1,f:8}]}]}]},{t:7,d:1,b:[{f:9,c:[{t:0,d:1,g:"span",a:[{k:"part",v:"clear",d:0},{k:"class",v:"select__clear",d:0},{k:"@click",f:10,d:1}],c:[{t:1,d:0,s:1,x:"×"}]}]}]},{t:0,d:0,s:1,g:"span",a:[{k:"part",v:"arrow",d:0},{k:"class",v:"select__arrow",d:0}],c:[{t:1,d:0,s:1,x:"▼"}]}]},{t:2,d:0,x:" 下拉菜单 "},{t:7,d:1,b:[{f:11,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"dropdown",d:0},{k:"class",v:"select__dropdown",d:0},{k:":class",f:12,d:1},{k:"role",v:"listbox",d:0}],c:[{t:2,d:0,x:" header 插槽 - 固定顶部 "},{t:7,d:1,b:[{f:13,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"header",d:0},{k:"class",v:"select__header",d:0},{k:"@click",f:14,d:1}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"header",d:0}],c:[]}]}]}]},{t:2,d:0,x:" 滚动内容区域 "},{t:0,d:0,g:"div",a:[{k:"part",v:"dropdown-content",d:0},{k:"class",v:"select__dropdown-content",d:0}],c:[{t:2,d:0,x:" 使用 options 属性时的渲染 "},{t:7,d:1,b:[{f:15,c:[{t:7,d:1,b:[{f:16,c:[{t:0,d:0,s:1,g:"div",a:[{k:"part",v:"empty",d:0},{k:"class",v:"select__empty",d:0}],c:[{t:1,d:0,s:1,x:"暂无数据"}]}]}]},{t:6,d:1,f:17,i:"option",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"option",d:0},{k:"class",v:"select__option",d:0},{k:":class",f:18,d:1},{k:"role",v:"option",d:0},{k:":aria-selected",f:19,d:1},{k:"@click",f:20,d:1}],c:[{t:0,d:0,g:"span",a:[{k:"part",v:"option-label",d:0},{k:"class",v:"select__option-label",d:0}],c:[{t:1,d:1,f:21}]}]}]}]}]},{t:2,d:0,x:" 使用插槽时的渲染 "},{t:7,d:1,b:[{f:22,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"slot-options",d:0},{k:"class",v:"select__slot-options",d:0},{k:"@click",f:23,d:1}],c:[{t:0,d:0,s:1,g:"slot",a:[],c:[]}]}]}]}]},{t:2,d:0,x:" footer 插槽 - 固定底部 "},{t:7,d:1,b:[{f:24,c:[{t:0,d:1,g:"div",a:[{k:"part",v:"footer",d:0},{k:"class",v:"select__footer",d:0},{k:"@click",f:14,d:1}],c:[{t:0,d:0,s:1,g:"slot",a:[{k:"name",v:"footer",d:0}],c:[]}]}]}]}]}]}]}]}],s:{tf:24,cf:24,dn:1,tn:1,sn:0}};export{t as __SOLELY_IR__,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import t from"./style.css.js";import{__SOLELY_IR__ as e}from"./index.html.js";import s from"../../../runtime/component/base-element.js";import{CustomElement as a}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let i=class extends s{clickOutsideHandler;slotObserver;closeTimer;get value(){return this.$data.value||""}set value(t){this.$data.disabled||this.setValue(t)}getSelectClasses(){const t={};return"small"===this.$data.size?t["select--sm"]=!0:"large"===this.$data.size?t["select--lg"]=!0:t["select--md"]=!0,t["is-disabled"]=!!this.$data.disabled,t["is-focused"]=!!this.$data.focused,t["is-open"]=!!this.$data.isOpen,t["use-slot"]=this.$data.useSlot,t}getDropdownClasses(){return{"select__dropdown--closing":!!this.$data.closing,"select__dropdown--top":"top"===this.$data.dropdownPlacement,"select__dropdown--bottom":"bottom"===this.$data.dropdownPlacement}}getOptionClasses(t){return{"select__option--selected":t.value===this.$data.value,"select__option--disabled":!!t.disabled}}calculateDropdownPlacement(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom,s=t.top;this.$data.dropdownPlacement=e<256&&s>e?"top":"bottom"}collectSlotOptions(){const t=Array.from(this.children);this.$data.hasHeaderSlot=t.some(t=>"header"===t.getAttribute("slot")),this.$data.hasFooterSlot=t.some(t=>"footer"===t.getAttribute("slot"));const e=t.filter(t=>!t.getAttribute("slot")&&t.hasAttribute("data-value"));0!==e.length?(this.$data.useSlot=!0,this.$data.slotOptions=e.map(t=>{const e=t;return{value:e.getAttribute("data-value")||"",label:e.getAttribute("data-label")||e.textContent?.trim()||"",disabled:e.hasAttribute("disabled"),element:t}}),this.syncSelectedLabel()):this.$data.useSlot=!1}mounted(){this.collectSlotOptions(),this.$data.useSlot||this.parseOptions(),this.setupSlotObserver(),this.clickOutsideHandler=t=>{t.composedPath().some(t=>t===this)||this.closeDropdown()},document.addEventListener("click",this.clickOutsideHandler)}setupSlotObserver(){this.slotObserver=new MutationObserver(()=>{this.collectSlotOptions()}),this.slotObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["data-value","data-label","disabled"]})}unmounted(){this.clickOutsideHandler&&document.removeEventListener("click",this.clickOutsideHandler),this.slotObserver&&this.slotObserver.disconnect(),this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}updated(){const t=this.$data.selectedLabel,e=this.getCurrentLabel();t!==e&&(this.$data.selectedLabel=e),this.updateAriaAttributes()}updateAriaAttributes(){const t=this.shadowRoot?.querySelector(".select__trigger");t&&(t.setAttribute("aria-expanded",this.$data.isOpen?"true":"false"),t.setAttribute("aria-disabled",this.$data.disabled?"true":"false"))}getCurrentLabel(){if(this.$data.useSlot){const t=this.$data.slotOptions.find(t=>t.value===this.$data.value);return t?.label||""}{const t=this.$data.parsedOptions.find(t=>t.value===this.$data.value);return t?.label||""}}parseOptions(){this.$data.parsedOptions=Array.isArray(this.$data.options)?this.$data.options:[],this.syncSelectedLabel()}syncSelectedLabel(){if(this.$data.useSlot){const t=this.$data.slotOptions?.find(t=>t.value===this.$data.value);this.$data.selectedLabel=t?.label||""}else{const t=this.$data.parsedOptions?.find(t=>t.value===this.$data.value);this.$data.selectedLabel=t?.label||""}}handleClick(){if(this.$data.disabled)return;const t=!this.$data.isOpen;this.$data.isOpen=t,this.$data.focused=t,t&&this.calculateDropdownPlacement()}handleSelect(t,e){t.disabled||(this.$data.value=t.value,this.syncSelectedLabel(),this.closeDropdown(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleSlotClick(t){const e=t.target.closest("[data-value]");if(!e)return;if(e.hasAttribute("data-group"))return void t.stopPropagation();const s=e.getAttribute("data-value")||"",a=e.getAttribute("data-label")||e.textContent?.trim()||"";e.hasAttribute("disabled")||(this.$data.value=s,this.$data.selectedLabel=a,this.closeDropdown(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleHeaderFooterClick(t){t.stopPropagation()}handleClear(t){t.stopPropagation(),this.$data.value="",this.$data.selectedLabel="",this.dispatchEvent(new Event("clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}closeDropdown(){this.$data.isOpen&&(this.$data.closing=!0,this.closeTimer=setTimeout(()=>{this.$data.isOpen=!1,this.$data.closing=!1,this.$data.focused=!1,this.closeTimer=void 0},200))}setValue(t,e=!1){this.$data.value=t,this.syncSelectedLabel(),e||this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}getValue(){return this.$data.value||""}setOptions(t){this.$data.options=t,this.$data.useSlot=!1,this.parseOptions()}};i=((t,e)=>{for(var s,a=e,i=t.length-1;i>=0;i--)(s=t[i])&&(a=s(a)||a);return a})([a({tagName:"solely-select",template:e,styles:t,shadowDOM:{use:!0,mode:"open"},props:[{name:"value",type:"string",default:""},{name:"placeholder",type:"string",default:"请选择"},{name:"disabled",type:"boolean",default:!1},{name:"size",type:"string",default:"medium"},{name:"clearable",type:"boolean",default:!1},{name:"options",type:"array",default:[]},{name:"multiple",type:"boolean",default:!1},{name:"block",type:"boolean",default:!1}]})],i);export{i as SolelySelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./style.css.cjs"),e=require("./index.html.cjs"),a=require("../../../runtime/component/base-element.cjs"),i=require("../../../runtime/component/decorators.cjs");Object.getOwnPropertyDescriptor;exports.SolelySlider=class extends a.default{railElement;dragMoveHandler;dragUpHandler;touchMoveHandler;touchEndHandler;getSliderClasses(){return{"slider--vertical":!!this.$data.vertical,"is-disabled":!!this.$data.disabled}}get value(){return this.$data.value??this.$data.min??0}set value(t){this.$data.disabled||this.setValue(t)}getHandleClasses(){return{"slider__handle--dragging":!!this.$data.isDragging}}mounted(){this.$data.isDragging=!1,void 0===this.$data.min&&(this.$data.min=0),void 0===this.$data.max&&(this.$data.max=100),void 0===this.$data.step&&(this.$data.step=1),void 0===this.$data.value&&(this.$data.value=this.$data.min),this.refresh(),this.railElement=this.shadowRoot?.querySelector(".slider__rail")}unmounted(){this.cleanupDragListeners()}cleanupDragListeners(){this.dragMoveHandler&&(document.removeEventListener("mousemove",this.dragMoveHandler),this.dragMoveHandler=void 0),this.dragUpHandler&&(document.removeEventListener("mouseup",this.dragUpHandler),this.dragUpHandler=void 0),this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=void 0),this.touchEndHandler&&(document.removeEventListener("touchend",this.touchEndHandler),this.touchEndHandler=void 0)}updated(){this.updateAriaAttributes()}updateAriaAttributes(){const t=this.shadowRoot?.querySelector(".slider__handle");t&&(t.setAttribute("aria-valuenow",String(this.$data.value??this.$data.min??0)),t.setAttribute("aria-valuemin",String(this.$data.min??0)),t.setAttribute("aria-valuemax",String(this.$data.max??100)),t.setAttribute("aria-disabled",this.$data.disabled?"true":"false"))}getParsedMarks(){if(!this.$data.marks)return[];try{const t=this.$data.marksData||{};return Object.entries(t).map(([t,e])=>({value:parseFloat(t),label:String(e)}))}catch{return[]}}getTrackStyle(){const t=this.getPercent();return this.$data.vertical?`height: ${t}%;`:`width: ${t}%;`}getHandleStyle(){const t=this.getPercent();return this.$data.vertical?`bottom: ${t}%;`:`left: ${t}%;`}getMarkStyle(t){const e=this.$data.min??0,a=(t-e)/((this.$data.max??100)-e)*100;return this.$data.vertical?`bottom: ${a}%;`:`left: ${a}%;`}getPercent(){const t=this.$data.min??0,e=this.$data.max??100;return(Math.max(t,Math.min(e,this.$data.value??t))-t)/(e-t)*100}railRect;handleMouseDown(t){this.$data.disabled||(t.preventDefault(),this.$data.isDragging=!0,this.railElement&&(this.railRect=this.railElement.getBoundingClientRect()),this.updateValueFromRect(t),this.cleanupDragListeners(),this.dragMoveHandler=t=>{this.$data.isDragging&&this.updateValueFromRect(t)},this.dragUpHandler=()=>{this.$data.isDragging=!1,this.railRect=void 0,this.cleanupDragListeners(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},document.addEventListener("mousemove",this.dragMoveHandler),document.addEventListener("mouseup",this.dragUpHandler))}handleTouchStart(t){this.$data.disabled||0!==t.touches.length&&(t.preventDefault(),this.$data.isDragging=!0,this.railElement&&(this.railRect=this.railElement.getBoundingClientRect()),this.updateValueFromRect(t.touches[0]),this.cleanupDragListeners(),this.touchMoveHandler=t=>{this.$data.isDragging&&t.touches.length>0&&this.updateValueFromRect(t.touches[0])},this.touchEndHandler=()=>{this.$data.isDragging=!1,this.railRect=void 0,this.cleanupDragListeners(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},document.addEventListener("touchmove",this.touchMoveHandler),document.addEventListener("touchend",this.touchEndHandler))}updateValueFromRect(t){if(!this.railRect)return void this.updateValue(t);const e=this.railRect;let a;a=this.$data.vertical?1-(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,a=Math.max(0,Math.min(1,a));const i=this.$data.min??0,s=this.$data.max??100,n=i+a*(s-i),r=this.$data.step||1,d=Math.round(n/r)*r,l=Math.max(i,Math.min(s,d));this.$data.value!==l&&(this.$data.value=l,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}updateValue(t){if(this.railElement||(this.railElement=this.shadowRoot?.querySelector(".slider__rail")),!this.railElement)return;const e=this.railElement.getBoundingClientRect();let a;a=this.$data.vertical?1-(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,a=Math.max(0,Math.min(1,a));const i=this.$data.min??0,s=this.$data.max??100,n=i+a*(s-i),r=this.$data.step||1,d=Math.round(n/r)*r,l=Math.max(i,Math.min(s,d));this.$data.value!==l&&(this.$data.value=l,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}setValue(t){const e=this.$data.min??0,a=this.$data.max??100;this.$data.value=Math.max(e,Math.min(a,t))}getValue(){return this.$data.value??this.$data.min??0}},exports.SolelySlider=((t,e)=>{for(var a,i=e,s=t.length-1;s>=0;s--)(a=t[s])&&(i=a(i)||i);return i})([i.CustomElement({tagName:"solely-slider",template:e.__SOLELY_IR__,styles:t.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"value",type:"number"},{name:"min",type:"number"},{name:"max",type:"number"},{name:"step",type:"number"},{name:"disabled",type:"boolean",default:!1},{name:"tooltipVisible",type:"boolean",default:!0},{name:"marks",type:"boolean",default:!1},{name:"marksData",type:"object",default:{}},{name:"vertical",type:"boolean",default:!1},{name:"block",type:"boolean",default:!1}]})],exports.SolelySlider);
|
|
@@ -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.getSliderClasses()},function(t){const{$data:a}=this;return a.min??0},function(t){const{$data:a}=this;return a.max??100},function(t){const{$data:a}=this;return a.value??a.min??0},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t){const{$data:a}=this;return a.vertical?"vertical":"horizontal"},function(t,a){const{$data:
|
|
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.getSliderClasses()},function(t){const{$data:a}=this;return a.min??0},function(t){const{$data:a}=this;return a.max??100},function(t){const{$data:a}=this;return a.value??a.min??0},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t){const{$data:a}=this;return a.vertical?"vertical":"horizontal"},function(t,a){const{$data:s}=this,{value:d,checked:e}=t?.target||{};this.handleMouseDown(t)},function(t,a){const{$data:s}=this,{value:d,checked:e}=t?.target||{};this.handleTouchStart(t)},function(t){const{$data:a}=this;return this.getTrackStyle()},function(t){const{$data:a}=this;return this.getHandleClasses()},function(t){const{$data:a}=this;return this.getHandleStyle()},function(t){const{$data:a}=this;return!1!==a.tooltipVisible},function(t){const{$data:a}=this;return`${a.value}`},function(t){const{$data:a}=this;return a.marks},function(t){const{$data:a}=this;return this.getParsedMarks()},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return this.getMarkStyle(s.value)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return{"slider__mark-dot--active":s.value<=(a.value??a.min??0)}},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[d]=t.map(t=>t.idxVal);return`${s.label}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"slider",d:0},{k:":class",f:1,d:1}],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"rail",d:0},{k:"class",v:"slider__rail",d:0},{k:"ref",v:"rail",d:0},{k:"role",v:"slider",d:0},{k:":aria-valuemin",f:2,d:1},{k:":aria-valuemax",f:3,d:1},{k:":aria-valuenow",f:4,d:1},{k:":aria-valuetext",f:4,d:1},{k:":aria-disabled",f:5,d:1},{k:":aria-orientation",f:6,d:1},{k:"tabindex",v:"0",d:0},{k:"@mousedown",f:7,d:1},{k:"@touchstart",f:8,d:1}],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"track",d:0},{k:"class",v:"slider__track",d:0},{k:":style",f:9,d:1}],c:[]},{t:0,d:1,g:"div",a:[{k:"part",v:"handle",d:0},{k:"class",v:"slider__handle",d:0},{k:":class",f:10,d:1},{k:":style",f:11,d:1}],c:[{t:7,d:1,b:[{f:12,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"tooltip",d:0},{k:"class",v:"slider__tooltip",d:0}],c:[{t:1,d:1,f:13}]}]}]}]},{t:2,d:0,x:" 刻度标记 "},{t:7,d:1,b:[{f:14,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"marks",d:0},{k:"class",v:"slider__marks",d:0},{k:"aria-hidden",v:"true",d:0}],c:[{t:6,d:1,f:15,i:"mark",n:"index",a:[],c:[{t:0,d:1,g:"span",a:[{k:"part",v:"mark",d:0},{k:"class",v:"slider__mark",d:0},{k:":style",f:16,d:1}],c:[{t:0,d:1,g:"span",a:[{k:"part",v:"mark-dot",d:0},{k:"class",v:"slider__mark-dot",d:0},{k:":class",f:17,d:1}],c:[]},{t:0,d:0,g:"span",a:[{k:"part",v:"mark-label",d:0},{k:"class",v:"slider__mark-label",d:0}],c:[{t:1,d:1,f:18}]}]}]}]}]}]}]}]}],s:{tf:18,cf:18,dn:1,tn:1,sn:0}};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.getSliderClasses()},function(t){const{$data:a}=this;return a.min??0},function(t){const{$data:a}=this;return a.max??100},function(t){const{$data:a}=this;return a.value??a.min??0},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t){const{$data:a}=this;return a.vertical?"vertical":"horizontal"},function(t,a){const{$data:d}=this,{value:s,checked:n}=
|
|
1
|
+
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getSliderClasses()},function(t){const{$data:a}=this;return a.min??0},function(t){const{$data:a}=this;return a.max??100},function(t){const{$data:a}=this;return a.value??a.min??0},function(t){const{$data:a}=this;return a.disabled?"true":"false"},function(t){const{$data:a}=this;return a.vertical?"vertical":"horizontal"},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleMouseDown(t)},function(t,a){const{$data:d}=this,{value:s,checked:n}=t?.target||{};this.handleTouchStart(t)},function(t){const{$data:a}=this;return this.getTrackStyle()},function(t){const{$data:a}=this;return this.getHandleClasses()},function(t){const{$data:a}=this;return this.getHandleStyle()},function(t){const{$data:a}=this;return!1!==a.tooltipVisible},function(t){const{$data:a}=this;return`${a.value}`},function(t){const{$data:a}=this;return a.marks},function(t){const{$data:a}=this;return this.getParsedMarks()},function(t){const{$data:a}=this;var[d]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return this.getMarkStyle(d.value)},function(t){const{$data:a}=this;var[d]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return{"slider__mark-dot--active":d.value<=(a.value??a.min??0)}},function(t){const{$data:a}=this;var[d]=t.map(t=>t.itmVal),[s]=t.map(t=>t.idxVal);return`${d.label}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"slider",d:0},{k:":class",f:1,d:1}],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"rail",d:0},{k:"class",v:"slider__rail",d:0},{k:"ref",v:"rail",d:0},{k:"role",v:"slider",d:0},{k:":aria-valuemin",f:2,d:1},{k:":aria-valuemax",f:3,d:1},{k:":aria-valuenow",f:4,d:1},{k:":aria-valuetext",f:4,d:1},{k:":aria-disabled",f:5,d:1},{k:":aria-orientation",f:6,d:1},{k:"tabindex",v:"0",d:0},{k:"@mousedown",f:7,d:1},{k:"@touchstart",f:8,d:1}],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"track",d:0},{k:"class",v:"slider__track",d:0},{k:":style",f:9,d:1}],c:[]},{t:0,d:1,g:"div",a:[{k:"part",v:"handle",d:0},{k:"class",v:"slider__handle",d:0},{k:":class",f:10,d:1},{k:":style",f:11,d:1}],c:[{t:7,d:1,b:[{f:12,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"tooltip",d:0},{k:"class",v:"slider__tooltip",d:0}],c:[{t:1,d:1,f:13}]}]}]}]},{t:2,d:0,x:" 刻度标记 "},{t:7,d:1,b:[{f:14,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"marks",d:0},{k:"class",v:"slider__marks",d:0},{k:"aria-hidden",v:"true",d:0}],c:[{t:6,d:1,f:15,i:"mark",n:"index",a:[],c:[{t:0,d:1,g:"span",a:[{k:"part",v:"mark",d:0},{k:"class",v:"slider__mark",d:0},{k:":style",f:16,d:1}],c:[{t:0,d:1,g:"span",a:[{k:"part",v:"mark-dot",d:0},{k:"class",v:"slider__mark-dot",d:0},{k:":class",f:17,d:1}],c:[]},{t:0,d:0,g:"span",a:[{k:"part",v:"mark-label",d:0},{k:"class",v:"slider__mark-label",d:0}],c:[{t:1,d:1,f:18}]}]}]}]}]}]}]}]}],s:{tf:18,cf:18,dn:1,tn:1,sn:0}};export{t as __SOLELY_IR__,t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import t from"./style.css.js";import{__SOLELY_IR__ as e}from"./index.html.js";import a from"../../../runtime/component/base-element.js";import{CustomElement as i}from"../../../runtime/component/decorators.js";Object.getOwnPropertyDescriptor;let s=class extends a{railElement;dragMoveHandler;dragUpHandler;touchMoveHandler;touchEndHandler;getSliderClasses(){return{"slider--vertical":!!this.$data.vertical,"is-disabled":!!this.$data.disabled}}get value(){return this.$data.value??this.$data.min??0}set value(t){this.$data.disabled||this.setValue(t)}getHandleClasses(){return{"slider__handle--dragging":!!this.$data.isDragging}}mounted(){this.$data.isDragging=!1,void 0===this.$data.min&&(this.$data.min=0),void 0===this.$data.max&&(this.$data.max=100),void 0===this.$data.step&&(this.$data.step=1),void 0===this.$data.value&&(this.$data.value=this.$data.min),this.refresh(),this.railElement=this.shadowRoot?.querySelector(".slider__rail")}unmounted(){this.cleanupDragListeners()}cleanupDragListeners(){this.dragMoveHandler&&(document.removeEventListener("mousemove",this.dragMoveHandler),this.dragMoveHandler=void 0),this.dragUpHandler&&(document.removeEventListener("mouseup",this.dragUpHandler),this.dragUpHandler=void 0),this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=void 0),this.touchEndHandler&&(document.removeEventListener("touchend",this.touchEndHandler),this.touchEndHandler=void 0)}updated(){this.updateAriaAttributes()}updateAriaAttributes(){const t=this.shadowRoot?.querySelector(".slider__handle");t&&(t.setAttribute("aria-valuenow",String(this.$data.value??this.$data.min??0)),t.setAttribute("aria-valuemin",String(this.$data.min??0)),t.setAttribute("aria-valuemax",String(this.$data.max??100)),t.setAttribute("aria-disabled",this.$data.disabled?"true":"false"))}getParsedMarks(){if(!this.$data.marks)return[];try{const t=this.$data.marksData||{};return Object.entries(t).map(([t,e])=>({value:parseFloat(t),label:String(e)}))}catch{return[]}}getTrackStyle(){const t=this.getPercent();return this.$data.vertical?`height: ${t}%;`:`width: ${t}%;`}getHandleStyle(){const t=this.getPercent();return this.$data.vertical?`bottom: ${t}%;`:`left: ${t}%;`}getMarkStyle(t){const e=this.$data.min??0,a=(t-e)/((this.$data.max??100)-e)*100;return this.$data.vertical?`bottom: ${a}%;`:`left: ${a}%;`}getPercent(){const t=this.$data.min??0,e=this.$data.max??100;return(Math.max(t,Math.min(e,this.$data.value??t))-t)/(e-t)*100}railRect;handleMouseDown(t){this.$data.disabled||(t.preventDefault(),this.$data.isDragging=!0,this.railElement&&(this.railRect=this.railElement.getBoundingClientRect()),this.updateValueFromRect(t),this.cleanupDragListeners(),this.dragMoveHandler=t=>{this.$data.isDragging&&this.updateValueFromRect(t)},this.dragUpHandler=()=>{this.$data.isDragging=!1,this.railRect=void 0,this.cleanupDragListeners(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},document.addEventListener("mousemove",this.dragMoveHandler),document.addEventListener("mouseup",this.dragUpHandler))}handleTouchStart(t){this.$data.disabled||0!==t.touches.length&&(t.preventDefault(),this.$data.isDragging=!0,this.railElement&&(this.railRect=this.railElement.getBoundingClientRect()),this.updateValueFromRect(t.touches[0]),this.cleanupDragListeners(),this.touchMoveHandler=t=>{this.$data.isDragging&&t.touches.length>0&&this.updateValueFromRect(t.touches[0])},this.touchEndHandler=()=>{this.$data.isDragging=!1,this.railRect=void 0,this.cleanupDragListeners(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},document.addEventListener("touchmove",this.touchMoveHandler),document.addEventListener("touchend",this.touchEndHandler))}updateValueFromRect(t){if(!this.railRect)return void this.updateValue(t);const e=this.railRect;let a;a=this.$data.vertical?1-(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,a=Math.max(0,Math.min(1,a));const i=this.$data.min??0,s=this.$data.max??100,n=i+a*(s-i),r=this.$data.step||1,d=Math.round(n/r)*r,h=Math.max(i,Math.min(s,d));this.$data.value!==h&&(this.$data.value=h,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}updateValue(t){if(this.railElement||(this.railElement=this.shadowRoot?.querySelector(".slider__rail")),!this.railElement)return;const e=this.railElement.getBoundingClientRect();let a;a=this.$data.vertical?1-(t.clientY-e.top)/e.height:(t.clientX-e.left)/e.width,a=Math.max(0,Math.min(1,a));const i=this.$data.min??0,s=this.$data.max??100,n=i+a*(s-i),r=this.$data.step||1,d=Math.round(n/r)*r,h=Math.max(i,Math.min(s,d));this.$data.value!==h&&(this.$data.value=h,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}setValue(t){const e=this.$data.min??0,a=this.$data.max??100;this.$data.value=Math.max(e,Math.min(a,t))}getValue(){return this.$data.value??this.$data.min??0}};s=((t,e)=>{for(var a,i=e,s=t.length-1;s>=0;s--)(a=t[s])&&(i=a(i)||i);return i})([i({tagName:"solely-slider",template:e,styles:t,shadowDOM:{use:!0,mode:"open"},props:[{name:"value",type:"number"},{name:"min",type:"number"},{name:"max",type:"number"},{name:"step",type:"number"},{name:"disabled",type:"boolean",default:!1},{name:"tooltipVisible",type:"boolean",default:!0},{name:"marks",type:"boolean",default:!1},{name:"marksData",type:"object",default:{}},{name:"vertical",type:"boolean",default:!1},{name:"block",type:"boolean",default:!1}]})],s);export{s as SolelySlider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./style.css.cjs"),e=require("./index.html.cjs"),s=require("../utils/helpers.cjs"),r=require("../../../runtime/component/base-element.cjs"),i=require("../../../runtime/component/decorators.cjs");var a,o,n,l=Object.defineProperty;Object.getOwnPropertyDescriptor;exports.SolelySteps=class extends r.default{slotObserver;slotInitTimer;get current(){return this.$data.current}set current(t){this.$data.current=t,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{current:t}}))}getStepsClasses(){const t={};return this.$data.direction&&(t[`steps--${this.$data.direction}`]=!0),t["steps--dot"]=!!this.$data.progressDot,"small"===this.$data.size?t["steps--sm"]=!0:"large"===this.$data.size?t["steps--lg"]=!0:t["steps--md"]=!0,t["use-slot"]=this.$data.useSlot,t}getStepClasses(t,e){const s=this.getStepStatus(e);return{"step--wait":"wait"===s,"step--process":"process"===s,"step--finish":"finish"===s,"step--error":"error"===s,"step--disabled":!!t.disabled}}getSlotStepClasses(t,e){const s=this.getSlotStepStatus(e);return{"step--wait":"wait"===s,"step--process":"process"===s,"step--finish":"finish"===s,"step--error":"error"===s,"step--disabled":!!t.disabled}}getIconClasses(t){const e={};return t.icon&&t.color&&exports.SolelySteps.PRESET_COLORS.includes(t.color)&&(e[`step__icon-wrapper--${t.color}`]=!0),e}getIconStyle(t){return t.icon&&t.color?exports.SolelySteps.PRESET_COLORS.includes(t.color)?"":`color: ${t.color}; background-color: ${t.color}15;`:""}collectSlotItems(){const t=Array.from(this.children).filter(t=>t.hasAttribute("data-step"));0!==t.length?(this.$data.useSlot=!0,this.$data.slotItems=t.map((t,e)=>{const s=t;return{step:s.getAttribute("data-step")||String(e+1),title:s.getAttribute("data-title")||s.textContent?.trim()||"",description:s.getAttribute("data-description")||void 0,disabled:s.hasAttribute("disabled"),iconHtml:s.innerHTML}})):this.$data.useSlot=!1}mounted(){this.refresh(),this.setupSlotObserver()}getParsedItems(){const t=this.$data.items;return Array.isArray(t)?t:"string"==typeof t&&t?s.safeJsonParse(t,[]):[]}setupSlotObserver(){this.slotInitTimer=setTimeout(()=>{this.collectSlotItems(),this.slotInitTimer=void 0},0),this.slotObserver=new MutationObserver(()=>{this.collectSlotItems()}),this.slotObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["data-step","data-title","data-description","disabled"]})}unmounted(){this.slotObserver&&this.slotObserver.disconnect(),this.slotInitTimer&&(clearTimeout(this.slotInitTimer),this.slotInitTimer=void 0)}getStepStatus(t){const e=this.$data.current||0,s=this.getParsedItems();if(!Array.isArray(s)||t<0||t>=s.length)return"wait";const r=s[t];return r?.status?r.status:t<e?"finish":t===e?"process":"wait"}getSlotStepStatus(t){const e=this.$data.current||0;return t<e?"finish":t===e?"process":"wait"}getStepIcon(t,e){if(t.icon)return t.icon;const s=this.getStepStatus(e);return"finish"===s?"✓":"error"===s?"✕":String(e+1)}handleStepClick(t,e){t.disabled||(this.$data.current=e,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{index:e,item:t}})))}handleSlotStepClick(t,e){t.disabled||(this.$data.current=e,this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{index:e,item:t}})))}setCurrent(t){this.$data.current=t}getCurrent(){return this.$data.current}next(){const t=this.$data.useSlot?this.$data.slotItems.length-1:this.getParsedItems().length-1;this.$data.current<t&&this.$data.current++}prev(){this.$data.current>0&&this.$data.current--}setItems(t){this.$data.items=JSON.stringify(t),this.$data.useSlot=!1,this.refresh()}},a=exports.SolelySteps,n=["blue","green","red","orange","gray"],(o="PRESET_COLORS")in a?l(a,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[o]=n,exports.SolelySteps=((t,e)=>{for(var s,r=e,i=t.length-1;i>=0;i--)(s=t[i])&&(r=s(r)||r);return r})([i.CustomElement({tagName:"solely-steps",template:e.__SOLELY_IR__,styles:t.default,shadowDOM:{use:!0,mode:"open"},props:[{name:"current",type:"number",default:0},{name:"direction",type:"string",default:"horizontal"},{name:"size",type:"string",default:"medium"},{name:"items",type:"string",default:"[]"},{name:"progressDot",type:"boolean",default:!1}]})],exports.SolelySteps);
|
|
@@ -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.getStepsClasses()},function(t){const{$data:a}=this;return!a.useSlot},function(t){const{$data:a}=this;return this.getParsedItems()},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return this.getStepClasses(s,i)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return"process"===this.getStepStatus(i)?"step":void 0},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:i,checked:d}=
|
|
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.getStepsClasses()},function(t){const{$data:a}=this;return!a.useSlot},function(t){const{$data:a}=this;return this.getParsedItems()},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return this.getStepClasses(s,i)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return"process"===this.getStepStatus(i)?"step":void 0},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:i,checked:d}=t?.target||{};var[n]=a.map(t=>t.itmVal),[e]=a.map(t=>t.idxVal);this.handleStepClick(n,e)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return this.getIconClasses(s)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.icon?this.getIconStyle(s):""},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return!a.progressDot},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.icon||"finish"===this.getStepStatus(i)||"error"===this.getStepStatus(i)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${this.getStepIcon(s,i)}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${i+1}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.title}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.description},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.description}`},function(t){const{$data:a}=this;return a.useSlot},function(t){const{$data:a}=this;return a.slotItems},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return this.getSlotStepClasses(s,i)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return"process"===this.getSlotStepStatus(i)?"step":void 0},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:i,checked:d}=t?.target||{};var[n]=a.map(t=>t.itmVal),[e]=a.map(t=>t.idxVal);this.handleSlotStepClick(n,e)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return!a.progressDot},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.iconHtml},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.title}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.description},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.description}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"steps",d:0},{k:":class",f:1,d:1},{k:"role",v:"list",d:0},{k:"aria-label",v:"步骤条",d:0}],c:[{t:2,d:0,x:" 使用 items 属性时的渲染 "},{t:7,d:1,b:[{f:2,c:[{t:6,d:1,f:3,i:"item",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"step",d:0},{k:"class",v:"step",d:0},{k:":class",f:4,d:1},{k:"role",v:"listitem",d:0},{k:":aria-current",f:5,d:1},{k:":aria-disabled",f:6,d:1},{k:"@click",f:7,d:1}],c:[{t:0,d:0,s:1,g:"div",a:[{k:"part",v:"tail",d:0},{k:"class",v:"step__tail",d:0}],c:[]},{t:0,d:0,g:"div",a:[{k:"part",v:"wrapper",d:0},{k:"class",v:"step__wrapper",d:0}],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"icon-wrapper",d:0},{k:"class",v:"step__icon-wrapper",d:0},{k:":class",f:8,d:1},{k:":style",f:9,d:1}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"icon",d:0},{k:"class",v:"step__icon",d:0}],c:[{t:7,d:1,b:[{f:10,c:[{t:7,d:1,b:[{f:11,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"icon-substitution",d:0},{k:"class",v:"step__icon-substitution",d:0}],c:[{t:1,d:1,f:12}]}]},{f:null,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"icon-text",d:0},{k:"class",v:"step__icon-text",d:0}],c:[{t:1,d:1,f:13}]}]}]}]}]}]}]},{t:0,d:0,g:"div",a:[{k:"part",v:"content",d:0},{k:"class",v:"step__content",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"title",d:0},{k:"class",v:"step__title",d:0}],c:[{t:1,d:1,f:14}]},{t:7,d:1,b:[{f:15,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"description",d:0},{k:"class",v:"step__description",d:0}],c:[{t:1,d:1,f:16}]}]}]}]}]}]}]}]}]},{t:2,d:0,x:" 使用插槽时的渲染 "},{t:7,d:1,b:[{f:17,c:[{t:6,d:1,f:18,i:"slotItem",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"step",d:0},{k:"class",v:"step",d:0},{k:":class",f:19,d:1},{k:"role",v:"listitem",d:0},{k:":aria-current",f:20,d:1},{k:":aria-disabled",f:21,d:1},{k:"@click",f:22,d:1}],c:[{t:0,d:0,s:1,g:"div",a:[{k:"part",v:"tail",d:0},{k:"class",v:"step__tail",d:0}],c:[]},{t:0,d:0,g:"div",a:[{k:"part",v:"wrapper",d:0},{k:"class",v:"step__wrapper",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"icon-wrapper",d:0},{k:"class",v:"step__icon-wrapper",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"icon",d:0},{k:"class",v:"step__icon",d:0}],c:[{t:7,d:1,b:[{f:23,c:[{t:2,d:0,x:" 使用插槽元素的 innerHTML 作为图标内容 "},{t:0,d:1,g:"span",a:[{k:"part",v:"icon-substitution",d:0},{k:"class",v:"step__icon-substitution",d:0},{k:":innerHTML",f:24,d:1}],c:[]}]}]}]}]},{t:0,d:0,g:"div",a:[{k:"part",v:"content",d:0},{k:"class",v:"step__content",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"title",d:0},{k:"class",v:"step__title",d:0}],c:[{t:1,d:1,f:25}]},{t:7,d:1,b:[{f:26,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"description",d:0},{k:"class",v:"step__description",d:0}],c:[{t:1,d:1,f:27}]}]}]}]}]}]}]}]}]}]}],s:{tf:27,cf:27,dn:1,tn:1,sn:0}};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.getStepsClasses()},function(t){const{$data:a}=this;return!a.useSlot},function(t){const{$data:a}=this;return this.getParsedItems()},function(t){const{$data:a}=this;var[
|
|
1
|
+
const t={t:"root",v:"1.2.0",fns:[function(t){const{$data:a}=this;return this.getStepsClasses()},function(t){const{$data:a}=this;return!a.useSlot},function(t){const{$data:a}=this;return this.getParsedItems()},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return this.getStepClasses(s,i)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return"process"===this.getStepStatus(i)?"step":void 0},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:i,checked:d}=t?.target||{};var[n]=a.map(t=>t.itmVal),[c]=a.map(t=>t.idxVal);this.handleStepClick(n,c)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return this.getIconClasses(s)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.icon?this.getIconStyle(s):""},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return!a.progressDot},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.icon||"finish"===this.getStepStatus(i)||"error"===this.getStepStatus(i)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${this.getStepIcon(s,i)}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${i+1}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.title}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.description},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.description}`},function(t){const{$data:a}=this;return a.useSlot},function(t){const{$data:a}=this;return a.slotItems},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return this.getSlotStepClasses(s,i)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return"process"===this.getSlotStepStatus(i)?"step":void 0},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.disabled?"true":"false"},function(t,a){const{$data:s}=this,{value:i,checked:d}=t?.target||{};var[n]=a.map(t=>t.itmVal),[c]=a.map(t=>t.idxVal);this.handleSlotStepClick(n,c)},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return!a.progressDot},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.iconHtml},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.title}`},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return s.description},function(t){const{$data:a}=this;var[s]=t.map(t=>t.itmVal),[i]=t.map(t=>t.idxVal);return`${s.description}`}],n:[{t:0,d:1,g:"div",a:[{k:"part",v:"base",d:0},{k:"class",v:"steps",d:0},{k:":class",f:1,d:1},{k:"role",v:"list",d:0},{k:"aria-label",v:"步骤条",d:0}],c:[{t:2,d:0,x:" 使用 items 属性时的渲染 "},{t:7,d:1,b:[{f:2,c:[{t:6,d:1,f:3,i:"item",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"step",d:0},{k:"class",v:"step",d:0},{k:":class",f:4,d:1},{k:"role",v:"listitem",d:0},{k:":aria-current",f:5,d:1},{k:":aria-disabled",f:6,d:1},{k:"@click",f:7,d:1}],c:[{t:0,d:0,s:1,g:"div",a:[{k:"part",v:"tail",d:0},{k:"class",v:"step__tail",d:0}],c:[]},{t:0,d:0,g:"div",a:[{k:"part",v:"wrapper",d:0},{k:"class",v:"step__wrapper",d:0}],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"icon-wrapper",d:0},{k:"class",v:"step__icon-wrapper",d:0},{k:":class",f:8,d:1},{k:":style",f:9,d:1}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"icon",d:0},{k:"class",v:"step__icon",d:0}],c:[{t:7,d:1,b:[{f:10,c:[{t:7,d:1,b:[{f:11,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"icon-substitution",d:0},{k:"class",v:"step__icon-substitution",d:0}],c:[{t:1,d:1,f:12}]}]},{f:null,c:[{t:0,d:0,g:"span",a:[{k:"part",v:"icon-text",d:0},{k:"class",v:"step__icon-text",d:0}],c:[{t:1,d:1,f:13}]}]}]}]}]}]}]},{t:0,d:0,g:"div",a:[{k:"part",v:"content",d:0},{k:"class",v:"step__content",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"title",d:0},{k:"class",v:"step__title",d:0}],c:[{t:1,d:1,f:14}]},{t:7,d:1,b:[{f:15,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"description",d:0},{k:"class",v:"step__description",d:0}],c:[{t:1,d:1,f:16}]}]}]}]}]}]}]}]}]},{t:2,d:0,x:" 使用插槽时的渲染 "},{t:7,d:1,b:[{f:17,c:[{t:6,d:1,f:18,i:"slotItem",n:"index",a:[],c:[{t:0,d:1,g:"div",a:[{k:"part",v:"step",d:0},{k:"class",v:"step",d:0},{k:":class",f:19,d:1},{k:"role",v:"listitem",d:0},{k:":aria-current",f:20,d:1},{k:":aria-disabled",f:21,d:1},{k:"@click",f:22,d:1}],c:[{t:0,d:0,s:1,g:"div",a:[{k:"part",v:"tail",d:0},{k:"class",v:"step__tail",d:0}],c:[]},{t:0,d:0,g:"div",a:[{k:"part",v:"wrapper",d:0},{k:"class",v:"step__wrapper",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"icon-wrapper",d:0},{k:"class",v:"step__icon-wrapper",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"icon",d:0},{k:"class",v:"step__icon",d:0}],c:[{t:7,d:1,b:[{f:23,c:[{t:2,d:0,x:" 使用插槽元素的 innerHTML 作为图标内容 "},{t:0,d:1,g:"span",a:[{k:"part",v:"icon-substitution",d:0},{k:"class",v:"step__icon-substitution",d:0},{k:":innerHTML",f:24,d:1}],c:[]}]}]}]}]},{t:0,d:0,g:"div",a:[{k:"part",v:"content",d:0},{k:"class",v:"step__content",d:0}],c:[{t:0,d:0,g:"div",a:[{k:"part",v:"title",d:0},{k:"class",v:"step__title",d:0}],c:[{t:1,d:1,f:25}]},{t:7,d:1,b:[{f:26,c:[{t:0,d:0,g:"div",a:[{k:"part",v:"description",d:0},{k:"class",v:"step__description",d:0}],c:[{t:1,d:1,f:27}]}]}]}]}]}]}]}]}]}]}],s:{tf:27,cf:27,dn:1,tn:1,sn:0}};export{t as __SOLELY_IR__,t as default};
|