@meistrari/tela-build 1.36.0 → 1.37.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.
@@ -9,8 +9,9 @@ A status component that displays different workflow and task statuses with appro
9
9
 
10
10
  ## Rules
11
11
 
12
- - **Always** use `<TelaStatus />` for any status indicator (workflow status, event status, health state, etc.). Never build a custom status with icons + color classes.
13
12
  - `text-success` and `text-error` are reserved for `<TelaStatus />` — never apply them to regular text content.
13
+ - **Always** use `<TelaStatus />` for any status indicator (workflow status, event status, health state, etc.). Never build a custom status with icons + color classes.
14
+ - **NEVER** use the `config` prop. It exists as an escape hatch for domain-specific variants in consuming apps (hex colors, localized labels, etc.). Always prefer an existing `variant` — if none fits, extend the built-in variant list instead of passing `config`. One-off `config` objects defeat the design system.
14
15
 
15
16
  ## Examples
16
17
 
@@ -13,6 +13,7 @@ type StatusConfig = {
13
13
 
14
14
  const props = withDefaults(defineProps<{
15
15
  variant?: TelaStatusVariant
16
+ config?: StatusConfig
16
17
  label?: string
17
18
  isIconAnimated?: boolean
18
19
  isIconHidden?: boolean
@@ -293,6 +294,9 @@ const variantConfig: Record<TelaStatusVariant, StatusConfig> = {
293
294
  }
294
295
 
295
296
  const currentStatus = computed<StatusConfig>(() => {
297
+ if (props.config)
298
+ return props.config
299
+
296
300
  const variant = props.variant ?? 'running'
297
301
 
298
302
  return variantConfig[variant] ?? variantConfig.running
@@ -334,7 +338,7 @@ function measureContentWidth() {
334
338
  }
335
339
 
336
340
  watch(
337
- () => [props.variant, statusLabel.value, props.isIconHidden],
341
+ () => [props.variant, props.config, statusLabel.value, props.isIconHidden],
338
342
  measureContentWidth,
339
343
  { immediate: true },
340
344
  )
@@ -358,7 +362,7 @@ const shineClass = computed(() => {
358
362
  ]
359
363
  })
360
364
 
361
- const isShineVisible = computed(() => ['running', 'executing', 'processing', 'verifying', 'initializing', 'reviewing'].includes(props.variant))
365
+ const isShineVisible = computed(() => !props.config && ['running', 'executing', 'processing', 'verifying', 'initializing', 'reviewing'].includes(props.variant))
362
366
 
363
367
  function iconVariants() {
364
368
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.36.0",
3
+ "version": "1.37.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",