@meistrari/tela-build 1.25.3 → 1.26.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.
@@ -20,15 +20,15 @@ const tag = computed(() => props.to ? NuxtLink : 'div')
20
20
  <component
21
21
  :is="tag"
22
22
  :class="cn(
23
- 'inline-block px-[5px] rounded-[5px] select-none',
24
- variant === 'outline' && 'border-[0.5px] ring-border-strong',
23
+ 'inline-block px-[5px] py-[3px] rounded-[5px] select-none',
24
+ variant === 'outline' && 'border-[0.5px] border-border',
25
25
  variant === 'filled' && 'bg-lowered',
26
26
  props.class,
27
27
  )"
28
28
  >
29
29
  <span
30
30
  :class="cn(
31
- 'flex items-center gap-[4px] text-[9px] whitespace-nowrap font-580 leading-[16px] tracking-[0.04rem] uppercase',
31
+ 'flex items-center gap-[4px] text-[9px] whitespace-nowrap font-580 leading-[10px] tracking-0.2px uppercase',
32
32
  variant === 'outline' && 'text-tertiary',
33
33
  variant === 'filled' && 'text-secondary tracking-normal',
34
34
  textClass,
@@ -100,7 +100,7 @@ const iconSize = computed(() => {
100
100
  <component
101
101
  :is="tag"
102
102
  :to="to"
103
- :class="resolvedStyle" transition ease-in-out duration-40 flex items-center justify-center gap-6px
103
+ :class="resolvedStyle" ease-out duration-40 flex items-center justify-center gap-6px
104
104
  :disabled="disabled"
105
105
  :cursor="disabled ? 'not-allowed' : 'pointer'"
106
106
  :target="target"
@@ -354,5 +354,11 @@ const colorValue = computed(() => {
354
354
  <template v-if="name === 'timeline-start'">
355
355
  <circle cx="4.5" cy="4.5" r="4" fill="white" stroke="currentColor" />
356
356
  </template>
357
+
358
+ <template v-if="name === 'level-right'">
359
+ <g transform="translate(3.3, 0.2)">
360
+ <path d="M0.805054 0.805054L3.34137 3.34137C4.54019 4.54019 4.60421 6.46316 3.4878 7.73906L0.805054 10.8051" stroke="currentColor" stroke-width="1.61015" stroke-linecap="round" />
361
+ </g>
362
+ </template>
357
363
  </svg>
358
364
  </template>
@@ -29,7 +29,7 @@ const emit = defineEmits<{
29
29
  }>()
30
30
 
31
31
  const style = computed(() => {
32
- const base = 'cursor-pointer flex items-center justify-center rounded-lg p-0.5em transition ease'
32
+ const base = 'cursor-pointer flex items-center justify-center rounded-lg p-0.5em ease-out duration-40'
33
33
  const size = ({
34
34
  '3xs': 'text-6px p-1',
35
35
  '2xs': 'text-8px p-4px', // 16px
@@ -40,7 +40,7 @@ const style = computed(() => {
40
40
 
41
41
  const color = ({
42
42
  primary: 'bg-#01292F !text-white hover:bg-#153A40 b-#011D21 hover:b-#123137',
43
- secondary: 'bg-transparent text-icon hover:bg-gray-100 hover:text-gray-950 active:text-gray-800 disabled:bg-gray-100 disabled:!text-gray-300',
43
+ secondary: 'bg-transparent text-icon-tertiary hover:bg-muted hover:text-gray-950 active:text-gray-800 disabled:bg-gray-100 disabled:!text-gray-300',
44
44
  } as Record<typeof props.color, string>)[props.color]
45
45
 
46
46
  const disabled = props.disabled && 'cursor-not-allowed !bg-#ECF0F2 !text-#617275 !b-0'
@@ -32,7 +32,7 @@ watch(() => props.modelValue, (newValue, oldValue) => {
32
32
  :icon="modelValue ? 'i-ph-star-fill' : 'i-ph-star-light'"
33
33
  color="secondary"
34
34
  :size="size"
35
- :class="cn(props.class)"
35
+ :class="cn(modelValue && 'hover:bg-amber-100!', props.class)"
36
36
  :icon-class="cn('relative z-1', modelValue ? 'text-amber-400!' : 'text-neutral-400!')"
37
37
  @click.stop.prevent="emit('update:modelValue', !modelValue)"
38
38
  />
@@ -23,6 +23,16 @@ const initialValue = ref(props.modelValue)
23
23
 
24
24
  const isEditing = ref(!props.displayIcon)
25
25
 
26
+ const autowidthOptions = computed(() => ({
27
+ comfortZone: props.displayIcon ? '2px' : '0px',
28
+ }))
29
+
30
+ function recalcAutowidth() {
31
+ nextTick(() => {
32
+ inputRef.value?.dispatchEvent(new Event('input', { bubbles: true }))
33
+ })
34
+ }
35
+
26
36
  function onFocus() {
27
37
  if (props.modelValue === props.defaultValue) {
28
38
  emit('update:modelValue', '')
@@ -83,6 +93,9 @@ function handleClickOutside(event: Event) {
83
93
 
84
94
  onMounted(() => {
85
95
  document.addEventListener('mousedown', handleClickOutside)
96
+ void document.fonts?.ready?.then(() => {
97
+ recalcAutowidth()
98
+ })
86
99
  })
87
100
 
88
101
  onUnmounted(() => {
@@ -93,26 +106,24 @@ onUnmounted(() => {
93
106
  <template>
94
107
  <div
95
108
  ref="containerRef"
96
- flex relative
109
+ flex relative min-w-0
97
110
  :class="cn('group', containerClass, { 'font-580 text-18px': !disableDefaultStyling })"
98
111
  outline-none
99
112
  text="textcolor"
100
113
  items-center
101
- cursor-text
102
114
  @click="onStartEditing"
103
115
  >
104
116
  <input
105
117
  ref="inputRef"
106
- :key="modelValue"
107
- v-autowidth="{
108
- maxWidth: '420px',
109
- }"
118
+ v-autowidth="autowidthOptions"
119
+ w-fit
120
+ shrink-0
121
+ max-w-full
110
122
  p-0
111
123
  transition
112
124
  :value="modelValue"
113
125
  :placeholder="placeholder"
114
126
  :disabled="disabled || (displayIcon && !isEditing)"
115
- truncate
116
127
  bg-transparent
117
128
  :class="[
118
129
  { 'font-580 text-18px': !disableDefaultStyling },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.25.3",
3
+ "version": "1.26.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",
@@ -1 +1 @@
1
- export type TelaCustomIconName = 'circle' | 'pause' | 'queued' | 'close' | 'circle-notch' | 'circle-minus' | 'stop' | 'circle-dashed' | 'warning' | 'check' | 'check-dashed' | 'semi-circle' | 'arrow-down' | 'reported' | 'circle-warning' | 'slice' | 'half-slice' | 'knot' | 'timeline-dot' | 'timeline-start'
1
+ export type TelaCustomIconName = 'circle' | 'pause' | 'queued' | 'close' | 'circle-notch' | 'circle-minus' | 'stop' | 'circle-dashed' | 'warning' | 'check' | 'check-dashed' | 'semi-circle' | 'arrow-down' | 'reported' | 'circle-warning' | 'slice' | 'half-slice' | 'knot' | 'timeline-dot' | 'timeline-start' | 'level-right'
@@ -304,11 +304,11 @@ export const DT = {
304
304
  warning: BASE_COLORS.amber[200],
305
305
  },
306
306
  text: {
307
- primary: BASE_COLORS.gray[800],
308
- secondary: BASE_COLORS.gray[500],
309
- tertiary: BASE_COLORS.gray[400],
310
- subtle: BASE_COLORS.gray[300],
311
- contrast: BASE_COLORS.gray[900],
307
+ primary: BASE_COLORS.neutral[800],
308
+ secondary: BASE_COLORS.neutral[500],
309
+ tertiary: BASE_COLORS.neutral[400],
310
+ subtle: BASE_COLORS.neutral[300],
311
+ contrast: BASE_COLORS.neutral[900],
312
312
  success: BASE_COLORS.green[600],
313
313
  error: BASE_COLORS.red[600],
314
314
  warning: BASE_COLORS.amber[600],