-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: copyright modification (#12707)
- Loading branch information
Showing
15 changed files
with
549 additions
and
154 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
web/app/components/base/icons/assets/public/common/highlight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
web/app/components/base/icons/assets/public/common/sparkles-soft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions
67
web/app/components/base/icons/src/public/common/Highlight.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"icon": { | ||
"type": "element", | ||
"isRootNode": true, | ||
"name": "svg", | ||
"attributes": { | ||
"xmlns": "http://www.w3.org/2000/svg", | ||
"width": "46", | ||
"height": "24", | ||
"viewBox": "0 0 46 24", | ||
"fill": "none" | ||
}, | ||
"children": [ | ||
{ | ||
"type": "element", | ||
"name": "path", | ||
"attributes": { | ||
"opacity": "0.5", | ||
"d": "M-6.5 8C-6.5 3.58172 -2.91828 0 1.5 0H45.5L33.0248 24H1.49999C-2.91829 24 -6.5 20.4183 -6.5 16V8Z", | ||
"fill": "url(#paint0_linear_6333_42118)" | ||
}, | ||
"children": [] | ||
}, | ||
{ | ||
"type": "element", | ||
"name": "defs", | ||
"attributes": {}, | ||
"children": [ | ||
{ | ||
"type": "element", | ||
"name": "linearGradient", | ||
"attributes": { | ||
"id": "paint0_linear_6333_42118", | ||
"x1": "1.81679", | ||
"y1": "5.47784e-07", | ||
"x2": "101.257", | ||
"y2": "30.3866", | ||
"gradientUnits": "userSpaceOnUse" | ||
}, | ||
"children": [ | ||
{ | ||
"type": "element", | ||
"name": "stop", | ||
"attributes": { | ||
"stop-color": "white", | ||
"stop-opacity": "0.12" | ||
}, | ||
"children": [] | ||
}, | ||
{ | ||
"type": "element", | ||
"name": "stop", | ||
"attributes": { | ||
"offset": "1", | ||
"stop-color": "white", | ||
"stop-opacity": "0.3" | ||
}, | ||
"children": [] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"name": "Highlight" | ||
} |
16 changes: 16 additions & 0 deletions
16
web/app/components/base/icons/src/public/common/Highlight.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// GENERATE BY script | ||
// DON NOT EDIT IT MANUALLY | ||
|
||
import * as React from 'react' | ||
import data from './Highlight.json' | ||
import IconBase from '@/app/components/base/icons/IconBase' | ||
import type { IconBaseProps, IconData } from '@/app/components/base/icons/IconBase' | ||
|
||
const Icon = React.forwardRef<React.MutableRefObject<SVGElement>, Omit<IconBaseProps, 'data'>>(( | ||
props, | ||
ref, | ||
) => <IconBase {...props} ref={ref} data={data as IconData} />) | ||
|
||
Icon.displayName = 'Highlight' | ||
|
||
export default Icon |
47 changes: 47 additions & 0 deletions
47
web/app/components/base/icons/src/public/common/SparklesSoft.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"icon": { | ||
"type": "element", | ||
"isRootNode": true, | ||
"name": "svg", | ||
"attributes": { | ||
"width": "14", | ||
"height": "14", | ||
"viewBox": "0 0 14 14", | ||
"fill": "none", | ||
"xmlns": "http://www.w3.org/2000/svg" | ||
}, | ||
"children": [ | ||
{ | ||
"type": "element", | ||
"name": "g", | ||
"attributes": { | ||
"id": "sparkles-soft" | ||
}, | ||
"children": [ | ||
{ | ||
"type": "element", | ||
"name": "path", | ||
"attributes": { | ||
"id": "Vector", | ||
"opacity": "0.5", | ||
"d": "M10.9963 1.36798C10.9839 1.25339 10.8909 1.16677 10.7802 1.16666C10.6695 1.16654 10.5763 1.25295 10.5636 1.36752C10.5045 1.90085 10.3525 2.26673 10.1143 2.5149C9.87599 2.76307 9.52476 2.92145 9.01275 2.98296C8.90277 2.99618 8.81983 3.09324 8.81995 3.20856C8.82006 3.32388 8.90322 3.42076 9.0132 3.43373C9.51653 3.49312 9.87583 3.65148 10.1201 3.90135C10.3631 4.14986 10.518 4.51523 10.563 5.04321C10.573 5.16035 10.6673 5.25012 10.7802 5.24999C10.8931 5.24986 10.9872 5.15987 10.9969 5.0427C11.0401 4.52364 11.1949 4.15004 11.4394 3.89528C11.684 3.64052 12.0426 3.47926 12.5409 3.43433C12.6534 3.42419 12.7398 3.32619 12.7399 3.20858C12.7401 3.09097 12.6539 2.99277 12.5414 2.98236C12.0346 2.93546 11.6838 2.77407 11.4452 2.52098C11.2054 2.2665 11.0533 1.89229 10.9963 1.36798Z", | ||
"fill": "#F5F8FF" | ||
}, | ||
"children": [] | ||
}, | ||
{ | ||
"type": "element", | ||
"name": "path", | ||
"attributes": { | ||
"id": "Vector_2", | ||
"d": "M7.13646 2.85102C7.10442 2.55638 6.8653 2.33365 6.5806 2.33334C6.29595 2.33304 6.05633 2.55526 6.02374 2.84984C5.87186 4.22127 5.48089 5.1621 4.86827 5.80025C4.25565 6.43838 3.35245 6.84566 2.03587 7.00386C1.75307 7.03781 1.53975 7.28742 1.54004 7.58393C1.54033 7.88049 1.75415 8.12958 2.03701 8.16294C3.33132 8.31566 4.25509 8.72289 4.88328 9.36543C5.50807 10.0045 5.90647 10.9439 6.02222 12.3016C6.04793 12.6029 6.29035 12.8337 6.58066 12.8333C6.87102 12.833 7.11294 12.6016 7.13797 12.3003C7.24885 10.9656 7.64695 10.0049 8.27583 9.34979C8.90477 8.69471 9.82698 8.28002 11.1083 8.16452C11.3976 8.13844 11.6197 7.88644 11.62 7.58399C11.6204 7.28159 11.3988 7.02906 11.1096 7.00229C9.8062 6.88171 8.90432 6.46673 8.29084 5.81589C7.674 5.16152 7.28306 4.19926 7.13646 2.85102Z", | ||
"fill": "#F5F8FF" | ||
}, | ||
"children": [] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"name": "SparklesSoft" | ||
} |
16 changes: 16 additions & 0 deletions
16
web/app/components/base/icons/src/public/common/SparklesSoft.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// GENERATE BY script | ||
// DON NOT EDIT IT MANUALLY | ||
|
||
import * as React from 'react' | ||
import data from './SparklesSoft.json' | ||
import IconBase from '@/app/components/base/icons/IconBase' | ||
import type { IconBaseProps, IconData } from '@/app/components/base/icons/IconBase' | ||
|
||
const Icon = React.forwardRef<React.MutableRefObject<SVGElement>, Omit<IconBaseProps, 'data'>>(( | ||
props, | ||
ref, | ||
) => <IconBase {...props} ref={ref} data={data as IconData} />) | ||
|
||
Icon.displayName = 'SparklesSoft' | ||
|
||
export default Icon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@tailwind components; | ||
|
||
@layer components { | ||
.premium-badge { | ||
@apply inline-flex justify-center items-center rounded-full border box-border border-[rgba(255,255,255,0.8)] text-white | ||
} | ||
|
||
/* m is for the regular button */ | ||
.premium-badge-m { | ||
@apply border shadow-lg !p-1 h-6 w-auto | ||
} | ||
|
||
.premium-badge-s { | ||
@apply border-[0.5px] shadow-xs !px-1 !py-[3px] h-[18px] w-auto | ||
} | ||
|
||
.premium-badge-blue { | ||
@apply bg-gradient-to-r from-[#5289ffe6] to-[#155aefe6] bg-util-colors-blue-blue-200 | ||
} | ||
|
||
.premium-badge-indigo { | ||
@apply bg-gradient-to-r from-[#8098f9e6] to-[#444ce7e6] bg-util-colors-indigo-indigo-200 | ||
} | ||
|
||
.premium-badge-gray { | ||
@apply bg-gradient-to-r from-[#98a2b2e6] to-[#676f83e6] bg-util-colors-gray-gray-200 | ||
} | ||
|
||
.premium-badge-orange { | ||
@apply bg-gradient-to-r from-[#ff692ee6] to-[#e04f16e6] bg-util-colors-orange-orange-200 | ||
} | ||
|
||
.premium-badge-blue.allowHover:hover { | ||
@apply bg-gradient-to-r from-[#296dffe6] to-[#004aebe6] bg-util-colors-blue-blue-300 cursor-pointer | ||
} | ||
|
||
.premium-badge-indigo.allowHover:hover { | ||
@apply bg-gradient-to-r from-[#6172f3e6] to-[#2d31a6e6] bg-util-colors-indigo-indigo-300 cursor-pointer | ||
} | ||
|
||
.premium-badge-gray.allowHover:hover { | ||
@apply bg-gradient-to-r from-[#676f83e6] to-[#354052e6] bg-util-colors-gray-gray-300 cursor-pointer | ||
} | ||
|
||
.premium-badge-orange.allowHover:hover { | ||
@apply bg-gradient-to-r from-[#ff4405e6] to-[#b93815e6] bg-util-colors-orange-orange-300 cursor-pointer | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import type { CSSProperties, ReactNode } from 'react' | ||
import React from 'react' | ||
import { type VariantProps, cva } from 'class-variance-authority' | ||
import { Highlight } from '@/app/components/base/icons/src/public/common' | ||
import classNames from '@/utils/classnames' | ||
import './index.css' | ||
|
||
const PremiumBadgeVariants = cva( | ||
'premium-badge', | ||
{ | ||
variants: { | ||
size: { | ||
s: 'premium-badge-s', | ||
m: 'premium-badge-m', | ||
}, | ||
color: { | ||
blue: 'premium-badge-blue', | ||
indigo: 'premium-badge-indigo', | ||
gray: 'premium-badge-gray', | ||
orange: 'premium-badge-orange', | ||
}, | ||
allowHover: { | ||
true: 'allowHover', | ||
false: '', | ||
}, | ||
}, | ||
defaultVariants: { | ||
size: 'm', | ||
color: 'blue', | ||
allowHover: false, | ||
}, | ||
}, | ||
) | ||
|
||
type PremiumBadgeProps = { | ||
size?: 's' | 'm' | ||
color?: 'blue' | 'indigo' | 'gray' | 'orange' | ||
allowHover?: boolean | ||
styleCss?: CSSProperties | ||
children?: ReactNode | ||
} & React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof PremiumBadgeVariants> | ||
|
||
const PremiumBadge: React.FC<PremiumBadgeProps> = ({ | ||
className, | ||
size, | ||
color, | ||
allowHover, | ||
styleCss, | ||
children, | ||
...props | ||
}) => { | ||
return ( | ||
<div | ||
className={classNames( | ||
PremiumBadgeVariants({ size, color, allowHover, className }), | ||
'relative text-nowrap', | ||
)} | ||
style={styleCss} | ||
{...props} | ||
> | ||
{children} | ||
<Highlight | ||
className={classNames( | ||
'absolute top-0 opacity-50 hover:opacity-80', | ||
size === 's' ? 'h-4.5 w-12' : 'h-6 w-12', | ||
)} | ||
style={{ | ||
right: '50%', | ||
transform: 'translateX(10%)', | ||
}} | ||
/> | ||
</div> | ||
) | ||
} | ||
PremiumBadge.displayName = 'PremiumBadge' | ||
|
||
export default PremiumBadge | ||
export { PremiumBadge, PremiumBadgeVariants } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.