@telus-uds/components-base 1.9.0 → 1.10.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.
@@ -95,10 +95,17 @@ const StepTracker = forwardRef(
95
95
  }
96
96
  )
97
97
  const getCopy = useCopy({ dictionary, copy })
98
- const stepTrackerLabel = getCopy('stepTrackerLabel')
99
- .replace('%{stepNumber}', current < steps.length ? current + 1 : steps.length)
100
- .replace('%{stepCount}', steps.length)
101
- .replace('%{stepLabel}', current < steps.length ? steps[current] : steps[steps.length - 1])
98
+ const stepTrackerLabel = showStepTrackerLabel
99
+ ? getCopy('stepTrackerLabel')
100
+ .replace('%{stepNumber}', current < steps.length ? current + 1 : steps.length)
101
+ .replace('%{stepCount}', steps.length)
102
+ .replace(
103
+ '%{stepLabel}',
104
+ current < steps.length ? steps[current] : steps[steps.length - 1]
105
+ )
106
+ : ''
107
+ const getStepLabel = (index) =>
108
+ themeTokens.showStepLabel ? getCopy('stepLabel').replace('%{stepNumber}', index + 1) : ''
102
109
  if (!steps.length) return null
103
110
  const selectedProps = selectProps({
104
111
  accessibilityLabel: stepTrackerLabel,
@@ -123,7 +130,7 @@ const StepTracker = forwardRef(
123
130
  status={current}
124
131
  key={label}
125
132
  label={label}
126
- name={getCopy('stepLabel').replace('%{stepNumber}', index + 1)}
133
+ name={getStepLabel(index)}
127
134
  stepIndex={index}
128
135
  stepCount={steps.length}
129
136
  tokens={themeTokens}
package/src/index.js CHANGED
@@ -3,6 +3,7 @@ export { default as ActivityIndicator } from './ActivityIndicator'
3
3
  export { default as Box } from './Box'
4
4
  export * from './Button'
5
5
  export { default as Card, PressableCardBase } from './Card'
6
+ export * from './Carousel'
6
7
  export { default as Checkbox } from './Checkbox'
7
8
  export * from './Checkbox'
8
9
  export { default as Divider } from './Divider'