@indielayer/ui 1.13.0 → 1.13.2

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/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.13.0";
1
+ declare const _default: "1.13.2";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const e = "1.13.0";
1
+ const e = "1.13.2";
2
2
  export {
3
3
  e as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indielayer/ui",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "Indielayer UI Components with Tailwind CSS build for Vue 3",
5
5
  "author": {
6
6
  "name": "João Teixeira",
@@ -427,7 +427,7 @@ function calcMaxTags() {
427
427
  const tagsArray = Array.from(tags)
428
428
 
429
429
  let totalWidth = 0
430
- let tagsCount = 0
430
+ let tagsCount = 1
431
431
 
432
432
  const maxWidth = tagsRef.value.offsetWidth - 30
433
433
 
@@ -22,7 +22,7 @@ export type TableHeaderSort = typeof validators.sort[number]
22
22
  export type TableHeaderAlign = typeof validators.textAlign[number]
23
23
  export type TableHeaderProps = ExtractPublicPropTypes<typeof tableHeaderProps>
24
24
 
25
- type InternalClasses = 'th' | 'sortIcon'
25
+ type InternalClasses = 'th' | 'sortIcon' | 'header'
26
26
  export interface TableHeaderTheme extends ThemeComponent<TableHeaderProps, InternalClasses> {}
27
27
 
28
28
  export default { name: 'XTableHeader', validators }
@@ -40,7 +40,7 @@ const { styles, classes, className } = useTheme('TableHeader', {}, props)
40
40
 
41
41
  <template>
42
42
  <th :style="styles" :class="[className, classes.th, 'group/th']">
43
- <div class="flex items-center gap-1 select-none">
43
+ <div :class="classes.header">
44
44
  <slot></slot>
45
45
 
46
46
  <x-toggle-tip v-if="tooltip" :content="tooltip"/>
@@ -7,10 +7,16 @@ const theme: TableHeaderTheme = {
7
7
 
8
8
  if (props.sortable) classes.push('cursor-pointer hover:text-secondary-800 dark:hover:text-secondary-300 transition-colors duration-150 ease-in-out')
9
9
 
10
- if (props.textAlign === 'left') classes.push('text-left')
11
- if (props.textAlign === 'right') classes.push('text-right')
12
- if (props.textAlign === 'center') classes.push('text-center')
13
- if (props.textAlign === 'justify') classes.push('text-justify')
10
+ return classes
11
+ },
12
+
13
+ header: ({ props }) => {
14
+ const classes = ['flex items-center gap-1 select-none']
15
+
16
+ if (props.textAlign === 'left') classes.push('justify-start')
17
+ if (props.textAlign === 'right') classes.push('justify-end')
18
+ if (props.textAlign === 'center') classes.push('justify-center')
19
+ if (props.textAlign === 'justify') classes.push('justify-center')
14
20
 
15
21
  return classes
16
22
  },
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export default '1.13.0'
1
+ export default '1.13.2'