poe-svelte-ui-lib 1.2.2 → 1.2.3

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.
@@ -125,9 +125,14 @@
125
125
  onChange={(value) => {
126
126
  if (value === 2) {
127
127
  component.properties.items.forEach((_item: any, index: number) => {
128
- let tabWidth = Math.max(...Array.from(document.body.querySelectorAll('.tab')).map((item) => (item as HTMLElement).offsetWidth))
128
+ let tabWidth = Math.ceil(
129
+ (Math.max(...Array.from(document.body.querySelectorAll('.tab')).map((item) => (item as HTMLElement).offsetWidth)) /
130
+ parseFloat(getComputedStyle(document.documentElement).fontSize)) *
131
+ 4,
132
+ )
133
+
129
134
  const items = [...(component.properties?.items || [])]
130
- items[index]['class'] = twMerge(items[index].class, `w-[${tabWidth}px]`)
135
+ items[index]['class'] = twMerge(items[index].class, `w-${tabWidth}`)
131
136
  updateProperty('items', items, component, onPropertyChange)
132
137
  })
133
138
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {