@loja-integrada/admin-components 0.19.10 → 0.21.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.
Files changed (42) hide show
  1. package/dist/Forms/commonStyles.d.ts +2 -2
  2. package/dist/Indicators/Alert/Alert.d.ts +1 -0
  3. package/dist/admin-components.cjs.development.js +3629 -3621
  4. package/dist/admin-components.cjs.development.js.map +1 -1
  5. package/dist/admin-components.cjs.production.min.js +1 -1
  6. package/dist/admin-components.cjs.production.min.js.map +1 -1
  7. package/dist/admin-components.esm.js +3629 -3621
  8. package/dist/admin-components.esm.js.map +1 -1
  9. package/package.json +2 -2
  10. package/src/Components/Button/Button.tsx +6 -6
  11. package/src/Components/HelpLink/index.tsx +1 -1
  12. package/src/Components/Modal/Modal.tsx +1 -1
  13. package/src/Components/Table/Table.tsx +2 -2
  14. package/src/Components/TableList/TableList.tsx +4 -4
  15. package/src/Components/TableList/TableListItemWrapper.tsx +1 -1
  16. package/src/Components/Tabs/TabsItem.tsx +1 -1
  17. package/src/Components/Timeline/TimelineItem.tsx +3 -3
  18. package/src/Forms/Checkbox/Checkbox.tsx +4 -4
  19. package/src/Forms/Dropdown/Dropdown.tsx +7 -6
  20. package/src/Forms/Input/Input.tsx +1 -1
  21. package/src/Forms/InputHelpText/InputHelpText.tsx +1 -1
  22. package/src/Forms/InputLabel/InputLabel.tsx +1 -1
  23. package/src/Forms/Toggle/Toggle.tsx +1 -1
  24. package/src/Forms/ToggleButton/ToggleButton.tsx +1 -1
  25. package/src/Forms/commonStyles.ts +9 -8
  26. package/src/Indicators/Alert/Alert.spec.tsx +1 -1
  27. package/src/Indicators/Alert/Alert.tsx +33 -16
  28. package/src/Indicators/Badge/Badge.spec.tsx +1 -1
  29. package/src/Indicators/Badge/Badge.tsx +2 -2
  30. package/src/Indicators/InformationBox/InformationBox.spec.tsx +2 -2
  31. package/src/Indicators/InformationBox/InformationBox.tsx +4 -4
  32. package/src/Indicators/Tag/Tag.tsx +1 -1
  33. package/src/Indicators/Tooltip/style.scss +1 -1
  34. package/src/Layout/Box/Components/Header/BoxHeader.tsx +2 -4
  35. package/src/Layout/ListActions/ListActions.tsx +2 -2
  36. package/src/Layout/Sidebar/Item.tsx +1 -1
  37. package/src/Layout/Sidebar/ItemSub.tsx +1 -1
  38. package/src/Navigation/Breadcrumb/index.tsx +2 -2
  39. package/src/Navigation/Pagination/PaginationInfo.tsx +1 -1
  40. package/src/Navigation/Pagination/PaginationNav.tsx +1 -1
  41. package/src/Navigation/Stepper/index.tsx +2 -2
  42. package/src/tailwind.scss +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loja-integrada/admin-components",
3
- "version": "0.19.10",
3
+ "version": "0.21.0",
4
4
  "author": "Loja Integrada Front-End Team",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -134,7 +134,7 @@
134
134
  "tailwindcss": ">=3.1.0"
135
135
  },
136
136
  "dependencies": {
137
- "@loja-integrada/tailwindcss-config": "^2.0.3",
137
+ "@loja-integrada/tailwindcss-config": "^2.4.0",
138
138
  "@tippyjs/react": "^4.2.5",
139
139
  "@types/react-select": "^4.0.17",
140
140
  "babel-jest": "^29.2.2",
@@ -27,12 +27,12 @@ const commonFocus =
27
27
 
28
28
  const listOfStyles = {
29
29
  primary: `bg-primary text-base-1 ${listOfStylesHover['primary']} ${listOfStylesActive['primary']} ${commonFocus}`,
30
- secondary: `bg-primary-light text-primary-bold ${listOfStylesHover['secondary']} ${listOfStylesActive['secondary']} ${commonFocus}`,
30
+ secondary: `bg-primary-light text-primary-bold komea:bg-secondary komea:text-secondary-bold komea:hover:bg-secondary/80 komea:active:bg-secondary/60 komea:active:shadow-none ${listOfStylesHover['secondary']} ${listOfStylesActive['secondary']} ${commonFocus}`,
31
31
  outlineSecondary: `bg-transparent text-primary border border-primary ${listOfStylesHover['outlineSecondary']} ${listOfStylesActive['outlineSecondary']} ${commonFocus}`,
32
32
  tertiary: `bg-inverted-2 text-on-primary ${listOfStylesHover['tertiary']} ${listOfStylesActive['tertiary']} ${commonFocus}`,
33
33
  warning: `bg-warning text-on-base ${listOfStylesHover['warning']} ${listOfStylesActive['warning']} ${commonFocus}`,
34
34
  danger: `bg-danger text-base-1 ${listOfStylesHover['danger']} ${listOfStylesActive['danger']} ${commonFocus}`,
35
- outline: `bg-transparent text-inverted-2 border border-inverted-2 ${listOfStylesHover['outline']} ${listOfStylesActive['outline']} ${commonFocus}`,
35
+ outline: `bg-transparent text-inverted-2 border border-inverted-2 komea:border-card-stroke komea:bg-base-2 komea:text-on-base komea:hover:bg-primary-light komea:active:bg-secondary komea:active:shadow-none ${listOfStylesHover['outline']} ${listOfStylesActive['outline']} ${commonFocus}`,
36
36
  onlyText: `bg-transparent border-transparent text-inverted-2 px-0 ${listOfStylesHover['onlyText']} ${listOfStylesActive['onlyText']} ${commonFocus}`,
37
37
  }
38
38
 
@@ -49,9 +49,9 @@ const listOfStylesDisabled = {
49
49
  }
50
50
 
51
51
  const listOfSizes = {
52
- small: `text-f6 h-10`,
53
- default: `text-f6 h-12`,
54
- large: `text-f5 h-14`,
52
+ small: `text-f6 komea:h-8 komea:px-3 h-10`,
53
+ default: `text-f6 komea:h-9 h-12`,
54
+ large: `text-f5 komea:h-10 komea:px-6 h-14`,
55
55
  }
56
56
 
57
57
  const ButtonType = React.forwardRef(
@@ -97,7 +97,7 @@ const ButtonComponent = (
97
97
  ;(!disabled || !loading) && onClick && onClick(event)
98
98
  }
99
99
 
100
- let classes = `inline-flex leading-none font-semibold tracking-tight items-center justify-center px-5 text-center no-underline cursor-pointer transition rounded-md after:align-middle focus:outline-none `
100
+ let classes = `inline-flex font-medium items-center justify-center px-5 komea:px-4 text-center no-underline cursor-pointer transition rounded-md after:align-middle focus:outline-none `
101
101
 
102
102
  if (loading) {
103
103
  classes +=
@@ -17,7 +17,7 @@ export const HelpLink: React.FC<HelpLinkProps> = React.memo(
17
17
  <>
18
18
  <Icon icon="questionCircle" size={4} className="shrink-0" block />
19
19
  <span
20
- className={`text-f6 font-semibold tracking-4 leading-6 ml-2
20
+ className={`text-f6 font-semibold ml-2
21
21
  ${!mobileText ? 'hidden md:inline' : ''}
22
22
  `}
23
23
  >
@@ -57,7 +57,7 @@ const ModalComponent = ({
57
57
  <div {...props}>
58
58
  <div className="ReactModal__header w-full flex justify-between items-start">
59
59
  <span
60
- className={`min-w-0 text-inverted-2 text-xs font-semibold uppercase break-words ${
60
+ className={`min-w-0 text-inverted-2 text-xs font-semibold uppercase komea:font-medium komea:normal-case break-words ${
61
61
  headerTitle ? 'pb-3' : ''
62
62
  }`}
63
63
  >
@@ -150,7 +150,7 @@ const TableComponent = ({
150
150
  <table
151
151
  {...getTableProps()}
152
152
  id={id}
153
- className={`w-full bg-base-1 rounded border-separate border border-card-stroke`}
153
+ className={`w-full bg-base-1 rounded komea:rounded-xs border-separate border border-card-stroke`}
154
154
  cellSpacing="0"
155
155
  >
156
156
  <thead className={`text-left`}>
@@ -211,7 +211,7 @@ const TableComponent = ({
211
211
  <tr>
212
212
  <td colSpan={columnsLength || 1} className={`${TdClasses}`}>
213
213
  <TdWrapper>
214
- <div className="text-center py-16 text-xl font-semibold text-on-base-2">
214
+ <div className="text-center py-16 text-xl font-medium text-on-base-2">
215
215
  {emptyText}
216
216
  </div>
217
217
  </TdWrapper>
@@ -45,7 +45,7 @@ const TableListComponent = ({
45
45
  }, [items])
46
46
 
47
47
  return (
48
- <div className={`table-list tracking-tight ${className}`}>
48
+ <div className={`table-list ${className}`}>
49
49
  {isLoading ? (
50
50
  <div className="table-list-loading">
51
51
  <TableListItemLoading />
@@ -60,11 +60,11 @@ const TableListComponent = ({
60
60
  {empty.illustration}
61
61
  </div>
62
62
  )}
63
- <div className="table-list-empty-title text-center text-f4 font-semibold text-primary-bold leading-7">
63
+ <div className="table-list-empty-title text-center text-f4 font-medium text-primary-bold">
64
64
  {empty.title}
65
65
  </div>
66
66
  {empty.subTitle && (
67
- <div className="table-list-empty-subtitle text-center text-f6 text-on-base-2 leading-6 -mt-1">
67
+ <div className="table-list-empty-subtitle text-center text-f6 text-on-base-2 -mt-1">
68
68
  {empty.subTitle}
69
69
  </div>
70
70
  )}
@@ -89,7 +89,7 @@ const TableListComponent = ({
89
89
  }`}
90
90
  >
91
91
  <span
92
- className={`text-f5 text-on-base-2 leading-4 break-words inline-block pt-6 pb-2`}
92
+ className={`text-f5 text-on-base-2 break-words inline-block pt-6 pb-2`}
93
93
  >
94
94
  {group.title}
95
95
  </span>
@@ -2,7 +2,7 @@ import React from 'react'
2
2
 
3
3
  import { TableListItemWrapperProp } from './TableListItem.interface'
4
4
 
5
- const ItemWrapperClasses = `flex relative py-6 text-f7 leading-4 break-words no-underline`
5
+ const ItemWrapperClasses = `flex relative py-6 text-f7 break-words no-underline`
6
6
  const ItemWrapperClassesContainerHover = `before:hover:block before:hover:absolute before:hover:h-full before:hover:w-5 lg:before:hover:w-8 before:hover:top-0 before:hover:-left-5 lg:before:hover:-left-8 before:hover:bg-base-2 after:hover:block after:hover:absolute after:hover:h-full after:hover:w-5 lg:after:hover:w-8 after:hover:top-0 after:hover:-right-5 lg:after:hover:-right-8 after:hover:bg-base-2`
7
7
 
8
8
  const DefaultWrapper = (props: any) => {
@@ -39,7 +39,7 @@ export const TabsItem = ({
39
39
  disabled={disabled}
40
40
  >
41
41
  <span
42
- className={`block tracking-4 text-f6 text-sm py-4 border-b-4 break-words ${
42
+ className={`block text-f6 py-4 border-b-4 break-words ${
43
43
  disabled ? '' : 'group-hover:font-semibold'
44
44
  } ${activeStyles(active)} ${boldFixStyle}`}
45
45
  data-title={title}
@@ -19,7 +19,7 @@ export const TimelineItem = ({ item }: TimelineItemProps) => {
19
19
  </div>
20
20
  <div className="ml-7 pt-px">
21
21
  <div
22
- className={`timeline-title group py-1 text-f6 leading-6 tracking-4 text-inverted-1 font-semibold break-words ${
22
+ className={`timeline-title group py-1 text-f6 text-inverted-1 font-semibold break-words ${
23
23
  showToggle ? 'cursor-pointer' : ''
24
24
  }`}
25
25
  onClick={() => showToggle && setIsOpen((isOpen) => !isOpen)}
@@ -41,14 +41,14 @@ export const TimelineItem = ({ item }: TimelineItemProps) => {
41
41
  <span className="inline break-words">{item.title}</span>
42
42
  </div>
43
43
  {item.timestamp && (
44
- <div className="timeline-timestamp mb-1 inline-flex items-center text-xs tracking-4 text-inverted-2 break-words">
44
+ <div className="timeline-timestamp mb-1 inline-flex items-center text-xs text-inverted-2 break-words">
45
45
  <Icon icon="clock" size={3} className="mr-1" />
46
46
  {item.timestamp}
47
47
  </div>
48
48
  )}
49
49
  {item.description && (
50
50
  <div
51
- className={`timeline-description mt-1 overflow-hidden text-sm tracking-4 text-inverted-1 break-words transition-max-height ${
51
+ className={`timeline-description mt-1 overflow-hidden text-sm text-inverted-1 break-words transition-max-height ${
52
52
  isOpen ? 'max-h-96' : 'max-h-0'
53
53
  }`}
54
54
  >
@@ -49,7 +49,7 @@ const CheckboxComponent = (
49
49
  isChecked || isIndeterminate ? 'scale-100' : 'scale-0'
50
50
  }`
51
51
 
52
- const checkboxIconContainerClasses = `border border-card-stroke transition duration-200 ease-in-out
52
+ const checkboxIconContainerClasses = `border border-card-stroke komea:border-input-stroke komea:shadow-sm transition duration-200 ease-in-out
53
53
  ${
54
54
  disabled
55
55
  ? 'bg-base-4'
@@ -58,10 +58,10 @@ const CheckboxComponent = (
58
58
  : 'bg-base-1'
59
59
  }
60
60
  ${isCenterBoxAlign ? 'items-center' : ''}
61
- rounded w-4 h-4 flex justify-center m-px
61
+ rounded-xs w-4 h-4 flex justify-center m-px
62
62
  `
63
63
 
64
- const checkboxLabelClasses = `ml-1 input-label text-f6 tracking-4 leading-6 ${
64
+ const checkboxLabelClasses = `ml-1 input-label text-f6 ${
65
65
  hasErrorState ? 'text-danger' : disabled ? 'text-inverted-2' : ''
66
66
  }`
67
67
 
@@ -87,7 +87,7 @@ const CheckboxComponent = (
87
87
  htmlFor={inputId}
88
88
  className={`inline-flex ${alignOptions[boxAlign]} cursor-pointer`}
89
89
  >
90
- <span className="relative rounded z-10 flex items-center justify-center focus-within:ring-2 ring-focus">
90
+ <span className="relative rounded-xs z-10 flex items-center justify-center focus-within:ring-2 komea:focus-within:ring-[3px] ring-focus komea:ring-focus/50">
91
91
  <input
92
92
  ref={ref || inputRef}
93
93
  type="checkbox"
@@ -13,9 +13,9 @@ import { InputHelpText } from '../InputHelpText'
13
13
  import { InputLabel, InputLabelProps } from '../InputLabel'
14
14
 
15
15
  export const sizeClasses = {
16
- default: 'h-12',
16
+ default: 'komea:h-9 h-12',
17
17
  small: 'h-8',
18
- large: 'h-14',
18
+ large: 'komea:h-10 h-14',
19
19
  xlarge: 'h-24',
20
20
  }
21
21
 
@@ -27,7 +27,8 @@ export const valueFontSizesClasses = {
27
27
  }
28
28
 
29
29
  export const variantControlClasses = {
30
- default: 'border-card-stroke rounded pl-2',
30
+ default:
31
+ 'border-card-stroke rounded pl-2 komea:border-input-stroke komea:shadow-sm',
31
32
  secondary:
32
33
  'border-inverted-2 hover:bg-base-3 rounded-md focus:ring-2 focus:ring-focus focus:ring-offset-2 focus:bg-base-1 pl-2',
33
34
  simple: 'border-0 border-b border-on-base-3',
@@ -175,7 +176,7 @@ const formatGroupLabel = (
175
176
  const CustomGroupHeading = (props: any) => (
176
177
  <GroupHeading
177
178
  {...props}
178
- className="p-2 pt-0 pb-3 text-inverted-1 uppercase font-bold text-xs"
179
+ className="p-2 pt-0 pb-3 text-inverted-1 uppercase font-semibold text-xs"
179
180
  />
180
181
  )
181
182
 
@@ -189,7 +190,7 @@ const CustomPlaceholder = (
189
190
  ) => (
190
191
  <Placeholder
191
192
  {...props}
192
- className={`tracking-4 w-full pr-2 truncate ${valueFontSizesClasses[fontSize]}`}
193
+ className={`w-full pr-2 truncate ${valueFontSizesClasses[fontSize]}`}
193
194
  />
194
195
  )
195
196
 
@@ -200,7 +201,7 @@ const CustomSingleValue = (
200
201
  ) => (
201
202
  <SingleValue
202
203
  {...props}
203
- className={`tracking-4 truncate ${variantValueClasses[variant]} ${valueFontSizesClasses[fontSize]}`}
204
+ className={`truncate ${variantValueClasses[variant]} ${valueFontSizesClasses[fontSize]}`}
204
205
  />
205
206
  )
206
207
 
@@ -59,7 +59,7 @@ const InputComponent = (
59
59
  inputContainerClass += ` ${defaultBorderClasses}`
60
60
  }
61
61
 
62
- const inputClass = `w-full tracking-4 px-4 appearance-none shadow-none outline-none bg-transparent box-border ${focusClass} ${
62
+ const inputClass = `w-full px-4 komea:px-3 appearance-none shadow-none outline-none bg-transparent box-border ${focusClass} ${
63
63
  hasErrorState ? errorBorderClasses : defaultBorderClasses
64
64
  } ${prefix && prefixBorder ? 'border-l' : ''} ${
65
65
  sufix && sufixBorder ? 'border-r' : ''
@@ -5,7 +5,7 @@ export const InputHelpText = React.memo(
5
5
  if (!helpText) return null
6
6
  return (
7
7
  <div
8
- className={`input-help-text text-xs tracking-4 leading-4 ${
8
+ className={`input-help-text text-xs ${
9
9
  hasError ? 'text-danger' : 'text-on-base-2'
10
10
  } ${className}`}
11
11
  >
@@ -12,7 +12,7 @@ export const InputLabel = React.memo(
12
12
  if (!label) return null
13
13
  return (
14
14
  <label
15
- className={`input-label text-f6 tracking-4 leading-6 font-semibold inline-flex items-center mb-0.5 ${
15
+ className={`input-label text-f6 font-medium inline-flex items-center mb-0.5 ${
16
16
  hasError ? 'text-danger' : 'text-on-base'
17
17
  } ${className}`}
18
18
  htmlFor={htmlFor}
@@ -51,7 +51,7 @@ const ToggleComponent = (
51
51
 
52
52
  const toggleCircleClasses = `transform ${toggleClasses.circle[toggleCheckText][toggleStatusText]} absolute left-[6px] top-[6px] w-5 h-5 rounded-full transition`
53
53
 
54
- const toggleLabelClasses = `ml-2 text-inverted-1 text-f6 tracking-4 label`
54
+ const toggleLabelClasses = `ml-2 text-inverted-1 text-f6 komea:font-medium label`
55
55
 
56
56
  return (
57
57
  <label
@@ -58,7 +58,7 @@ const ToggleButtonComponent = (
58
58
 
59
59
  return (
60
60
  <div
61
- className={`${className} inline-flex justify-center items-center h-12 ${toggleClasses}} rounded text-f6 tracking-4 font-semibold`}
61
+ className={`${className} inline-flex justify-center items-center h-12 ${toggleClasses}} rounded text-f6 font-semibold`}
62
62
  >
63
63
  <ul className="list-none inline-flex justify-center items-center h-12">
64
64
  {toggleItems}
@@ -5,25 +5,26 @@ export const inputContainerDisabledClasses =
5
5
 
6
6
  export const inputContainerReadonlyClasses = '!bg-base-2'
7
7
 
8
- export const errorBorderClasses = 'border-danger focus:border-danger'
8
+ export const errorBorderClasses =
9
+ 'border-danger focus:border-danger komea:focus:ring-danger/20'
9
10
 
10
- export const defaultBorderClasses = 'border-card-stroke'
11
+ export const defaultBorderClasses = 'border-card-stroke komea:border-input-stroke'
11
12
 
12
13
  export const focusClass = 'focus:border-inverted-1'
13
14
 
14
- export const inputClasses = `appearance-none shadow-none outline-none bg-base-1 border px-4 rounded text-on-base text-sm tracking-4 min-w-0 w-full transition-border duration-75 ${focusClass} ${inputPlaceholderClasses}`
15
+ export const inputClasses = `appearance-none shadow-none outline-none bg-base-1 border px-4 rounded text-on-base text-sm min-w-0 w-full transition-border duration-75 komea:border-input-stroke komea:px-3 komea:shadow-sm komea:text-body-large md:komea:text-body komea:focus:border-focus komea:focus:ring-[3px] komea:focus:ring-focus/50 ${focusClass} ${inputPlaceholderClasses}`
15
16
 
16
- export const inputContainerClasses = `flex focus-within:border-inverted-1 bg-base-1 border rounded text-on-base text-sm tracking-4 min-w-0 w-full transition-border duration-75 overflow-hidden ${inputPlaceholderClasses}`
17
+ export const inputContainerClasses = `flex focus-within:border-inverted-1 bg-base-1 border rounded text-on-base text-sm min-w-0 w-full transition-border duration-75 overflow-hidden komea:border-input-stroke komea:shadow-sm komea:text-body-large md:komea:text-body komea:focus-within:border-focus komea:focus-within:ring-[3px] komea:focus-within:ring-focus/50 ${inputPlaceholderClasses}`
17
18
 
18
- const adornmentClasses = `adornment flex justify-center items-center relative w-16 text-f6 text-inverted-2 tracking-4 -mt-px`
19
+ const adornmentClasses = `adornment flex justify-center items-center relative w-16 text-f6 text-inverted-2 -mt-px`
19
20
 
20
21
  export const prefixClasses = `${adornmentClasses} rounded-l left-0`
21
22
 
22
23
  export const sufixClasses = `${adornmentClasses} rounded-r right-0`
23
24
 
24
25
  export const variantClasses = {
25
- default: 'h-12',
26
- small: 'h-10',
27
- large: 'h-14',
26
+ default: 'komea:h-9 h-12',
27
+ small: 'komea:h-8 h-10',
28
+ large: 'komea:h-10 h-14',
28
29
  xlarge: 'h-24',
29
30
  }
@@ -36,7 +36,7 @@ describe(specTitle('Alert tests'), () => {
36
36
  cy.get('.alert').should('have.class', 'bg-danger-light')
37
37
 
38
38
  mount(<Default type="info" />)
39
- cy.get('.alert').should('have.class', 'bg-focus-light')
39
+ cy.get('.alert').should('have.class', 'bg-info-light')
40
40
 
41
41
  mount(<Default type="primary" />)
42
42
  cy.get('.alert').should('have.class', 'bg-primary-light')
@@ -16,42 +16,51 @@ const alertTypes: Record<
16
16
  class: string
17
17
  icon: IconProps['icon']
18
18
  iconClass: string
19
+ textClass: string
19
20
  }
20
21
  > = {
21
22
  success: {
22
- class: 'bg-success-light border-success',
23
+ class: 'bg-success-light border-success komea:border-success-stroke',
23
24
  icon: 'checkCircle',
24
- iconClass: 'text-success',
25
+ iconClass: 'text-success komea:text-success-dark',
26
+ textClass: 'komea:text-success-dark',
25
27
  },
26
28
  warning: {
27
- class: 'bg-warning-light border-warning-dark',
29
+ class: 'bg-warning-light border-warning-dark komea:border-warning-stroke',
28
30
  icon: 'exclamationTriangle',
29
31
  iconClass: 'text-warning-dark',
32
+ textClass: 'komea:text-warning-dark',
30
33
  },
31
34
  danger: {
32
- class: 'bg-danger-light border-danger',
35
+ class: 'bg-danger-light border-danger komea:border-danger-stroke',
33
36
  icon: 'ban',
34
- iconClass: 'text-danger',
37
+ iconClass: 'text-danger komea:text-danger-dark',
38
+ textClass: 'komea:text-danger-dark',
35
39
  },
36
40
  info: {
37
- class: 'bg-focus-light border-focus-dark',
41
+ class: 'bg-info-light border-info-dark komea:border-info-stroke',
38
42
  icon: 'infoCircle',
39
- iconClass: 'text-focus-dark',
43
+ iconClass: 'text-info-dark',
44
+ textClass: 'komea:text-info-dark',
40
45
  },
41
46
  infoOutline: {
42
- class: 'bg-base-1 border-focus-dark',
47
+ class: 'bg-base-1 border-info-dark komea:border-info-stroke',
43
48
  icon: 'infoCircle',
44
- iconClass: 'text-focus-dark',
49
+ iconClass: 'text-info-dark',
50
+ textClass: '',
45
51
  },
46
52
  infoDark: {
47
- class: 'bg-base-1 border-[#607081]',
53
+ // O hex cravado não acompanha o `data-chrome`; na chrome nova cai no neutro do design system.
54
+ class: 'bg-base-1 border-[#607081] komea:border-card-stroke',
48
55
  icon: 'infoCircle',
49
- iconClass: 'text-[#607081]',
56
+ iconClass: 'text-[#607081] komea:text-on-base-2',
57
+ textClass: '',
50
58
  },
51
59
  primary: {
52
- class: 'bg-primary-light border-primary',
60
+ class: 'bg-primary-light border-primary komea:border-card-stroke',
53
61
  icon: 'infoCircle',
54
62
  iconClass: 'text-primary',
63
+ textClass: '',
55
64
  },
56
65
  }
57
66
 
@@ -80,7 +89,7 @@ const AlertComponent = ({
80
89
  if (!alertIsOpen) return null
81
90
  return (
82
91
  <div
83
- className={`alert border-l-4 py-4 pl-6 pr-5 rounded w-full relative flex items-start sm:items-center ${
92
+ className={`alert border-l-4 komea:border-l py-4 pl-6 pr-5 rounded w-full relative flex items-start sm:items-center ${
84
93
  alertTypes[type].class
85
94
  }${hideBorder ? '' : ' border'}`}
86
95
  >
@@ -95,9 +104,17 @@ const AlertComponent = ({
95
104
  </div>
96
105
  )}
97
106
  <div className="flex-grow flex flex-col sm:flex-row items-start sm:items-center justify-between min-w-0">
98
- <div className="flex flex-col justify-center min-w-0 break-words text-f6 tracking-4 leading-6 text-on-base">
99
- <span className="alert-title font-semibold">{title}</span>
100
- {subtitle && <span className="alert-subtitle mt-1">{subtitle}</span>}
107
+ <div
108
+ className={`flex flex-col justify-center min-w-0 break-words text-f6 text-on-base ${alertTypes[type].textClass}`}
109
+ >
110
+ <span className="alert-title font-semibold komea:font-medium">
111
+ {title}
112
+ </span>
113
+ {subtitle && (
114
+ <span className="alert-subtitle komea:text-caption mt-1">
115
+ {subtitle}
116
+ </span>
117
+ )}
101
118
  </div>
102
119
  {actions && (
103
120
  <div className="alert-actions flex flex-shrink-0 items-center flex-row sm:flex-row-reverse sm:space-x-reverse space-x-3 mt-3 sm:mt-0 sm:ml-5">
@@ -69,6 +69,6 @@ describe(specTitle('Badge tests'), () => {
69
69
  cy.get(badgeClass).should('have.class', 'bg-danger-dark text-base-1')
70
70
 
71
71
  mount(<Default type="focus" />)
72
- cy.get(badgeClass).should('have.class', 'bg-focus text-base-1')
72
+ cy.get(badgeClass).should('have.class', 'bg-info text-base-1')
73
73
  })
74
74
  })
@@ -8,7 +8,7 @@ const badgeTypes = {
8
8
  danger: 'bg-danger-dark text-base-1',
9
9
  success: 'bg-success-dark text-base-1',
10
10
  warning: 'bg-warning-dark text-base-1',
11
- focus: 'bg-focus text-base-1',
11
+ focus: 'bg-info text-base-1',
12
12
  }
13
13
 
14
14
  const badgeRounded = {
@@ -44,7 +44,7 @@ const BadgeComponent = ({
44
44
  expanded ? 'flex w-full' : 'inline-flex'
45
45
  }`}
46
46
  >
47
- <span className="badgeText tracking-4 font-semibold">{text}</span>
47
+ <span className="badgeText font-semibold">{text}</span>
48
48
  </div>
49
49
  )
50
50
  }
@@ -29,9 +29,9 @@ describe(specTitle('InformationBox tests'), () => {
29
29
  cy.get('.InformationBox').should('have.class', 'bg-danger-light')
30
30
 
31
31
  mount(<Default type="info" />)
32
- cy.get('.InformationBox-title').should('have.class', 'text-focus-dark')
32
+ cy.get('.InformationBox-title').should('have.class', 'text-info-dark')
33
33
  cy.get('.InformationBox-icon').should('have.class', 'icon-lightbulb')
34
- cy.get('.InformationBox').should('have.class', 'bg-focus-light')
34
+ cy.get('.InformationBox').should('have.class', 'bg-info-light')
35
35
  })
36
36
 
37
37
  it('Close button', () => {
@@ -36,10 +36,10 @@ const InformationBoxTypes: Record<
36
36
  },
37
37
  info: {
38
38
  title: 'Informação',
39
- titleClass: 'text-focus-dark',
40
- class: 'bg-focus-light border-focus-dark',
39
+ titleClass: 'text-info-dark',
40
+ class: 'bg-info-light border-info-dark komea:border-info-stroke',
41
41
  icon: 'lightbulb',
42
- iconClass: 'text-focus-dark',
42
+ iconClass: 'text-info-dark',
43
43
  },
44
44
  }
45
45
 
@@ -74,7 +74,7 @@ const InformationBoxComponent = ({
74
74
  </div>
75
75
 
76
76
  <div className="flex-grow flex flex-col sm:flex-row items-start justify-between min-w-0">
77
- <div className="flex flex-col justify-center min-w-0 break-words tracking-4 leading-6 text-on-base">
77
+ <div className="flex flex-col justify-center min-w-0 break-words leading-6 text-on-base">
78
78
  <span
79
79
  className={`InformationBox-title text-f5 font-semibold ${InformationBoxTypes[type].titleClass}`}
80
80
  >
@@ -19,7 +19,7 @@ const TagComponent = ({
19
19
  <div
20
20
  className={`tag ${
21
21
  fullWidth ? 'flex' : 'inline-flex'
22
- } items-center justify-between border rounded px-4 py-2 tracking-4 leading-6 text-f6 text-primary-bold ${
22
+ } items-center justify-between border rounded px-4 py-2 text-f6 text-primary-bold ${
23
23
  TagTypes[type]
24
24
  } ${className}`}
25
25
  >
@@ -1,5 +1,5 @@
1
1
  .tippy-box {
2
- @apply relative bg-inverted-1 text-base-1 rounded text-f7 tracking-4 leading-4 outline-0 transition-all;
2
+ @apply relative bg-inverted-1 text-base-1 rounded text-f7 outline-0 transition-all;
3
3
 
4
4
  &[data-animation='fade'][data-state='hidden'] {
5
5
  @apply opacity-0;
@@ -30,14 +30,12 @@ export const BoxHeader = React.memo(
30
30
  >
31
31
  <div className="flex-1 min-w-0 mr-2">
32
32
  {title && (
33
- <h3
34
- className={`tracking-3 text-base font-semibold break-words`}
35
- >
33
+ <h3 className="text-f5 font-medium break-words lg:text-f4">
36
34
  {title}
37
35
  </h3>
38
36
  )}
39
37
  {subtitle && (
40
- <h4 className="tracking-4 text-sm text-on-base-2 leading-6 break-words">
38
+ <h4 className="text-f7 text-on-base-2 break-words lg:text-f6">
41
39
  {subtitle}
42
40
  </h4>
43
41
  )}
@@ -21,7 +21,7 @@ const Tag = ({ type, text }: ListActionsTagProps) => {
21
21
 
22
22
  return (
23
23
  <span
24
- className={`top-3 left-3 px-0.5 py-px rounded-sm text-f8 font-semibold leading-3 text-base-1 ${commonClasses}`}
24
+ className={`top-3 left-3 px-0.5 py-px rounded-sm text-f8 font-semibold text-base-1 ${commonClasses}`}
25
25
  >
26
26
  <Badge
27
27
  size="xsmall"
@@ -60,7 +60,7 @@ const ListActionButton = ({
60
60
  <Icon icon={icon} size={5} className="p-px" />
61
61
  {tagType || tagText ? <Tag type={tagType} text={tagText} /> : null}
62
62
  </span>
63
- <p className="lg:w-24 text-f8 lg:text-f7 font-semibold tracking-4 text-center select-none leading-tight">
63
+ <p className="lg:w-24 text-f8 lg:text-f7 font-semibold text-center select-none">
64
64
  {text}
65
65
  </p>
66
66
  </button>
@@ -3,7 +3,7 @@ import { Icon, IconProps } from '../../Icons/Icon'
3
3
  import { safeCSSId } from '../../utils'
4
4
  import { SidebarSubItemProps } from './ItemSub'
5
5
 
6
- const sidebarItemBtnClasses = `flex items-center relative px-6 py-3.5 lg:py-2.5 text-sm tracking-4 font-semibold duration-200 group-hover:text-on-base`
6
+ const sidebarItemBtnClasses = `flex items-center relative px-6 py-3.5 lg:py-2.5 text-sm font-semibold duration-200 group-hover:text-on-base`
7
7
  const sidebarItemBtnActiveClasses = (active: boolean | undefined) =>
8
8
  active ? `text-on-base` : `text-on-base-2`
9
9
  const sidebarItemBtnIconClasses = `w-4 h-6 flex-shrink-0`
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { safeCSSId } from '../../utils'
3
3
 
4
- const sidebarItemDropdownItemClasses = `flex items-center pl-14 pr-0 py-1.5 lg:py-1 text-on-base-2 text-f6 tracking-4 leading-6 duration-200 hover:text-on-base`
4
+ const sidebarItemDropdownItemClasses = `flex items-center pl-14 pr-0 py-1.5 lg:py-1 text-on-base-2 text-f6 duration-200 hover:text-on-base`
5
5
  const sidebarItemDropdownItemActiveClasses = (active: boolean | undefined) =>
6
6
  active ? `text-on-base font-semibold active` : `text-on-base-2`
7
7
 
@@ -62,7 +62,7 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = React.memo(
62
62
  <div
63
63
  className={`header-navigation-breadcrumb max-w-full truncate w-full`}
64
64
  >
65
- <div className="w-full inline-flex self-center items-center font-semibold tracking-5 text-f5 sm:text-f4 lg:text-f3">
65
+ <div className="w-full inline-flex self-center items-center font-semibold text-f5 sm:text-f4 lg:text-f3">
66
66
  {(previousTitle || previousHref || Link) && (
67
67
  <span className="header-navigation-previous inline-flex items-center text-on-base-2 text-xl -mr-px truncate">
68
68
  {renderPrevLink()}
@@ -72,7 +72,7 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = React.memo(
72
72
  </span>
73
73
  )}
74
74
  <span
75
- className={`header-navigation-current text-on-base truncate leading-relaxed ${
75
+ className={`header-navigation-current text-on-base truncate ${
76
76
  mobileAlign === 'center'
77
77
  ? 'w-full lg:w-auto text-center lg:text-left'
78
78
  : ''
@@ -19,7 +19,7 @@ const PaginationInfoComponent = ({
19
19
 
20
20
  return (
21
21
  <div className="pagination-info hidden sm:flex">
22
- <div className="flex items-center mr-5 text-inverted-2 tracking-4 text-f6">
22
+ <div className="flex items-center mr-5 text-inverted-2 text-f6">
23
23
  {itemsLengthOptions ? (
24
24
  <Select
25
25
  id="selectItemsPerPage"
@@ -46,7 +46,7 @@ const PaginationNavComponent = ({
46
46
 
47
47
  return (
48
48
  <div className="pagination-nav flex items-center justify-between w-full sm:w-auto">
49
- <div className="text-inverted-2 text-f6 tracking-4">
49
+ <div className="text-inverted-2 text-f6">
50
50
  <span
51
51
  id="btnPaginationActualPage"
52
52
  className="pagination-nav-current inline-block w-9 bg-base-1 border border-card-stroke/50 rounded font-semibold leading-8 text-center text-primary"