huibo-ui 0.5.0 → 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/dist/cjs/hb-form-item.cjs.entry.js +59 -9
- package/dist/cjs/hb-form-item.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-form.cjs.entry.js +105 -2
- package/dist/cjs/hb-form.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-select.cjs.entry.js +82 -10
- package/dist/cjs/hb-select.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-steps.cjs.entry.js +1 -1
- package/dist/cjs/hb-steps.cjs.entry.js.map +1 -1
- package/dist/cjs/hb-table.cjs.entry.js +195 -27
- package/dist/cjs/hb-table.cjs.entry.js.map +1 -1
- package/dist/cjs/huibo-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/Form/Form.js +205 -2
- package/dist/collection/components/Form/Form.js.map +1 -1
- package/dist/collection/components/Form/FormItem.js +117 -10
- package/dist/collection/components/Form/FormItem.js.map +1 -1
- package/dist/collection/components/Select/Select.js +105 -10
- package/dist/collection/components/Select/Select.js.map +1 -1
- package/dist/collection/components/Table/Table.js +273 -27
- package/dist/collection/components/Table/Table.js.map +1 -1
- package/dist/collection/utils/virtual-scroll.js +39 -0
- package/dist/collection/utils/virtual-scroll.js.map +1 -0
- package/dist/components/hb-form-item.js +62 -9
- package/dist/components/hb-form-item.js.map +1 -1
- package/dist/components/hb-form.js +110 -2
- package/dist/components/hb-form.js.map +1 -1
- package/dist/components/hb-select.js +87 -11
- package/dist/components/hb-select.js.map +1 -1
- package/dist/components/hb-steps.js +1 -1
- package/dist/components/hb-steps.js.map +1 -1
- package/dist/components/hb-table.js +203 -29
- package/dist/components/hb-table.js.map +1 -1
- package/dist/esm/hb-form-item.entry.js +59 -9
- package/dist/esm/hb-form-item.entry.js.map +1 -1
- package/dist/esm/hb-form.entry.js +105 -2
- package/dist/esm/hb-form.entry.js.map +1 -1
- package/dist/esm/hb-select.entry.js +82 -10
- package/dist/esm/hb-select.entry.js.map +1 -1
- package/dist/esm/hb-steps.entry.js +1 -1
- package/dist/esm/hb-steps.entry.js.map +1 -1
- package/dist/esm/hb-table.entry.js +195 -27
- package/dist/esm/hb-table.entry.js.map +1 -1
- package/dist/esm/huibo-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/huibo-ui/huibo-ui.esm.js +1 -1
- package/dist/huibo-ui/huibo-ui.esm.js.map +1 -1
- package/dist/huibo-ui/{p-79b24b83.entry.js → p-2cf5bf20.entry.js} +2 -2
- package/dist/huibo-ui/{p-79b24b83.entry.js.map → p-2cf5bf20.entry.js.map} +1 -1
- package/dist/huibo-ui/p-4148d875.entry.js +2 -0
- package/dist/huibo-ui/p-4148d875.entry.js.map +1 -0
- package/dist/huibo-ui/{p-54a28052.entry.js → p-6bfe1954.entry.js} +2 -2
- package/dist/huibo-ui/p-6bfe1954.entry.js.map +1 -0
- package/dist/huibo-ui/{p-ac18c68b.entry.js → p-e8824b2c.entry.js} +2 -2
- package/dist/huibo-ui/p-e8824b2c.entry.js.map +1 -0
- package/dist/huibo-ui/p-f69599fa.entry.js +2 -0
- package/dist/huibo-ui/p-f69599fa.entry.js.map +1 -0
- package/dist/types/components/Form/Form.d.ts +57 -0
- package/dist/types/components/Form/FormItem.d.ts +23 -0
- package/dist/types/components/Select/Select.d.ts +19 -0
- package/dist/types/components/Table/Table.d.ts +103 -8
- package/dist/types/components.d.ts +148 -2
- package/dist/types/utils/virtual-scroll.d.ts +38 -0
- package/package.json +1 -1
- package/dist/huibo-ui/p-29092b85.entry.js +0 -2
- package/dist/huibo-ui/p-29092b85.entry.js.map +0 -1
- package/dist/huibo-ui/p-2bc30b1b.entry.js +0 -2
- package/dist/huibo-ui/p-2bc30b1b.entry.js.map +0 -1
- package/dist/huibo-ui/p-54a28052.entry.js.map +0 -1
- package/dist/huibo-ui/p-ac18c68b.entry.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-e42dfa95.js";export{s as setNonce}from"./p-e42dfa95.js";import{g as a}from"./p-e1255160.js";var t=()=>{const l=import.meta.url;const a={};if(l!==""){a.resourcesUrl=new URL(".",l).href}return e(a)};t().then((async e=>{await a();return l(JSON.parse('[["p-79b24b83",[[1,"hb-steps",{"active":[2],"processStatus":[1,"process-status"],"alignCenter":[4,"align-center"],"direction":[1],"steps":[32]}]]],["p-7f65dc36",[[1,"hb-affix",{"top":[2],"bottom":[2],"target":[1],"affixed":[32]},[[0,"hbTestScroll","onTestScroll"]]]]],["p-cde83f76",[[1,"hb-alert",{"title":[1],"description":[1],"type":[1],"closable":[4],"showIcon":[4,"show-icon"],"center":[4],"closed":[32]}]]],["p-1f0b1662",[[1,"hb-anchor",{"items":[16],"top":[2],"affix":[4],"activeKey":[32]}]]],["p-dfd144d8",[[1,"hb-aside",{"width":[1]}]]],["p-e3155cd7",[[1,"hb-avatar",{"size":[8],"shape":[1],"src":[1],"icon":[1],"alt":[1]}]]],["p-a190ca89",[[1,"hb-backtop",{"visibilityHeight":[2,"visibility-height"],"target":[1],"right":[2],"bottom":[2],"visible":[32],"backToTop":[64]},[[9,"scroll","onWindowScroll"]]]]],["p-b06c8020",[[1,"hb-badge",{"value":[8],"max":[2],"isDot":[4,"is-dot"],"hidden":[4],"type":[1]}]]],["p-aeae83af",[[1,"hb-breadcrumb",{"separator":[1]}]]],["p-02f15843",[[1,"hb-breadcrumb-item",{"href":[1]}]]],["p-f2c78699",[[1,"hb-button",{"type":[1],"size":[1],"classNames":[1,"class-names"],"disabled":[4],"loading":[4]}]]],["p-687d8dff",[[1,"hb-calendar",{"modelValue":[1025,"model-value"],"firstDayOfWeek":[2,"first-day-of-week"],"disabledDate":[16],"viewDate":[32],"selectedDate":[32],"focusDate":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-1b0fbe69",[[1,"hb-card",{"header":[1],"shadow":[1]}]]],["p-06ec8d02",[[1,"hb-carousel",{"current":[1026],"autoplay":[4],"interval":[2],"arrow":[1],"dots":[4],"loop":[4],"slideCount":[32],"isHover":[32]},null,{"autoplay":["handleAutoplayOptionsChange"],"interval":["handleAutoplayOptionsChange"],"current":["handleCurrentChange"]}]]],["p-b7900dee",[[1,"hb-cascader",{"modelValue":[1040],"options":[16],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"showAllLevels":[4,"show-all-levels"],"name":[1],"inputId":[1,"input-id"],"separator":[1],"emitPath":[4,"emit-path"],"filterable":[4],"lazy":[4],"load":[16],"multiple":[4],"checkStrictly":[4,"check-strictly"],"maxTagCount":[2,"max-tag-count"],"isOpen":[32],"inputValue":[32],"searchValue":[32],"loadingKeys":[32],"filteredPaths":[32],"activePath":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-b105cf76",[[1,"hb-checkbox",{"modelValue":[1028,"model-value"],"value":[8],"disabled":[4],"checked":[4],"indeterminate":[4],"name":[1],"checkboxId":[1,"checkbox-id"],"label":[1],"border":[4],"size":[1],"isChecked":[32]},null,{"modelValue":["handleValueChange"],"checked":["handleValueChange"],"value":["handleValueChange"]}]]],["p-c869842c",[[1,"hb-checkbox-group",{"modelValue":[1040],"disabled":[4],"size":[1],"border":[4],"min":[2],"max":[2],"checkboxes":[32]},null,{"modelValue":["handleValueChange"],"disabled":["handlePropsChange"],"size":["handlePropsChange"],"border":["handlePropsChange"]}]]],["p-2ca9796a",[[1,"hb-collapse",{"accordion":[1028]}]]],["p-494e6c25",[[1,"hb-collapse-item",{"itemKey":[1,"item-key"],"key":[1],"title":[1],"disabled":[4],"active":[1028],"isOpen":[32]},null,{"active":["handleActiveChange"]}]]],["p-e1773c93",[[1,"hb-color-picker",{"modelValue":[1025,"model-value"],"disabled":[4],"colorFormat":[1,"color-format"],"showAlpha":[4,"show-alpha"],"predefine":[16],"isOpen":[32],"currentColor":[32],"hue":[32],"saturation":[32],"value":[32],"alpha":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-15db24e9",[[1,"hb-color-picker-panel",{"modelValue":[1025,"model-value"],"colorFormat":[1,"color-format"],"showAlpha":[4,"show-alpha"],"predefine":[16],"currentColor":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-88a6c905",[[4,"hb-config-provider",{"theme":[1],"size":[1],"locale":[1]}]]],["p-5c839288",[[1,"hb-container",{"direction":[1]}]]],["p-6efed295",[[1,"hb-date-picker",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"format":[1],"valueFormat":[1,"value-format"],"type":[1],"disabledDate":[16],"name":[1],"inputId":[1,"input-id"],"isOpen":[32],"inputValue":[32],"selectedDate":[32],"panelViewDate":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-14c3b47b",[[1,"hb-date-picker-pane",{"modelValue":[1025,"model-value"],"format":[1],"view":[1025],"selectedDate":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-815fc943",[[1,"hb-date-range-picker",{"modelValue":[1040],"placeholder":[16],"disabled":[4],"clearable":[4],"size":[1],"format":[1],"disabledDate":[16],"name":[1],"isOpen":[32],"leftViewDate":[32],"startDate":[32],"endDate":[32],"pickingEnd":[32],"hoverDate":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-3dacb26b",[[1,"hb-date-time-picker",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"format":[1],"name":[1],"inputId":[1,"input-id"],"isOpen":[32],"inputValue":[32],"selectedDate":[32],"currentView":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-c8e917db",[[1,"hb-descriptions",{"title":[1],"border":[4],"column":[2],"colon":[4],"items":[16]}]]],["p-c7713947",[[1,"hb-dialog",{"modelValue":[1028,"model-value"],"title":[1],"width":[1],"fullscreen":[4],"modal":[4],"closeOnClickModal":[4,"close-on-click-modal"],"closeOnPressEscape":[4,"close-on-press-escape"],"showClose":[4,"show-close"],"destroyOnClose":[4,"destroy-on-close"],"leaving":[32]},null,{"modelValue":["handleVisibleChange"]}]]],["p-b7885d4a",[[1,"hb-divider",{"direction":[1],"contentPosition":[1,"content-position"],"dashed":[4]}]]],["p-1f6d0adb",[[1,"hb-drawer",{"modelValue":[1028,"model-value"],"title":[1],"size":[1],"direction":[1],"closeOnClickModal":[4,"close-on-click-modal"],"showClose":[4,"show-close"],"modal":[4],"closeOnPressEscape":[4,"close-on-press-escape"],"zIndexState":[32],"leaving":[32]},null,{"modelValue":["handleVisible"]}]]],["p-ff6bc5cc",[[1,"hb-dropdown",{"items":[16],"trigger":[1],"disabled":[4],"isOpen":[32],"leaving":[32],"activeIndex":[32]}]]],["p-193efdc0",[[1,"hb-empty",{"description":[1],"image":[1]}]]],["p-3042f986",[[1,"hb-float-button",{"type":[1],"shape":[1],"icon":[1],"description":[1],"right":[2],"bottom":[2],"badge":[8]}]]],["p-20632186",[[1,"hb-footer",{"height":[1]}]]],["p-ac18c68b",[[1,"hb-form",{"model":[16],"rules":[16],"labelPosition":[1,"label-position"],"labelWidth":[1,"label-width"],"inline":[4],"size":[1],"disabled":[4],"validate":[16],"resetFields":[16],"fields":[32]}]]],["p-54a28052",[[1,"hb-form-item",{"prop":[1],"label":[1],"labelWidth":[1,"label-width"],"required":[4],"rules":[16],"size":[1],"validate":[16],"resetValue":[16],"getValue":[16],"errors":[32],"isvalidating":[32]}]]],["p-746a11a3",[[1,"hb-header",{"height":[1]}]]],["p-ea0823f3",[[1,"hb-image",{"src":[1],"alt":[1],"width":[1],"height":[1],"fit":[1],"lazy":[4],"preview":[4],"radius":[1],"loaded":[32],"error":[32],"previewVisible":[32]},null,{"src":["handleSrcChange"]}]]],["p-10f6c184",[[1,"hb-image-preview",{"modelValue":[1028,"model-value"],"src":[1],"srcList":[16],"current":[1026],"zoomStep":[2,"zoom-step"],"minZoom":[2,"min-zoom"],"maxZoom":[2,"max-zoom"],"zoom":[32],"rotate":[32]},null,{"modelValue":["handleVisibleChange"],"current":["handleCurrentChange"]}]]],["p-4d87d7f4",[[1,"hb-input",{"modelValue":[1025,"model-value"],"type":[1],"size":[1],"disabled":[4],"readonly":[4],"placeholder":[1],"clearable":[4],"showPassword":[4,"show-password"],"showWordLimit":[4,"show-word-limit"],"maxlength":[2],"minlength":[2],"name":[1],"inputId":[1,"input-id"],"autocomplete":[1],"autofocus":[4],"prefixIcon":[1,"prefix-icon"],"suffixIcon":[1,"suffix-icon"],"rows":[2],"autosize":[4],"resize":[1],"isFocused":[32],"showClear":[32],"passwordVisible":[32],"inputValue":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-7a38b3e2",[[1,"hb-input-number",{"modelValue":[1026,"model-value"],"size":[1],"disabled":[4],"readonly":[4],"min":[2],"max":[2],"step":[2],"precision":[2],"stepStrictly":[4,"step-strictly"],"controls":[4],"controlsPosition":[1,"controls-position"],"name":[1],"inputId":[1,"input-id"],"placeholder":[1],"currentValue":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-6518c435",[[1,"hb-input-tag",{"modelValue":[1040],"size":[1],"disabled":[4],"placeholder":[1],"maxlength":[2],"max":[2],"clearable":[4],"width":[1],"type":[1],"closable":[4],"inputVisible":[4,"input-visible"],"inputValue":[32],"isFocused":[32]}]]],["p-6c8cf248",[[1,"hb-layout",{"span":[2],"offset":[2],"push":[2],"pull":[2],"xs":[2],"sm":[2],"md":[2],"lg":[2],"xl":[2]}]]],["p-f1f2483f",[[1,"hb-link",{"type":[1],"underline":[4],"disabled":[4],"href":[1],"target":[1],"icon":[1]}]]],["p-950e7465",[[1,"hb-loading",{"size":[1],"text":[1],"fullscreen":[4]}]]],["p-55cd13eb",[[1,"hb-main"]]],["p-ac45291c",[[1,"hb-menu",{"mode":[1],"defaultActive":[1025,"default-active"],"collapsed":[4],"backgroundColor":[1,"background-color"],"textColor":[1,"text-color"],"activeTextColor":[1,"active-text-color"],"activeItem":[32]},[[0,"hbMenuItemSelect","handleSelect"]],{"defaultActive":["handleDefaultActiveChange"],"collapsed":["handleCollapsedChange"]}]]],["p-0cc1e3f3",[[1,"hb-menu-item",{"itemKey":[1,"item-key"],"key":[1],"disabled":[4],"icon":[1],"active":[4]}]]],["p-cb66dbef",[[1,"hb-message",{"message":[1],"type":[1],"closable":[4],"duration":[2],"visible":[32]}]]],["p-d9c7c378",[[1,"hb-notification",{"id":[1],"type":[1],"title":[1],"message":[1],"duration":[2],"position":[1],"showClose":[4,"show-close"],"visible":[1028]}]]],["p-dd9c6459",[[1,"hb-page-header",{"title":[1],"subtitle":[1],"back":[4],"ghost":[4]}]]],["p-6c23fbd1",[[1,"hb-pagination",{"total":[2],"pageSize":[2,"page-size"],"currentPage":[1026,"current-page"],"pageSizes":[16],"pagerCount":[2,"pager-count"],"disabled":[4],"showTotal":[4,"show-total"],"showPageSize":[4,"show-page-size"],"internalCurrent":[32],"internalPageSize":[32]},null,{"currentPage":["handleCurrentPageChange"],"pageSize":["handlePageSizeChange"]}]]],["p-63d68c61",[[1,"hb-popconfirm",{"title":[1],"confirmButtonText":[1,"confirm-button-text"],"cancelButtonText":[1,"cancel-button-text"],"placement":[1],"disabled":[4],"icon":[1],"visible":[32],"leaving":[32],"popupStyle":[32]}]]],["p-69bb1dd9",[[1,"hb-popover",{"title":[1],"width":[1],"placement":[1],"trigger":[1],"disabled":[4],"visible":[32],"leaving":[32],"popupStyle":[32]}]]],["p-412ff618",[[1,"hb-progress",{"percentage":[2],"status":[1],"strokeWidth":[2,"stroke-width"],"showText":[4,"show-text"],"color":[1]}]]],["p-96cecd21",[[1,"hb-radio",{"modelValue":[1032,"model-value"],"value":[8],"disabled":[4],"checked":[4],"name":[1],"radioId":[1,"radio-id"],"label":[1],"border":[4],"size":[1],"isChecked":[32]},null,{"modelValue":["handleValueChange"],"checked":["handleValueChange"],"value":["handleValueChange"]}]]],["p-b38802b0",[[1,"hb-rate",{"modelValue":[1026,"model-value"],"max":[2],"disabled":[4],"allowHalf":[4,"allow-half"],"readonly":[4],"showScore":[4,"show-score"],"showText":[4,"show-text"],"texts":[16],"scoreTemplate":[1,"score-template"],"hoverValue":[32],"currentValue":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-3deff48c",[[1,"hb-result",{"status":[1],"title":[1],"subTitle":[1,"sub-title"],"icon":[1]}]]],["p-0ddae4e9",[[1,"hb-row",{"gutter":[2],"justify":[1],"align":[1],"tag":[1]}]]],["p-b3fd12c7",[[1,"hb-scrollbar",{"height":[1],"maxHeight":[1,"max-height"],"always":[4],"native":[4],"minSize":[2,"min-size"],"scrollbarVisible":[32],"thumbHeight":[32],"thumbTop":[32],"setScrollTop":[64],"setScrollLeft":[64],"getScrollTop":[64],"getScrollLeft":[64]},null,{"height":["handleSizeChange"],"maxHeight":["handleSizeChange"]}]]],["p-415295f3",[[1,"hb-segmented",{"modelValue":[1025,"model-value"],"block":[4],"size":[1],"options":[16],"activeIndex":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-2bc30b1b",[[1,"hb-select",{"modelValue":[1032,"model-value"],"options":[16],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"multiple":[4],"filterable":[4],"filterMethod":[16],"defaultFirstOption":[4,"default-first-option"],"allowCreate":[4,"allow-create"],"collapseTags":[4,"collapse-tags"],"maxCollapseTags":[2,"max-collapse-tags"],"isOpen":[32],"inputValue":[32],"searchValue":[32],"filteredOptions":[32],"activeOptionIndex":[32]},null,{"modelValue":["handleValueChange"],"options":["handleOptionsChange"]}]]],["p-e36bbe6f",[[1,"hb-skeleton",{"active":[4],"rows":[2],"loading":[4],"avatar":[4],"showTitle":[4,"show-title"],"paragraph":[4]}]]],["p-8a202bc5",[[1,"hb-slider",{"modelValue":[1026,"model-value"],"min":[2],"max":[2],"step":[2],"showTooltip":[4,"show-tooltip"],"formatTooltip":[16],"disabled":[4],"range":[4],"vertical":[4],"height":[1],"marks":[16],"dragging":[32],"currentValue":[32],"tooltipVisible":[32],"tooltipValue":[32],"activeHandle":[32]},null,{"modelValue":["handleModelChange"]}]]],["p-89be7973",[[1,"hb-space",{"size":[8],"direction":[1],"wrap":[4],"alignment":[1],"fill":[4],"fillRatio":[2,"fill-ratio"]}]]],["p-e9e7abca",[[1,"hb-statistic",{"title":[1],"value":[8],"precision":[2],"valuePrefix":[1,"value-prefix"],"suffix":[1],"valueStyle":[1,"value-style"]}]]],["p-b6afe81e",[[1,"hb-step",{"title":[1],"description":[1],"icon":[1],"status":[1]}]]],["p-7a682c56",[[1,"hb-sub-menu",{"label":[1],"icon":[1],"collapsed":[4],"isOpen":[32],"isHover":[32]}]]],["p-e73c357f",[[1,"hb-switch",{"modelValue":[1028,"model-value"],"disabled":[4],"activeText":[1,"active-text"],"inactiveText":[1,"inactive-text"],"activeColor":[1,"active-color"],"inactiveColor":[1,"inactive-color"],"activeValue":[8,"active-value"],"inactiveValue":[8,"inactive-value"],"width":[2],"inlinePrompt":[4,"inline-prompt"]}]]],["p-fd6831f9",[[1,"hb-tab-pane",{"key":[1],"label":[1],"active":[4]}]]],["p-29092b85",[[1,"hb-table",{"data":[16],"columns":[16],"stripe":[4],"border":[4],"size":[1],"loading":[4],"rowKey":[1,"row-key"],"emptyText":[1,"empty-text"],"maxHeight":[1,"max-height"],"highlightCurrentRow":[4,"highlight-current-row"],"selectable":[4],"actions":[16],"virtualScroll":[4,"virtual-scroll"],"itemHeight":[2,"item-height"],"virtualScrollHeight":[2,"virtual-scroll-height"],"treeProps":[16],"editable":[4],"sortProp":[32],"sortDirection":[32],"currentRow":[32],"selectedRows":[32],"scrollTop":[32],"expandedRowKeys":[32],"editingCell":[32]},null,{"data":["handleDataChange"]}]]],["p-b5ea18ba",[[1,"hb-tabs",{"modelValue":[1025,"model-value"],"type":[1],"closable":[4],"activeTab":[32],"tabs":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-688460ce",[[1,"hb-tag",{"type":[1],"closable":[4],"effect":[1],"round":[4],"size":[1]}]]],["p-2bcda1bb",[[1,"hb-text",{"type":[1],"size":[1],"truncated":[4],"bold":[4],"italic":[4],"deleted":[4]}]]],["p-1b98152b",[[1,"hb-time-picker",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"format":[1],"name":[1],"inputId":[1,"input-id"],"isOpen":[32],"inputValue":[32],"selectedHour":[32],"selectedMinute":[32],"selectedSecond":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-e7c73624",[[1,"hb-time-select",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"start":[1],"end":[1],"step":[2],"minTime":[1,"min-time"],"maxTime":[1,"max-time"],"isOpen":[32],"inputValue":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-6bfeab80",[[1,"hb-timeline",{"mode":[1],"items":[16]}]]],["p-5e253c15",[[1,"hb-tooltip",{"content":[1],"placement":[1],"trigger":[1],"disabled":[4],"showArrow":[4,"show-arrow"],"visible":[32],"leaving":[32],"popupStyle":[32]}]]],["p-1e5abc8a",[[1,"hb-tour",{"visible":[1028],"steps":[16],"current":[1026],"targetRect":[32]}]]],["p-20fc554b",[[1,"hb-transfer",{"data":[16],"targetKeys":[1040],"selectedKeys":[1040],"titles":[16],"disabled":[4],"filterable":[4],"leftFilter":[32],"rightFilter":[32]},null,{"selectedKeys":["handleSelectedKeysChange"]}]]],["p-98b513cd",[[1,"hb-tree",{"data":[16],"expandedKeys":[1040],"selectedKeys":[1040],"checkable":[4],"checkedKeys":[1040],"defaultExpandAll":[4,"default-expand-all"],"showLine":[4,"show-line"],"internalExpanded":[32],"internalSelected":[32],"internalChecked":[32],"focusKey":[32]},null,{"data":["handleDataChange"],"expandedKeys":["handleExpandedKeysChange"],"selectedKeys":["handleSelectedKeysChange"],"checkedKeys":["handleCheckedKeysChange"]}]]],["p-b8c83751",[[1,"hb-tree-select",{"data":[16],"modelValue":[1025,"model-value"],"multiple":[4],"placeholder":[1],"disabled":[4],"checkable":[4],"defaultExpandAll":[4,"default-expand-all"],"isOpen":[32],"internalExpanded":[32],"internalSelected":[32],"internalChecked":[32],"focusKey":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-dfccc7aa",[[1,"hb-upload",{"action":[1],"multiple":[4],"accept":[1],"disabled":[4],"limit":[2],"drag":[4],"name":[1],"headers":[16],"data":[16],"withCredentials":[4,"with-credentials"],"beforeUpload":[16],"fileList":[1040],"isDragover":[32]}]]],["p-8c4415ed",[[1,"hb-watermark",{"content":[1],"width":[2],"height":[2],"gap":[2],"rotate":[2],"fontColor":[1,"font-color"],"fontSize":[2,"font-size"]}]]],["p-e004fc81",[[1,"hb-icon",{"name":[1],"size":[8],"color":[1],"spin":[4]}]]]]'),e)}));
|
|
1
|
+
import{p as e,b as l}from"./p-e42dfa95.js";export{s as setNonce}from"./p-e42dfa95.js";import{g as a}from"./p-e1255160.js";var t=()=>{const l=import.meta.url;const a={};if(l!==""){a.resourcesUrl=new URL(".",l).href}return e(a)};t().then((async e=>{await a();return l(JSON.parse('[["p-2cf5bf20",[[1,"hb-steps",{"active":[2],"processStatus":[1,"process-status"],"alignCenter":[4,"align-center"],"direction":[1],"steps":[32]}]]],["p-7f65dc36",[[1,"hb-affix",{"top":[2],"bottom":[2],"target":[1],"affixed":[32]},[[0,"hbTestScroll","onTestScroll"]]]]],["p-cde83f76",[[1,"hb-alert",{"title":[1],"description":[1],"type":[1],"closable":[4],"showIcon":[4,"show-icon"],"center":[4],"closed":[32]}]]],["p-1f0b1662",[[1,"hb-anchor",{"items":[16],"top":[2],"affix":[4],"activeKey":[32]}]]],["p-dfd144d8",[[1,"hb-aside",{"width":[1]}]]],["p-e3155cd7",[[1,"hb-avatar",{"size":[8],"shape":[1],"src":[1],"icon":[1],"alt":[1]}]]],["p-a190ca89",[[1,"hb-backtop",{"visibilityHeight":[2,"visibility-height"],"target":[1],"right":[2],"bottom":[2],"visible":[32],"backToTop":[64]},[[9,"scroll","onWindowScroll"]]]]],["p-b06c8020",[[1,"hb-badge",{"value":[8],"max":[2],"isDot":[4,"is-dot"],"hidden":[4],"type":[1]}]]],["p-aeae83af",[[1,"hb-breadcrumb",{"separator":[1]}]]],["p-02f15843",[[1,"hb-breadcrumb-item",{"href":[1]}]]],["p-f2c78699",[[1,"hb-button",{"type":[1],"size":[1],"classNames":[1,"class-names"],"disabled":[4],"loading":[4]}]]],["p-687d8dff",[[1,"hb-calendar",{"modelValue":[1025,"model-value"],"firstDayOfWeek":[2,"first-day-of-week"],"disabledDate":[16],"viewDate":[32],"selectedDate":[32],"focusDate":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-1b0fbe69",[[1,"hb-card",{"header":[1],"shadow":[1]}]]],["p-06ec8d02",[[1,"hb-carousel",{"current":[1026],"autoplay":[4],"interval":[2],"arrow":[1],"dots":[4],"loop":[4],"slideCount":[32],"isHover":[32]},null,{"autoplay":["handleAutoplayOptionsChange"],"interval":["handleAutoplayOptionsChange"],"current":["handleCurrentChange"]}]]],["p-b7900dee",[[1,"hb-cascader",{"modelValue":[1040],"options":[16],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"showAllLevels":[4,"show-all-levels"],"name":[1],"inputId":[1,"input-id"],"separator":[1],"emitPath":[4,"emit-path"],"filterable":[4],"lazy":[4],"load":[16],"multiple":[4],"checkStrictly":[4,"check-strictly"],"maxTagCount":[2,"max-tag-count"],"isOpen":[32],"inputValue":[32],"searchValue":[32],"loadingKeys":[32],"filteredPaths":[32],"activePath":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-b105cf76",[[1,"hb-checkbox",{"modelValue":[1028,"model-value"],"value":[8],"disabled":[4],"checked":[4],"indeterminate":[4],"name":[1],"checkboxId":[1,"checkbox-id"],"label":[1],"border":[4],"size":[1],"isChecked":[32]},null,{"modelValue":["handleValueChange"],"checked":["handleValueChange"],"value":["handleValueChange"]}]]],["p-c869842c",[[1,"hb-checkbox-group",{"modelValue":[1040],"disabled":[4],"size":[1],"border":[4],"min":[2],"max":[2],"checkboxes":[32]},null,{"modelValue":["handleValueChange"],"disabled":["handlePropsChange"],"size":["handlePropsChange"],"border":["handlePropsChange"]}]]],["p-2ca9796a",[[1,"hb-collapse",{"accordion":[1028]}]]],["p-494e6c25",[[1,"hb-collapse-item",{"itemKey":[1,"item-key"],"key":[1],"title":[1],"disabled":[4],"active":[1028],"isOpen":[32]},null,{"active":["handleActiveChange"]}]]],["p-e1773c93",[[1,"hb-color-picker",{"modelValue":[1025,"model-value"],"disabled":[4],"colorFormat":[1,"color-format"],"showAlpha":[4,"show-alpha"],"predefine":[16],"isOpen":[32],"currentColor":[32],"hue":[32],"saturation":[32],"value":[32],"alpha":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-15db24e9",[[1,"hb-color-picker-panel",{"modelValue":[1025,"model-value"],"colorFormat":[1,"color-format"],"showAlpha":[4,"show-alpha"],"predefine":[16],"currentColor":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-88a6c905",[[4,"hb-config-provider",{"theme":[1],"size":[1],"locale":[1]}]]],["p-5c839288",[[1,"hb-container",{"direction":[1]}]]],["p-6efed295",[[1,"hb-date-picker",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"format":[1],"valueFormat":[1,"value-format"],"type":[1],"disabledDate":[16],"name":[1],"inputId":[1,"input-id"],"isOpen":[32],"inputValue":[32],"selectedDate":[32],"panelViewDate":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-14c3b47b",[[1,"hb-date-picker-pane",{"modelValue":[1025,"model-value"],"format":[1],"view":[1025],"selectedDate":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-815fc943",[[1,"hb-date-range-picker",{"modelValue":[1040],"placeholder":[16],"disabled":[4],"clearable":[4],"size":[1],"format":[1],"disabledDate":[16],"name":[1],"isOpen":[32],"leftViewDate":[32],"startDate":[32],"endDate":[32],"pickingEnd":[32],"hoverDate":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-3dacb26b",[[1,"hb-date-time-picker",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"format":[1],"name":[1],"inputId":[1,"input-id"],"isOpen":[32],"inputValue":[32],"selectedDate":[32],"currentView":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-c8e917db",[[1,"hb-descriptions",{"title":[1],"border":[4],"column":[2],"colon":[4],"items":[16]}]]],["p-c7713947",[[1,"hb-dialog",{"modelValue":[1028,"model-value"],"title":[1],"width":[1],"fullscreen":[4],"modal":[4],"closeOnClickModal":[4,"close-on-click-modal"],"closeOnPressEscape":[4,"close-on-press-escape"],"showClose":[4,"show-close"],"destroyOnClose":[4,"destroy-on-close"],"leaving":[32]},null,{"modelValue":["handleVisibleChange"]}]]],["p-b7885d4a",[[1,"hb-divider",{"direction":[1],"contentPosition":[1,"content-position"],"dashed":[4]}]]],["p-1f6d0adb",[[1,"hb-drawer",{"modelValue":[1028,"model-value"],"title":[1],"size":[1],"direction":[1],"closeOnClickModal":[4,"close-on-click-modal"],"showClose":[4,"show-close"],"modal":[4],"closeOnPressEscape":[4,"close-on-press-escape"],"zIndexState":[32],"leaving":[32]},null,{"modelValue":["handleVisible"]}]]],["p-ff6bc5cc",[[1,"hb-dropdown",{"items":[16],"trigger":[1],"disabled":[4],"isOpen":[32],"leaving":[32],"activeIndex":[32]}]]],["p-193efdc0",[[1,"hb-empty",{"description":[1],"image":[1]}]]],["p-3042f986",[[1,"hb-float-button",{"type":[1],"shape":[1],"icon":[1],"description":[1],"right":[2],"bottom":[2],"badge":[8]}]]],["p-20632186",[[1,"hb-footer",{"height":[1]}]]],["p-e8824b2c",[[1,"hb-form",{"model":[16],"rules":[16],"labelPosition":[1,"label-position"],"labelWidth":[1,"label-width"],"inline":[4],"size":[1],"disabled":[4],"initialValues":[16],"validateMessages":[16],"onFinish":[16],"onFinishFailed":[16],"onValuesChange":[16],"validate":[16],"resetFields":[16],"fields":[32]}]]],["p-6bfe1954",[[1,"hb-form-item",{"prop":[1],"label":[1],"labelWidth":[1,"label-width"],"required":[4],"rules":[16],"size":[1],"validateStatus":[1,"validate-status"],"help":[1],"labelCol":[2,"label-col"],"validate":[16],"resetValue":[16],"getValue":[16],"errors":[32],"isvalidating":[32]}]]],["p-746a11a3",[[1,"hb-header",{"height":[1]}]]],["p-ea0823f3",[[1,"hb-image",{"src":[1],"alt":[1],"width":[1],"height":[1],"fit":[1],"lazy":[4],"preview":[4],"radius":[1],"loaded":[32],"error":[32],"previewVisible":[32]},null,{"src":["handleSrcChange"]}]]],["p-10f6c184",[[1,"hb-image-preview",{"modelValue":[1028,"model-value"],"src":[1],"srcList":[16],"current":[1026],"zoomStep":[2,"zoom-step"],"minZoom":[2,"min-zoom"],"maxZoom":[2,"max-zoom"],"zoom":[32],"rotate":[32]},null,{"modelValue":["handleVisibleChange"],"current":["handleCurrentChange"]}]]],["p-4d87d7f4",[[1,"hb-input",{"modelValue":[1025,"model-value"],"type":[1],"size":[1],"disabled":[4],"readonly":[4],"placeholder":[1],"clearable":[4],"showPassword":[4,"show-password"],"showWordLimit":[4,"show-word-limit"],"maxlength":[2],"minlength":[2],"name":[1],"inputId":[1,"input-id"],"autocomplete":[1],"autofocus":[4],"prefixIcon":[1,"prefix-icon"],"suffixIcon":[1,"suffix-icon"],"rows":[2],"autosize":[4],"resize":[1],"isFocused":[32],"showClear":[32],"passwordVisible":[32],"inputValue":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-7a38b3e2",[[1,"hb-input-number",{"modelValue":[1026,"model-value"],"size":[1],"disabled":[4],"readonly":[4],"min":[2],"max":[2],"step":[2],"precision":[2],"stepStrictly":[4,"step-strictly"],"controls":[4],"controlsPosition":[1,"controls-position"],"name":[1],"inputId":[1,"input-id"],"placeholder":[1],"currentValue":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-6518c435",[[1,"hb-input-tag",{"modelValue":[1040],"size":[1],"disabled":[4],"placeholder":[1],"maxlength":[2],"max":[2],"clearable":[4],"width":[1],"type":[1],"closable":[4],"inputVisible":[4,"input-visible"],"inputValue":[32],"isFocused":[32]}]]],["p-6c8cf248",[[1,"hb-layout",{"span":[2],"offset":[2],"push":[2],"pull":[2],"xs":[2],"sm":[2],"md":[2],"lg":[2],"xl":[2]}]]],["p-f1f2483f",[[1,"hb-link",{"type":[1],"underline":[4],"disabled":[4],"href":[1],"target":[1],"icon":[1]}]]],["p-950e7465",[[1,"hb-loading",{"size":[1],"text":[1],"fullscreen":[4]}]]],["p-55cd13eb",[[1,"hb-main"]]],["p-ac45291c",[[1,"hb-menu",{"mode":[1],"defaultActive":[1025,"default-active"],"collapsed":[4],"backgroundColor":[1,"background-color"],"textColor":[1,"text-color"],"activeTextColor":[1,"active-text-color"],"activeItem":[32]},[[0,"hbMenuItemSelect","handleSelect"]],{"defaultActive":["handleDefaultActiveChange"],"collapsed":["handleCollapsedChange"]}]]],["p-0cc1e3f3",[[1,"hb-menu-item",{"itemKey":[1,"item-key"],"key":[1],"disabled":[4],"icon":[1],"active":[4]}]]],["p-cb66dbef",[[1,"hb-message",{"message":[1],"type":[1],"closable":[4],"duration":[2],"visible":[32]}]]],["p-d9c7c378",[[1,"hb-notification",{"id":[1],"type":[1],"title":[1],"message":[1],"duration":[2],"position":[1],"showClose":[4,"show-close"],"visible":[1028]}]]],["p-dd9c6459",[[1,"hb-page-header",{"title":[1],"subtitle":[1],"back":[4],"ghost":[4]}]]],["p-6c23fbd1",[[1,"hb-pagination",{"total":[2],"pageSize":[2,"page-size"],"currentPage":[1026,"current-page"],"pageSizes":[16],"pagerCount":[2,"pager-count"],"disabled":[4],"showTotal":[4,"show-total"],"showPageSize":[4,"show-page-size"],"internalCurrent":[32],"internalPageSize":[32]},null,{"currentPage":["handleCurrentPageChange"],"pageSize":["handlePageSizeChange"]}]]],["p-63d68c61",[[1,"hb-popconfirm",{"title":[1],"confirmButtonText":[1,"confirm-button-text"],"cancelButtonText":[1,"cancel-button-text"],"placement":[1],"disabled":[4],"icon":[1],"visible":[32],"leaving":[32],"popupStyle":[32]}]]],["p-69bb1dd9",[[1,"hb-popover",{"title":[1],"width":[1],"placement":[1],"trigger":[1],"disabled":[4],"visible":[32],"leaving":[32],"popupStyle":[32]}]]],["p-412ff618",[[1,"hb-progress",{"percentage":[2],"status":[1],"strokeWidth":[2,"stroke-width"],"showText":[4,"show-text"],"color":[1]}]]],["p-96cecd21",[[1,"hb-radio",{"modelValue":[1032,"model-value"],"value":[8],"disabled":[4],"checked":[4],"name":[1],"radioId":[1,"radio-id"],"label":[1],"border":[4],"size":[1],"isChecked":[32]},null,{"modelValue":["handleValueChange"],"checked":["handleValueChange"],"value":["handleValueChange"]}]]],["p-b38802b0",[[1,"hb-rate",{"modelValue":[1026,"model-value"],"max":[2],"disabled":[4],"allowHalf":[4,"allow-half"],"readonly":[4],"showScore":[4,"show-score"],"showText":[4,"show-text"],"texts":[16],"scoreTemplate":[1,"score-template"],"hoverValue":[32],"currentValue":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-3deff48c",[[1,"hb-result",{"status":[1],"title":[1],"subTitle":[1,"sub-title"],"icon":[1]}]]],["p-0ddae4e9",[[1,"hb-row",{"gutter":[2],"justify":[1],"align":[1],"tag":[1]}]]],["p-b3fd12c7",[[1,"hb-scrollbar",{"height":[1],"maxHeight":[1,"max-height"],"always":[4],"native":[4],"minSize":[2,"min-size"],"scrollbarVisible":[32],"thumbHeight":[32],"thumbTop":[32],"setScrollTop":[64],"setScrollLeft":[64],"getScrollTop":[64],"getScrollLeft":[64]},null,{"height":["handleSizeChange"],"maxHeight":["handleSizeChange"]}]]],["p-415295f3",[[1,"hb-segmented",{"modelValue":[1025,"model-value"],"block":[4],"size":[1],"options":[16],"activeIndex":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-f69599fa",[[1,"hb-select",{"modelValue":[1032,"model-value"],"options":[16],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"multiple":[4],"filterable":[4],"filterMethod":[16],"defaultFirstOption":[4,"default-first-option"],"allowCreate":[4,"allow-create"],"collapseTags":[4,"collapse-tags"],"maxCollapseTags":[2,"max-collapse-tags"],"virtual":[4],"dropdownMaxHeight":[2,"dropdown-max-height"],"virtualItemHeight":[2,"virtual-item-height"],"isOpen":[32],"inputValue":[32],"searchValue":[32],"filteredOptions":[32],"activeOptionIndex":[32],"dropdownScrollTop":[32]},null,{"modelValue":["handleValueChange"],"options":["handleOptionsChange"]}]]],["p-e36bbe6f",[[1,"hb-skeleton",{"active":[4],"rows":[2],"loading":[4],"avatar":[4],"showTitle":[4,"show-title"],"paragraph":[4]}]]],["p-8a202bc5",[[1,"hb-slider",{"modelValue":[1026,"model-value"],"min":[2],"max":[2],"step":[2],"showTooltip":[4,"show-tooltip"],"formatTooltip":[16],"disabled":[4],"range":[4],"vertical":[4],"height":[1],"marks":[16],"dragging":[32],"currentValue":[32],"tooltipVisible":[32],"tooltipValue":[32],"activeHandle":[32]},null,{"modelValue":["handleModelChange"]}]]],["p-89be7973",[[1,"hb-space",{"size":[8],"direction":[1],"wrap":[4],"alignment":[1],"fill":[4],"fillRatio":[2,"fill-ratio"]}]]],["p-e9e7abca",[[1,"hb-statistic",{"title":[1],"value":[8],"precision":[2],"valuePrefix":[1,"value-prefix"],"suffix":[1],"valueStyle":[1,"value-style"]}]]],["p-b6afe81e",[[1,"hb-step",{"title":[1],"description":[1],"icon":[1],"status":[1]}]]],["p-7a682c56",[[1,"hb-sub-menu",{"label":[1],"icon":[1],"collapsed":[4],"isOpen":[32],"isHover":[32]}]]],["p-e73c357f",[[1,"hb-switch",{"modelValue":[1028,"model-value"],"disabled":[4],"activeText":[1,"active-text"],"inactiveText":[1,"inactive-text"],"activeColor":[1,"active-color"],"inactiveColor":[1,"inactive-color"],"activeValue":[8,"active-value"],"inactiveValue":[8,"inactive-value"],"width":[2],"inlinePrompt":[4,"inline-prompt"]}]]],["p-fd6831f9",[[1,"hb-tab-pane",{"key":[1],"label":[1],"active":[4]}]]],["p-4148d875",[[1,"hb-table",{"data":[16],"columns":[16],"stripe":[4],"border":[4],"size":[1],"loading":[4],"rowKey":[1,"row-key"],"emptyText":[1,"empty-text"],"maxHeight":[1,"max-height"],"highlightCurrentRow":[4,"highlight-current-row"],"selectable":[4],"actions":[16],"virtualScroll":[4,"virtual-scroll"],"itemHeight":[2,"item-height"],"virtualScrollHeight":[2,"virtual-scroll-height"],"treeProps":[16],"editable":[4],"pagination":[16],"rowClassName":[16],"sortProp":[32],"sortDirection":[32],"currentRow":[32],"selectedRows":[32],"scrollTop":[32],"expandedRowKeys":[32],"editingCell":[32],"internalPage":[32],"internalPageSize":[32],"internalFilters":[32]},null,{"data":["handleDataChange"],"pagination":["handlePaginationChange"]}]]],["p-b5ea18ba",[[1,"hb-tabs",{"modelValue":[1025,"model-value"],"type":[1],"closable":[4],"activeTab":[32],"tabs":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-688460ce",[[1,"hb-tag",{"type":[1],"closable":[4],"effect":[1],"round":[4],"size":[1]}]]],["p-2bcda1bb",[[1,"hb-text",{"type":[1],"size":[1],"truncated":[4],"bold":[4],"italic":[4],"deleted":[4]}]]],["p-1b98152b",[[1,"hb-time-picker",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"format":[1],"name":[1],"inputId":[1,"input-id"],"isOpen":[32],"inputValue":[32],"selectedHour":[32],"selectedMinute":[32],"selectedSecond":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-e7c73624",[[1,"hb-time-select",{"modelValue":[1025,"model-value"],"placeholder":[1],"disabled":[4],"size":[1],"clearable":[4],"start":[1],"end":[1],"step":[2],"minTime":[1,"min-time"],"maxTime":[1,"max-time"],"isOpen":[32],"inputValue":[32]},null,{"modelValue":["handleValueChange"]}]]],["p-6bfeab80",[[1,"hb-timeline",{"mode":[1],"items":[16]}]]],["p-5e253c15",[[1,"hb-tooltip",{"content":[1],"placement":[1],"trigger":[1],"disabled":[4],"showArrow":[4,"show-arrow"],"visible":[32],"leaving":[32],"popupStyle":[32]}]]],["p-1e5abc8a",[[1,"hb-tour",{"visible":[1028],"steps":[16],"current":[1026],"targetRect":[32]}]]],["p-20fc554b",[[1,"hb-transfer",{"data":[16],"targetKeys":[1040],"selectedKeys":[1040],"titles":[16],"disabled":[4],"filterable":[4],"leftFilter":[32],"rightFilter":[32]},null,{"selectedKeys":["handleSelectedKeysChange"]}]]],["p-98b513cd",[[1,"hb-tree",{"data":[16],"expandedKeys":[1040],"selectedKeys":[1040],"checkable":[4],"checkedKeys":[1040],"defaultExpandAll":[4,"default-expand-all"],"showLine":[4,"show-line"],"internalExpanded":[32],"internalSelected":[32],"internalChecked":[32],"focusKey":[32]},null,{"data":["handleDataChange"],"expandedKeys":["handleExpandedKeysChange"],"selectedKeys":["handleSelectedKeysChange"],"checkedKeys":["handleCheckedKeysChange"]}]]],["p-b8c83751",[[1,"hb-tree-select",{"data":[16],"modelValue":[1025,"model-value"],"multiple":[4],"placeholder":[1],"disabled":[4],"checkable":[4],"defaultExpandAll":[4,"default-expand-all"],"isOpen":[32],"internalExpanded":[32],"internalSelected":[32],"internalChecked":[32],"focusKey":[32]},null,{"modelValue":["handleModelValueChange"]}]]],["p-dfccc7aa",[[1,"hb-upload",{"action":[1],"multiple":[4],"accept":[1],"disabled":[4],"limit":[2],"drag":[4],"name":[1],"headers":[16],"data":[16],"withCredentials":[4,"with-credentials"],"beforeUpload":[16],"fileList":[1040],"isDragover":[32]}]]],["p-8c4415ed",[[1,"hb-watermark",{"content":[1],"width":[2],"height":[2],"gap":[2],"rotate":[2],"fontColor":[1,"font-color"],"fontSize":[2,"font-size"]}]]],["p-e004fc81",[[1,"hb-icon",{"name":[1],"size":[8],"color":[1],"spin":[4]}]]]]'),e)}));
|
|
2
2
|
//# sourceMappingURL=huibo-ui.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["node_modules/.pnpm/@stencil+core@4.27.1/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAcC,KAAAC,MAAA
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["node_modules/.pnpm/@stencil+core@4.27.1/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.27.1 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAcC,KAAAC,MAAA,yiiBAAuCJ,EAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,g as e,h as i}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,g as e,h as i}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-steps{display:flex}.hb-steps--vertical,.hb-steps__item{flex-direction:column}.hb-steps__item{align-items:center;display:flex;flex:1;position:relative}.hb-steps--vertical .hb-steps__item{align-items:flex-start;flex-direction:row;gap:var(--hb-spacing-sm);padding-bottom:var(--hb-spacing-md)}.hb-steps__head{align-items:center;display:flex;width:100%}.hb-steps__icon{align-items:center;background:var(--hb-color-fill);border-radius:50%;color:var(--hb-color-text-secondary);display:flex;flex-shrink:0;font-size:var(--hb-font-size-sm);font-weight:600;height:28px;justify-content:center;transition:all .3s;width:28px}.hb-steps__item--finish .hb-steps__icon,.hb-steps__item--process .hb-steps__icon{background:var(--hb-color-primary);color:#fff}.hb-steps__item--error .hb-steps__icon{background:var(--hb-color-danger);color:#fff}.hb-steps__line{background:var(--hb-color-border-secondary);flex:1;height:2px;margin:0 var(--hb-spacing-xs)}.hb-steps__item--finish .hb-steps__line{background:var(--hb-color-primary)}.hb-steps__main{margin-top:var(--hb-spacing-xs);text-align:center}.hb-steps--vertical .hb-steps__main{text-align:left}.hb-steps:not(.hb-steps--align-center) .hb-steps__item{align-items:flex-start}.hb-steps:not(.hb-steps--align-center) .hb-steps__main{text-align:left}.hb-steps__title{font-size:var(--hb-font-size-sm);font-weight:600}.hb-steps__item--process .hb-steps__title{color:var(--hb-color-primary)}.hb-steps__description{color:var(--hb-color-text-secondary);font-size:var(--hb-font-size-xs);margin-top:2px}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const s=o;const n=class{constructor(e){t(this,e)}get el(){return e(this)}active=0;processStatus="process";alignCenter=false;direction="horizontal";steps=[];componentDidLoad(){const t=this.el.querySelectorAll("hb-step");this.steps=Array.from(t).map((t=>{const e=t;return{title:e.getAttribute("title")||"",description:e.getAttribute("description")||undefined,icon:e.getAttribute("icon")||undefined,status:e.getAttribute("status")||undefined}}))}getStatus(t){const e=this.steps[t];if(e&&e.status)return e.status;if(t<this.active)return"finish";if(t===this.active)return this.processStatus;return"wait"}renderIcon(t){const e=this.steps[t];if(e&&e.icon){return i("hb-icon",{name:e.icon,size:16,"aria-hidden":"true"})}const o=this.getStatus(t);if(o==="finish")return"✓";if(o==="error")return"✕";return String(t+1)}render(){return i("ol",{key:"0d8629001821503f45dfd45399f9e2fad40beae8",class:{"hb-steps":true,[`hb-steps--${this.direction}`]:true,"hb-steps--align-center":this.alignCenter},role:"list"},this.steps.map(((t,e)=>{const o=this.getStatus(e);return i("li",{class:{"hb-steps__item":true,[`hb-steps__item--${o}`]:true},role:"listitem","aria-current":o==="process"?"step":undefined,"aria-disabled":t.status==="wait"&&e>this.active?"true":undefined},i("div",{class:"hb-steps__head"},i("span",{class:"hb-steps__icon","aria-hidden":"true"},this.renderIcon(e)),e<this.steps.length-1&&i("div",{class:"hb-steps__line"})),i("div",{class:"hb-steps__main"},i("div",{class:"hb-steps__title"},t.title),t.description&&i("div",{class:"hb-steps__description"},t.description)))})))}};n.style=s;export{n as hb_steps};
|
|
2
|
+
//# sourceMappingURL=p-2cf5bf20.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["stepsCss","HbStepsStyle0","Steps","active","processStatus","alignCenter","direction","steps","componentDidLoad","items","this","el","querySelectorAll","Array","from","map","item","node","title","getAttribute","description","undefined","icon","status","getStatus","index","meta","renderIcon","h","name","size","String","render","key","class","role","step","i","length"],"sources":["src/components/Steps/steps.css?tag=hb-steps&encapsulation=shadow","src/components/Steps/Steps.tsx"],"sourcesContent":[":host { display: block; }\n.hb-steps { display: flex; }\n.hb-steps--vertical { flex-direction: column; }\n.hb-steps__item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }\n.hb-steps--vertical .hb-steps__item { flex-direction: row; align-items: flex-start; gap: var(--hb-spacing-sm); padding-bottom: var(--hb-spacing-md); }\n.hb-steps__head { display: flex; align-items: center; width: 100%; }\n.hb-steps__icon {\n width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;\n font-size: var(--hb-font-size-sm); font-weight: 600; flex-shrink: 0;\n background: var(--hb-color-fill); color: var(--hb-color-text-secondary); transition: all 0.3s;\n}\n.hb-steps__item--process .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--finish .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--error .hb-steps__icon { background: var(--hb-color-danger); color: #fff; }\n.hb-steps__line { flex: 1; height: 2px; background: var(--hb-color-border-secondary); margin: 0 var(--hb-spacing-xs); }\n.hb-steps__item--finish .hb-steps__line { background: var(--hb-color-primary); }\n.hb-steps__main { text-align: center; margin-top: var(--hb-spacing-xs); }\n.hb-steps--vertical .hb-steps__main { text-align: left; }\n\n/* 对齐方式(alignCenter prop):默认 false 时图标与文字左对齐,true 时居中 */\n.hb-steps:not(.hb-steps--align-center) .hb-steps__item { align-items: flex-start; }\n.hb-steps:not(.hb-steps--align-center) .hb-steps__main { text-align: left; }\n.hb-steps__title { font-size: var(--hb-font-size-sm); font-weight: 600; }\n.hb-steps__item--process .hb-steps__title { color: var(--hb-color-primary); }\n.hb-steps__description { font-size: var(--hb-font-size-xs); color: var(--hb-color-text-secondary); margin-top: 2px; }\n","import { Component, h, Prop, State, Element } from '@stencil/core';\n\nexport type StepStatus = 'wait' | 'process' | 'finish' | 'error';\n\ninterface StepMeta {\n title: string;\n description?: string;\n /** 自定义图标名/标记('hb-icon' name 或文本)。undefined 表示用默认序号/状态图标 */\n icon?: string;\n /** 子项显式状态覆盖(不指定则按 active 自动推导) */\n status?: StepStatus;\n}\n\n@Component({ tag: 'hb-steps', styleUrl: 'steps.css', shadow: true })\nexport class Steps {\n @Element() el: HTMLElement;\n @Prop() active: number = 0;\n @Prop() processStatus: StepStatus = 'process';\n @Prop() alignCenter: boolean = false;\n @Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n @State() steps: StepMeta[] = [];\n\n componentDidLoad() {\n const items = this.el.querySelectorAll('hb-step');\n this.steps = Array.from(items).map(item => {\n const node = item as HTMLElement;\n // 仅用 getAttribute:hb-step 的 @Prop() status 默认值为 'wait',\n // 若读 (node as any).status 会拿到默认值,从而错误地覆盖 active 推导。\n // 用户显式在 HTML 上写 status=\"xxx\" 时 getAttribute 才有值。\n return {\n title: node.getAttribute('title') || '',\n description: node.getAttribute('description') || undefined,\n icon: node.getAttribute('icon') || undefined,\n status: (node.getAttribute('status') || undefined) as StepStatus | undefined,\n };\n });\n }\n\n private getStatus(index: number): StepStatus {\n const meta = this.steps[index];\n // 子项显式 status 优先(仅当用户在 HTML 上写了 status 属性)\n if (meta && meta.status) return meta.status;\n if (index < this.active) return 'finish';\n if (index === this.active) return this.processStatus;\n return 'wait';\n }\n\n /** 渲染图标:子项自定义 icon 优先;否则按状态(finish=✓、error=✕、其余=序号) */\n private renderIcon(index: number): any {\n const meta = this.steps[index];\n if (meta && meta.icon) {\n // 自定义图标名:若与 hb-icon 内置图标同名则渲染 hb-icon,否则按文本渲染\n return <hb-icon name={meta.icon} size={16} aria-hidden=\"true\" />;\n }\n const status = this.getStatus(index);\n if (status === 'finish') return '✓';\n if (status === 'error') return '✕';\n return String(index + 1);\n }\n\n render() {\n return (\n <ol class={{ 'hb-steps': true, [`hb-steps--${this.direction}`]: true, 'hb-steps--align-center': this.alignCenter }} role=\"list\">\n {this.steps.map((step, i) => {\n const status = this.getStatus(i);\n return (\n <li\n class={{ 'hb-steps__item': true, [`hb-steps__item--${status}`]: true }}\n role=\"listitem\"\n aria-current={status === 'process' ? 'step' : undefined}\n aria-disabled={step.status === 'wait' && i > this.active ? 'true' : undefined}\n >\n <div class=\"hb-steps__head\">\n <span class=\"hb-steps__icon\" aria-hidden=\"true\">\n {this.renderIcon(i)}\n </span>\n {i < this.steps.length - 1 && <div class=\"hb-steps__line\"></div>}\n </div>\n <div class=\"hb-steps__main\">\n <div class=\"hb-steps__title\">{step.title}</div>\n {step.description && <div class=\"hb-steps__description\">{step.description}</div>}\n </div>\n </li>\n );\n })}\n </ol>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAW,
|
|
1
|
+
{"version":3,"names":["stepsCss","HbStepsStyle0","Steps","active","processStatus","alignCenter","direction","steps","componentDidLoad","items","this","el","querySelectorAll","Array","from","map","item","node","title","getAttribute","description","undefined","icon","status","getStatus","index","meta","renderIcon","h","name","size","String","render","key","class","role","step","i","length"],"sources":["src/components/Steps/steps.css?tag=hb-steps&encapsulation=shadow","src/components/Steps/Steps.tsx"],"sourcesContent":[":host { display: block; }\n.hb-steps { display: flex; }\n.hb-steps--vertical { flex-direction: column; }\n.hb-steps__item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }\n.hb-steps--vertical .hb-steps__item { flex-direction: row; align-items: flex-start; gap: var(--hb-spacing-sm); padding-bottom: var(--hb-spacing-md); }\n.hb-steps__head { display: flex; align-items: center; width: 100%; }\n.hb-steps__icon {\n width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;\n font-size: var(--hb-font-size-sm); font-weight: 600; flex-shrink: 0;\n background: var(--hb-color-fill); color: var(--hb-color-text-secondary); transition: all 0.3s;\n}\n.hb-steps__item--process .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--finish .hb-steps__icon { background: var(--hb-color-primary); color: #fff; }\n.hb-steps__item--error .hb-steps__icon { background: var(--hb-color-danger); color: #fff; }\n.hb-steps__line { flex: 1; height: 2px; background: var(--hb-color-border-secondary); margin: 0 var(--hb-spacing-xs); }\n.hb-steps__item--finish .hb-steps__line { background: var(--hb-color-primary); }\n.hb-steps__main { text-align: center; margin-top: var(--hb-spacing-xs); }\n.hb-steps--vertical .hb-steps__main { text-align: left; }\n\n/* 对齐方式(alignCenter prop):默认 false 时图标与文字左对齐,true 时居中 */\n.hb-steps:not(.hb-steps--align-center) .hb-steps__item { align-items: flex-start; }\n.hb-steps:not(.hb-steps--align-center) .hb-steps__main { text-align: left; }\n.hb-steps__title { font-size: var(--hb-font-size-sm); font-weight: 600; }\n.hb-steps__item--process .hb-steps__title { color: var(--hb-color-primary); }\n.hb-steps__description { font-size: var(--hb-font-size-xs); color: var(--hb-color-text-secondary); margin-top: 2px; }\n","import { Component, h, Prop, State, Element } from '@stencil/core';\n\nexport type StepStatus = 'wait' | 'process' | 'finish' | 'error';\n\ninterface StepMeta {\n title: string;\n description?: string;\n /** 自定义图标名/标记('hb-icon' name 或文本)。undefined 表示用默认序号/状态图标 */\n icon?: string;\n /** 子项显式状态覆盖(不指定则按 active 自动推导) */\n status?: StepStatus;\n}\n\n@Component({ tag: 'hb-steps', styleUrl: 'steps.css', shadow: true })\nexport class Steps {\n @Element() el: HTMLElement;\n @Prop() active: number = 0;\n @Prop() processStatus: StepStatus = 'process';\n @Prop() alignCenter: boolean = false;\n @Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n @State() steps: StepMeta[] = [];\n\n componentDidLoad() {\n const items = this.el.querySelectorAll('hb-step');\n this.steps = Array.from(items).map(item => {\n const node = item as HTMLElement;\n // 仅用 getAttribute:hb-step 的 @Prop() status 默认值为 'wait',\n // 若读 (node as any).status 会拿到默认值,从而错误地覆盖 active 推导。\n // 用户显式在 HTML 上写 status=\"xxx\" 时 getAttribute 才有值。\n return {\n title: node.getAttribute('title') || '',\n description: node.getAttribute('description') || undefined,\n icon: node.getAttribute('icon') || undefined,\n status: (node.getAttribute('status') || undefined) as StepStatus | undefined,\n };\n });\n }\n\n private getStatus(index: number): StepStatus {\n const meta = this.steps[index];\n // 子项显式 status 优先(仅当用户在 HTML 上写了 status 属性)\n if (meta && meta.status) return meta.status;\n if (index < this.active) return 'finish';\n if (index === this.active) return this.processStatus;\n return 'wait';\n }\n\n /** 渲染图标:子项自定义 icon 优先;否则按状态(finish=✓、error=✕、其余=序号) */\n private renderIcon(index: number): any {\n const meta = this.steps[index];\n if (meta && meta.icon) {\n // 自定义图标名:若与 hb-icon 内置图标同名则渲染 hb-icon,否则按文本渲染\n return <hb-icon name={meta.icon} size={16} aria-hidden=\"true\" />;\n }\n const status = this.getStatus(index);\n if (status === 'finish') return '✓';\n if (status === 'error') return '✕';\n return String(index + 1);\n }\n\n render() {\n return (\n <ol class={{ 'hb-steps': true, [`hb-steps--${this.direction}`]: true, 'hb-steps--align-center': this.alignCenter }} role=\"list\">\n {this.steps.map((step, i) => {\n const status = this.getStatus(i);\n return (\n <li\n class={{ 'hb-steps__item': true, [`hb-steps__item--${status}`]: true }}\n role=\"listitem\"\n aria-current={status === 'process' ? 'step' : undefined}\n aria-disabled={step.status === 'wait' && i > this.active ? 'true' : undefined}\n >\n <div class=\"hb-steps__head\">\n <span class=\"hb-steps__icon\" aria-hidden=\"true\">\n {this.renderIcon(i)}\n </span>\n {i < this.steps.length - 1 && <div class=\"hb-steps__line\"></div>}\n </div>\n <div class=\"hb-steps__main\">\n <div class=\"hb-steps__title\">{step.title}</div>\n {step.description && <div class=\"hb-steps__description\">{step.description}</div>}\n </div>\n </li>\n );\n })}\n </ol>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAW,gkOACjB,MAAAC,EAAeD,E,MCaFE,EAAK,M,iDAERC,OAAiB,EACjBC,cAA4B,UAC5BC,YAAuB,MACvBC,UAAuC,aAEtCC,MA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TN,EAAA,QAAMM,MAAM,iBAAgB,cAAa,QACtCxB,KAAKiB,WAAWU,IAElBA,EAAI3B,KAAKH,MAAM+B,OAAS,GAAKV,EAAA,OAAKM,MAAM,oBAE3CN,EAAA,OAAKM,MAAM,kBACTN,EAAA,OAAKM,MAAM,mBAAmBE,EAAKlB,OAClCkB,EAAKhB,aAAeQ,EAAA,OAAKM,MAAM,yBAAyBE,EAAKhB,cAE7D,I","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-e42dfa95.js";const a='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inline-block{display:inline-block}.border{border-style:var(--tw-border-style);border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-table{background-color:var(--hb-color-bg);border-radius:var(--hb-border-radius-base);overflow:hidden;position:relative}.hb-table--border{border:1px solid var(--hb-color-border-secondary)}.hb-table--border .hb-table__table th,.hb-table--border .hb-table__td{border-right:1px solid var(--hb-color-border-secondary)}.hb-table__wrapper{overflow-x:auto}.hb-table__table{border-collapse:collapse;border-spacing:0;table-layout:auto;width:100%}.hb-table__table th{background-color:var(--hb-table-header-bg);border-bottom:1px solid var(--hb-color-border-secondary);color:var(--hb-table-header-color);font-size:var(--hb-font-size-sm);font-weight:600;padding:10px 12px;text-align:left;-webkit-user-select:none;user-select:none;white-space:nowrap}.hb-table__th-content{align-items:center;display:inline-flex;gap:4px}.hb-table__th--sortable{cursor:pointer}.hb-table__th--sortable:hover{background-color:var(--hb-color-fill-tertiary)}.hb-table__sort{display:inline-flex;flex-direction:column;font-size:10px;gap:1px;line-height:1}.hb-table__sort-icon{color:var(--hb-color-text-quaternary);transition:color var(--hb-transition-duration)}.hb-table__sort-icon--active{color:var(--hb-color-primary)}.hb-table__td{border-bottom:1px solid var(--hb-table-border-color);color:var(--hb-color-text);font-size:var(--hb-font-size-sm);padding:10px 12px;transition:background-color var(--hb-transition-duration)}.hb-table__row:hover .hb-table__td{background-color:var(--hb-table-row-hover-bg)}.hb-table__row--striped .hb-table__td{background-color:var(--hb-table-stripe-bg)}.hb-table__row--current .hb-table__td{background-color:var(--hb-color-primary-bg)}.hb-table__empty{color:var(--hb-color-text-secondary);padding:var(--hb-spacing-xl)0;text-align:center}.hb-table__loading{align-items:center;background-color:#ffffffb3;display:flex;inset:0;justify-content:center;position:absolute;z-index:1}.hb-table__loading-spinner{animation:hb-spin .8s linear infinite;border:3px solid var(--hb-color-border-secondary);border-radius:50%;border-top-color:var(--hb-color-primary);height:32px;width:32px}.hb-table--small .hb-table__table th,.hb-table--small .hb-table__td{font-size:var(--hb-font-size-xs);padding:6px 8px}.hb-table--large .hb-table__table th,.hb-table--large .hb-table__td{font-size:var(--hb-font-size-base);padding:14px 16px}.hb-table__selection{min-width:48px;text-align:center;white-space:nowrap;width:48px}.hb-table__checkbox{accent-color:var(--hb-color-primary);cursor:pointer;height:16px;vertical-align:middle;width:16px}.hb-table__selection .hb-table__checkbox{margin:0}.hb-table__row--selected .hb-table__td{background-color:var(--hb-color-primary-bg)}.hb-table__cell--fixed-left,.hb-table__cell--fixed-right{background-color:var(--hb-color-bg);position:sticky;z-index:2}.hb-table__table th.hb-table__cell--fixed-left,.hb-table__table th.hb-table__cell--fixed-right{background-color:var(--hb-table-header-bg)}.hb-table__cell--fixed-right{box-shadow:-4px 0 8px #0000000f}.hb-table__cell--fixed-left:not(.hb-table__cell--fixed-right){box-shadow:4px 0 8px #0000000f}.hb-table__row--selected .hb-table__cell--fixed-left,.hb-table__row--selected .hb-table__cell--fixed-right{background-color:var(--hb-color-primary-bg)}.hb-table__row:hover .hb-table__cell--fixed-left,.hb-table__row:hover .hb-table__cell--fixed-right{background-color:var(--hb-table-row-hover-bg)}@keyframes hb-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.hb-table__action{background:0 0;border:none;color:var(--hb-color-primary,#1677ff);cursor:pointer;font-size:var(--hb-font-size-sm,14px);line-height:1.5;padding:0;transition:opacity var(--hb-transition-duration,.2s)}.hb-table__action:hover{opacity:.8}.hb-table__action:disabled{color:var(--hb-color-text-disabled,#c0c4cc);cursor:not-allowed}.hb-table__action--danger{color:var(--hb-color-danger,#f5222d)}.hb-table__action--danger:disabled{color:var(--hb-color-text-disabled,#c0c4cc)}.hb-table__action+.hb-table__action{margin-left:var(--hb-spacing-sm,12px)}.hb-table--virtual{overflow:hidden}.hb-table__virtual-wrapper{display:flex;flex-direction:column}.hb-table__virtual-viewport{overflow:auto;position:relative}.hb-table__virtual-spacer{position:relative;width:100%}.hb-table__table--virtual{table-layout:fixed;width:100%}.hb-table__table--virtual tbody{position:relative}.hb-table__expand{align-items:center;background:0 0;border:none;color:var(--hb-color-text-secondary,#595959);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:10px;height:16px;justify-content:center;line-height:1;margin-right:4px;padding:0;transition:color var(--hb-transition-duration,.2s);vertical-align:middle;width:16px}.hb-table__expand:hover{color:var(--hb-color-primary,#1677ff)}.hb-table__row--tree .hb-table__td{white-space:nowrap}.hb-table__cell--editable{cursor:text}.hb-table__cell--editable:hover{background-color:var(--hb-color-fill-tertiary,#f5f5f5)}.hb-table__edit-input{background-color:var(--hb-color-bg,#fff);border:1px solid var(--hb-color-primary,#1677ff);border-radius:var(--hb-border-radius-base,4px);box-sizing:border-box;color:var(--hb-color-text,#262626);font-size:var(--hb-font-size-sm,14px);min-width:60px;outline:none;padding:2px 6px;width:100%}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@media (max-width:575.98px){.hb-table__table{min-width:480px}.hb-table__table thead th{background-color:var(--hb-color-bg-container,#fafafa);position:sticky;top:0;z-index:2}}';const r=a;const o=class{constructor(i){t(this,i);this.hbSortChange=e(this,"hbSortChange",7);this.hbRowClick=e(this,"hbRowClick",7);this.hbSelectionChange=e(this,"hbSelectionChange",7);this.hbAction=e(this,"hbAction",7);this.hbExpandChange=e(this,"hbExpandChange",7);this.hbCellChange=e(this,"hbCellChange",7);this.hbPageChange=e(this,"hbPageChange",7);this.hbFilterChange=e(this,"hbFilterChange",7)}data=[];columns=[];stripe=false;border=false;size="default";loading=false;rowKey="";emptyText="暂无数据";maxHeight;highlightCurrentRow=false;selectable=false;actions=[];virtualScroll=false;itemHeight=48;virtualScrollHeight=400;treeProps;editable=false;pagination;rowClassName;sortProp="";sortDirection=null;currentRow=-1;selectedRows=new Set;scrollTop=0;expandedRowKeys=[];editingCell=null;internalPage=1;internalPageSize=10;internalFilters={};hbSortChange;hbRowClick;hbSelectionChange;hbAction;hbExpandChange;hbCellChange;hbPageChange;hbFilterChange;handleDataChange(){this.selectedRows=new Set;this.emitSelection()}handlePaginationChange(){if(this.pagination){this.internalPage=this.pagination.current??this.pagination.defaultCurrent??1;this.internalPageSize=this.pagination.pageSize??this.pagination.defaultPageSize??10}}get isTreeMode(){return!!this.treeProps}get childrenField(){return this.treeProps&&this.treeProps.children||"children"}flattenTree(t,e=0,i=""){const a=this.childrenField;const r=[];t.forEach(((t,o)=>{const n=i?`${i}.${o}`:`${o}`;const s=this.rowKey?t[this.rowKey]:n;const l=t[a];const h=Array.isArray(l)&&l.length>0;r.push({row:t,level:e,key:s,hasChildren:h,index:o});if(h&&this.expandedRowKeys.indexOf(s)!==-1){r.push(...this.flattenTree(l,e+1,n))}}));return r}toggleExpand=(t,e)=>{const i=this.expandedRowKeys.indexOf(e);const a=i===-1;this.expandedRowKeys=a?[...this.expandedRowKeys,e]:this.expandedRowKeys.filter((t=>t!==e));this.hbExpandChange.emit({expanded:a,row:t})};startEdit=(t,e,i)=>{t.stopPropagation();if(!this.editable)return;this.editingCell={rowKey:e,prop:i}};commitEdit=(t,e,i)=>{const a=t.target;const r=a.value;e[i]=r;this.editingCell=null;this.hbCellChange.emit({row:e,prop:i,value:r})};onEditKeydown=(t,e,i)=>{if(t.key==="Enter"){t.preventDefault();this.commitEdit(t,e,i)}else if(t.key==="Escape"){t.preventDefault();this.editingCell=null}};allCheckboxRef;componentDidRender(){if(this.allCheckboxRef){this.allCheckboxRef.indeterminate=this.isIndeterminate}}virtualBuffer=5;handleVirtualScroll=t=>{const e=t.target;this.scrollTop=e.scrollTop};get visibleRange(){const t=this.data.length;if(t===0)return{startIndex:0,endIndex:0};const e=this.itemHeight>0?this.itemHeight:1;const i=this.virtualScrollHeight;let a=Math.floor(this.scrollTop/e)-this.virtualBuffer;if(a<0)a=0;let r=Math.ceil((this.scrollTop+i)/e)+this.virtualBuffer;if(r>t)r=t;return{startIndex:a,endIndex:r}}get virtualTotalHeight(){return this.data.length*(this.itemHeight>0?this.itemHeight:1)}effectiveSortOrder(t){if(t.sortOrder!==undefined)return t.sortOrder;if(this.sortProp===t.prop)return this.sortDirection;return null}handleSort=t=>{const e=t.prop;if(t.sortOrder!==undefined){this.hbSortChange.emit({prop:e,order:t.sortOrder});return}if(this.sortProp===e){this.sortDirection=this.sortDirection==="ascending"?"descending":this.sortDirection==="descending"?null:"ascending"}else{this.sortProp=e;this.sortDirection="ascending"}this.hbSortChange.emit({prop:e,order:this.sortDirection})};get sortedData(){let t;let e=null;for(const i of this.columns){if(i.sortable||i.sorter){const a=this.effectiveSortOrder(i);if(a){t=i;e=a;break}}}if(!t&&this.sortProp&&this.sortDirection){e=this.sortDirection}if(!e)return this.data;const i=e==="ascending"?1:-1;const a=t?t.prop:this.sortProp;const r=t&&t.sorter;return[...this.data].sort(((t,e)=>{if(r)return r(t,e)*i;const o=t[a];const n=e[a];if(o<n)return-1*i;if(o>n)return 1*i;return 0}))}get filteredData(){let t=this.sortedData;for(const e of this.columns){if(!e.onFilter||!e.filters)continue;const i=e.filteredValue!==undefined?e.filteredValue:this.internalFilters[e.prop];if(!i||i.length===0)continue;t=t.filter((t=>i.some((i=>e.onFilter(t,i)))))}return t}get pagedData(){const t=this.filteredData;if(!this.pagination)return t;const e=this.currentPage;const i=this.currentPageSize;const a=(e-1)*i;return t.slice(a,a+i)}get currentPage(){return this.pagination?.current??this.internalPage}get currentPageSize(){return this.pagination?.pageSize??this.internalPageSize}handlePageChange=t=>{this.internalPage=t;this.hbPageChange.emit({current:t,pageSize:this.currentPageSize})};handlePageSizeChange=t=>{this.internalPageSize=t;this.internalPage=1;this.hbPageChange.emit({current:1,pageSize:t})};handleFilterToggle=(t,e)=>{const i=t.filteredValue!==undefined?t.filteredValue:this.internalFilters[t.prop]||[];const a=i.includes(e)?i.filter((t=>t!==e)):[...i,e];if(t.filteredValue===undefined){this.internalFilters={...this.internalFilters,[t.prop]:a}}this.hbFilterChange.emit({prop:t.prop,values:a})};handleFilterReset=t=>{if(t.filteredValue===undefined){this.internalFilters={...this.internalFilters,[t.prop]:[]}}this.hbFilterChange.emit({prop:t.prop,values:[]})};get isAllSelected(){return this.data.length>0&&this.selectedRows.size===this.data.length}get isIndeterminate(){return this.selectedRows.size>0&&this.selectedRows.size<this.data.length}toggleRow=(t,e)=>{e.stopPropagation();const i=new Set(this.selectedRows);if(i.has(t)){i.delete(t)}else{i.add(t)}this.selectedRows=i;this.emitSelection()};toggleAll=()=>{if(this.isAllSelected){this.selectedRows=new Set}else{this.selectedRows=new Set(this.data.map(((t,e)=>e)))}this.emitSelection()};emitSelection(){const t=Array.from(this.selectedRows).sort(((t,e)=>t-e)).map((t=>this.data[t])).filter(Boolean);this.hbSelectionChange.emit(t)}handleRowClick=(t,e)=>{this.currentRow=e;this.hbRowClick.emit({row:t,index:e})};handleAction=(t,e,i)=>{this.hbAction.emit({row:t,index:e,action:i})};get hasActions(){return!!this.actions&&this.actions.length>0}isColumnFiltered(t){const e=t.filteredValue!==undefined?t.filteredValue:this.internalFilters[t.prop];return!!e&&e.length>0}_fixedOffsetsCache=null;_fixedOffsetsColumnsRef=null;getFixedOffsets(){if(this._fixedOffsetsCache&&this._fixedOffsetsColumnsRef===this.columns){return this._fixedOffsetsCache}const t={};let e="0px";for(const i of this.columns){const a=i.fixed===true?"left":i.fixed;if(a==="left"){t[i.prop]={side:"left",left:e};e=`calc(${e} + ${i.width||"0px"})`}}let i="0px";for(let e=this.columns.length-1;e>=0;e--){const a=this.columns[e];if(a.fixed==="right"){t[a.prop]={side:"right",right:i};i=`calc(${i} + ${a.width||"0px"})`}}this._fixedOffsetsCache=t;this._fixedOffsetsColumnsRef=this.columns;return t}cellStyle(t,e){const i=this.getFixedOffsets()[t];const a={...e||{}};if(i?.side==="left"){a.position="sticky";a.left=i.left;a.zIndex="2"}else if(i?.side==="right"){a.position="sticky";a.right=i.right;a.zIndex="2"}return a}renderCell(t,e,i){if(t.render)return t.render(e,i);if(t.formatter)return t.formatter(e,i);return e[t.prop]??""}renderRow(t,e,a){const r=!!a;const o=a?a.level:0;const n=a?a.key:this.rowKey?t[this.rowKey]:e;const s=o*16;const l=t=>!!this.editingCell&&this.editingCell.rowKey===n&&this.editingCell.prop===t;const h=this.rowClassName?this.rowClassName(t,e):"";return i("tr",{key:n,class:{"hb-table__row":true,"hb-table__row--striped":this.stripe&&e%2===1,"hb-table__row--current":this.highlightCurrentRow&&e===this.currentRow,"hb-table__row--selected":this.selectedRows.has(e),"hb-table__row--tree":r,[h]:!!h},onClick:()=>this.handleRowClick(t,e)},this.selectable&&i("td",{class:"hb-table__selection",onClick:t=>t.stopPropagation()},i("input",{type:"checkbox",class:"hb-table__checkbox",checked:this.selectedRows.has(e),onChange:t=>this.toggleRow(e,t)})),this.columns.map(((o,h)=>{const b=this.getFixedOffsets()[o.prop];const d=h===0;const c=r&&d&&a.hasChildren;const p=c&&this.expandedRowKeys.indexOf(n)!==-1;const f=this.editable&&!!o.editable&&l(o.prop);const u=this.editable&&!!o.editable;return i("td",{key:o.prop,style:this.cellStyle(o.prop,{textAlign:o.align||"left"}),class:{"hb-table__td":true,"hb-table__cell--fixed-left":b?.side==="left","hb-table__cell--fixed-right":b?.side==="right","hb-table__cell--editable":u,"hb-table__cell--ellipsis":!!o.ellipsis},onClick:u?t=>this.startEdit(t,n,o.prop):undefined},r&&d&&i("span",{class:"hb-table__indent",style:{display:"inline-block",width:`${s}px`},"aria-hidden":"true"}),c&&i("button",{type:"button",class:{"hb-table__expand":true,"hb-table__expand--expanded":p},"aria-label":p?"收起":"展开",onClick:e=>{e.stopPropagation();this.toggleExpand(t,n)}},p?"▼":"▶"),c===false&&r&&d&&i("span",{class:"hb-table__expand-placeholder",style:{display:"inline-block",width:"16px"},"aria-hidden":"true"}),f?i("input",{class:"hb-table__edit-input",type:"text",value:t[o.prop]??"",onBlur:e=>this.commitEdit(e,t,o.prop),onKeyDown:e=>this.onEditKeydown(e,t,o.prop)}):i("slot",{name:`cell-${o.prop}`},this.renderCell(o,t,e)))})),this.hasActions&&i("td",{class:"hb-table__td--actions",style:{textAlign:"right",whiteSpace:"nowrap"},onClick:t=>t.stopPropagation()},this.actions.map((a=>i("button",{type:"button",class:{"hb-table__action":true,"hb-table__action--primary":a.type==="primary","hb-table__action--danger":a.type==="danger"},disabled:a.disabled?a.disabled(t,e):false,onClick:()=>this.handleAction(t,e,a.key)},a.label)))))}renderColumnFilter=t=>{if(!t.filters||t.filters.length===0||!t.onFilter)return null;const e=t.filteredValue!==undefined?t.filteredValue:this.internalFilters[t.prop]||[];const a=this.isColumnFiltered(t);return i("span",{class:"hb-table__filter",onClick:t=>t.stopPropagation()},i("details",{class:"hb-table__filter-dropdown"},i("summary",{class:{"hb-table__filter-trigger":true,"hb-table__filter-trigger--active":a},"aria-label":"筛选"},i("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},i("path",{d:"M22 3H2l8 9.46V19l4 2v-8.54L22 3z"}))),i("div",{class:"hb-table__filter-menu",role:"menu"},i("ul",{class:"hb-table__filter-list"},t.filters.map((a=>{const r=e.includes(a.value);return i("li",{class:"hb-table__filter-item",role:"menuitemcheckbox","aria-checked":r?"true":"false"},i("label",{class:"hb-table__filter-label"},i("input",{type:"checkbox",class:"hb-table__filter-checkbox",checked:r,onChange:()=>this.handleFilterToggle(t,a.value)}),i("span",null,a.label)))}))),i("div",{class:"hb-table__filter-actions"},i("button",{type:"button",class:"hb-table__filter-reset",onClick:()=>this.handleFilterReset(t)},"重置")))))};renderHeader(){return i("thead",null,i("tr",null,this.selectable&&i("th",{class:"hb-table__selection"},i("input",{type:"checkbox",class:"hb-table__checkbox",checked:this.isAllSelected,ref:t=>{this.allCheckboxRef=t},onChange:this.toggleAll})),this.columns.map((t=>{const e=this.getFixedOffsets()[t.prop];const a=!!t.sortable||!!t.sorter;const r=this.effectiveSortOrder(t);return i("th",{key:t.prop,style:this.cellStyle(t.prop,{width:t.width,minWidth:t.minWidth,textAlign:t.align||"left"}),class:{"hb-table__th--sortable":a,"hb-table__cell--fixed-left":e?.side==="left","hb-table__cell--fixed-right":e?.side==="right"},onClick:a?()=>this.handleSort(t):undefined},i("div",{class:"hb-table__th-content"},i("span",null,t.label),a&&i("span",{class:"hb-table__sort"},i("span",{class:{"hb-table__sort-icon":true,"hb-table__sort-icon--active":r==="ascending"}},"▲"),i("span",{class:{"hb-table__sort-icon":true,"hb-table__sort-icon--active":r==="descending"}},"▼")),this.renderColumnFilter(t)))})),this.hasActions&&i("th",{class:"hb-table__th--actions",style:{textAlign:"right",whiteSpace:"nowrap"}},"操作")))}renderPagination(){if(!this.pagination)return null;const t=this.filteredData.length;const e=this.currentPage;const a=this.currentPageSize;const r=Math.max(1,Math.ceil(t/a));const o=this.pagination.showTotal;return i("div",{class:"hb-table__pagination"},o&&i("span",{class:"hb-table__pagination-total"},"共 ",t," 条"),i("span",{class:"hb-table__pagination-pages"},i("button",{type:"button",class:"hb-table__pagination-btn",disabled:e<=1,onClick:()=>this.handlePageChange(e-1),"aria-label":"上一页"},"‹"),i("span",{class:"hb-table__pagination-current"},e," / ",r),i("button",{type:"button",class:"hb-table__pagination-btn",disabled:e>=r,onClick:()=>this.handlePageChange(e+1),"aria-label":"下一页"},"›")),this.pagination.pageSizes&&i("select",{class:"hb-table__pagination-size",onChange:t=>this.handlePageSizeChange(parseInt(t.target.value,10))},this.pagination.pageSizes.map((t=>i("option",{value:String(t),selected:t===a},t," 条/页")))))}render(){const t=this.pagedData;const e=t.length===0;const a=this.isTreeMode?this.flattenTree(t):[];const r=()=>{const{startIndex:a,endIndex:r}=this.visibleRange;const o=a*(this.itemHeight>0?this.itemHeight:1);return i("div",{class:"hb-table__virtual-viewport",style:{height:`${this.virtualScrollHeight}px`,overflowY:"auto"},onScroll:this.handleVirtualScroll},i("div",{class:"hb-table__virtual-spacer",style:{height:`${this.virtualTotalHeight}px`,position:"relative"}},i("table",{class:"hb-table__table hb-table__table--virtual"},i("tbody",null,e?i("tr",null,i("td",{colSpan:this.columns.length+(this.selectable?1:0)+(this.hasActions?1:0),class:"hb-table__empty"},this.emptyText)):i("tr",{style:{height:`${o}px`},"aria-hidden":"true"}),t.slice(a,r).map(((t,e)=>this.renderRow(t,a+e)))))))};const o=()=>i("tbody",null,e?i("tr",null,i("td",{colSpan:this.columns.length+(this.selectable?1:0)+(this.hasActions?1:0),class:"hb-table__empty"},this.emptyText)):this.isTreeMode?a.map(((t,e)=>this.renderRow(t.row,e,t))):t.map(((t,e)=>this.renderRow(t,e))));return i("div",{class:{"hb-table":true,[`hb-table--${this.size}`]:true,"hb-table--border":this.border,"hb-table--virtual":this.virtualScroll,"hb-table--has-pagination":!!this.pagination}},this.loading&&i("div",{class:"hb-table__loading"},i("div",{class:"hb-table__loading-spinner"})),this.virtualScroll?i("div",{class:"hb-table__virtual-wrapper"},i("table",{class:"hb-table__table"},this.renderHeader()),r()):i("div",{class:"hb-table__wrapper",style:this.maxHeight?{maxHeight:this.maxHeight,overflow:"auto"}:undefined},i("table",{class:"hb-table__table"},this.renderHeader(),o())),this.renderPagination())}static get watchers(){return{data:["handleDataChange"],pagination:["handlePaginationChange"]}}};o.style=r;export{o as hb_table};
|
|
2
|
+
//# sourceMappingURL=p-4148d875.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["tableCss","HbTableStyle0","Table","data","columns","stripe","border","size","loading","rowKey","emptyText","maxHeight","highlightCurrentRow","selectable","actions","virtualScroll","itemHeight","virtualScrollHeight","treeProps","editable","pagination","rowClassName","sortProp","sortDirection","currentRow","selectedRows","Set","scrollTop","expandedRowKeys","editingCell","internalPage","internalPageSize","internalFilters","hbSortChange","hbRowClick","hbSelectionChange","hbAction","hbExpandChange","hbCellChange","hbPageChange","hbFilterChange","handleDataChange","this","emitSelection","handlePaginationChange","current","defaultCurrent","pageSize","defaultPageSize","isTreeMode","childrenField","children","flattenTree","list","level","parentKeyPath","field","result","forEach","row","i","keyPath","key","kids","hasKids","Array","isArray","length","push","hasChildren","index","indexOf","toggleExpand","idx","expanded","filter","k","emit","startEdit","e","prop","stopPropagation","commitEdit","input","target","value","onEditKeydown","preventDefault","allCheckboxRef","componentDidRender","indeterminate","isIndeterminate","virtualBuffer","handleVirtualScroll","visibleRange","total","startIndex","endIndex","viewport","Math","floor","ceil","virtualTotalHeight","effectiveSortOrder","col","sortOrder","undefined","handleSort","order","sortedData","activeCol","activeOrder","sortable","sorter","direction","sorterFn","sort","a","b","va","vb","filteredData","onFilter","filters","values","filteredValue","some","v","pagedData","filtered","page","currentPage","currentPageSize","start","slice","handlePageChange","handlePageSizeChange","handleFilterToggle","next","includes","handleFilterReset","isAllSelected","toggleRow","has","delete","add","toggleAll","map","_","selected","from","Boolean","handleRowClick","handleAction","action","hasActions","isColumnFiltered","_fixedOffsetsCache","_fixedOffsetsColumnsRef","getFixedOffsets","leftAcc","c","side","fixed","left","width","rightAcc","right","cellStyle","base","off","style","position","zIndex","renderCell","rowIndex","render","formatter","renderRow","fr","tree","rowKeyVal","indent","isEditing","extraRowClass","h","class","onClick","type","checked","onChange","colIdx","isFirstCol","showExpand","editing","editableActive","textAlign","align","ellipsis","display","onBlur","onKeyDown","name","whiteSpace","act","disabled","label","renderColumnFilter","activeValues","viewBox","height","fill","stroke","d","role","f","renderHeader","ref","el","canSort","minWidth","renderPagination","totalPages","max","showTotal","pageSizes","parseInt","s","String","displayData","isEmpty","flatRows","renderVirtualBody","offsetTop","overflowY","onScroll","colSpan","renderNormalBody","overflow"],"sources":["src/components/Table/table.css?tag=hb-table&encapsulation=shadow","src/components/Table/Table.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-table {\n position: relative;\n overflow: hidden;\n border-radius: var(--hb-border-radius-base);\n background-color: var(--hb-color-bg);\n}\n\n.hb-table--border {\n border: 1px solid var(--hb-color-border-secondary);\n}\n\n.hb-table--border .hb-table__td,\n.hb-table--border .hb-table__table th {\n border-right: 1px solid var(--hb-color-border-secondary);\n}\n\n.hb-table__wrapper {\n overflow-x: auto;\n}\n\n.hb-table__table {\n width: 100%;\n border-collapse: collapse;\n border-spacing: 0;\n table-layout: auto;\n}\n\n.hb-table__table th {\n background-color: var(--hb-table-header-bg);\n color: var(--hb-table-header-color);\n font-weight: 600;\n font-size: var(--hb-font-size-sm);\n padding: 10px 12px;\n text-align: left;\n border-bottom: 1px solid var(--hb-color-border-secondary);\n white-space: nowrap;\n user-select: none;\n}\n\n.hb-table__th-content {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.hb-table__th--sortable {\n cursor: pointer;\n}\n\n.hb-table__th--sortable:hover {\n background-color: var(--hb-color-fill-tertiary);\n}\n\n.hb-table__sort {\n display: inline-flex;\n flex-direction: column;\n line-height: 1;\n font-size: 10px;\n gap: 1px;\n}\n\n.hb-table__sort-icon {\n color: var(--hb-color-text-quaternary);\n transition: color var(--hb-transition-duration);\n}\n\n.hb-table__sort-icon--active {\n color: var(--hb-color-primary);\n}\n\n.hb-table__td {\n padding: 10px 12px;\n font-size: var(--hb-font-size-sm);\n color: var(--hb-color-text);\n border-bottom: 1px solid var(--hb-table-border-color);\n transition: background-color var(--hb-transition-duration);\n}\n\n.hb-table__row:hover .hb-table__td {\n background-color: var(--hb-table-row-hover-bg);\n}\n\n.hb-table__row--striped .hb-table__td {\n background-color: var(--hb-table-stripe-bg);\n}\n\n.hb-table__row--current .hb-table__td {\n background-color: var(--hb-color-primary-bg);\n}\n\n.hb-table__empty {\n text-align: center;\n color: var(--hb-color-text-secondary);\n padding: var(--hb-spacing-xl) 0;\n}\n\n.hb-table__loading {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, 0.7);\n z-index: 1;\n}\n\n.hb-table__loading-spinner {\n width: 32px;\n height: 32px;\n border: 3px solid var(--hb-color-border-secondary);\n border-top-color: var(--hb-color-primary);\n border-radius: 50%;\n animation: hb-spin 0.8s linear infinite;\n}\n\n/* ---- 尺寸 ---- */\n.hb-table--small .hb-table__table th,\n.hb-table--small .hb-table__td {\n padding: 6px 8px;\n font-size: var(--hb-font-size-xs);\n}\n\n.hb-table--large .hb-table__table th,\n.hb-table--large .hb-table__td {\n padding: 14px 16px;\n font-size: var(--hb-font-size-base);\n}\n\n/* ---- 行选择 ---- */\n.hb-table__selection {\n width: 48px;\n min-width: 48px;\n text-align: center;\n white-space: nowrap;\n}\n.hb-table__checkbox {\n width: 16px;\n height: 16px;\n cursor: pointer;\n accent-color: var(--hb-color-primary);\n vertical-align: middle;\n}\n.hb-table__selection .hb-table__checkbox {\n margin: 0;\n}\n.hb-table__row--selected .hb-table__td {\n background-color: var(--hb-color-primary-bg);\n}\n\n/* ---- 固定列(sticky) ---- */\n/* 固定列单元格需要不透明背景,避免横向滚动时底层内容透出 */\n.hb-table__cell--fixed-left,\n.hb-table__cell--fixed-right {\n position: sticky;\n z-index: 2;\n background-color: var(--hb-color-bg);\n}\n.hb-table__table th.hb-table__cell--fixed-left,\n.hb-table__table th.hb-table__cell--fixed-right {\n background-color: var(--hb-table-header-bg);\n}\n.hb-table__cell--fixed-right {\n box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);\n}\n.hb-table__cell--fixed-left:not(.hb-table__cell--fixed-right) {\n box-shadow: 4px 0 8px rgba(0, 0, 0, 0.06);\n}\n/* 固定列在选中行需保持选中背景 */\n.hb-table__row--selected .hb-table__cell--fixed-left,\n.hb-table__row--selected .hb-table__cell--fixed-right {\n background-color: var(--hb-color-primary-bg);\n}\n.hb-table__row:hover .hb-table__cell--fixed-left,\n.hb-table__row:hover .hb-table__cell--fixed-right {\n background-color: var(--hb-table-row-hover-bg);\n}\n\n@keyframes hb-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n/* 行操作按钮(link 风格,类 Ant Design) */\n.hb-table__action {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n font-size: var(--hb-font-size-sm, 14px);\n line-height: 1.5;\n color: var(--hb-color-primary, #1677ff);\n transition: opacity var(--hb-transition-duration, 0.2s);\n}\n.hb-table__action:hover {\n opacity: 0.8;\n}\n.hb-table__action:disabled {\n color: var(--hb-color-text-disabled, #c0c4cc);\n cursor: not-allowed;\n}\n.hb-table__action--danger {\n color: var(--hb-color-danger, #f5222d);\n}\n.hb-table__action--danger:disabled {\n color: var(--hb-color-text-disabled, #c0c4cc);\n}\n.hb-table__action + .hb-table__action {\n margin-left: var(--hb-spacing-sm, 12px);\n}\n\n/* ---- 虚拟滚动 ---- */\n.hb-table--virtual {\n overflow: hidden;\n}\n.hb-table__virtual-wrapper {\n display: flex;\n flex-direction: column;\n}\n.hb-table__virtual-viewport {\n overflow-y: auto;\n overflow-x: auto;\n position: relative;\n}\n.hb-table__virtual-spacer {\n position: relative;\n width: 100%;\n}\n.hb-table__table--virtual {\n width: 100%;\n table-layout: fixed;\n}\n.hb-table__table--virtual tbody {\n /* 可见窗口的行紧跟在 offset 占位行之后,撑高容器由 spacer 负责 */\n position: relative;\n}\n\n/* ---- 树形数据(可展开行) ---- */\n.hb-table__expand {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n margin-right: 4px;\n padding: 0;\n background: none;\n border: none;\n cursor: pointer;\n color: var(--hb-color-text-secondary, #595959);\n font-size: 10px;\n line-height: 1;\n vertical-align: middle;\n transition: color var(--hb-transition-duration, 0.2s);\n flex-shrink: 0;\n}\n.hb-table__expand:hover {\n color: var(--hb-color-primary, #1677ff);\n}\n.hb-table__row--tree .hb-table__td {\n /* 树形行第一列内容随缩进对齐 */\n white-space: nowrap;\n}\n\n/* ---- 行内编辑 ---- */\n.hb-table__cell--editable {\n cursor: text;\n}\n.hb-table__cell--editable:hover {\n background-color: var(--hb-color-fill-tertiary, #f5f5f5);\n}\n.hb-table__edit-input {\n width: 100%;\n min-width: 60px;\n box-sizing: border-box;\n padding: 2px 6px;\n font-size: var(--hb-font-size-sm, 14px);\n color: var(--hb-color-text, #262626);\n border: 1px solid var(--hb-color-primary, #1677ff);\n border-radius: var(--hb-border-radius-base, 4px);\n outline: none;\n background-color: var(--hb-color-bg, #fff);\n}\n\n/* ============================================================\n * 响应式(移动端):\n * - 小屏强制最小宽度,避免列被挤压到不可读(保留横向滚动)\n * - sticky 表头在滚动时保持可见\n * ============================================================ */\n@media (max-width: 575.98px) {\n .hb-table__table {\n /* 最小宽度保证列内容可读,超出靠 wrapper 横向滚动 */\n min-width: 480px;\n }\n\n /* sticky 表头:横向滚动时表头跟随 */\n .hb-table__table thead th {\n position: sticky;\n top: 0;\n z-index: 2;\n background-color: var(--hb-color-bg-container, #fafafa);\n }\n}\n","import { Component, h, Prop, State, Event, EventEmitter, Watch } from '@stencil/core';\n\nexport interface TableColumn {\n /** 列字段名 */\n prop: string;\n /** 列标题 */\n label: string;\n /** 列宽 */\n width?: string;\n /** 最小列宽 */\n minWidth?: string;\n /** 是否可排序(true=按字段值排序) */\n sortable?: boolean;\n /** 排序函数(接收两行,返回数字)。优先级高于 sortable,启用自定义排序(T2) */\n sorter?: (a: Record<string, any>, b: Record<string, any>) => number;\n /** 受控排序方向(设置后 Table 不再内部切换该列,由外部控制,T2) */\n sortOrder?: SortDirection;\n /** 对齐方式 */\n align?: 'left' | 'center' | 'right';\n /** 固定列:left / right / true(等同 left) */\n fixed?: 'left' | 'right' | boolean;\n /** 单元格文本格式化(框架无关,返回纯文本字符串) */\n formatter?: (row: Record<string, any>, index: number) => string;\n /** 自定义单元格渲染(返回字符串或内联 JSX,T7)。优先级高于 formatter */\n render?: (row: Record<string, any>, index: number) => any;\n /** 该列是否可(行内)编辑;需同时开启 Table.editable 才生效 */\n editable?: boolean;\n /** 筛选项(非空时表头显示筛选下拉;与 onFilter 配合,T3) */\n filters?: { label: string; value: string | number }[];\n /** 受控筛选值(设置后由外部控制,T3) */\n filteredValue?: (string | number)[];\n /** 筛选函数 (row, filterValue) => boolean(T3) */\n onFilter?: (row: Record<string, any>, filterValue: string | number) => boolean;\n /** 超出省略号 */\n ellipsis?: boolean;\n}\n\n/**\n * 行操作按钮配置(框架无关)。\n * 由 Table 自身渲染按钮(在 shadow DOM 内),点击派发 hbAction 事件,\n * 消费方据此执行编辑/删除等逻辑——无需往每行塞框架专属元素,绕开「slot 跨行共享」限制。\n */\nexport interface TableAction {\n /** 操作标识,回传到 hbAction.detail.action */\n key: string;\n /** 按钮文案 */\n label: string;\n /** 按钮样式:default 主色文字 / danger 危险色 */\n type?: 'default' | 'primary' | 'danger';\n /** 是否禁用(按行判断) */\n disabled?: (row: Record<string, any>, index: number) => boolean;\n}\n\nexport type SortDirection = 'ascending' | 'descending' | null;\n\n/**\n * 内置分页配置(T1)。传入 pagination 对象即启用内置分页,\n * Table 自动切片 data 并在底部渲染 <hb-pagination>。\n */\nexport interface TablePagination {\n /** 当前页(从 1 开始,受控) */\n current?: number;\n /** 默认当前页(非受控) */\n defaultCurrent?: number;\n /** 每页条数(受控) */\n pageSize?: number;\n /** 默认每页条数(非受控,默认 10) */\n defaultPageSize?: number;\n /** 可选每页条数 */\n pageSizes?: number[];\n /** 是否显示总数 */\n showTotal?: boolean;\n}\n\n/**\n * 树形数据配置。\n * `children` 指定子节点在每行数据中的字段名(默认 'children'),\n * 行存在该字段(非空数组)时渲染展开箭头,可递归展开后代。\n */\nexport interface TableTreeProps {\n children?: string;\n}\n\n/**\n * 拍平后的可见行:保留原始 row + 嵌套层级 + 唯一 key,\n * 供 render 一次性 map 成 <tr>(仅含已展开链路上的后代)。\n */\ninterface FlatRow {\n row: Record<string, any>;\n level: number;\n key: string | number;\n /** 该行是否有非空 children(决定是否渲染展开箭头) */\n hasChildren: boolean;\n /** 该行在父层数组中的索引(用于 rowKey 缺省回退与稳定 key) */\n index: number;\n}\n\ninterface FixedOffset {\n side?: 'left' | 'right';\n left?: string;\n right?: string;\n}\n\n/**\n * Table 表格组件\n * 用于展示多条结构类似的数据,可对数据进行排序、筛选、选择等操作\n */\n@Component({\n tag: 'hb-table',\n styleUrl: 'table.css',\n shadow: true,\n})\nexport class Table {\n /** 数据源 */\n @Prop() data: Record<string, any>[] = [];\n\n /** 列配置 */\n @Prop() columns: TableColumn[] = [];\n\n /** 是否带斑马纹 */\n @Prop() stripe: boolean = false;\n\n /** 是否带边框 */\n @Prop() border: boolean = false;\n\n /** 表格尺寸 */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /** 是否显示加载状态 */\n @Prop() loading: boolean = false;\n\n /** 行数据的 Key */\n @Prop() rowKey: string = '';\n\n /** 空数据文案 */\n @Prop() emptyText: string = '暂无数据';\n\n /** 最大高度(超出固定表头) */\n @Prop() maxHeight?: string;\n\n /** 是否高亮当前行 */\n @Prop() highlightCurrentRow: boolean = false;\n\n /** 是否开启行选择(显示 checkbox 列) */\n @Prop() selectable: boolean = false;\n\n /** 行操作配置;非空时自动在末尾渲染「操作」列 */\n @Prop() actions: TableAction[] = [];\n\n /** 是否开启虚拟滚动(大数据量场景,默认关闭,向后兼容) */\n @Prop() virtualScroll: boolean = false;\n\n /** 虚拟滚动每行预估高度(px),用于计算撑高容器与可见窗口 */\n @Prop() itemHeight: number = 48;\n\n /** 虚拟滚动视口高度(px),超过此高度出现滚动条 */\n @Prop() virtualScrollHeight: number = 400;\n\n /**\n * 树形数据配置:传入后启用「可展开行」模式。\n * data 行含 `children` 字段(字段名可经此配置覆盖)时渲染展开箭头。\n * 默认 undefined —— 不启用树形。\n */\n @Prop() treeProps?: TableTreeProps;\n\n /** 是否开启行内编辑模式(默认关闭)。需列配置 column.editable=true 才对该列生效 */\n @Prop() editable: boolean = false;\n\n /**\n * 内置分页配置(T1)。传入后 Table 自动对 data 切片并在底部渲染 <hb-pagination>。\n * 不传则不分页(向后兼容)。\n */\n @Prop() pagination?: TablePagination;\n\n /** 行 className(函数,按行返回附加 class,T8) */\n @Prop() rowClassName?: (row: Record<string, any>, index: number) => string;\n\n @State() sortProp: string = '';\n @State() sortDirection: SortDirection = null;\n @State() currentRow: number = -1;\n @State() selectedRows: Set<number> = new Set();\n /** 虚拟滚动:当前滚动位置(px),驱动可见窗口计算 */\n @State() scrollTop: number = 0;\n\n /** 树形模式:已展开行的 key 列表 */\n @State() expandedRowKeys: Array<string | number> = [];\n\n /** 行内编辑:当前正在编辑的单元格 { key, prop },null 表示无 */\n @State() editingCell: { rowKey: string | number; prop: string } | null = null;\n\n /** T1 分页:内部当前页(非受控时用) */\n @State() internalPage: number = 1;\n /** T1 分页:内部每页条数(非受控时用) */\n @State() internalPageSize: number = 10;\n\n /** T3 筛选:内部筛选状态 { prop: 选中的 value 列表 }(非受控时用) */\n @State() internalFilters: Record<string, (string | number)[]> = {};\n\n /** 排序变化事件 */\n @Event() hbSortChange: EventEmitter<{ prop: string; order: SortDirection }>;\n\n /** 行点击事件 */\n @Event() hbRowClick: EventEmitter<{ row: Record<string, any>; index: number }>;\n\n /** 选择变化事件 */\n @Event() hbSelectionChange: EventEmitter<Record<string, any>[]>;\n\n /** 行操作点击事件 */\n @Event() hbAction: EventEmitter<{ row: Record<string, any>; index: number; action: string }>;\n\n /** 树形行展开/收起事件 */\n @Event() hbExpandChange: EventEmitter<{ expanded: boolean; row: Record<string, any> }>;\n\n /** 行内编辑提交事件 */\n @Event() hbCellChange: EventEmitter<{ row: Record<string, any>; prop: string; value: any }>;\n\n /** T1 分页变化事件 { current, pageSize } */\n @Event() hbPageChange: EventEmitter<{ current: number; pageSize: number }>;\n\n /** T3 筛选变化事件 { prop, values } */\n @Event() hbFilterChange: EventEmitter<{ prop: string; values: (string | number)[] }>;\n\n @Watch('data')\n handleDataChange() {\n this.selectedRows = new Set();\n this.emitSelection();\n }\n\n @Watch('pagination')\n handlePaginationChange() {\n // 受控分页:从 pagination.current/pageSize 初始化内部状态\n if (this.pagination) {\n this.internalPage = this.pagination.current ?? this.pagination.defaultCurrent ?? 1;\n this.internalPageSize = this.pagination.pageSize ?? this.pagination.defaultPageSize ?? 10;\n }\n }\n\n /** 树形模式是否启用(显式传入 treeProps 即启用) */\n private get isTreeMode(): boolean {\n return !!this.treeProps;\n }\n\n /** 子节点字段名(treeProps.children 缺省回退 'children') */\n private get childrenField(): string {\n return (this.treeProps && this.treeProps.children) || 'children';\n }\n\n /**\n * 把树拍平成可见行列表:仅保留「祖先链路全部已展开」的后代。\n */\n private flattenTree(list: Record<string, any>[], level: number = 0, parentKeyPath: string = ''): FlatRow[] {\n const field = this.childrenField;\n const result: FlatRow[] = [];\n list.forEach((row, i) => {\n const keyPath = parentKeyPath ? `${parentKeyPath}.${i}` : `${i}`;\n const key = this.rowKey ? row[this.rowKey] : keyPath;\n const kids = row[field];\n const hasKids = Array.isArray(kids) && kids.length > 0;\n result.push({ row, level, key, hasChildren: hasKids, index: i });\n if (hasKids && this.expandedRowKeys.indexOf(key) !== -1) {\n result.push(...this.flattenTree(kids as Record<string, any>[], level + 1, keyPath));\n }\n });\n return result;\n }\n\n /** 树形展开/收起切换 */\n private toggleExpand = (row: Record<string, any>, key: string | number) => {\n const idx = this.expandedRowKeys.indexOf(key);\n const expanded = idx === -1;\n this.expandedRowKeys = expanded ? [...this.expandedRowKeys, key] : this.expandedRowKeys.filter(k => k !== key);\n this.hbExpandChange.emit({ expanded, row });\n };\n\n /** 行内编辑:进入编辑态 */\n private startEdit = (e: Event, key: string | number, prop: string) => {\n e.stopPropagation();\n if (!this.editable) return;\n this.editingCell = { rowKey: key, prop };\n };\n\n /** 行内编辑:提交(回车 / 失焦 / Change) */\n private commitEdit = (e: Event, row: Record<string, any>, prop: string) => {\n const input = e.target as HTMLInputElement;\n const value = input.value;\n row[prop] = value;\n this.editingCell = null;\n this.hbCellChange.emit({ row, prop, value });\n };\n\n /** 行内编辑:回车提交 / Esc 取消 */\n private onEditKeydown = (e: KeyboardEvent, row: Record<string, any>, prop: string) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n this.commitEdit(e, row, prop);\n } else if (e.key === 'Escape') {\n e.preventDefault();\n this.editingCell = null;\n }\n };\n\n private allCheckboxRef?: HTMLInputElement;\n\n componentDidRender() {\n if (this.allCheckboxRef) {\n this.allCheckboxRef.indeterminate = this.isIndeterminate;\n }\n }\n\n /** 虚拟滚动上下缓冲行数 */\n private readonly virtualBuffer = 5;\n\n /** 虚拟滚动:滚动事件回调,更新 scrollTop 触发可见窗口重算 */\n private handleVirtualScroll = (e: Event) => {\n const target = e.target as HTMLElement;\n this.scrollTop = target.scrollTop;\n };\n\n /** 虚拟滚动:计算可见窗口 [startIndex, endIndex) */\n private get visibleRange(): { startIndex: number; endIndex: number } {\n const total = this.data.length;\n if (total === 0) return { startIndex: 0, endIndex: 0 };\n\n const itemHeight = this.itemHeight > 0 ? this.itemHeight : 1;\n const viewport = this.virtualScrollHeight;\n\n let startIndex = Math.floor(this.scrollTop / itemHeight) - this.virtualBuffer;\n if (startIndex < 0) startIndex = 0;\n\n let endIndex = Math.ceil((this.scrollTop + viewport) / itemHeight) + this.virtualBuffer;\n if (endIndex > total) endIndex = total;\n\n return { startIndex, endIndex };\n }\n\n /** 虚拟滚动:撑高容器总高度 */\n private get virtualTotalHeight(): number {\n return this.data.length * (this.itemHeight > 0 ? this.itemHeight : 1);\n }\n\n /**\n * T2:解析某列的有效排序方向。\n * 受控(col.sortOrder 设置)→ 用该值;否则用内部 state(sortProp/sortDirection)。\n */\n private effectiveSortOrder(col: TableColumn): SortDirection {\n if (col.sortOrder !== undefined) return col.sortOrder;\n if (this.sortProp === col.prop) return this.sortDirection;\n return null;\n }\n\n private handleSort = (col: TableColumn) => {\n const prop = col.prop;\n // T2:受控排序(col.sortOrder 已定义)→ 不内部切换,仅 emit 交外部决策\n if (col.sortOrder !== undefined) {\n this.hbSortChange.emit({ prop, order: col.sortOrder });\n return;\n }\n if (this.sortProp === prop) {\n this.sortDirection = this.sortDirection === 'ascending' ? 'descending' : this.sortDirection === 'descending' ? null : 'ascending';\n } else {\n this.sortProp = prop;\n this.sortDirection = 'ascending';\n }\n this.hbSortChange.emit({ prop, order: this.sortDirection });\n };\n\n /**\n * T2 增强的排序数据:支持 col.sorter 自定义排序函数 + 受控 sortOrder。\n * 多列排序不支持(与 antd 行为一致,取首个有效排序列)。\n */\n private get sortedData(): Record<string, any>[] {\n // 找到当前生效的排序列\n let activeCol: TableColumn | undefined;\n let activeOrder: SortDirection = null;\n for (const col of this.columns) {\n if (col.sortable || col.sorter) {\n const order = this.effectiveSortOrder(col);\n if (order) {\n activeCol = col;\n activeOrder = order;\n break;\n }\n }\n }\n // 兼容旧逻辑:若没有列级 sortOrder,回退到内部 sortProp/sortDirection\n if (!activeCol && this.sortProp && this.sortDirection) {\n activeOrder = this.sortDirection;\n }\n\n if (!activeOrder) return this.data;\n const direction = activeOrder === 'ascending' ? 1 : -1;\n const sortProp = activeCol ? activeCol.prop : this.sortProp;\n const sorterFn = activeCol && activeCol.sorter;\n\n return [...this.data].sort((a, b) => {\n if (sorterFn) return sorterFn(a, b) * direction;\n const va = a[sortProp];\n const vb = b[sortProp];\n if (va < vb) return -1 * direction;\n if (va > vb) return 1 * direction;\n return 0;\n });\n }\n\n /**\n * T3 筛选:应用所有列的 onFilter。\n * 受控(col.filteredValue 已定义)→ 用该值;否则用内部 internalFilters[prop]。\n */\n private get filteredData(): Record<string, any>[] {\n let result = this.sortedData;\n for (const col of this.columns) {\n if (!col.onFilter || !col.filters) continue;\n const values = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop];\n if (!values || values.length === 0) continue;\n result = result.filter(row => values.some(v => col.onFilter!(row, v)));\n }\n return result;\n }\n\n /**\n * T1 分页:取当前页数据切片(仅当 pagination 配置时)。\n * 在 sorted+filtered 之后切片。\n */\n private get pagedData(): Record<string, any>[] {\n const filtered = this.filteredData;\n if (!this.pagination) return filtered;\n const page = this.currentPage;\n const size = this.currentPageSize;\n const start = (page - 1) * size;\n return filtered.slice(start, start + size);\n }\n\n /** T1:当前页(受控优先) */\n private get currentPage(): number {\n return this.pagination?.current ?? this.internalPage;\n }\n\n /** T1:当前每页条数(受控优先) */\n private get currentPageSize(): number {\n return this.pagination?.pageSize ?? this.internalPageSize;\n }\n\n /** T1:分页切换 */\n private handlePageChange = (page: number) => {\n this.internalPage = page;\n this.hbPageChange.emit({ current: page, pageSize: this.currentPageSize });\n };\n\n /** T1:每页条数切换 */\n private handlePageSizeChange = (size: number) => {\n this.internalPageSize = size;\n // 切条数后回到第一页避免越界\n this.internalPage = 1;\n this.hbPageChange.emit({ current: 1, pageSize: size });\n };\n\n /** T3:筛选下拉切换某项 */\n private handleFilterToggle = (col: TableColumn, value: string | number) => {\n const current = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop] || [];\n const next = current.includes(value) ? current.filter(v => v !== value) : [...current, value];\n // 仅内部状态时更新;受控(filteredValue 已定义)则只 emit 交外部\n if (col.filteredValue === undefined) {\n this.internalFilters = { ...this.internalFilters, [col.prop]: next };\n }\n this.hbFilterChange.emit({ prop: col.prop, values: next });\n };\n\n /** T3:清空某列筛选 */\n private handleFilterReset = (col: TableColumn) => {\n if (col.filteredValue === undefined) {\n this.internalFilters = { ...this.internalFilters, [col.prop]: [] };\n }\n this.hbFilterChange.emit({ prop: col.prop, values: [] });\n };\n\n private get isAllSelected(): boolean {\n return this.data.length > 0 && this.selectedRows.size === this.data.length;\n }\n\n private get isIndeterminate(): boolean {\n return this.selectedRows.size > 0 && this.selectedRows.size < this.data.length;\n }\n\n private toggleRow = (index: number, e: Event) => {\n e.stopPropagation();\n const next = new Set(this.selectedRows);\n if (next.has(index)) {\n next.delete(index);\n } else {\n next.add(index);\n }\n this.selectedRows = next;\n this.emitSelection();\n };\n\n private toggleAll = () => {\n if (this.isAllSelected) {\n this.selectedRows = new Set();\n } else {\n this.selectedRows = new Set(this.data.map((_, i) => i));\n }\n this.emitSelection();\n };\n\n private emitSelection() {\n const selected = Array.from(this.selectedRows)\n .sort((a, b) => a - b)\n .map(i => this.data[i])\n .filter(Boolean);\n this.hbSelectionChange.emit(selected);\n }\n\n private handleRowClick = (row: Record<string, any>, index: number) => {\n this.currentRow = index;\n this.hbRowClick.emit({ row, index });\n };\n\n private handleAction = (row: Record<string, any>, index: number, action: string) => {\n this.hbAction.emit({ row, index, action });\n };\n\n private get hasActions(): boolean {\n return !!this.actions && this.actions.length > 0;\n }\n\n /** T3:某列是否有激活筛选 */\n private isColumnFiltered(col: TableColumn): boolean {\n const values = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop];\n return !!values && values.length > 0;\n }\n\n /**\n * 计算固定列的 sticky 偏移(左侧/右侧累计宽度)。\n * P1 优化:缓存结果,仅当 columns 引用变化时重算。\n */\n private _fixedOffsetsCache: Record<string, FixedOffset> | null = null;\n private _fixedOffsetsColumnsRef: TableColumn[] | null = null;\n private getFixedOffsets(): Record<string, FixedOffset> {\n if (this._fixedOffsetsCache && this._fixedOffsetsColumnsRef === this.columns) {\n return this._fixedOffsetsCache;\n }\n const result: Record<string, FixedOffset> = {};\n let leftAcc = '0px';\n for (const c of this.columns) {\n const side = c.fixed === true ? 'left' : c.fixed;\n if (side === 'left') {\n result[c.prop] = { side: 'left', left: leftAcc };\n leftAcc = `calc(${leftAcc} + ${c.width || '0px'})`;\n }\n }\n let rightAcc = '0px';\n for (let i = this.columns.length - 1; i >= 0; i--) {\n const c = this.columns[i];\n if (c.fixed === 'right') {\n result[c.prop] = { side: 'right', right: rightAcc };\n rightAcc = `calc(${rightAcc} + ${c.width || '0px'})`;\n }\n }\n this._fixedOffsetsCache = result;\n this._fixedOffsetsColumnsRef = this.columns;\n return result;\n }\n\n private cellStyle(prop: string, base?: Record<string, string>): Record<string, string> {\n const off = this.getFixedOffsets()[prop];\n const style: Record<string, string> = { ...(base || {}) };\n if (off?.side === 'left') {\n style.position = 'sticky';\n style.left = off.left as string;\n style.zIndex = '2';\n } else if (off?.side === 'right') {\n style.position = 'sticky';\n style.right = off.right as string;\n style.zIndex = '2';\n }\n return style;\n }\n\n /**\n * 渲染单元格内容(T7:优先 col.render,其次 formatter,最后原值)。\n */\n private renderCell(col: TableColumn, row: Record<string, any>, rowIndex: number): any {\n if (col.render) return col.render(row, rowIndex);\n if (col.formatter) return col.formatter(row, rowIndex);\n return row[col.prop] ?? '';\n }\n\n /**\n * 渲染单行(普通 + 虚拟滚动 + 树形 共用)。\n */\n private renderRow(row: Record<string, any>, rowIndex: number, fr?: FlatRow) {\n const tree = !!fr;\n const level = fr ? fr.level : 0;\n const rowKeyVal = fr ? fr.key : this.rowKey ? row[this.rowKey] : rowIndex;\n const indent = level * 16;\n\n const isEditing = (prop: string) => !!this.editingCell && this.editingCell.rowKey === rowKeyVal && this.editingCell.prop === prop;\n // T8:行 className\n const extraRowClass = this.rowClassName ? this.rowClassName(row, rowIndex) : '';\n\n return (\n <tr\n key={rowKeyVal}\n class={{\n 'hb-table__row': true,\n 'hb-table__row--striped': this.stripe && rowIndex % 2 === 1,\n 'hb-table__row--current': this.highlightCurrentRow && rowIndex === this.currentRow,\n 'hb-table__row--selected': this.selectedRows.has(rowIndex),\n 'hb-table__row--tree': tree,\n [extraRowClass]: !!extraRowClass,\n }}\n onClick={() => this.handleRowClick(row, rowIndex)}\n >\n {this.selectable && (\n <td class=\"hb-table__selection\" onClick={e => e.stopPropagation()}>\n <input type=\"checkbox\" class=\"hb-table__checkbox\" checked={this.selectedRows.has(rowIndex)} onChange={e => this.toggleRow(rowIndex, e)} />\n </td>\n )}\n {this.columns.map((col, colIdx) => {\n const off = this.getFixedOffsets()[col.prop];\n const isFirstCol = colIdx === 0;\n const showExpand = tree && isFirstCol && fr!.hasChildren;\n const expanded = showExpand && this.expandedRowKeys.indexOf(rowKeyVal) !== -1;\n const editing = this.editable && !!col.editable && isEditing(col.prop);\n const editableActive = this.editable && !!col.editable;\n\n return (\n <td\n key={col.prop}\n style={this.cellStyle(col.prop, { textAlign: col.align || 'left' })}\n class={{\n 'hb-table__td': true,\n 'hb-table__cell--fixed-left': off?.side === 'left',\n 'hb-table__cell--fixed-right': off?.side === 'right',\n 'hb-table__cell--editable': editableActive,\n 'hb-table__cell--ellipsis': !!col.ellipsis,\n }}\n onClick={editableActive ? e => this.startEdit(e, rowKeyVal, col.prop) : undefined}\n >\n {tree && isFirstCol && <span class=\"hb-table__indent\" style={{ display: 'inline-block', width: `${indent}px` }} aria-hidden=\"true\" />}\n {showExpand && (\n <button\n type=\"button\"\n class={{ 'hb-table__expand': true, 'hb-table__expand--expanded': expanded }}\n aria-label={expanded ? '收起' : '展开'}\n onClick={e => {\n e.stopPropagation();\n this.toggleExpand(row, rowKeyVal);\n }}\n >\n {expanded ? '▼' : '▶'}\n </button>\n )}\n {showExpand === false && tree && isFirstCol && <span class=\"hb-table__expand-placeholder\" style={{ display: 'inline-block', width: '16px' }} aria-hidden=\"true\" />}\n {editing ? (\n <input\n class=\"hb-table__edit-input\"\n type=\"text\"\n value={row[col.prop] ?? ''}\n onBlur={e => this.commitEdit(e, row, col.prop)}\n onKeyDown={e => this.onEditKeydown(e, row, col.prop)}\n />\n ) : (\n // T7:col.render 优先(支持返回 JSX);否则 formatter;否则原值\n <slot name={`cell-${col.prop}`}>{this.renderCell(col, row, rowIndex)}</slot>\n )}\n </td>\n );\n })}\n {this.hasActions && (\n <td class=\"hb-table__td--actions\" style={{ textAlign: 'right', whiteSpace: 'nowrap' }} onClick={e => e.stopPropagation()}>\n {this.actions.map(act => (\n <button\n type=\"button\"\n class={{\n 'hb-table__action': true,\n 'hb-table__action--primary': act.type === 'primary',\n 'hb-table__action--danger': act.type === 'danger',\n }}\n disabled={act.disabled ? act.disabled(row, rowIndex) : false}\n onClick={() => this.handleAction(row, rowIndex, act.key)}\n >\n {act.label}\n </button>\n ))}\n </td>\n )}\n </tr>\n );\n }\n\n /**\n * T3:渲染表头某列的筛选下拉。\n */\n private renderColumnFilter = (col: TableColumn) => {\n if (!col.filters || col.filters.length === 0 || !col.onFilter) return null;\n const activeValues = col.filteredValue !== undefined ? col.filteredValue : this.internalFilters[col.prop] || [];\n const filtered = this.isColumnFiltered(col);\n return (\n <span class=\"hb-table__filter\" onClick={e => e.stopPropagation()}>\n <details class=\"hb-table__filter-dropdown\">\n <summary class={{ 'hb-table__filter-trigger': true, 'hb-table__filter-trigger--active': filtered }} aria-label=\"筛选\">\n <svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M22 3H2l8 9.46V19l4 2v-8.54L22 3z\" />\n </svg>\n </summary>\n <div class=\"hb-table__filter-menu\" role=\"menu\">\n <ul class=\"hb-table__filter-list\">\n {col.filters.map(f => {\n const checked = activeValues.includes(f.value);\n return (\n <li class=\"hb-table__filter-item\" role=\"menuitemcheckbox\" aria-checked={checked ? 'true' : 'false'}>\n <label class=\"hb-table__filter-label\">\n <input\n type=\"checkbox\"\n class=\"hb-table__filter-checkbox\"\n checked={checked}\n onChange={() => this.handleFilterToggle(col, f.value)}\n />\n <span>{f.label}</span>\n </label>\n </li>\n );\n })}\n </ul>\n <div class=\"hb-table__filter-actions\">\n <button type=\"button\" class=\"hb-table__filter-reset\" onClick={() => this.handleFilterReset(col)}>重置</button>\n </div>\n </div>\n </details>\n </span>\n );\n };\n\n /** 渲染表头(普通 + 虚拟滚动共用,表头始终固定不随滚) */\n private renderHeader() {\n return (\n <thead>\n <tr>\n {this.selectable && (\n <th class=\"hb-table__selection\">\n <input\n type=\"checkbox\"\n class=\"hb-table__checkbox\"\n checked={this.isAllSelected}\n ref={el => {\n this.allCheckboxRef = el as HTMLInputElement;\n }}\n onChange={this.toggleAll}\n />\n </th>\n )}\n {this.columns.map(col => {\n const off = this.getFixedOffsets()[col.prop];\n // T2:列可排序的条件(sortable 或 sorter)\n const canSort = !!col.sortable || !!col.sorter;\n const order = this.effectiveSortOrder(col);\n return (\n <th\n key={col.prop}\n style={this.cellStyle(col.prop, {\n width: col.width,\n minWidth: col.minWidth,\n textAlign: col.align || 'left',\n })}\n class={{\n 'hb-table__th--sortable': canSort,\n 'hb-table__cell--fixed-left': off?.side === 'left',\n 'hb-table__cell--fixed-right': off?.side === 'right',\n }}\n onClick={canSort ? () => this.handleSort(col) : undefined}\n >\n <div class=\"hb-table__th-content\">\n <span>{col.label}</span>\n {canSort && (\n <span class=\"hb-table__sort\">\n <span class={{ 'hb-table__sort-icon': true, 'hb-table__sort-icon--active': order === 'ascending' }}>▲</span>\n <span class={{ 'hb-table__sort-icon': true, 'hb-table__sort-icon--active': order === 'descending' }}>▼</span>\n </span>\n )}\n {/* T3:筛选下拉 */}\n {this.renderColumnFilter(col)}\n </div>\n </th>\n );\n })}\n {this.hasActions && (\n <th class=\"hb-table__th--actions\" style={{ textAlign: 'right', whiteSpace: 'nowrap' }}>\n 操作\n </th>\n )}\n </tr>\n </thead>\n );\n }\n\n /** T1:渲染内置分页底部栏 */\n private renderPagination() {\n if (!this.pagination) return null;\n const total = this.filteredData.length;\n const page = this.currentPage;\n const size = this.currentPageSize;\n const totalPages = Math.max(1, Math.ceil(total / size));\n const showTotal = this.pagination.showTotal;\n return (\n <div class=\"hb-table__pagination\">\n {showTotal && <span class=\"hb-table__pagination-total\">共 {total} 条</span>}\n <span class=\"hb-table__pagination-pages\">\n <button type=\"button\" class=\"hb-table__pagination-btn\" disabled={page <= 1} onClick={() => this.handlePageChange(page - 1)} aria-label=\"上一页\">‹</button>\n <span class=\"hb-table__pagination-current\">{page} / {totalPages}</span>\n <button type=\"button\" class=\"hb-table__pagination-btn\" disabled={page >= totalPages} onClick={() => this.handlePageChange(page + 1)} aria-label=\"下一页\">›</button>\n </span>\n {this.pagination.pageSizes && (\n <select\n class=\"hb-table__pagination-size\"\n onChange={e => this.handlePageSizeChange(parseInt((e.target as HTMLSelectElement).value, 10))}\n >\n {this.pagination.pageSizes.map(s => (\n <option value={String(s)} selected={s === size}>{s} 条/页</option>\n ))}\n </select>\n )}\n </div>\n );\n }\n\n render() {\n // T1+T2+T3:排序 → 筛选 → 分页 依次应用\n const displayData = this.pagedData;\n const isEmpty = displayData.length === 0;\n\n const flatRows: FlatRow[] = this.isTreeMode ? this.flattenTree(displayData) : [];\n\n const renderVirtualBody = () => {\n const { startIndex, endIndex } = this.visibleRange;\n const offsetTop = startIndex * (this.itemHeight > 0 ? this.itemHeight : 1);\n return (\n <div class=\"hb-table__virtual-viewport\" style={{ height: `${this.virtualScrollHeight}px`, overflowY: 'auto' }} onScroll={this.handleVirtualScroll}>\n <div class=\"hb-table__virtual-spacer\" style={{ height: `${this.virtualTotalHeight}px`, position: 'relative' }}>\n <table class=\"hb-table__table hb-table__table--virtual\">\n <tbody>\n {isEmpty ? (\n <tr>\n <td colSpan={this.columns.length + (this.selectable ? 1 : 0) + (this.hasActions ? 1 : 0)} class=\"hb-table__empty\">\n {this.emptyText}\n </td>\n </tr>\n ) : (\n <tr style={{ height: `${offsetTop}px` }} aria-hidden=\"true\" />\n )}\n {displayData.slice(startIndex, endIndex).map((row, i) => this.renderRow(row, startIndex + i))}\n </tbody>\n </table>\n </div>\n </div>\n );\n };\n\n const renderNormalBody = () => (\n <tbody>\n {isEmpty ? (\n <tr>\n <td colSpan={this.columns.length + (this.selectable ? 1 : 0) + (this.hasActions ? 1 : 0)} class=\"hb-table__empty\">\n {this.emptyText}\n </td>\n </tr>\n ) : this.isTreeMode ? (\n flatRows.map((fr, i) => this.renderRow(fr.row, i, fr))\n ) : (\n displayData.map((row, rowIndex) => this.renderRow(row, rowIndex))\n )}\n </tbody>\n );\n\n return (\n <div class={{ 'hb-table': true, [`hb-table--${this.size}`]: true, 'hb-table--border': this.border, 'hb-table--virtual': this.virtualScroll, 'hb-table--has-pagination': !!this.pagination }}>\n {this.loading && (\n <div class=\"hb-table__loading\">\n <div class=\"hb-table__loading-spinner\"></div>\n </div>\n )}\n {this.virtualScroll ? (\n <div class=\"hb-table__virtual-wrapper\">\n <table class=\"hb-table__table\">{this.renderHeader()}</table>\n {renderVirtualBody()}\n </div>\n ) : (\n <div class=\"hb-table__wrapper\" style={this.maxHeight ? { maxHeight: this.maxHeight, overflow: 'auto' } : undefined}>\n <table class=\"hb-table__table\">\n {this.renderHeader()}\n {renderNormalBody()}\n </table>\n </div>\n )}\n {/* T1:内置分页 */}\n {this.renderPagination()}\n </div>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAW,4vYACjB,MAAAC,EAAeD,E,MC+GFE,EAAK,M,uXAERC,KAA8B,GAG9BC,QAAyB,GAGzBC,OAAkB,MAGlBC,OAAkB,MAGlBC,KAAsC,UAGtCC,QAAmB,MAGnBC,OAAiB,GAGjBC,UAAoB,OAGpBC,UAGAC,oBAA+B,MAG/BC,WAAsB,MAGtBC,QAAyB,GAGzBC,cAAyB,MAGzBC,WAAqB,GAGrBC,oBAA8B,IAO9BC,UAGAC,SAAoB,MAMpBC,WAGAC,aAECC,SAAmB,GACnBC,cAA+B,KAC/BC,YAAsB,EACtBC,aAA4B,IAAIC,IAEhCC,UAAoB,EAGpBC,gBAA0C,GAG1CC,YAAgE,KAGhEC,aAAuB,EAEvBC,iBAA2B,GAG3BC,gBAAuD,GAGvDC,aAGAC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EA,EAAA,MAAImD,QAASlM,KAAKtC,QAAQ+D,QAAUzB,KAAK7B,WAAa,EAAI,IAAM6B,KAAKiH,WAAa,EAAI,GAAI+B,MAAM,mBAC7FhJ,KAAKhC,YAGRgC,KAAKO,WACPsL,EAASpF,KAAI,CAACgC,EAAIvH,IAAMlB,KAAKwI,UAAUC,EAAGxH,IAAKC,EAAGuH,KAElDkD,EAAYlF,KAAI,CAACxF,EAAKoH,IAAarI,KAAKwI,UAAUvH,EAAKoH,MAK7D,OACEU,EAAA,OAAKC,MAAO,CAAE,WAAY,KAAM,CAAC,aAAahJ,KAAKnC,QAAS,KAAM,mBAAoBmC,KAAKpC,OAAQ,oBAAqBoC,KAAK3B,cAAe,6BAA8B2B,KAAKtB,aAC5KsB,KAAKlC,SACJiL,EAAA,OAAKC,MAAM,qBACTD,EAAA,OAAKC,MAAM,+BAGdhJ,KAAK3B,cACJ0K,EAAA,OAAKC,MAAM,6BACTD,EAAA,SAAOC,MAAM,mBAAmBhJ,KAAK8K,gBACpCgB,KAGH/C,EAAA,OAAKC,MAAM,oBAAoBf,MAAOjI,KAAK/B,UAAY,CAAEA,UAAW+B,KAAK/B,UAAWmO,SAAU,QAAWpI,WACvG+E,EAAA,SAAOC,MAAM,mBACVhJ,KAAK8K,eACLqB,MAKNnM,KAAKmL,mB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,g as e,h as i}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form-item{align-items:flex-start;display:flex;gap:var(--hb-spacing-sm)}.hb-form-item--label-top,:host([data-label-top]) .hb-form-item{align-items:stretch;flex-direction:column;gap:var(--hb-spacing-xs)}.hb-form-item__label{align-items:center;color:var(--hb-color-text);display:inline-flex;flex-shrink:0;font-size:var(--hb-font-size-sm,14px);height:var(--hb-size-default,32px);justify-content:flex-end;white-space:nowrap}.hb-form-item--label-top .hb-form-item__label,:host([data-label-top]) .hb-form-item__label{height:auto;justify-content:flex-start;padding-bottom:var(--hb-spacing-xxs,2px)}.hb-form-item--label-left .hb-form-item__label{justify-content:flex-start}.hb-form-item__required{color:var(--hb-color-danger);font-family:SimSun,sans-serif;font-size:var(--hb-font-size-sm,14px);margin-right:4px}.hb-form-item__content{flex:1;min-width:0;position:relative}.hb-form-item__error{animation:hb-form-error-fade-in .2s ease-out;color:var(--hb-color-danger);font-size:var(--hb-font-size-xs,12px);line-height:1.5;margin-top:4px;min-height:0}@keyframes hb-form-error-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@media (max-width:575.98px){.hb-form-item{align-items:stretch!important;flex-direction:column!important;gap:var(--hb-spacing-xs)!important}.hb-form-item__label{height:auto!important;justify-content:flex-start!important;padding-bottom:var(--hb-spacing-xxs,2px)!important}}';const r=o;const a=class{constructor(e){t(this,e)}get el(){return e(this)}prop="";label="";labelWidth;required=false;rules=[];size="default";errors=[];isvalidating=false;componentDidLoad(){this.el.dispatchEvent(new CustomEvent("hbFormFieldRegister",{detail:{prop:this.prop,validate:this.validate,resetValue:this.resetValue,getValue:this.getValue},bubbles:true,composed:true}));this.el.addEventListener("hbChange",this.handleChildChange)}disconnectedCallback(){this.el.removeEventListener("hbChange",this.handleChildChange)}handleChildChange=()=>{if(this.errors.length>0){void this.validate()}};get formRules(){const t=this.el.closest("hb-form");const e=t?t.rules?.[this.prop]||[]:[];return[...e,...this.rules]}get isRequired(){if(this.required)return true;return this.formRules.some((t=>t&&t.required))}get resolvedLabelPosition(){const t=this.el.closest("hb-form");return t&&t.labelPosition||"right"}validate=async()=>{const t=this.getValue();const e=this.formRules;if(e.length===0){this.errors=[];return[]}this.isvalidating=true;const i=[];for(const o of e){const e=t===undefined||t===null||t===""||Array.isArray(t)&&t.length===0;if(o.required&&e){i.push(o.message||`${this.label||this.prop}不能为空`);continue}if(e)continue;if(o.pattern){const e=typeof o.pattern==="string"?new RegExp(o.pattern).test(String(t)):o.pattern.test(String(t));if(!e){i.push(o.message||`${this.label||this.prop}格式不正确`);continue}}if(o.type==="email"){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))){i.push(o.message||`${this.label||this.prop}格式不正确`);continue}}if(o.min!==undefined&&typeof t==="string"&&t.length<o.min){i.push(o.message||`${this.label||this.prop}最少${o.min}个字符`);continue}if(o.max!==undefined&&typeof t==="string"&&t.length>o.max){i.push(o.message||`${this.label||this.prop}最多${o.max}个字符`);continue}if(o.validator){try{await o.validator(t,this.formRules)}catch(t){i.push(t.message||o.message||`${this.label||this.prop}验证失败`)}}}this.errors=i;this.isvalidating=false;return i};resetValue=()=>{this.errors=[]};getValue=()=>{const t=this.el.querySelector("hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, "+"hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, "+"hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select");if(t){return t.modelValue}return undefined};render(){const t=this.resolvedLabelPosition==="top";const e=this.errors.length>0;const o=this.label?`hb-form-item__label-${this.prop||"x"}`:undefined;return i("div",{key:"ad51782227c637557a1cc0a4be2397b20f63b2e2",class:{"hb-form-item":true,"hb-form-item--error":e,"hb-form-item--validating":this.isvalidating,"hb-form-item--required":this.isRequired,"hb-form-item--label-top":t,"hb-form-item--label-left":this.resolvedLabelPosition==="left"}},this.label&&i("label",{key:"22b4830775644a315a797c91ca77045015632cf5",id:o,class:"hb-form-item__label",style:this.labelWidth?{width:this.labelWidth}:undefined,title:this.label},this.isRequired&&i("span",{key:"43c4db5f65f68f8a9db2362c8cdf724069895238",class:"hb-form-item__required","aria-hidden":"true"},"*"),this.label),i("div",{key:"0fe8dda2a5b0363c55ca6e19d1c2b0e3a44e503f",class:"hb-form-item__content",role:"group","aria-labelledby":o,"aria-required":this.isRequired?"true":undefined,"aria-invalid":e?"true":undefined},i("slot",{key:"6b714ffde9c6a0f9112aef9a28519ba42df0fa96"}),e&&i("div",{key:"41a97ac3f7f0dccd9938d9dbf844852c085d0b72",class:"hb-form-item__error",role:"alert"},this.errors[0])))}};a.style=r;export{a as hb_form_item};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,g as e,h as i}from"./p-e42dfa95.js";const o='/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.inline{display:inline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;:host{display:block}.hb-form-item{align-items:flex-start;display:flex;gap:var(--hb-spacing-sm)}.hb-form-item--label-top,:host([data-label-top]) .hb-form-item{align-items:stretch;flex-direction:column;gap:var(--hb-spacing-xs)}.hb-form-item__label{align-items:center;color:var(--hb-color-text);display:inline-flex;flex-shrink:0;font-size:var(--hb-font-size-sm,14px);height:var(--hb-size-default,32px);justify-content:flex-end;white-space:nowrap}.hb-form-item--label-top .hb-form-item__label,:host([data-label-top]) .hb-form-item__label{height:auto;justify-content:flex-start;padding-bottom:var(--hb-spacing-xxs,2px)}.hb-form-item--label-left .hb-form-item__label{justify-content:flex-start}.hb-form-item__required{color:var(--hb-color-danger);font-family:SimSun,sans-serif;font-size:var(--hb-font-size-sm,14px);margin-right:4px}.hb-form-item__content{flex:1;min-width:0;position:relative}.hb-form-item__error{animation:hb-form-error-fade-in .2s ease-out;color:var(--hb-color-danger);font-size:var(--hb-font-size-xs,12px);line-height:1.5;margin-top:4px;min-height:0}@keyframes hb-form-error-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@media (max-width:575.98px){.hb-form-item{align-items:stretch!important;flex-direction:column!important;gap:var(--hb-spacing-xs)!important}.hb-form-item__label{height:auto!important;justify-content:flex-start!important;padding-bottom:var(--hb-spacing-xxs,2px)!important}}';const r=o;const n=class{constructor(e){t(this,e)}get el(){return e(this)}prop="";label="";labelWidth;required=false;rules=[];size="default";validateStatus;help;labelCol;errors=[];isvalidating=false;componentDidLoad(){this.el.dispatchEvent(new CustomEvent("hbFormFieldRegister",{detail:{prop:this.prop,validate:this.validate,resetValue:this.resetValue,getValue:this.getValue},bubbles:true,composed:true}));this.el.addEventListener("hbChange",this.handleChildChange)}disconnectedCallback(){this.el.removeEventListener("hbChange",this.handleChildChange)}handleChildChange=()=>{if(this.errors.length>0){void this.validate()}};get formRules(){const t=this.el.closest("hb-form");const e=t?t.rules?.[this.prop]||[]:[];return[...e,...this.rules]}get isRequired(){if(this.required)return true;return this.formRules.some((t=>t&&t.required))}get resolvedLabelPosition(){const t=this.el.closest("hb-form");return t&&t.labelPosition||"right"}get resolvedValidateMessages(){const t=this.el.closest("hb-form");return t&&t.validateMessages}msg(t,e,i){if(t.message)return t.message;const o=this.resolvedValidateMessages;const r=this.label||this.prop;if(o&&o[e])return o[e].replace("{label}",r);return i.replace("{label}",r)}validate=async()=>{const t=this.getValue();const e=this.formRules;if(e.length===0){this.errors=[];return[]}this.isvalidating=true;const i=[];for(const o of e){const e=t===undefined||t===null||t===""||Array.isArray(t)&&t.length===0;if(o.required&&e){i.push(this.msg(o,"required",`${this.label||this.prop}不能为空`));continue}if(e)continue;if(o.pattern){const e=typeof o.pattern==="string"?new RegExp(o.pattern).test(String(t)):o.pattern.test(String(t));if(!e){i.push(this.msg(o,"pattern",`${this.label||this.prop}格式不正确`));continue}}if(o.type==="email"){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))){i.push(this.msg(o,"email",`${this.label||this.prop}格式不正确`));continue}}if(o.min!==undefined&&typeof t==="string"&&t.length<o.min){i.push(this.msg(o,"min",`${this.label||this.prop}最少${o.min}个字符`));continue}if(o.max!==undefined&&typeof t==="string"&&t.length>o.max){i.push(this.msg(o,"max",`${this.label||this.prop}最多${o.max}个字符`));continue}if(o.validator){try{await o.validator(t,this.formRules)}catch(t){i.push(t.message||o.message||`${this.label||this.prop}验证失败`)}}}this.errors=i;this.isvalidating=false;return i};resetValue=()=>{this.errors=[]};getValue=()=>{const t=this.el.querySelector("hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, "+"hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, "+"hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select");if(t){return t.modelValue}return undefined};get displayError(){if(this.help!==undefined)return this.help;return this.errors[0]||""}get showError(){if(this.validateStatus==="error")return true;if(this.validateStatus==="success"||this.validateStatus==="validating")return false;return this.errors.length>0}render(){const t=this.resolvedLabelPosition==="top";const e=this.showError;const o=this.label?`hb-form-item__label-${this.prop||"x"}`:undefined;const r=this.labelCol?{width:`${this.labelCol/24*100}%`}:this.labelWidth?{width:this.labelWidth}:undefined;return i("div",{key:"8c6bd451a2c673a66d3a98b08fdf30ac74f2fb2e",class:{"hb-form-item":true,"hb-form-item--error":e,"hb-form-item--validating":this.isvalidating||this.validateStatus==="validating","hb-form-item--required":this.isRequired,"hb-form-item--label-top":t,"hb-form-item--label-left":this.resolvedLabelPosition==="left"}},this.label&&i("label",{key:"98db5eae626555e4ae442b116bff048189209b5d",id:o,class:"hb-form-item__label",style:r,title:this.label},this.isRequired&&i("span",{key:"05f771e79623e3eeac28fb8b3d100501c5c94f6b",class:"hb-form-item__required","aria-hidden":"true"},"*"),this.label),i("div",{key:"3dc24c2eb1f33ed16f14cca93a644ece209d6c13",class:"hb-form-item__content",role:"group","aria-labelledby":o,"aria-required":this.isRequired?"true":undefined,"aria-invalid":e?"true":undefined},i("slot",{key:"3a143de305f27a70c5e775a0c24c16da77f7fe3a"}),e&&i("div",{key:"9d5708648cb0ec43b9c8a274145221ec0edec86e",class:"hb-form-item__error",role:"alert"},this.displayError)))}};n.style=r;export{n as hb_form_item};
|
|
2
|
+
//# sourceMappingURL=p-6bfe1954.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["formItemCss","HbFormItemStyle0","FormItem","prop","label","labelWidth","required","rules","size","validateStatus","help","labelCol","errors","isvalidating","componentDidLoad","this","el","dispatchEvent","CustomEvent","detail","validate","resetValue","getValue","bubbles","composed","addEventListener","handleChildChange","disconnectedCallback","removeEventListener","length","formRules","form","closest","formLevelRules","isRequired","some","r","resolvedLabelPosition","labelPosition","resolvedValidateMessages","validateMessages","msg","rule","key","fallback","message","tmpl","replace","async","value","isEmpty","undefined","Array","isArray","push","pattern","ok","RegExp","test","String","type","min","max","validator","err","input","querySelector","modelValue","displayError","showError","render","labelTop","hasError","labelId","labelStyle","width","h","class","id","style","title","role"],"sources":["src/components/Form/form-item.css?tag=hb-form-item&encapsulation=shadow","src/components/Form/FormItem.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.hb-form-item {\n display: flex;\n align-items: flex-start;\n gap: var(--hb-spacing-sm);\n}\n\n/* label 位置:顶部(对齐 antd label-position=\"top\")——\n 需要 Form 通过 class 下发,但 FormItem 在独立使用时也支持自身包装。\n 这里用 :host([data-label-position=\"top\"]) 兜底,Form 可通过 setting attribute 生效。 */\n:host([data-label-top]) .hb-form-item,\n.hb-form-item--label-top {\n flex-direction: column;\n align-items: stretch;\n gap: var(--hb-spacing-xs);\n}\n\n.hb-form-item__label {\n display: inline-flex;\n align-items: center;\n justify-content: flex-end;\n height: var(--hb-size-default, 32px);\n font-size: var(--hb-font-size-sm, 14px);\n color: var(--hb-color-text);\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n/* label-position=top 时标签左对齐 */\n:host([data-label-top]) .hb-form-item__label,\n.hb-form-item--label-top .hb-form-item__label {\n justify-content: flex-start;\n height: auto;\n padding-bottom: var(--hb-spacing-xxs, 2px);\n}\n\n/* label-position=left 时标签左对齐 */\n.hb-form-item--label-left .hb-form-item__label {\n justify-content: flex-start;\n}\n\n.hb-form-item__required {\n color: var(--hb-color-danger);\n margin-right: 4px;\n font-size: var(--hb-font-size-sm, 14px);\n font-family: SimSun, sans-serif;\n}\n\n.hb-form-item__content {\n flex: 1;\n position: relative;\n min-width: 0;\n}\n\n.hb-form-item__error {\n font-size: var(--hb-font-size-xs, 12px);\n color: var(--hb-color-danger);\n margin-top: 4px;\n line-height: 1.5;\n min-height: 0;\n animation: hb-form-error-fade-in 0.2s ease-out;\n}\n\n@keyframes hb-form-error-fade-in {\n from {\n opacity: 0;\n transform: translateY(-4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* ============================================================\n * 响应式(移动端):小屏强制 label 顶部布局,\n * 避免标签列在窄屏被挤压。覆盖 hb-form-item--label-left/right。\n * ============================================================ */\n@media (max-width: 575.98px) {\n .hb-form-item {\n flex-direction: column !important;\n align-items: stretch !important;\n gap: var(--hb-spacing-xs) !important;\n }\n\n .hb-form-item__label {\n justify-content: flex-start !important;\n height: auto !important;\n padding-bottom: var(--hb-spacing-xxs, 2px) !important;\n }\n}\n","import { Component, h, Prop, State, Element } from '@stencil/core';\n\n/**\n * FormItem 表单项组件\n * 表单中的每一项\n */\n@Component({\n tag: 'hb-form-item',\n styleUrl: 'form-item.css',\n shadow: true,\n})\nexport class FormItem {\n @Element() el: HTMLElement;\n\n /** 字段名 */\n @Prop() prop: string = '';\n\n /** 标签文本 */\n @Prop() label: string = '';\n\n /** 标签宽度 */\n @Prop() labelWidth?: string;\n\n /** 是否必填 */\n @Prop() required: boolean = false;\n\n /** 该表单项的验证规则 */\n @Prop() rules: any[] = [];\n\n /** 表单尺寸 */\n @Prop() size: 'large' | 'default' | 'small' = 'default';\n\n /**\n * F6:手动校验态('success' | 'warning' | 'error' | 'validating' | '')。\n * 设置后覆盖内部校验结果驱动的错误显示(对齐 antd validateStatus)。\n */\n @Prop() validateStatus?: '' | 'success' | 'warning' | 'error' | 'validating';\n\n /** F6:手动错误/帮助文案(配合 validateStatus='error' 显示自定义提示) */\n @Prop() help?: string;\n\n /**\n * F7:标签栅格占比(1-24)。未设置时用 labelWidth。\n * 对齐 antd labelCol(简化为纯数字栅格,labelCol.span)。\n */\n @Prop() labelCol?: number;\n\n @State() errors: string[] = [];\n @State() isvalidating: boolean = false;\n\n /** hb-form 在 componentWillLoad 注册的事件监听;FormItem 在 componentDidLoad 派发,\n * 但 componentWillLoad 早于子组件的 componentDidLoad,因此注册一定先到。\n * 这里还监听 hbFieldReset,便于 Form.resetFields 主动广播。 */\n\n componentDidLoad() {\n // 向父级 hb-form 注册\n this.el.dispatchEvent(\n new CustomEvent('hbFormFieldRegister', {\n detail: {\n prop: this.prop,\n validate: this.validate,\n resetValue: this.resetValue,\n getValue: this.getValue,\n },\n bubbles: true,\n composed: true, // 穿越 Shadow DOM 边界(FormItem 自身 shadow -> Form host)\n }),\n );\n\n // 子控件值变化时清错(对齐 antd:合法输入即移除错误提示)\n this.el.addEventListener('hbChange', this.handleChildChange);\n }\n\n disconnectedCallback() {\n this.el.removeEventListener('hbChange', this.handleChildChange);\n }\n\n /** 子控件 hbChange 时,若当前有错误则重新校验以尽早清除错误提示 */\n private handleChildChange = () => {\n if (this.errors.length > 0) {\n void this.validate();\n }\n };\n\n private get formRules(): any[] {\n // 合并 prop 对应的 form rules 和自身 rules\n const form = this.el.closest('hb-form');\n const formLevelRules = form ? (form as any).rules?.[this.prop] || [] : [];\n return [...formLevelRules, ...this.rules];\n }\n\n /** 是否渲染必填星号:显式 required 或任一规则带 required(对齐 antd 自动推断) */\n private get isRequired(): boolean {\n if (this.required) return true;\n return this.formRules.some(r => r && r.required);\n }\n\n /** 继承父 hb-form 的 labelPosition(FormItem 自身无此 prop,避免与 Form 冲突时以 Form 为准) */\n private get resolvedLabelPosition(): 'left' | 'right' | 'top' {\n const form = this.el.closest('hb-form') as any;\n return (form && form.labelPosition) || 'right';\n }\n\n /**\n * F4:继承父 hb-form 的 validateMessages(校验提示模板)。\n * 支持占位符 {label}。仅对 rule 未显式指定 message 的规则生效。\n */\n private get resolvedValidateMessages(): Record<string, string> | undefined {\n const form = this.el.closest('hb-form') as any;\n return form && form.validateMessages;\n }\n\n /** 用模板生成错误文案({label} 替换为字段标签),优先级:rule.message > 模板 > 内置默认 */\n private msg(rule: any, key: string, fallback: string): string {\n if (rule.message) return rule.message;\n const tmpl = this.resolvedValidateMessages;\n const label = this.label || this.prop;\n if (tmpl && tmpl[key]) return tmpl[key].replace('{label}', label);\n return fallback.replace('{label}', label);\n }\n\n /**\n * 验证此字段\n */\n @Prop() validate = async (): Promise<string[]> => {\n const value = this.getValue();\n const rules = this.formRules;\n\n if (rules.length === 0) {\n this.errors = [];\n return [];\n }\n\n this.isvalidating = true;\n const errors: string[] = [];\n\n for (const rule of rules) {\n // 必填校验:空字符串 / null / undefined / 空数组均视为\"未填\"\n const isEmpty = value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0);\n if (rule.required && isEmpty) {\n errors.push(this.msg(rule, 'required', `${this.label || this.prop}不能为空`));\n continue;\n }\n // 非必填且为空时,跳过后续格式校验(与 antd 行为一致)\n if (isEmpty) continue;\n if (rule.pattern) {\n const ok = typeof rule.pattern === 'string' ? new RegExp(rule.pattern).test(String(value)) : rule.pattern.test(String(value));\n if (!ok) {\n errors.push(this.msg(rule, 'pattern', `${this.label || this.prop}格式不正确`));\n continue;\n }\n }\n if (rule.type === 'email') {\n if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(String(value))) {\n errors.push(this.msg(rule, 'email', `${this.label || this.prop}格式不正确`));\n continue;\n }\n }\n if (rule.min !== undefined && typeof value === 'string' && value.length < rule.min) {\n errors.push(this.msg(rule, 'min', `${this.label || this.prop}最少${rule.min}个字符`));\n continue;\n }\n if (rule.max !== undefined && typeof value === 'string' && value.length > rule.max) {\n errors.push(this.msg(rule, 'max', `${this.label || this.prop}最多${rule.max}个字符`));\n continue;\n }\n if (rule.validator) {\n try {\n await rule.validator(value, this.formRules);\n } catch (err: any) {\n errors.push(err.message || rule.message || `${this.label || this.prop}验证失败`);\n }\n }\n }\n\n this.errors = errors;\n this.isvalidating = false;\n return errors;\n };\n\n @Prop() resetValue = () => {\n this.errors = [];\n };\n\n @Prop() getValue = (): any => {\n // 覆盖所有表单控件:input/select/cascader/date 系列/数字/checkbox/radio/switch/slider/color-picker/rate/upload\n const input = this.el.querySelector(\n 'hb-input, hb-select, hb-cascader, hb-date-picker, hb-date-time-picker, hb-date-range-picker, ' +\n 'hb-input-number, hb-textarea, hb-checkbox, hb-checkbox-group, hb-radio-group, hb-switch, ' +\n 'hb-slider, hb-color-picker, hb-rate, hb-time-picker, hb-time-select',\n );\n if (input) {\n return (input as any).modelValue;\n }\n return undefined;\n };\n\n /** F6:实际显示的错误文案。手动 help 优先;否则取内部 errors[0] */\n private get displayError(): string {\n if (this.help !== undefined) return this.help;\n return this.errors[0] || '';\n }\n\n /** F6:实际是否显示错误(手动 validateStatus='error' 或内部有错) */\n private get showError(): boolean {\n if (this.validateStatus === 'error') return true;\n if (this.validateStatus === 'success' || this.validateStatus === 'validating') return false;\n return this.errors.length > 0;\n }\n\n render() {\n const labelTop = this.resolvedLabelPosition === 'top';\n const hasError = this.showError;\n // A4:label 与内容关联。子控件是 slot(id 未知),无法用 label.for;\n // 改用 content 容器 role=group + aria-labelledby 指向 label id,\n // 把 label 语义绑到整组;并用 aria-required / aria-invalid 暴露必填与校验态(读屏可感知,\n // 不再仅靠红色 + 隐藏星号)。\n const labelId = this.label ? `hb-form-item__label-${this.prop || 'x'}` : undefined;\n // F7:labelCol 栅格占比(1-24),未设置时回退 labelWidth\n const labelStyle = this.labelCol\n ? { width: `${(this.labelCol / 24) * 100}%` }\n : this.labelWidth\n ? { width: this.labelWidth }\n : undefined;\n return (\n <div\n class={{\n 'hb-form-item': true,\n 'hb-form-item--error': hasError,\n 'hb-form-item--validating': this.isvalidating || this.validateStatus === 'validating',\n 'hb-form-item--required': this.isRequired,\n 'hb-form-item--label-top': labelTop,\n 'hb-form-item--label-left': this.resolvedLabelPosition === 'left',\n }}\n >\n {this.label && (\n <label id={labelId} class=\"hb-form-item__label\" style={labelStyle} title={this.label}>\n {this.isRequired && (\n <span class=\"hb-form-item__required\" aria-hidden=\"true\">\n *\n </span>\n )}\n {this.label}\n </label>\n )}\n <div class=\"hb-form-item__content\" role=\"group\" aria-labelledby={labelId} aria-required={this.isRequired ? 'true' : undefined} aria-invalid={hasError ? 'true' : undefined}>\n <slot />\n {hasError && (\n <div class=\"hb-form-item__error\" role=\"alert\">\n {this.displayError}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAc,s/NACpB,MAAAC,EAAeD,E,MCUFE,EAAQ,M,iDAIXC,KAAe,GAGfC,MAAgB,GAGhBC,WAGAC,SAAoB,MAGpBC,MAAe,GAGfC,KAAsC,UAMtCC,eAGAC,KAMAC,SAECC,OAAmB,GACnBC,aAAwB,MAMjC,gBAAAC,GAEEC,KAAKC,GAAGC,cACN,IAAIC,YAAY,sBAAuB,CACrCC,OAAQ,CACNhB,KAAMY,KAAKZ,KACXiB,SAAUL,KAAKK,SACfC,WAAYN,KAAKM,WACjBC,SAAUP,KAAKO,UAEjBC,QAAS,KACTC,SAAU,QAKdT,KAAKC,GAAGS,iBAAiB,WAAYV,KAAKW,kB,CAG5C,oBAAAC,GACEZ,KAAKC,GAAGY,oBAAoB,WAAYb,KAAKW,kB,CAIvCA,kBAAoB,KAC1B,GAAIX,KAAKH,OAAOiB,OAAS,EAAG,MACrBd,KAAKK,U,GAId,aAAYU,GAEV,MAAMC,EAAOhB,KAAKC,GAAGgB,QAAQ,WAC7B,MAAMC,EAAiBF,EAAQA,EAAaxB,QAAQQ,KAAKZ,OAAS,GAAK,GACvE,MAAO,IAAI8B,KAAmBlB,KAAKR,M,CAIrC,cAAY2B,GACV,GAAInB,KAAKT,SAAU,OAAO,KAC1B,OAAOS,KAAKe,U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