@loja-integrada/admin-components 0.19.7 → 0.19.9
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/dist/Icons/icons-path/ProgressiveDiscount.d.ts +2 -0
- package/dist/Icons/icons-path/index.d.ts +1 -0
- package/dist/Indicators/Alert/Alert.d.ts +6 -2
- package/dist/admin-components.cjs.development.js +317 -130
- package/dist/admin-components.cjs.development.js.map +1 -1
- package/dist/admin-components.cjs.production.min.js +1 -1
- package/dist/admin-components.cjs.production.min.js.map +1 -1
- package/dist/admin-components.esm.js +317 -130
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +5 -5
- package/src/Icons/icons-path/ProgressiveDiscount.tsx +36 -0
- package/src/Icons/icons-path/index.ts +2 -0
- package/src/Indicators/Alert/Alert.tsx +23 -8
- 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.
|
|
3
|
+
"version": "0.19.9",
|
|
4
4
|
"author": "Loja Integrada Front-End Team",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@types/react-modal": "^3.12.1",
|
|
96
96
|
"@types/react-table": "^7.7.1",
|
|
97
97
|
"@types/react-text-mask": "^5.4.8",
|
|
98
|
-
"autoprefixer": "^10.4.
|
|
98
|
+
"autoprefixer": "^10.4.20",
|
|
99
99
|
"babel-loader": "^8.2.2",
|
|
100
100
|
"babel-plugin-istanbul": "^6.1.1",
|
|
101
101
|
"babel-plugin-module-name-mapper": "^1.2.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"html-webpack-plugin": "^5.5.0",
|
|
109
109
|
"husky": "^5.1.3",
|
|
110
110
|
"identity-obj-proxy": "^3.0.0",
|
|
111
|
-
"postcss": "^8.4.
|
|
111
|
+
"postcss": "^8.4.47",
|
|
112
112
|
"postcss-loader": "^4.2.0",
|
|
113
113
|
"postcss-nesting": "^11.2.1",
|
|
114
114
|
"prettier": "^2.6.2",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"storybook-addon-designs": "^6.3.1",
|
|
121
121
|
"storybook-dark-mode": "^2.1.1",
|
|
122
122
|
"style-loader": "2.0.0",
|
|
123
|
-
"tailwindcss": "^3.
|
|
123
|
+
"tailwindcss": "^3.4.13",
|
|
124
124
|
"tsdx": "^0.14.1",
|
|
125
125
|
"tslib": "^2.4.0",
|
|
126
126
|
"typescript": "^4.6.4",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"tailwindcss": ">=3.1.0"
|
|
135
135
|
},
|
|
136
136
|
"dependencies": {
|
|
137
|
-
"@loja-integrada/tailwindcss-config": "^
|
|
137
|
+
"@loja-integrada/tailwindcss-config": "^2.0.3",
|
|
138
138
|
"@tippyjs/react": "^4.2.5",
|
|
139
139
|
"@types/react-select": "^4.0.17",
|
|
140
140
|
"babel-jest": "^29.2.2",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
export const ProgressiveDiscount = () => (
|
|
4
|
+
<>
|
|
5
|
+
<path
|
|
6
|
+
fillRule="evenodd"
|
|
7
|
+
clipRule="evenodd"
|
|
8
|
+
d="M4.53255 2.09998C4.07255 2.09998 3.69922 2.47331 3.69922 2.93331C3.69922 3.39331 4.07255 3.76664 4.53255 3.76664C4.99255 3.76664 5.36589 3.39331 5.36589 2.93331C5.36589 2.47331 4.99255 2.09998 4.53255 2.09998Z"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
fillRule="evenodd"
|
|
12
|
+
clipRule="evenodd"
|
|
13
|
+
d="M7.53255 5.09998C7.07255 5.09998 6.69922 5.47331 6.69922 5.93331C6.69922 6.39331 7.07255 6.76664 7.53255 6.76664C7.99255 6.76664 8.36589 6.39331 8.36589 5.93331C8.36589 5.47331 7.99255 5.09998 7.53255 5.09998Z"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
fillRule="evenodd"
|
|
17
|
+
clipRule="evenodd"
|
|
18
|
+
d="M7.21605 2.09998H7.79005C7.89539 2.09998 7.95939 2.21664 7.90205 2.30598L5.13205 6.61398C5.07139 6.70864 4.96539 6.76664 4.85205 6.76664H4.27805C4.17272 6.76664 4.10872 6.64998 4.16605 6.56064L6.93605 2.25264C6.99672 2.15798 7.10272 2.09998 7.21605 2.09998Z"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
fillRule="evenodd"
|
|
22
|
+
clipRule="evenodd"
|
|
23
|
+
d="M11.3 1.49995C11.3 1.16858 11.0314 0.899951 10.7 0.899951H1.3C0.968629 0.899951 0.7 1.16858 0.7 1.49995V7.29995C0.7 7.63132 0.968629 7.89995 1.3 7.89995H10.7C11.0314 7.89995 11.3 7.63132 11.3 7.29995V1.49995ZM1 0.199951C0.447715 0.199951 0 0.647667 0 1.19995V7.59995C0 8.15224 0.447715 8.59995 1 8.59995H11C11.5523 8.59995 12 8.15224 12 7.59995V1.19995C12 0.647666 11.5523 0.199951 11 0.199951H1Z"
|
|
24
|
+
/>
|
|
25
|
+
<path
|
|
26
|
+
fillRule="evenodd"
|
|
27
|
+
clipRule="evenodd"
|
|
28
|
+
d="M1.7083 9C1.7559 9.28377 2.0027 9.5 2.3 9.5H9.7C9.9973 9.5 10.2441 9.28377 10.2917 9H11V9.2C11 9.75228 10.5523 10.2 10 10.2H2C1.44772 10.2 1 9.75228 1 9.2V9H1.7083Z"
|
|
29
|
+
/>
|
|
30
|
+
<path
|
|
31
|
+
fillRule="evenodd"
|
|
32
|
+
clipRule="evenodd"
|
|
33
|
+
d="M2.7083 10.6C2.7559 10.8837 3.0027 11.1 3.3 11.1H8.7C8.9973 11.1 9.2441 10.8837 9.2917 10.6H10V10.8C10 11.3523 9.55229 11.8 9 11.8H3C2.44772 11.8 2 11.3523 2 10.8V10.6H2.7083Z"
|
|
34
|
+
/>
|
|
35
|
+
</>
|
|
36
|
+
)
|
|
@@ -91,6 +91,7 @@ import { MinusCircle } from './MinusCircle'
|
|
|
91
91
|
import { MinusCircleSolid } from './MinusCircleSolid'
|
|
92
92
|
import { DotsThree } from './DotsThree'
|
|
93
93
|
import { Instagram } from './Instagram'
|
|
94
|
+
import { ProgressiveDiscount } from './ProgressiveDiscount'
|
|
94
95
|
|
|
95
96
|
export const icons = {
|
|
96
97
|
adjust: Adjust,
|
|
@@ -187,4 +188,5 @@ export const icons = {
|
|
|
187
188
|
minusCircleSolid: MinusCircleSolid,
|
|
188
189
|
dotsThree: DotsThree,
|
|
189
190
|
instagram: Instagram,
|
|
191
|
+
progressiveDiscount: ProgressiveDiscount,
|
|
190
192
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { Icon, IconProps } from '../../Icons'
|
|
3
3
|
|
|
4
|
-
type alertTypesOptions = 'success' | 'warning' | 'danger' | 'info' | 'primary'
|
|
4
|
+
type alertTypesOptions = 'success' | 'warning' | 'danger' | 'info' | 'infoOutline' | 'infoDark' | 'primary'
|
|
5
5
|
|
|
6
6
|
const alertTypes: Record<
|
|
7
7
|
alertTypesOptions,
|
|
@@ -17,9 +17,9 @@ const alertTypes: Record<
|
|
|
17
17
|
iconClass: 'text-success',
|
|
18
18
|
},
|
|
19
19
|
warning: {
|
|
20
|
-
class: 'bg-warning-light border-warning',
|
|
20
|
+
class: 'bg-warning-light border-warning-dark',
|
|
21
21
|
icon: 'exclamationTriangle',
|
|
22
|
-
iconClass: 'text-warning',
|
|
22
|
+
iconClass: 'text-warning-dark',
|
|
23
23
|
},
|
|
24
24
|
danger: {
|
|
25
25
|
class: 'bg-danger-light border-danger',
|
|
@@ -27,9 +27,19 @@ const alertTypes: Record<
|
|
|
27
27
|
iconClass: 'text-danger',
|
|
28
28
|
},
|
|
29
29
|
info: {
|
|
30
|
-
class: 'bg-
|
|
30
|
+
class: 'bg-focus-light border-focus-dark',
|
|
31
31
|
icon: 'infoCircle',
|
|
32
|
-
iconClass: 'text-
|
|
32
|
+
iconClass: 'text-focus-dark',
|
|
33
|
+
},
|
|
34
|
+
infoOutline: {
|
|
35
|
+
class: 'bg-base-1 border-focus-dark',
|
|
36
|
+
icon: 'infoCircle',
|
|
37
|
+
iconClass: 'text-focus-dark',
|
|
38
|
+
},
|
|
39
|
+
infoDark: {
|
|
40
|
+
class: 'bg-base-1 border-[#607081]',
|
|
41
|
+
icon: 'infoCircle',
|
|
42
|
+
iconClass: 'text-[#607081]',
|
|
33
43
|
},
|
|
34
44
|
primary: {
|
|
35
45
|
class: 'bg-primary-light border-primary',
|
|
@@ -47,6 +57,7 @@ const AlertComponent = ({
|
|
|
47
57
|
showClose = false,
|
|
48
58
|
onClose,
|
|
49
59
|
hideIcon = false,
|
|
60
|
+
hideBorder = false,
|
|
50
61
|
customIcon,
|
|
51
62
|
}: AlertProps) => {
|
|
52
63
|
const [alertIsOpen, setAlertIsOpen] = useState(isOpen)
|
|
@@ -62,7 +73,7 @@ const AlertComponent = ({
|
|
|
62
73
|
if (!alertIsOpen) return null
|
|
63
74
|
return (
|
|
64
75
|
<div
|
|
65
|
-
className={`alert border
|
|
76
|
+
className={`alert border-l-4 py-4 pl-6 pr-5 rounded w-full relative flex items-start sm:items-center ${alertTypes[type].class}${hideBorder ? '' : ' border'}`}
|
|
66
77
|
>
|
|
67
78
|
{!hideIcon && (
|
|
68
79
|
<div
|
|
@@ -75,7 +86,7 @@ const AlertComponent = ({
|
|
|
75
86
|
</div>
|
|
76
87
|
)}
|
|
77
88
|
<div className="flex-grow flex flex-col sm:flex-row items-start sm:items-center justify-between min-w-0">
|
|
78
|
-
<div className="flex flex-col justify-center min-w-0 break-words text-f6 tracking-4 leading-
|
|
89
|
+
<div className="flex flex-col justify-center min-w-0 break-words text-f6 tracking-4 leading-6 text-on-base">
|
|
79
90
|
<span className="alert-title font-semibold">{title}</span>
|
|
80
91
|
{subtitle && <span className="alert-subtitle mt-1">{subtitle}</span>}
|
|
81
92
|
</div>
|
|
@@ -86,7 +97,7 @@ const AlertComponent = ({
|
|
|
86
97
|
)}
|
|
87
98
|
</div>
|
|
88
99
|
{(showClose || onClose) && (
|
|
89
|
-
<div className={`alert-close flex-shrink-0 flex ml-5`}>
|
|
100
|
+
<div className={`alert-close flex-shrink-0 flex self-start ml-5`}>
|
|
90
101
|
<button
|
|
91
102
|
className="p-2 -m-2 text-inverted-2 hover:text-inverted-1"
|
|
92
103
|
onClick={handleOnClose}
|
|
@@ -130,6 +141,10 @@ export interface AlertProps {
|
|
|
130
141
|
* @default false
|
|
131
142
|
*/
|
|
132
143
|
hideIcon?: boolean
|
|
144
|
+
/** Hide alert border
|
|
145
|
+
* @default false
|
|
146
|
+
*/
|
|
147
|
+
hideBorder?: boolean
|
|
133
148
|
/**
|
|
134
149
|
* Custom icon
|
|
135
150
|
*/
|