@soft-stech/bootsman-ui-shadcn 2.0.14 → 2.0.16
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/{BuiTableHeader.vue_vue_type_script_setup_true_lang-B6wyr0bg.js → BuiTableHeader.vue_vue_type_script_setup_true_lang-Di2FKUwD.js} +10 -12
- package/dist/components/input/BuiInput.vue.d.ts +3 -1
- package/dist/components/input/BuiPasswordInput.vue.d.ts +2 -0
- package/dist/components/input/index.js +151 -98
- package/dist/components/table/BuiTableHeader.js +1 -1
- package/dist/components/table/index.js +133 -128
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/input/BuiInput.vue +41 -1
- package/src/components/input/BuiPasswordInput.vue +15 -6
- package/src/components/table/BuiDataTable.vue +53 -49
- package/src/components/table/BuiTableHeader.vue +1 -3
- package/src/stories/BuiInput.stories.ts +20 -0
|
@@ -450,55 +450,59 @@ const handleHeaderCellSorting = (header: Header<TData, unknown>) => {
|
|
|
450
450
|
</BuiPopover>
|
|
451
451
|
</template>
|
|
452
452
|
<BuiTableHeader v-if="tableHeaders" :freeze-header="props.freezeHeader" ref="tableHeaderRef">
|
|
453
|
-
<
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
453
|
+
<BuiTableRow class="h-10">
|
|
454
|
+
<BuiTableHead
|
|
455
|
+
v-for="(header, index) in tableHeaders"
|
|
456
|
+
:key="header.id"
|
|
457
|
+
:id="`${header.id}_cell`"
|
|
458
|
+
:style="{
|
|
459
|
+
...getPinningStyle(header.column),
|
|
460
|
+
cursor: getHeaderCellSortingButton(header) ? 'pointer' : 'auto'
|
|
461
|
+
}"
|
|
462
|
+
:freeze-header="props.freezeHeader"
|
|
463
|
+
:can-resize="header.column.getCanResize() ? true : undefined"
|
|
464
|
+
@click="handleHeaderCellSorting(header)"
|
|
465
|
+
>
|
|
466
|
+
<FlexRender
|
|
467
|
+
v-if="!header.isPlaceholder"
|
|
468
|
+
:render="header.column.columnDef.header"
|
|
469
|
+
:props="header.getContext()"
|
|
470
|
+
/>
|
|
471
|
+
<div
|
|
472
|
+
v-if="
|
|
473
|
+
enableColumnResizing &&
|
|
474
|
+
index < tableHeaders.length - 1 &&
|
|
475
|
+
header.column.getCanResize()
|
|
476
|
+
"
|
|
477
|
+
@dblclick="resetCells"
|
|
478
|
+
@mousedown.self="
|
|
479
|
+
(e: Event) => handleResizeControlMouseDown(e, header.id, props.enableColumnResizing)
|
|
480
|
+
"
|
|
481
|
+
@click.stop
|
|
482
|
+
:className="
|
|
483
|
+
cn(
|
|
484
|
+
'resize-handler absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50',
|
|
485
|
+
isResizing && resizingCellId === header.id ? 'bg-primary opacity-50' : ''
|
|
486
|
+
)
|
|
487
|
+
"
|
|
488
|
+
/>
|
|
489
|
+
<template #actions>
|
|
490
|
+
<BuiContextMenuContent v-if="availableHeaderCellActions(header).length > 0">
|
|
491
|
+
<BuiContextMenuItem
|
|
492
|
+
v-for="(action, idx) in availableHeaderCellActions(header)"
|
|
493
|
+
@click="onHeaderCellAction(header, action)"
|
|
494
|
+
:key="idx"
|
|
495
|
+
>
|
|
496
|
+
{{
|
|
497
|
+
headerContextMenuTranslations && headerContextMenuTranslations[action]
|
|
498
|
+
? headerContextMenuTranslations[action]
|
|
499
|
+
: defaultColumnContextMenuTranslations[action]
|
|
500
|
+
}}
|
|
501
|
+
</BuiContextMenuItem>
|
|
502
|
+
</BuiContextMenuContent>
|
|
503
|
+
</template>
|
|
504
|
+
</BuiTableHead>
|
|
505
|
+
</BuiTableRow>
|
|
502
506
|
</BuiTableHeader>
|
|
503
507
|
<BuiTableBody>
|
|
504
508
|
<template v-if="table.getRowModel().rows?.length">
|
|
@@ -69,3 +69,23 @@ export const ColorPicker: Story = {
|
|
|
69
69
|
`
|
|
70
70
|
})
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
export const Search: Story = {
|
|
74
|
+
render: (args) => ({
|
|
75
|
+
components: { BuiInput },
|
|
76
|
+
setup() {
|
|
77
|
+
args = {
|
|
78
|
+
...args,
|
|
79
|
+
type: 'search',
|
|
80
|
+
placeholder: 'Filter'
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return { args }
|
|
84
|
+
},
|
|
85
|
+
template: `
|
|
86
|
+
<div class="grid w-full max-w-sm items-center gap-1.5">
|
|
87
|
+
<BuiInput id="search" v-bind="args" />
|
|
88
|
+
</div>
|
|
89
|
+
`
|
|
90
|
+
})
|
|
91
|
+
}
|