@veltra/desktop 1.0.8 → 1.0.9
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/components/action/action-group.vue.d.ts +2 -2
- package/dist/components/action/action.vue.d.ts +3 -3
- package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
- package/dist/components/batch-edit/style.js +2 -2
- package/dist/components/button/button.vue.d.ts +1 -1
- package/dist/components/cascade/cascade.js +15 -13
- package/dist/components/cascade/cascade.js.map +1 -1
- package/dist/components/cascade/cascade.vue.d.ts +4 -4
- package/dist/components/cascade/node.js.map +1 -1
- package/dist/components/cascade/use-check.js +3 -2
- package/dist/components/cascade/use-check.js.map +1 -1
- package/dist/components/cascade/use-select.js +3 -3
- package/dist/components/cascade/use-select.js.map +1 -1
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.js +9 -9
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +9 -9
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/empty/empty.vue.d.ts +1 -1
- package/dist/components/file-picker/file-picker.vue.d.ts +1 -1
- package/dist/components/file-picker/helper.js +19 -7
- package/dist/components/file-picker/helper.js.map +1 -1
- package/dist/components/file-viewer/file-viewer.js +294 -0
- package/dist/components/file-viewer/file-viewer.js.map +1 -0
- package/dist/components/file-viewer/file-viewer.vue.d.ts +42 -0
- package/dist/components/file-viewer/helper.js +185 -0
- package/dist/components/file-viewer/helper.js.map +1 -0
- package/dist/components/file-viewer/index.d.ts +1 -0
- package/dist/components/file-viewer/previewers/docx-previewer.js +76 -0
- package/dist/components/file-viewer/previewers/docx-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/image-previewer.js +64 -0
- package/dist/components/file-viewer/previewers/image-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/pdf-previewer.js +90 -0
- package/dist/components/file-viewer/previewers/pdf-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/sheet-previewer.js +175 -0
- package/dist/components/file-viewer/previewers/sheet-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/text-previewer.js +74 -0
- package/dist/components/file-viewer/previewers/text-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/video-previewer.js +62 -0
- package/dist/components/file-viewer/previewers/video-previewer.js.map +1 -0
- package/dist/components/file-viewer/style.d.ts +1 -0
- package/dist/components/file-viewer/style.js +4 -0
- package/dist/components/file-viewer/style2.css +445 -0
- package/dist/components/grid-input/grid-input.vue.d.ts +1 -1
- package/dist/components/index.d.ts +12 -9
- package/dist/components/input/input.vue.d.ts +1 -1
- package/dist/components/multi-select/multi-select-option.js +14 -10
- package/dist/components/multi-select/multi-select-option.js.map +1 -1
- package/dist/components/multi-select/multi-select.js +16 -19
- package/dist/components/multi-select/multi-select.js.map +1 -1
- package/dist/components/multi-select/multi-select.vue.d.ts +3 -3
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +4 -4
- package/dist/components/notification/notification.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +1 -1
- package/dist/components/number-range-input/number-range-input.vue.d.ts +2 -2
- package/dist/components/palette/di.js.map +1 -1
- package/dist/components/palette/palette-alpha.js +7 -10
- package/dist/components/palette/palette-alpha.js.map +1 -1
- package/dist/components/palette/palette-hue.js +5 -7
- package/dist/components/palette/palette-hue.js.map +1 -1
- package/dist/components/palette/palette-sv.js +8 -10
- package/dist/components/palette/palette-sv.js.map +1 -1
- package/dist/components/palette/palette.js +22 -24
- package/dist/components/palette/palette.js.map +1 -1
- package/dist/components/password-input/password-input.vue.d.ts +1 -1
- package/dist/components/pop-confirm/pop-confirm.vue.d.ts +1 -1
- package/dist/components/progress-nodes/progress-nodes.vue.d.ts +3 -3
- package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +2 -2
- package/dist/components/select/select.js +14 -12
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/select.vue.d.ts +2 -2
- package/dist/components/slider/slider-thumb.js +10 -13
- package/dist/components/slider/slider-thumb.js.map +1 -1
- package/dist/components/slider/slider.js +12 -15
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/table/di.js.map +1 -1
- package/dist/components/table/node/row.d.ts +10 -1
- package/dist/components/table/node/row.js +9 -0
- package/dist/components/table/node/row.js.map +1 -1
- package/dist/components/table/style.js +1 -1
- package/dist/components/table/table-body.js +25 -26
- package/dist/components/table/table-body.js.map +1 -1
- package/dist/components/table/table-cell.js +16 -9
- package/dist/components/table/table-cell.js.map +1 -1
- package/dist/components/table/table-row.js +78 -19
- package/dist/components/table/table-row.js.map +1 -1
- package/dist/components/table/table.js +76 -34
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/use-fixed-columns.js +27 -8
- package/dist/components/table/use-fixed-columns.js.map +1 -1
- package/dist/components/table/use-rows.js +2 -2
- package/dist/components/table/use-rows.js.map +1 -1
- package/dist/components/table/use-table.js +25 -3
- package/dist/components/table/use-table.js.map +1 -1
- package/dist/components/tabs/index.d.ts +3 -1
- package/dist/components/tabs/style2.css +169 -107
- package/dist/components/tabs/tabs-horizontal.js +133 -0
- package/dist/components/tabs/tabs-horizontal.js.map +1 -0
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +29 -0
- package/dist/components/tabs/tabs-vertical.js +89 -0
- package/dist/components/tabs/tabs-vertical.js.map +1 -0
- package/dist/components/tabs/tabs-vertical.vue.d.ts +28 -0
- package/dist/components/tabs/tabs.js +75 -105
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tabs/tabs.vue.d.ts +9 -23
- package/dist/components/tabs/use-tabs-bar.js +105 -0
- package/dist/components/tabs/use-tabs-bar.js.map +1 -0
- package/dist/components/textarea/textarea.vue.d.ts +1 -1
- package/dist/components/tip/tip.vue.d.ts +2 -2
- package/dist/components/tree/style2.css +45 -23
- package/dist/components/tree/tree-node.js +50 -35
- package/dist/components/tree/tree-node.js.map +1 -1
- package/dist/components/tree/tree.js +27 -20
- package/dist/components/tree/tree.js.map +1 -1
- package/dist/components/tree/tree.vue.d.ts +1 -1
- package/dist/components/tree/use-check.js +52 -14
- package/dist/components/tree/use-check.js.map +1 -1
- package/dist/components/tree/use-tree-nodes.js +51 -24
- package/dist/components/tree/use-tree-nodes.js.map +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +3 -3
- package/dist/components/watermark/watermark.vue.d.ts +1 -1
- package/dist/index.d.ts +57 -53
- package/dist/index.js +51 -48
- package/dist/types/file-viewer.d.ts +71 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/tabs.d.ts +106 -14
- package/dist/types/tree.d.ts +6 -1
- package/package.json +32 -31
- package/src/components/cascade/cascade.vue +18 -18
- package/src/components/cascade/node.ts +4 -1
- package/src/components/cascade/use-check.ts +5 -4
- package/src/components/cascade/use-select.ts +4 -5
- package/src/components/date-picker/date-picker.vue +10 -9
- package/src/components/date-range-picker/date-range-picker.vue +12 -12
- package/src/components/file-picker/helper.ts +21 -10
- package/src/components/file-viewer/file-viewer.vue +311 -0
- package/src/components/file-viewer/helper.ts +193 -0
- package/src/components/file-viewer/index.ts +1 -0
- package/src/components/file-viewer/previewers/docx-previewer.vue +78 -0
- package/src/components/file-viewer/previewers/image-previewer.vue +64 -0
- package/src/components/file-viewer/previewers/pdf-previewer.vue +90 -0
- package/src/components/file-viewer/previewers/sheet-previewer.vue +210 -0
- package/src/components/file-viewer/previewers/text-previewer.vue +76 -0
- package/src/components/file-viewer/previewers/video-previewer.vue +72 -0
- package/src/components/file-viewer/style.scss +504 -0
- package/src/components/file-viewer/style.ts +4 -0
- package/src/components/index.ts +2 -0
- package/src/components/multi-select/multi-select-option.vue +16 -3
- package/src/components/multi-select/multi-select.vue +17 -9
- package/src/components/palette/di.ts +5 -3
- package/src/components/palette/palette-alpha.vue +7 -10
- package/src/components/palette/palette-hue.vue +5 -7
- package/src/components/palette/palette-sv.vue +12 -14
- package/src/components/palette/palette.vue +19 -21
- package/src/components/select/select.vue +21 -19
- package/src/components/slider/slider-thumb.vue +11 -14
- package/src/components/slider/slider.vue +15 -15
- package/src/components/table/di.ts +20 -3
- package/src/components/table/node/row.ts +10 -1
- package/src/components/table/table-body.vue +28 -33
- package/src/components/table/table-cell.vue +17 -9
- package/src/components/table/table-row.tsx +83 -17
- package/src/components/table/table.vue +73 -45
- package/src/components/table/use-fixed-columns.ts +46 -12
- package/src/components/table/use-rows.ts +14 -3
- package/src/components/table/use-table.ts +27 -3
- package/src/components/tabs/index.ts +2 -0
- package/src/components/tabs/style.scss +217 -134
- package/src/components/tabs/tabs-horizontal.vue +125 -0
- package/src/components/tabs/tabs-vertical.vue +75 -0
- package/src/components/tabs/tabs.vue +56 -127
- package/src/components/tabs/use-tabs-bar.ts +119 -0
- package/src/components/tree/style.scss +74 -29
- package/src/components/tree/tree-node.vue +10 -4
- package/src/components/tree/tree.vue +39 -12
- package/src/components/tree/use-check.ts +79 -23
- package/src/components/tree/use-tree-nodes.ts +85 -34
- package/src/types/file-viewer.ts +69 -0
- package/src/types/index.ts +1 -0
- package/src/types/tabs.ts +113 -19
- package/src/types/tree.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-table.js","names":[],"sources":["../../../src/components/table/use-table.ts"],"sourcesContent":["import { o } from '@cat-kit/core'\nimport { bem, type BEM } from '@veltra/utils'\nimport { useSlots, type Ref } from 'vue'\n\nimport type {\n TableColumnRenderContext,\n TableColumnSlotsScope,\n TableProps,\n TableRow,\n RenderReturn,\n TableRowSlotsScope\n} from '../../types'\nimport type { ColumnNode } from './node/col'\n\ninterface Options {\n props: TableProps\n cls: BEM<'table'>\n leftFixed: Ref<boolean>\n rightFixed: Ref<boolean>\n}\n\ninterface UseTableReturn {\n getColumnSlotsNode: (ctx: TableColumnSlotsScope | TableColumnRenderContext) => RenderReturn\n getHeaderSlotsNode: (ctx: { column: ColumnNode }) => RenderReturn\n getExpandRowSlotsNode: (ctx: TableRowSlotsScope) => RenderReturn\n getCellClass: (column: ColumnNode) => string\n getHeaderCellClass: (column: ColumnNode) => string\n getCellCtx: (\n row: TableRow,\n column: ColumnNode\n ) => TableColumnSlotsScope | TableColumnRenderContext\n}\n\nexport function useTable(options: Options): UseTableReturn {\n const { props, cls, leftFixed, rightFixed } = options\n\n const slots = useSlots()\n\n const getColumnSlotsNode = (\n ctx: TableColumnSlotsScope | TableColumnRenderContext\n ): RenderReturn => {\n const column = ctx.column.data\n\n const { render, key } = column\n\n if (render) return render(ctx)\n\n const slotsRender = props.slots?.[`column:${key}`] ?? slots[`column:${key}`]\n\n if (slotsRender) return slotsRender(ctx)\n\n return ctx.val\n }\n\n const getHeaderSlotsNode = (ctx: { column: ColumnNode }): RenderReturn => {\n const column = ctx.column.data\n const { nameRender, key } = column\n\n if (nameRender) return nameRender(ctx)\n\n const slotsRender = props.slots?.[`header:${key}`] ?? slots[`header:${key}`]\n\n if (slotsRender) return slotsRender(ctx)\n\n return column.name\n }\n\n const getExpandRowSlotsNode = (ctx: TableRowSlotsScope): RenderReturn => {\n const slotsRender = props.slots?.['row:expand'] ?? slots['row:expand']\n\n if (slotsRender) return slotsRender(ctx)\n return null\n }\n\n const cellCls = cls.e('cell')\n\n const getCommonClassName = (column: ColumnNode): string => {\n const classList: string[] = [cellCls]\n\n leftFixed.value && column.isLastFixed && classList.push(bem.is('last-fixed'))\n\n rightFixed.value && column.isFirstFixed && classList.push(bem.is('first-fixed'))\n\n if (column.fixed) {\n classList.push(bem.is('fixed-' + column.fixed))\n }\n return classList.join(' ')\n }\n\n const getCellClass = (column: ColumnNode): string => {\n return getCommonClassName(column) + ` ${bem.is(column.align)}`\n }\n\n const getHeaderCellClass = (column: ColumnNode): string => {\n return getCommonClassName(column) + ` ${bem.is(column.headerAlign)}`\n }\n\n const getCellCtx = (\n row: TableRow,\n column: ColumnNode\n ): TableColumnSlotsScope | TableColumnRenderContext => {\n const rowData = row.data\n const val = column.key ? o(rowData).get(column.key) : undefined\n\n const ctx = {\n row,\n column,\n rowData,\n val,\n model: {\n modelValue: val,\n 'onUpdate:modelValue': (val: any) => {\n rowData[column.key] = val\n }\n }\n }\n\n return ctx\n }\n\n return {\n /**\n * 获取列插槽VNode\n * @param ctx 列渲染上下文\n */\n getColumnSlotsNode,\n /**\n * 获取表头插槽VNode\n * @param ctx 表头渲染上下文\n */\n getHeaderSlotsNode,\n /**\n * 获取展开行插槽VNode\n * @param ctx 展开行渲染上下文\n */\n getExpandRowSlotsNode,\n /**\n * 获取单元格类名\n * @param column 列\n */\n getCellClass,\n /**\n * 获取表头单元格类名\n * @param column 列\n */\n getHeaderCellClass,\n /**\n * 获取单元格上下文\n * @param row 行\n * @param column 列\n */\n getCellCtx\n }\n}\n"],"mappings":";;;;AAiCA,SAAgB,SAAS,SAAkC;CACzD,MAAM,EAAE,OAAO,KAAK,WAAW,eAAe;CAE9C,MAAM,QAAQ,UAAU;CAExB,MAAM,sBACJ,QACiB;EAGjB,MAAM,EAAE,QAAQ,QAFD,IAAI,OAAO;AAI1B,MAAI,OAAQ,QAAO,OAAO,IAAI;EAE9B,MAAM,cAAc,MAAM,QAAQ,UAAU,UAAU,MAAM,UAAU;AAEtE,MAAI,YAAa,QAAO,YAAY,IAAI;AAExC,SAAO,IAAI;;CAGb,MAAM,sBAAsB,QAA8C;EACxE,MAAM,SAAS,IAAI,OAAO;EAC1B,MAAM,EAAE,YAAY,QAAQ;AAE5B,MAAI,WAAY,QAAO,WAAW,IAAI;EAEtC,MAAM,cAAc,MAAM,QAAQ,UAAU,UAAU,MAAM,UAAU;AAEtE,MAAI,YAAa,QAAO,YAAY,IAAI;AAExC,SAAO,OAAO;;CAGhB,MAAM,yBAAyB,QAA0C;EACvE,MAAM,cAAc,MAAM,QAAQ,iBAAiB,MAAM;AAEzD,MAAI,YAAa,QAAO,YAAY,IAAI;AACxC,SAAO;;CAGT,MAAM,UAAU,IAAI,EAAE,OAAO;CAE7B,MAAM,sBAAsB,WAA+B;EACzD,MAAM,YAAsB,CAAC,QAAQ;AAErC,YAAU,SAAS,OAAO,eAAe,UAAU,KAAK,IAAI,GAAG,aAAa,CAAC;AAE7E,aAAW,SAAS,OAAO,gBAAgB,UAAU,KAAK,IAAI,GAAG,cAAc,CAAC;AAEhF,MAAI,OAAO,MACT,WAAU,KAAK,IAAI,GAAG,WAAW,OAAO,MAAM,CAAC;AAEjD,SAAO,UAAU,KAAK,IAAI
|
|
1
|
+
{"version":3,"file":"use-table.js","names":[],"sources":["../../../src/components/table/use-table.ts"],"sourcesContent":["import { o } from '@cat-kit/core'\nimport { bem, type BEM } from '@veltra/utils'\nimport { useSlots, watch, type Ref } from 'vue'\n\nimport type {\n TableColumnRenderContext,\n TableColumnSlotsScope,\n TableProps,\n TableRow,\n RenderReturn,\n TableRowSlotsScope\n} from '../../types'\nimport type { ColumnNode } from './node/col'\n\ninterface Options {\n props: TableProps\n cls: BEM<'table'>\n leftFixed: Ref<boolean>\n rightFixed: Ref<boolean>\n}\n\ninterface UseTableReturn {\n getColumnSlotsNode: (ctx: TableColumnSlotsScope | TableColumnRenderContext) => RenderReturn\n getHeaderSlotsNode: (ctx: { column: ColumnNode }) => RenderReturn\n getExpandRowSlotsNode: (ctx: TableRowSlotsScope) => RenderReturn\n getCellClass: (column: ColumnNode) => string\n getHeaderCellClass: (column: ColumnNode) => string\n getCellCtx: (\n row: TableRow,\n column: ColumnNode\n ) => TableColumnSlotsScope | TableColumnRenderContext\n}\n\nexport function useTable(options: Options): UseTableReturn {\n const { props, cls, leftFixed, rightFixed } = options\n\n const slots = useSlots()\n\n const getColumnSlotsNode = (\n ctx: TableColumnSlotsScope | TableColumnRenderContext\n ): RenderReturn => {\n const column = ctx.column.data\n\n const { render, key } = column\n\n if (render) return render(ctx)\n\n const slotsRender = props.slots?.[`column:${key}`] ?? slots[`column:${key}`]\n\n if (slotsRender) return slotsRender(ctx)\n\n return ctx.val\n }\n\n const getHeaderSlotsNode = (ctx: { column: ColumnNode }): RenderReturn => {\n const column = ctx.column.data\n const { nameRender, key } = column\n\n if (nameRender) return nameRender(ctx)\n\n const slotsRender = props.slots?.[`header:${key}`] ?? slots[`header:${key}`]\n\n if (slotsRender) return slotsRender(ctx)\n\n return column.name\n }\n\n const getExpandRowSlotsNode = (ctx: TableRowSlotsScope): RenderReturn => {\n const slotsRender = props.slots?.['row:expand'] ?? slots['row:expand']\n\n if (slotsRender) return slotsRender(ctx)\n return null\n }\n\n const cellCls = cls.e('cell')\n\n const getCommonClassName = (column: ColumnNode): string => {\n const classList: string[] = [cellCls]\n\n leftFixed.value && column.isLastFixed && classList.push(bem.is('last-fixed'))\n\n rightFixed.value && column.isFirstFixed && classList.push(bem.is('first-fixed'))\n\n if (column.fixed) {\n classList.push(bem.is('fixed-' + column.fixed))\n }\n return classList.join(' ')\n }\n\n /**\n * B1: 单元格类名按 ColumnNode 身份缓存。\n *\n * 对同一列,类名只取决于 (column.fixed, column.isLastFixed, column.isFirstFixed,\n * column.align, leftFixed, rightFixed)。其中前四个绑定在 ColumnNode 实例上,\n * 后两个在 leftFixed/rightFixed 变化时失效缓存即可。用 WeakMap 以 ColumnNode\n * 为键可避免字符串 key 的拼接/哈希开销,且列树重建时节点随 GC 自动释放。\n */\n let cellClassCache = new WeakMap<ColumnNode, string>()\n let headerCellClassCache = new WeakMap<ColumnNode, string>()\n\n watch([leftFixed, rightFixed], () => {\n cellClassCache = new WeakMap()\n headerCellClassCache = new WeakMap()\n })\n\n const getCellClass = (column: ColumnNode): string => {\n const cached = cellClassCache.get(column)\n if (cached !== undefined) return cached\n const result = getCommonClassName(column) + ` ${bem.is(column.align)}`\n cellClassCache.set(column, result)\n return result\n }\n\n const getHeaderCellClass = (column: ColumnNode): string => {\n const cached = headerCellClassCache.get(column)\n if (cached !== undefined) return cached\n const result = getCommonClassName(column) + ` ${bem.is(column.headerAlign)}`\n headerCellClassCache.set(column, result)\n return result\n }\n\n const getCellCtx = (\n row: TableRow,\n column: ColumnNode\n ): TableColumnSlotsScope | TableColumnRenderContext => {\n const rowData = row.data\n const val = column.key ? o(rowData).get(column.key) : undefined\n\n const ctx = {\n row,\n column,\n rowData,\n val,\n model: {\n modelValue: val,\n 'onUpdate:modelValue': (val: any) => {\n rowData[column.key] = val\n }\n }\n }\n\n return ctx\n }\n\n return {\n /**\n * 获取列插槽VNode\n * @param ctx 列渲染上下文\n */\n getColumnSlotsNode,\n /**\n * 获取表头插槽VNode\n * @param ctx 表头渲染上下文\n */\n getHeaderSlotsNode,\n /**\n * 获取展开行插槽VNode\n * @param ctx 展开行渲染上下文\n */\n getExpandRowSlotsNode,\n /**\n * 获取单元格类名\n * @param column 列\n */\n getCellClass,\n /**\n * 获取表头单元格类名\n * @param column 列\n */\n getHeaderCellClass,\n /**\n * 获取单元格上下文\n * @param row 行\n * @param column 列\n */\n getCellCtx\n }\n}\n"],"mappings":";;;;AAiCA,SAAgB,SAAS,SAAkC;CACzD,MAAM,EAAE,OAAO,KAAK,WAAW,eAAe;CAE9C,MAAM,QAAQ,UAAU;CAExB,MAAM,sBACJ,QACiB;EAGjB,MAAM,EAAE,QAAQ,QAFD,IAAI,OAAO;AAI1B,MAAI,OAAQ,QAAO,OAAO,IAAI;EAE9B,MAAM,cAAc,MAAM,QAAQ,UAAU,UAAU,MAAM,UAAU;AAEtE,MAAI,YAAa,QAAO,YAAY,IAAI;AAExC,SAAO,IAAI;;CAGb,MAAM,sBAAsB,QAA8C;EACxE,MAAM,SAAS,IAAI,OAAO;EAC1B,MAAM,EAAE,YAAY,QAAQ;AAE5B,MAAI,WAAY,QAAO,WAAW,IAAI;EAEtC,MAAM,cAAc,MAAM,QAAQ,UAAU,UAAU,MAAM,UAAU;AAEtE,MAAI,YAAa,QAAO,YAAY,IAAI;AAExC,SAAO,OAAO;;CAGhB,MAAM,yBAAyB,QAA0C;EACvE,MAAM,cAAc,MAAM,QAAQ,iBAAiB,MAAM;AAEzD,MAAI,YAAa,QAAO,YAAY,IAAI;AACxC,SAAO;;CAGT,MAAM,UAAU,IAAI,EAAE,OAAO;CAE7B,MAAM,sBAAsB,WAA+B;EACzD,MAAM,YAAsB,CAAC,QAAQ;AAErC,YAAU,SAAS,OAAO,eAAe,UAAU,KAAK,IAAI,GAAG,aAAa,CAAC;AAE7E,aAAW,SAAS,OAAO,gBAAgB,UAAU,KAAK,IAAI,GAAG,cAAc,CAAC;AAEhF,MAAI,OAAO,MACT,WAAU,KAAK,IAAI,GAAG,WAAW,OAAO,MAAM,CAAC;AAEjD,SAAO,UAAU,KAAK,IAAI;;;;;;;;;;CAW5B,IAAI,iCAAiB,IAAI,SAA6B;CACtD,IAAI,uCAAuB,IAAI,SAA6B;AAE5D,OAAM,CAAC,WAAW,WAAW,QAAQ;AACnC,mCAAiB,IAAI,SAAS;AAC9B,yCAAuB,IAAI,SAAS;GACpC;CAEF,MAAM,gBAAgB,WAA+B;EACnD,MAAM,SAAS,eAAe,IAAI,OAAO;AACzC,MAAI,WAAW,KAAA,EAAW,QAAO;EACjC,MAAM,SAAS,mBAAmB,OAAO,GAAG,IAAI,IAAI,GAAG,OAAO,MAAM;AACpE,iBAAe,IAAI,QAAQ,OAAO;AAClC,SAAO;;CAGT,MAAM,sBAAsB,WAA+B;EACzD,MAAM,SAAS,qBAAqB,IAAI,OAAO;AAC/C,MAAI,WAAW,KAAA,EAAW,QAAO;EACjC,MAAM,SAAS,mBAAmB,OAAO,GAAG,IAAI,IAAI,GAAG,OAAO,YAAY;AAC1E,uBAAqB,IAAI,QAAQ,OAAO;AACxC,SAAO;;CAGT,MAAM,cACJ,KACA,WACqD;EACrD,MAAM,UAAU,IAAI;EACpB,MAAM,MAAM,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAI,OAAO,IAAI,GAAG,KAAA;AAetD,SAbY;GACV;GACA;GACA;GACA;GACA,OAAO;IACL,YAAY;IACZ,wBAAwB,QAAa;AACnC,aAAQ,OAAO,OAAO;;IAEzB;GACF;;AAKH,QAAO;EAKL;EAKA;EAKA;EAKA;EAKA;EAMA;EACD"}
|
|
@@ -15,152 +15,214 @@
|
|
|
15
15
|
* --u-height-small: 24px;
|
|
16
16
|
*/
|
|
17
17
|
/** 暗色:data-theme 与系统偏好,与 UITheme.injectBuiltInThemes 选择器策略一致 */
|
|
18
|
+
/** shadcn 风格 TabsList:hover 背景底色容器 + 白底活动态;rounded=true 时水平为胶囊状。 */
|
|
19
|
+
/* ===== 复合标签页:bar + content 布局容器 ===== */
|
|
18
20
|
.u-tabs {
|
|
19
21
|
display: flex;
|
|
20
|
-
|
|
21
|
-
.u-tabs__header {
|
|
22
|
-
flex-shrink: 0;
|
|
22
|
+
gap: var(--u-gap-small);
|
|
23
23
|
}
|
|
24
24
|
.u-tabs__content {
|
|
25
|
-
flex
|
|
25
|
+
flex: 1 1 auto;
|
|
26
|
+
width: 100%;
|
|
27
|
+
min-height: 0;
|
|
28
|
+
border-radius: var(--u-radius-default);
|
|
26
29
|
}
|
|
27
|
-
.u-
|
|
28
|
-
|
|
29
|
-
font-weight: 600;
|
|
30
|
-
letter-spacing: 1px;
|
|
31
|
-
color: var(--u-text-color-main);
|
|
32
|
-
user-select: none;
|
|
33
|
-
position: relative;
|
|
30
|
+
.u-tabs--top {
|
|
31
|
+
flex-direction: column;
|
|
34
32
|
}
|
|
35
|
-
.u-
|
|
36
|
-
|
|
37
|
-
position: absolute;
|
|
38
|
-
background-color: var(--u-color-primary);
|
|
39
|
-
transition-duration: 0.25s;
|
|
40
|
-
transition-property: transform;
|
|
41
|
-
transition-timing-function: cubic-bezier(0.35, 0, 0.25, 1);
|
|
33
|
+
.u-tabs--bottom {
|
|
34
|
+
flex-direction: column-reverse;
|
|
42
35
|
}
|
|
43
|
-
.u-
|
|
44
|
-
|
|
45
|
-
justify-content: flex-start;
|
|
46
|
-
align-items: center;
|
|
47
|
-
flex-wrap: nowrap;
|
|
36
|
+
.u-tabs--left {
|
|
37
|
+
flex-direction: row;
|
|
48
38
|
}
|
|
49
|
-
.u-
|
|
50
|
-
|
|
51
|
-
cursor: not-allowed;
|
|
39
|
+
.u-tabs--left .u-tabs__content {
|
|
40
|
+
height: 100%;
|
|
52
41
|
}
|
|
53
|
-
.u-
|
|
54
|
-
|
|
42
|
+
.u-tabs--right {
|
|
43
|
+
flex-direction: row-reverse;
|
|
55
44
|
}
|
|
56
|
-
.u-
|
|
57
|
-
|
|
58
|
-
transition-property: width, margin-left;
|
|
59
|
-
transition-duration: 0.25s;
|
|
60
|
-
margin-left: 0;
|
|
45
|
+
.u-tabs--right .u-tabs__content {
|
|
46
|
+
height: 100%;
|
|
61
47
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
|
|
49
|
+
/* ===== 标签栏(独立组件):水平 / 垂直 ===== */
|
|
50
|
+
.u-tabs-bar {
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-self: flex-start;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
min-width: 0;
|
|
55
|
+
padding: 0 4px;
|
|
56
|
+
background-color: var(--u-bg-color-hover);
|
|
57
|
+
border-radius: var(--u-radius-default);
|
|
58
|
+
gap: 2px;
|
|
66
59
|
}
|
|
67
|
-
.u-tabs
|
|
68
|
-
display: flex;
|
|
69
|
-
justify-content: flex-start;
|
|
60
|
+
.u-tabs-bar--horizontal {
|
|
70
61
|
align-items: center;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
.u-tabs--top .u-tabs__header-item::after, .u-tabs--bottom .u-tabs__header-item::after {
|
|
74
|
-
bottom: 0;
|
|
75
|
-
left: 0;
|
|
76
|
-
height: 2px;
|
|
77
|
-
width: 100%;
|
|
78
|
-
transform: scaleX(0);
|
|
79
|
-
}
|
|
80
|
-
.u-tabs--top .u-tabs__header-item.is-active::after, .u-tabs--bottom .u-tabs__header-item.is-active::after {
|
|
81
|
-
transform: scaleX(1);
|
|
62
|
+
position: relative;
|
|
63
|
+
flex-shrink: 0;
|
|
82
64
|
}
|
|
83
|
-
.u-tabs--
|
|
65
|
+
.u-tabs-bar--vertical {
|
|
84
66
|
flex-direction: column;
|
|
85
67
|
}
|
|
86
|
-
.u-tabs
|
|
87
|
-
|
|
68
|
+
.u-tabs-bar__viewport {
|
|
69
|
+
flex: 1 1 auto;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
padding: 4px 0;
|
|
72
|
+
overflow-x: auto;
|
|
73
|
+
overflow-y: hidden;
|
|
74
|
+
scrollbar-width: none;
|
|
88
75
|
}
|
|
89
|
-
.u-tabs
|
|
90
|
-
|
|
76
|
+
.u-tabs-bar__viewport::-webkit-scrollbar {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
.u-tabs-bar__list {
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
flex-wrap: nowrap;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
width: max-content;
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 0;
|
|
86
|
+
gap: 2px;
|
|
91
87
|
}
|
|
92
|
-
.u-tabs
|
|
93
|
-
|
|
88
|
+
.u-tabs-bar__item {
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
font-weight: 500;
|
|
91
|
+
letter-spacing: 0.25px;
|
|
92
|
+
color: var(--u-text-color-main);
|
|
93
|
+
user-select: none;
|
|
94
|
+
position: relative;
|
|
95
|
+
border-radius: calc(var(--u-radius-default) - 2px);
|
|
96
|
+
background-color: transparent;
|
|
97
|
+
box-shadow: none;
|
|
98
|
+
border: none;
|
|
99
|
+
outline: none;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
display: inline-flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
gap: 0;
|
|
105
|
+
transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
|
|
94
106
|
}
|
|
95
|
-
.u-tabs
|
|
96
|
-
|
|
107
|
+
.u-tabs-bar__item:not(.is-active):not(.is-disabled):hover {
|
|
108
|
+
color: var(--u-text-color-title);
|
|
97
109
|
}
|
|
98
|
-
.u-tabs
|
|
99
|
-
|
|
110
|
+
.u-tabs-bar__item.is-disabled {
|
|
111
|
+
color: var(--u-text-color-disabled);
|
|
112
|
+
cursor: not-allowed;
|
|
100
113
|
}
|
|
101
|
-
.u-tabs
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
transform: scaleY(0);
|
|
114
|
+
.u-tabs-bar__item.is-active {
|
|
115
|
+
color: var(--u-text-color-title);
|
|
116
|
+
background-color: var(--u-bg-color-top);
|
|
117
|
+
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
|
|
106
118
|
}
|
|
107
|
-
.u-tabs
|
|
108
|
-
|
|
119
|
+
.u-tabs-bar__item-label {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
min-width: 0;
|
|
109
123
|
}
|
|
110
|
-
.u-tabs
|
|
111
|
-
|
|
124
|
+
.u-tabs-bar__close {
|
|
125
|
+
flex: 0 0 auto;
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
width: 16px;
|
|
130
|
+
height: 16px;
|
|
131
|
+
margin-left: 6px;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
padding: 0;
|
|
134
|
+
border: none;
|
|
135
|
+
background: transparent;
|
|
136
|
+
color: var(--u-text-color-secondary);
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
border-radius: var(--u-radius-default);
|
|
139
|
+
font-size: 12px;
|
|
140
|
+
line-height: 1;
|
|
141
|
+
transition: width 0.18s ease, margin-left 0.18s ease, opacity 0.18s ease, transform 0.18s ease, color 0.15s ease, background-color 0.15s ease;
|
|
112
142
|
}
|
|
113
|
-
.u-tabs
|
|
114
|
-
|
|
115
|
-
|
|
143
|
+
.u-tabs-bar__close:hover {
|
|
144
|
+
color: var(--u-text-color-title);
|
|
145
|
+
background-color: rgba(15, 23, 42, 0.08);
|
|
116
146
|
}
|
|
117
|
-
.u-tabs
|
|
118
|
-
|
|
147
|
+
.u-tabs-bar__close:active {
|
|
148
|
+
background-color: rgba(15, 23, 42, 0.14);
|
|
119
149
|
}
|
|
120
|
-
.u-tabs--
|
|
121
|
-
|
|
150
|
+
.u-tabs-bar--horizontal .u-tabs-bar__item .u-tabs-bar__close {
|
|
151
|
+
width: 0;
|
|
152
|
+
margin-left: 0;
|
|
153
|
+
opacity: 0;
|
|
154
|
+
transform: scale(0.6);
|
|
155
|
+
pointer-events: none;
|
|
156
|
+
}
|
|
157
|
+
.u-tabs-bar--horizontal .u-tabs-bar__item:hover .u-tabs-bar__close {
|
|
158
|
+
width: 16px;
|
|
159
|
+
margin-left: 6px;
|
|
160
|
+
opacity: 1;
|
|
161
|
+
transform: scale(1);
|
|
162
|
+
pointer-events: auto;
|
|
163
|
+
}
|
|
164
|
+
.u-tabs-bar--vertical .u-tabs-bar__item {
|
|
165
|
+
justify-content: space-between;
|
|
166
|
+
}
|
|
167
|
+
.u-tabs-bar__nav {
|
|
168
|
+
flex: 0 0 auto;
|
|
169
|
+
display: inline-flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
justify-content: center;
|
|
172
|
+
padding: 0;
|
|
173
|
+
border: none;
|
|
174
|
+
background: transparent;
|
|
175
|
+
color: var(--u-text-color-main);
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
user-select: none;
|
|
178
|
+
border-radius: calc(var(--u-radius-default) - 2px);
|
|
179
|
+
transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
|
|
122
180
|
}
|
|
123
|
-
.u-tabs
|
|
124
|
-
|
|
181
|
+
.u-tabs-bar__nav:hover:not(:disabled) {
|
|
182
|
+
color: var(--u-text-color-title);
|
|
183
|
+
background-color: var(--u-bg-color-top);
|
|
184
|
+
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
|
|
125
185
|
}
|
|
126
|
-
.u-tabs
|
|
127
|
-
|
|
186
|
+
.u-tabs-bar__nav:disabled {
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
opacity: 0.4;
|
|
128
189
|
}
|
|
129
|
-
.u-tabs
|
|
130
|
-
|
|
190
|
+
.u-tabs-bar.is-block {
|
|
191
|
+
display: flex;
|
|
192
|
+
width: 100%;
|
|
193
|
+
max-width: 100%;
|
|
194
|
+
align-self: stretch;
|
|
131
195
|
}
|
|
132
|
-
.u-tabs--small .u-
|
|
133
|
-
height: var(--u-form-component-height-small);
|
|
196
|
+
.u-tabs-bar--small .u-tabs-bar__item {
|
|
197
|
+
height: calc(var(--u-form-component-height-small) - 4px);
|
|
134
198
|
padding: 0 var(--u-gap-small);
|
|
135
199
|
}
|
|
136
|
-
.u-tabs--small .u-
|
|
137
|
-
width: var(--u-
|
|
138
|
-
|
|
200
|
+
.u-tabs-bar--small .u-tabs-bar__nav {
|
|
201
|
+
width: calc(var(--u-form-component-height-small) - 4px);
|
|
202
|
+
height: calc(var(--u-form-component-height-small) - 4px);
|
|
139
203
|
}
|
|
140
|
-
.u-tabs--default .u-
|
|
141
|
-
height: var(--u-form-component-height-default);
|
|
204
|
+
.u-tabs-bar--default .u-tabs-bar__item {
|
|
205
|
+
height: calc(var(--u-form-component-height-default) - 4px);
|
|
142
206
|
padding: 0 var(--u-gap-default);
|
|
143
207
|
}
|
|
144
|
-
.u-tabs--default .u-
|
|
145
|
-
width: var(--u-
|
|
146
|
-
|
|
208
|
+
.u-tabs-bar--default .u-tabs-bar__nav {
|
|
209
|
+
width: calc(var(--u-form-component-height-default) - 4px);
|
|
210
|
+
height: calc(var(--u-form-component-height-default) - 4px);
|
|
147
211
|
}
|
|
148
|
-
.u-tabs--large .u-
|
|
149
|
-
height: var(--u-form-component-height-large);
|
|
212
|
+
.u-tabs-bar--large .u-tabs-bar__item {
|
|
213
|
+
height: calc(var(--u-form-component-height-large) - 4px);
|
|
150
214
|
padding: 0 var(--u-gap-large);
|
|
151
215
|
}
|
|
152
|
-
.u-tabs--large .u-
|
|
153
|
-
width: var(--u-
|
|
154
|
-
|
|
216
|
+
.u-tabs-bar--large .u-tabs-bar__nav {
|
|
217
|
+
width: calc(var(--u-form-component-height-large) - 4px);
|
|
218
|
+
height: calc(var(--u-form-component-height-large) - 4px);
|
|
155
219
|
}
|
|
156
|
-
.u-tabs
|
|
157
|
-
|
|
220
|
+
.u-tabs-bar.is-rounded .u-tabs-bar__item {
|
|
221
|
+
border-radius: 9999px;
|
|
158
222
|
}
|
|
159
|
-
.u-
|
|
160
|
-
|
|
161
|
-
border-radius: var(--u-radius-default);
|
|
223
|
+
.u-tabs-bar.is-rounded .u-tabs-bar__nav {
|
|
224
|
+
border-radius: 9999px;
|
|
162
225
|
}
|
|
163
|
-
.u-
|
|
164
|
-
|
|
165
|
-
opacity: 0.1;
|
|
226
|
+
.u-tabs-bar--horizontal.is-rounded {
|
|
227
|
+
border-radius: 9999px;
|
|
166
228
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icon/icon.js";
|
|
2
|
+
import { useTabsBar } from "./use-tabs-bar.js";
|
|
3
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, renderList, shallowRef, toDisplayString, unref, useModel, vShow, withCtx, withDirectives, withModifiers } from "vue";
|
|
4
|
+
import { bem } from "@veltra/utils";
|
|
5
|
+
import { useFallbackProps } from "@veltra/compositions";
|
|
6
|
+
import { ArrowLeft, ArrowRight, Close } from "@veltra/icons/normal";
|
|
7
|
+
//#region src/components/tabs/tabs-horizontal.vue
|
|
8
|
+
const _hoisted_1 = ["disabled"];
|
|
9
|
+
const _hoisted_2 = ["onClick"];
|
|
10
|
+
const _hoisted_3 = ["aria-label", "onClick"];
|
|
11
|
+
const _hoisted_4 = ["disabled"];
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
name: "TabsHorizontal",
|
|
14
|
+
__name: "tabs-horizontal",
|
|
15
|
+
props: /* @__PURE__ */ mergeModels({
|
|
16
|
+
size: {},
|
|
17
|
+
modelValue: {},
|
|
18
|
+
items: {},
|
|
19
|
+
closable: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
block: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
rounded: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
position: { default: "top" }
|
|
32
|
+
}, {
|
|
33
|
+
"modelValue": {},
|
|
34
|
+
"modelModifiers": {}
|
|
35
|
+
}),
|
|
36
|
+
emits: /* @__PURE__ */ mergeModels([
|
|
37
|
+
"update:modelValue",
|
|
38
|
+
"click",
|
|
39
|
+
"close"
|
|
40
|
+
], ["update:modelValue"]),
|
|
41
|
+
setup(__props, { emit: __emit }) {
|
|
42
|
+
const props = __props;
|
|
43
|
+
const emit = __emit;
|
|
44
|
+
const { size } = useFallbackProps([props], { size: "default" });
|
|
45
|
+
const cls = bem("tabs-bar");
|
|
46
|
+
const model = useModel(__props, "modelValue");
|
|
47
|
+
const viewportRef = shallowRef();
|
|
48
|
+
const listRef = shallowRef();
|
|
49
|
+
const { showNav, canPrev, canNext, scrollByStep } = useTabsBar({
|
|
50
|
+
viewportRef,
|
|
51
|
+
listRef,
|
|
52
|
+
items: computed(() => props.items),
|
|
53
|
+
model
|
|
54
|
+
});
|
|
55
|
+
const isItemClosable = (item) => {
|
|
56
|
+
if (item.disabled) return false;
|
|
57
|
+
return item.closable ?? props.closable;
|
|
58
|
+
};
|
|
59
|
+
const handleClick = (item, index) => {
|
|
60
|
+
if (item.disabled) return;
|
|
61
|
+
model.value = item.key;
|
|
62
|
+
emit("click", item, index);
|
|
63
|
+
};
|
|
64
|
+
const handleClose = (item, index) => {
|
|
65
|
+
if (item.disabled) return;
|
|
66
|
+
emit("close", item, index);
|
|
67
|
+
};
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([
|
|
70
|
+
unref(cls).b,
|
|
71
|
+
unref(cls).m("horizontal"),
|
|
72
|
+
unref(cls).m(__props.position),
|
|
73
|
+
unref(cls).m(unref(size)),
|
|
74
|
+
unref(bem).is("block", __props.block),
|
|
75
|
+
unref(bem).is("rounded", __props.rounded)
|
|
76
|
+
]) }, [
|
|
77
|
+
withDirectives(createElementVNode("button", {
|
|
78
|
+
type: "button",
|
|
79
|
+
class: normalizeClass([unref(cls).e("nav"), unref(cls).em("nav", "prev")]),
|
|
80
|
+
disabled: !unref(canPrev),
|
|
81
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(scrollByStep)(-1))
|
|
82
|
+
}, [createVNode(unref(_sfc_main$1), null, {
|
|
83
|
+
default: withCtx(() => [createVNode(unref(ArrowLeft))]),
|
|
84
|
+
_: 1
|
|
85
|
+
})], 10, _hoisted_1), [[vShow, unref(showNav)]]),
|
|
86
|
+
createElementVNode("div", {
|
|
87
|
+
ref_key: "viewportRef",
|
|
88
|
+
ref: viewportRef,
|
|
89
|
+
class: normalizeClass(unref(cls).e("viewport"))
|
|
90
|
+
}, [createElementVNode("div", {
|
|
91
|
+
ref_key: "listRef",
|
|
92
|
+
ref: listRef,
|
|
93
|
+
class: normalizeClass(unref(cls).e("list"))
|
|
94
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
95
|
+
return openBlock(), createElementBlock("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
role: "tab",
|
|
98
|
+
key: item.key,
|
|
99
|
+
class: normalizeClass([
|
|
100
|
+
unref(cls).e("item"),
|
|
101
|
+
unref(bem).is("active", model.value === item.key),
|
|
102
|
+
unref(bem).is("disabled", item.disabled === true)
|
|
103
|
+
]),
|
|
104
|
+
onClick: withModifiers(($event) => handleClick(item, index), ["stop"])
|
|
105
|
+
}, [createElementVNode("span", { class: normalizeClass(unref(cls).e("item-label")) }, toDisplayString(item.name ?? item.key), 3), isItemClosable(item) ? (openBlock(), createElementBlock("span", {
|
|
106
|
+
key: 0,
|
|
107
|
+
role: "button",
|
|
108
|
+
tabindex: "0",
|
|
109
|
+
class: normalizeClass(unref(cls).e("close")),
|
|
110
|
+
"aria-label": `close ${item.name ?? item.key}`,
|
|
111
|
+
onClick: withModifiers(($event) => handleClose(item, index), ["stop"])
|
|
112
|
+
}, [createVNode(unref(_sfc_main$1), null, {
|
|
113
|
+
default: withCtx(() => [createVNode(unref(Close))]),
|
|
114
|
+
_: 1
|
|
115
|
+
})], 10, _hoisted_3)) : createCommentVNode("v-if", true)], 10, _hoisted_2);
|
|
116
|
+
}), 128))], 2)], 2),
|
|
117
|
+
withDirectives(createElementVNode("button", {
|
|
118
|
+
type: "button",
|
|
119
|
+
class: normalizeClass([unref(cls).e("nav"), unref(cls).em("nav", "next")]),
|
|
120
|
+
disabled: !unref(canNext),
|
|
121
|
+
onClick: _cache[1] || (_cache[1] = ($event) => unref(scrollByStep)(1))
|
|
122
|
+
}, [createVNode(unref(_sfc_main$1), null, {
|
|
123
|
+
default: withCtx(() => [createVNode(unref(ArrowRight))]),
|
|
124
|
+
_: 1
|
|
125
|
+
})], 10, _hoisted_4), [[vShow, unref(showNav)]])
|
|
126
|
+
], 2);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
//#endregion
|
|
131
|
+
export { _sfc_main as default };
|
|
132
|
+
|
|
133
|
+
//# sourceMappingURL=tabs-horizontal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-horizontal.js","names":[],"sources":["../../../src/components/tabs/tabs-horizontal.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n cls.b,\n cls.m('horizontal'),\n cls.m(position),\n cls.m(size),\n bem.is('block', block),\n bem.is('rounded', rounded)\n ]\"\n >\n <button\n v-show=\"showNav\"\n type=\"button\"\n :class=\"[cls.e('nav'), cls.em('nav', 'prev')]\"\n :disabled=\"!canPrev\"\n @click=\"scrollByStep(-1)\"\n >\n <u-icon>\n <ArrowLeft />\n </u-icon>\n </button>\n\n <div ref=\"viewportRef\" :class=\"cls.e('viewport')\">\n <div ref=\"listRef\" :class=\"cls.e('list')\">\n <button\n type=\"button\"\n role=\"tab\"\n v-for=\"(item, index) in items\"\n :key=\"item.key\"\n :class=\"[\n cls.e('item'),\n bem.is('active', model === item.key),\n bem.is('disabled', item.disabled === true)\n ]\"\n @click.stop=\"handleClick(item, index)\"\n >\n <span :class=\"cls.e('item-label')\">{{ item.name ?? item.key }}</span>\n <span\n v-if=\"isItemClosable(item)\"\n role=\"button\"\n tabindex=\"0\"\n :class=\"cls.e('close')\"\n :aria-label=\"`close ${item.name ?? item.key}`\"\n @click.stop=\"handleClose(item, index)\"\n >\n <u-icon>\n <Close />\n </u-icon>\n </span>\n </button>\n </div>\n </div>\n\n <button\n v-show=\"showNav\"\n type=\"button\"\n :class=\"[cls.e('nav'), cls.em('nav', 'next')]\"\n :disabled=\"!canNext\"\n @click=\"scrollByStep(1)\"\n >\n <u-icon>\n <ArrowRight />\n </u-icon>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { ArrowLeft, ArrowRight, Close } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, shallowRef } from 'vue'\n\nimport type { ComponentSize, TabItem, TabsHorizontalEmits, TabsHorizontalProps } from '../../types'\nimport { UIcon } from '../icon'\nimport { useTabsBar } from './use-tabs-bar'\n\ndefineOptions({ name: 'TabsHorizontal' })\n\nconst props = withDefaults(defineProps<TabsHorizontalProps>(), {\n position: 'top',\n closable: false,\n block: false,\n rounded: false\n})\n\nconst emit = defineEmits<TabsHorizontalEmits>()\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst cls = bem('tabs-bar')\n\nconst model = defineModel<string>()\n\nconst viewportRef = shallowRef<HTMLElement>()\nconst listRef = shallowRef<HTMLElement>()\n\nconst itemsRef = computed(() => props.items)\n\nconst { showNav, canPrev, canNext, scrollByStep } = useTabsBar({\n viewportRef,\n listRef,\n items: itemsRef,\n model\n})\n\nconst isItemClosable = (item: TabItem) => {\n if (item.disabled) return false\n return item.closable ?? props.closable\n}\n\nconst handleClick = (item: TabItem, index: number) => {\n if (item.disabled) return\n model.value = item.key\n emit('click', item, index)\n}\n\nconst handleClose = (item: TabItem, index: number) => {\n if (item.disabled) return\n emit('close', item, index)\n}\n</script>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TabItem, TabsHorizontalProps } from "../../types/tabs.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tabs/tabs-horizontal.vue.d.ts
|
|
5
|
+
type __VLS_Props = TabsHorizontalProps;
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
12
|
+
} & {
|
|
13
|
+
click: (item: TabItem, index: number) => any;
|
|
14
|
+
"update:modelValue": (value: string) => any;
|
|
15
|
+
close: (item: TabItem, index: number) => any;
|
|
16
|
+
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
block: boolean;
|
|
22
|
+
closable: boolean;
|
|
23
|
+
position: "top" | "bottom";
|
|
24
|
+
rounded: boolean;
|
|
25
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { _default };
|
|
29
|
+
//# sourceMappingURL=tabs-horizontal.vue.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icon/icon.js";
|
|
2
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, renderList, toDisplayString, unref, useModel, withCtx, withModifiers } from "vue";
|
|
3
|
+
import { bem } from "@veltra/utils";
|
|
4
|
+
import { useFallbackProps } from "@veltra/compositions";
|
|
5
|
+
import { Close } from "@veltra/icons/normal";
|
|
6
|
+
//#region src/components/tabs/tabs-vertical.vue
|
|
7
|
+
const _hoisted_1 = ["onClick"];
|
|
8
|
+
const _hoisted_2 = ["aria-label", "onClick"];
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "TabsVertical",
|
|
11
|
+
__name: "tabs-vertical",
|
|
12
|
+
props: /* @__PURE__ */ mergeModels({
|
|
13
|
+
size: {},
|
|
14
|
+
modelValue: {},
|
|
15
|
+
items: {},
|
|
16
|
+
closable: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
rounded: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
position: { default: "left" }
|
|
25
|
+
}, {
|
|
26
|
+
"modelValue": {},
|
|
27
|
+
"modelModifiers": {}
|
|
28
|
+
}),
|
|
29
|
+
emits: /* @__PURE__ */ mergeModels([
|
|
30
|
+
"update:modelValue",
|
|
31
|
+
"click",
|
|
32
|
+
"close"
|
|
33
|
+
], ["update:modelValue"]),
|
|
34
|
+
setup(__props, { emit: __emit }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const emit = __emit;
|
|
37
|
+
const { size } = useFallbackProps([props], { size: "default" });
|
|
38
|
+
const cls = bem("tabs-bar");
|
|
39
|
+
const model = useModel(__props, "modelValue");
|
|
40
|
+
const isItemClosable = (item) => {
|
|
41
|
+
if (item.disabled) return false;
|
|
42
|
+
return item.closable ?? props.closable;
|
|
43
|
+
};
|
|
44
|
+
const handleClick = (item, index) => {
|
|
45
|
+
if (item.disabled) return;
|
|
46
|
+
model.value = item.key;
|
|
47
|
+
emit("click", item, index);
|
|
48
|
+
};
|
|
49
|
+
const handleClose = (item, index) => {
|
|
50
|
+
if (item.disabled) return;
|
|
51
|
+
emit("close", item, index);
|
|
52
|
+
};
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([
|
|
55
|
+
unref(cls).b,
|
|
56
|
+
unref(cls).m("vertical"),
|
|
57
|
+
unref(cls).m(__props.position),
|
|
58
|
+
unref(cls).m(unref(size)),
|
|
59
|
+
unref(bem).is("rounded", __props.rounded)
|
|
60
|
+
]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
61
|
+
return openBlock(), createElementBlock("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
role: "tab",
|
|
64
|
+
key: item.key,
|
|
65
|
+
class: normalizeClass([
|
|
66
|
+
unref(cls).e("item"),
|
|
67
|
+
unref(bem).is("active", model.value === item.key),
|
|
68
|
+
unref(bem).is("disabled", item.disabled === true)
|
|
69
|
+
]),
|
|
70
|
+
onClick: withModifiers(($event) => handleClick(item, index), ["stop"])
|
|
71
|
+
}, [createElementVNode("span", { class: normalizeClass(unref(cls).e("item-label")) }, toDisplayString(item.name ?? item.key), 3), isItemClosable(item) ? (openBlock(), createElementBlock("span", {
|
|
72
|
+
key: 0,
|
|
73
|
+
role: "button",
|
|
74
|
+
tabindex: "0",
|
|
75
|
+
class: normalizeClass(unref(cls).e("close")),
|
|
76
|
+
"aria-label": `close ${item.name ?? item.key}`,
|
|
77
|
+
onClick: withModifiers(($event) => handleClose(item, index), ["stop"])
|
|
78
|
+
}, [createVNode(unref(_sfc_main$1), null, {
|
|
79
|
+
default: withCtx(() => [createVNode(unref(Close))]),
|
|
80
|
+
_: 1
|
|
81
|
+
})], 10, _hoisted_2)) : createCommentVNode("v-if", true)], 10, _hoisted_1);
|
|
82
|
+
}), 128))], 2);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
export { _sfc_main as default };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=tabs-vertical.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-vertical.js","names":[],"sources":["../../../src/components/tabs/tabs-vertical.vue"],"sourcesContent":["<template>\n <div\n :class=\"[cls.b, cls.m('vertical'), cls.m(position), cls.m(size), bem.is('rounded', rounded)]\"\n >\n <button\n type=\"button\"\n role=\"tab\"\n v-for=\"(item, index) in items\"\n :key=\"item.key\"\n :class=\"[\n cls.e('item'),\n bem.is('active', model === item.key),\n bem.is('disabled', item.disabled === true)\n ]\"\n @click.stop=\"handleClick(item, index)\"\n >\n <span :class=\"cls.e('item-label')\">{{ item.name ?? item.key }}</span>\n <span\n v-if=\"isItemClosable(item)\"\n role=\"button\"\n tabindex=\"0\"\n :class=\"cls.e('close')\"\n :aria-label=\"`close ${item.name ?? item.key}`\"\n @click.stop=\"handleClose(item, index)\"\n >\n <u-icon>\n <Close />\n </u-icon>\n </span>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { Close } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\n\nimport type { ComponentSize, TabItem, TabsVerticalEmits, TabsVerticalProps } from '../../types'\nimport { UIcon } from '../icon'\n\ndefineOptions({ name: 'TabsVertical' })\n\nconst props = withDefaults(defineProps<TabsVerticalProps>(), {\n position: 'left',\n closable: false,\n rounded: false\n})\n\nconst emit = defineEmits<TabsVerticalEmits>()\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst cls = bem('tabs-bar')\n\nconst model = defineModel<string>()\n\nconst isItemClosable = (item: TabItem) => {\n if (item.disabled) return false\n return item.closable ?? props.closable\n}\n\nconst handleClick = (item: TabItem, index: number) => {\n if (item.disabled) return\n model.value = item.key\n emit('click', item, index)\n}\n\nconst handleClose = (item: TabItem, index: number) => {\n if (item.disabled) return\n emit('close', item, index)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAMd,MAAM,OAAO;EAEb,MAAM,EAAE,SAAS,iBAAiB,CAAC,MAAM,EAAE,EACzC,MAAM,WACP,CAAA;EAED,MAAM,MAAM,IAAI,WAAU;EAE1B,MAAM,QAAQ,SAAmB,SAAA,aAAC;EAElC,MAAM,kBAAkB,SAAkB;AACxC,OAAI,KAAK,SAAU,QAAO;AAC1B,UAAO,KAAK,YAAY,MAAM;;EAGhC,MAAM,eAAe,MAAe,UAAkB;AACpD,OAAI,KAAK,SAAU;AACnB,SAAM,QAAQ,KAAK;AACnB,QAAK,SAAS,MAAM,MAAK;;EAG3B,MAAM,eAAe,MAAe,UAAkB;AACpD,OAAI,KAAK,SAAU;AACnB,QAAK,SAAS,MAAM,MAAK;;;uBAvEzB,mBA6BM,OAAA,EA5BH,OAAK,eAAA;IAAG,MAAA,IAAG,CAAC;IAAG,MAAA,IAAG,CAAC,EAAC,WAAA;IAAc,MAAA,IAAG,CAAC,EAAE,QAAA,SAAQ;IAAG,MAAA,IAAG,CAAC,EAAE,MAAA,KAAI,CAAA;IAAG,MAAA,IAAG,CAAC,GAAE,WAAY,QAAA,QAAO;IAAA,CAAA,EAAA,EAAA,EAAA,UAAA,KAAA,EAE1F,mBAyBS,UAAA,MAAA,WAtBiB,QAAA,QAAhB,MAAM,UAAK;wBAHrB,mBAyBS,UAAA;KAxBP,MAAK;KACL,MAAK;KAEJ,KAAK,KAAK;KACV,OAAK,eAAA;MAAY,MAAA,IAAG,CAAC,EAAC,OAAA;MAAkB,MAAA,IAAG,CAAC,GAAE,UAAW,MAAA,UAAU,KAAK,IAAG;MAAW,MAAA,IAAG,CAAC,GAAE,YAAa,KAAK,aAAQ,KAAA;;KAKtH,SAAK,eAAA,WAAO,YAAY,MAAM,MAAK,EAAA,CAAA,OAAA,CAAA;QAEpC,mBAAqE,QAAA,EAA9D,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,aAAA,CAAA,EAAA,EAAA,gBAAmB,KAAK,QAAQ,KAAK,IAAG,EAAA,EAAA,EAEnD,eAAe,KAAI,IAAA,WAAA,EAD3B,mBAWO,QAAA;;KATL,MAAK;KACL,UAAS;KACR,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,QAAA,CAAA;KACZ,cAAU,SAAW,KAAK,QAAQ,KAAK;KACvC,SAAK,eAAA,WAAO,YAAY,MAAM,MAAK,EAAA,CAAA,OAAA,CAAA;QAEpC,YAES,MAAA,YAAA,EAAA,MAAA;4BADE,CAAT,YAAS,MAAA,MAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TabItem, TabsVerticalProps } from "../../types/tabs.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tabs/tabs-vertical.vue.d.ts
|
|
5
|
+
type __VLS_Props = TabsVerticalProps;
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
12
|
+
} & {
|
|
13
|
+
click: (item: TabItem, index: number) => any;
|
|
14
|
+
"update:modelValue": (value: string) => any;
|
|
15
|
+
close: (item: TabItem, index: number) => any;
|
|
16
|
+
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
closable: boolean;
|
|
22
|
+
position: "left" | "right";
|
|
23
|
+
rounded: boolean;
|
|
24
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { _default };
|
|
28
|
+
//# sourceMappingURL=tabs-vertical.vue.d.ts.map
|