@loadsmart/loadsmart-ui 5.12.1 → 5.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/loadsmart-ui",
3
- "version": "5.12.1",
3
+ "version": "5.12.3",
4
4
  "description": "Miranda UI, a React UI library",
5
5
  "main": "dist",
6
6
  "files": [
@@ -34,9 +34,20 @@ const EmptyStateWithIllustration: FC<EmptyStateWithIllustrationProps> = ({
34
34
  )}
35
35
  {(title || description) && (
36
36
  <Stack space="xs">
37
- {title && <Text variant="heading-sm-bold">{title}</Text>}
37
+ {title && (
38
+ <Text
39
+ variant={isPageVariant ? 'heading-sm-bold' : 'body-bold'}
40
+ color={isPageVariant ? 'color-neutral-darkest' : 'color-neutral-darker'}
41
+ >
42
+ {title}
43
+ </Text>
44
+ )}
38
45
  {description && (
39
- <Text data-testid="empty-state-description" variant="body">
46
+ <Text
47
+ data-testid="empty-state-description"
48
+ variant={isPageVariant ? 'body' : 'caption'}
49
+ color="color-neutral-darkest"
50
+ >
40
51
  {description}
41
52
  </Text>
42
53
  )}
@@ -27,10 +27,14 @@ export function Playground(args: TabsProps): JSX.Element {
27
27
  <Tab.Item name="tab-2" leading={<span>&clubs;</span>}>
28
28
  Multi-quote
29
29
  </Tab.Item>
30
+ <Tab.Item name="tab-3" leading={<span>&clubs;</span>}>
31
+ Quote
32
+ </Tab.Item>
30
33
  </Tab.Items>
31
34
  <Tab.Panels>
32
35
  <Tab.Panel name="tab-1">I am the first tab!</Tab.Panel>
33
36
  <Tab.Panel name="tab-2">And I am the second!</Tab.Panel>
37
+ <Tab.Panel name="tab-3">What is up!</Tab.Panel>
34
38
  </Tab.Panels>
35
39
  </Tab>
36
40
  )
@@ -40,13 +40,17 @@ const StyledSpan = styled.span`
40
40
  `
41
41
 
42
42
  const Children = styled(StyledSpan)`
43
- /* placeholder */
43
+ flex: 1;
44
44
  `
45
45
 
46
46
  const Leading = styled(StyledSpan)`
47
47
  /* placeholder */
48
48
  `
49
49
 
50
+ const StyledListItem = styled.li`
51
+ display: flex;
52
+ `
53
+
50
54
  const StyledLabel = styled.label<WithActiveProps & WithDirectionProps>`
51
55
  ${font({
52
56
  height: 'font-height-2',
@@ -56,6 +60,10 @@ const StyledLabel = styled.label<WithActiveProps & WithDirectionProps>`
56
60
 
57
61
  font-size: ${token('font-size-4')};
58
62
  text-transform: uppercase;
63
+ text-align: ${conditional({
64
+ center: whenProps({ direction: 'vertical' }),
65
+ justify: whenProps({ direction: 'horizontal' }),
66
+ })};
59
67
 
60
68
  ${hoverable`
61
69
  color: ${token('color-neutral-darker')};
@@ -64,7 +72,7 @@ const StyledLabel = styled.label<WithActiveProps & WithDirectionProps>`
64
72
 
65
73
  ${disableable`
66
74
  color: ${token('color-neutral-dark')}33;
67
- background-color: ${token('color-neutral-light')}33;
75
+ background-color: ${token('color-neutral-light')};
68
76
  `}
69
77
 
70
78
  padding: ${token('space-m')} ${token('space-l')};
@@ -148,7 +156,7 @@ function TabsItem({
148
156
  }, [activeTab, name, setActiveTab, isDefault])
149
157
 
150
158
  return (
151
- <li role="tab" aria-selected={isActive ? 'true' : 'false'}>
159
+ <StyledListItem role="tab" aria-selected={isActive ? 'true' : 'false'}>
152
160
  <StyledLabel
153
161
  className={clsx(
154
162
  {
@@ -172,7 +180,7 @@ function TabsItem({
172
180
  {leading && <Leading>{leading}</Leading>}
173
181
  {children && <Children>{children}</Children>}
174
182
  </StyledLabel>
175
- </li>
183
+ </StyledListItem>
176
184
  )
177
185
  }
178
186