@tak-ps/vue-tabler 4.14.0 → 4.16.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/CHANGELOG.md CHANGED
@@ -10,6 +10,14 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v4.16.0 - 2026-04-23
14
+
15
+ - :tada: Add Tabler Border Component
16
+
17
+ ### v4.15.0 - 2026-04-20
18
+
19
+ - :rocket: Click anywhere collapse
20
+
13
21
  ### v4.14.0 - 2026-04-19
14
22
 
15
23
  - :rocket: Add ability to turn off border
package/README.md CHANGED
@@ -56,6 +56,7 @@ import { TablerButton, TablerAlert } from '@tak-ps/vue-tabler';
56
56
  | Component | Description |
57
57
  |-----------|-------------|
58
58
  | **TablerAlert** | Display important messages and feedback. |
59
+ | **TablerBorder** | Bordered card section with optional label and header slot. |
59
60
  | **TablerBreadCrumb** | Navigation aid indicating the current page's location. |
60
61
  | **TablerButton** | Standard action buttons with various styles. |
61
62
  | **TablerBytes** | Utility to format byte values into human-readable strings. |
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <div class='card h-100 border border-light-subtle shadow-sm'>
3
+ <div
4
+ class='card-body d-flex flex-column'
5
+ :class='{
6
+ "gap-4": gap === "lg",
7
+ "gap-3": gap === "md",
8
+ "gap-2": gap === "sm",
9
+ }'
10
+ >
11
+ <div
12
+ v-if='label || $slots.header'
13
+ class='d-flex align-items-center justify-content-between'
14
+ >
15
+ <p
16
+ v-if='label'
17
+ class='text-uppercase small mb-0'
18
+ v-text='label'
19
+ />
20
+ <slot name='header' />
21
+ </div>
22
+ <slot />
23
+ </div>
24
+ </div>
25
+ </template>
26
+
27
+ <script setup lang='ts'>
28
+ export interface BorderProps {
29
+ label?: string;
30
+ gap?: 'sm' | 'md' | 'lg';
31
+ }
32
+
33
+ withDefaults(defineProps<BorderProps>(), {
34
+ label: '',
35
+ gap: 'md',
36
+ });
37
+ </script>
@@ -3,10 +3,10 @@
3
3
  class='hover-expandable rounded position-relative px-2 py-2'
4
4
  :class='{
5
5
  "expanded mb-3": isExpanded,
6
- "cursor-pointer": props.clickAnywhereExpand && !isExpanded,
6
+ "cursor-pointer": props.clickAnywhereExpand || props.clickAnywhereCollapse,
7
7
  "no-border": !props.border
8
8
  }'
9
- @click='(props.clickAnywhereExpand && !isExpanded) ? toggle() : null'
9
+ @click='handleClick'
10
10
  >
11
11
  <div
12
12
  :class='{
@@ -53,12 +53,14 @@ export interface SlidedownProps {
53
53
  arrow?: boolean;
54
54
  border?: boolean;
55
55
  clickAnywhereExpand?: boolean;
56
+ clickAnywhereCollapse?: boolean;
56
57
  }
57
58
 
58
59
  const props = withDefaults(defineProps<SlidedownProps>(), {
59
60
  arrow: true,
60
61
  border: true,
61
- clickAnywhereExpand: false
62
+ clickAnywhereExpand: false,
63
+ clickAnywhereCollapse: false
62
64
  });
63
65
 
64
66
  const isExpanded = ref(false);
@@ -77,6 +79,19 @@ function toggle() {
77
79
  el.style.maxHeight = ''; // Reset to CSS default (0)
78
80
  }
79
81
  }
82
+ }
83
+
84
+ function handleClick(event: MouseEvent) {
85
+ // Don't handle clicks from the expanded content wrapper
86
+ const el = contentWrapperRef.value;
87
+ if (el && el === event.target) return;
88
+ if (el && el.contains(event.target as Node)) return;
89
+
90
+ if (props.clickAnywhereExpand) {
91
+ toggle();
92
+ } else if (props.clickAnywhereCollapse && isExpanded.value) {
93
+ toggle();
94
+ }
80
95
  };
81
96
  </script>
82
97
 
package/lib.ts CHANGED
@@ -9,6 +9,7 @@ export { default as TablerFileInput } from './components/input/FileInput.vue'
9
9
  export { default as TablerEnum } from './components/input/Enum.vue';
10
10
 
11
11
  export { default as TablerAlert } from './components/Alert.vue'
12
+ export { default as TablerBorder } from './components/Border.vue'
12
13
  export { default as TablerInlineAlert } from './components/InlineAlert.vue'
13
14
  export { default as TablerBadge } from './components/Badge.vue'
14
15
  export { default as TablerButton } from './components/Button.vue'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/vue-tabler",
3
3
  "type": "module",
4
- "version": "4.14.0",
4
+ "version": "4.16.0",
5
5
  "lib": "lib.ts",
6
6
  "main": "lib.ts",
7
7
  "module": "lib.ts",