@meistrari/tela-build 2.1.1 → 2.2.1

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
@@ -2,6 +2,15 @@
2
2
 
3
3
  Latest updates and announcements.
4
4
 
5
+ ## December 2, 2026
6
+
7
+ - [Chat → Usage](/templates/chat#usage) `TelaChatUsagePopover` renders its percentage with [Animated Number](/components/animated-number), so a new `percent` rolls its digits in instead of swapping the text, alongside the bar's fill.
8
+
9
+ ## December 1, 2026
10
+
11
+ - [Chat → Usage](/templates/chat#usage) `TelaChatUsageMeter` has a `popover-align` prop (`start`, `center` or `end`, default `end`) that picks which edge of the popover lines up with the ring, so a ring near the left of the page can open its popover to the right.
12
+ - [Status](/components/status) The status row no longer fades in when its variant or label changes; only the old row fades out, while the icon and the label keep their own entry animation. The fade-in never finished when the change happened while the status was hidden (`display: none`, as inside a `v-show` panel), which left an empty colored chip until the component remounted.
13
+
5
14
  ## November 25, 2026
6
15
 
7
16
  - [Chat → Usage](/templates/chat#usage) New `TelaChatUsageMeter` and `TelaChatUsagePopover` show the assistant's monthly usage. The meter is an 18px progress ring that fills clockwise with `percent` and opens the popover above it (`v-model:open`). The popover is a 256px card with the renewal (`renews-in-days`), the monthly limit bar and its percentage, plus what its `state` adds: `warning` a notice with the share left, `limit` the limit notice with **Turn on extra usage** and **Not now** (emit `activate` and `dismiss`, and close the meter's popover), and `additional` the formatted `additional-amount`. It renders on its own too, for hosts that show the body without the ring. Set `calculating` while a new value is on its way: the ring pulses over the last value (a steady dimmer ring under reduced motion), the meter's `aria-label` reads `labels.calculating` and sets `aria-busy`, and the popover shows `labels.calculating` ("Calculating…") in place of the percentage. Copy comes from `labels` (`TelaChatUsageLabels`), with English defaults.
@@ -1340,7 +1340,7 @@ How much of the assistant's monthly allowance the user has spent. `TelaChatUsage
1340
1340
  </template>
1341
1341
  ```
1342
1342
 
1343
- The meter fills clockwise with the percentage and is a full ring at 100%. Clicking it opens the popover; **Turn on extra usage** and **Not now** close it and emit `activate` and `dismiss`. Bind `v-model:open` to open it from the host, for example when the user reaches the limit.
1343
+ The meter fills clockwise with the percentage and is a full ring at 100%. Clicking it opens the popover; **Turn on extra usage** and **Not now** close it and emit `activate` and `dismiss`. Bind `v-model:open` to open it from the host, for example when the user reaches the limit. The popover lines up its right edge with the ring; set `popover-align="start"` when the ring sits near the left of the page.
1344
1344
 
1345
1345
  ```vue
1346
1346
  <script setup lang="ts">
@@ -2016,6 +2016,7 @@ type UsagePopoverEmits = { activate: [], dismiss: [] } // the 'limit' state's
2016
2016
 
2017
2017
  type UsageMeterProps = UsagePopoverProps & {
2018
2018
  open?: boolean // v-model:open; activate and dismiss close it
2019
+ popoverAlign?: 'start' | 'center' | 'end' // the popover's edge lined up with the ring; default: 'end'
2019
2020
  // calculating also pulses the ring over the last value, sets aria-busy and passes labels.calculating to labels.trigger
2020
2021
  }
2021
2022
 
@@ -8,9 +8,11 @@ const props = withDefaults(defineProps<{
8
8
  additionalAmount?: string
9
9
  labels?: Partial<TelaChatUsageLabels>
10
10
  calculating?: boolean
11
+ popoverAlign?: 'start' | 'center' | 'end'
11
12
  }>(), {
12
13
  state: 'normal',
13
14
  calculating: false,
15
+ popoverAlign: 'end',
14
16
  labels: () => ({}),
15
17
  })
16
18
 
@@ -65,7 +67,7 @@ const triggerLabel = computed(() => props.labels.trigger?.(shown.value) ?? `Usag
65
67
  </TelaPopoverTrigger>
66
68
  <TelaPopoverContent
67
69
  side="top"
68
- align="end"
70
+ :align="popoverAlign"
69
71
  :side-offset="6"
70
72
  data-tela-escape-layer
71
73
  class="!w-auto !rounded-none !border-0 !bg-transparent !p-0 !shadow-none"
@@ -36,7 +36,10 @@ const used = computed(() => Math.min(100, Math.max(0, Math.round(props.percent))
36
36
  </script>
37
37
 
38
38
  <template>
39
- <div flex="~ col" gap-16px w-256px pt-10px px-12px pb-12px bg rounded-12px border-0.5px border shadow-flying>
39
+ <div
40
+ flex="~ col" gap-16px w-256px pt-10px px-12px pb-12px bg rounded-12px border-0.5px shadow-flying
41
+ class="border-black/12"
42
+ >
40
43
  <div flex items-center justify-between gap-8px>
41
44
  <span body-11-semibold text-primary>{{ copy.title }}</span>
42
45
  <span body-11-regular text-secondary>{{ copy.renewsIn(renewsInDays) }}</span>
@@ -45,8 +48,9 @@ const used = computed(() => Math.min(100, Math.max(0, Math.round(props.percent))
45
48
  <div flex="~ col" gap-8px>
46
49
  <div flex="~ col" gap-6px>
47
50
  <div flex items-center justify-between gap-8px>
48
- <span body-11-medium text-primary>{{ copy.monthlyLimit }}</span>
49
- <span body-11-regular text-secondary>{{ calculating ? copy.calculating : `${used}%` }}</span>
51
+ <span body-11-semibold text-primary>{{ copy.monthlyLimit }}</span>
52
+ <span v-if="calculating" body-11-regular text-secondary>{{ copy.calculating }}</span>
53
+ <TelaAnimatedNumber v-else :value="used" suffix="%" class="body-11-regular text-secondary" />
50
54
  </div>
51
55
  <TelaProgressBar :model-value="used" variant="blue" :aria-label="copy.monthlyLimit" />
52
56
  </div>
@@ -433,10 +433,12 @@ const SPRING_CONFIG = {
433
433
  >
434
434
  <div ref="contentMeasure">
435
435
  <AnimatePresence mode="popLayout" :initial="false">
436
+ <!-- No enter fade here: one that starts while the status is hidden (display: none) never
437
+ finishes and leaves the row invisible. The icon and the label animate their own entry. -->
436
438
  <Motion
437
439
  :key="`${props.variant}-${statusLabel}`"
438
440
  flex items-center gap-4px
439
- v-bind="{ initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }"
441
+ v-bind="{ exit: { opacity: 0 } }"
440
442
  >
441
443
  <div v-if="!isIconHidden" :class="cn('relative z-1 p-[2px]', backgroundColor)">
442
444
  <Motion :key="`icon-${iconName}`" v-bind="iconVariants()">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",