This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from tipisai/Release/tipis
Release/tipis
- Loading branch information
Showing
427 changed files
with
17,232 additions
and
9,308 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
engine-strict = true | ||
engine-strict=true |
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
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
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
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,25 @@ | ||
import { FC } from "react" | ||
import RequireIcon from "@/assets/agent/require.svg?react" | ||
import { ILabelProps } from "./interface" | ||
import { | ||
iconContainerStyle, | ||
labelContainerStyle, | ||
labelStyle, | ||
requiredIconStyle, | ||
} from "./style" | ||
|
||
const Label: FC<ILabelProps> = (props) => { | ||
const { title, required } = props | ||
return ( | ||
<div css={labelContainerStyle}> | ||
<p css={labelStyle}>{title}</p> | ||
{required && ( | ||
<div css={iconContainerStyle}> | ||
<RequireIcon css={requiredIconStyle} /> | ||
</div> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export default Label |
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,4 @@ | ||
export interface ILabelProps { | ||
title: string | ||
required?: boolean | ||
} |
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,32 @@ | ||
import { css } from "@emotion/react" | ||
import { getColor } from "@illa-public/color-scheme" | ||
|
||
export const labelContainerStyle = css` | ||
width: 160px; | ||
flex: none; | ||
display: flex; | ||
padding: 9px 0; | ||
gap: 4px; | ||
` | ||
|
||
export const labelStyle = css` | ||
width: 100%; | ||
color: ${getColor("grayBlue", "02")}; | ||
text-align: right; | ||
font-weight: 500; | ||
line-height: 22px; | ||
font-size: 14px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
` | ||
|
||
export const requiredIconStyle = css` | ||
flex: none; | ||
width: 8px; | ||
height: 8px; | ||
` | ||
|
||
export const iconContainerStyle = css` | ||
line-height: 22px; | ||
` |
30 changes: 30 additions & 0 deletions
30
apps/agent/src/Layout/Function/LabelWithController/index.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,30 @@ | ||
import { FC } from "react" | ||
import ErrorMessage from "../../../components/InputErrorMessage" | ||
import Label from "../Label" | ||
import { ILabelWithControllerProps } from "./interface" | ||
import { | ||
controllerContainerStyle, | ||
errorMessageContainerStyle, | ||
labelWithContainerStyle, | ||
outerContainerStyle, | ||
} from "./style" | ||
|
||
const LabelWithController: FC<ILabelWithControllerProps> = (props) => { | ||
const { title, children, required, errorMessage } = props | ||
return ( | ||
<div css={outerContainerStyle}> | ||
<div css={labelWithContainerStyle}> | ||
<Label title={title} required={required} /> | ||
<div css={controllerContainerStyle}>{children}</div> | ||
</div> | ||
{errorMessage && ( | ||
<div css={errorMessageContainerStyle}> | ||
<Label title={""} /> | ||
<ErrorMessage message={errorMessage} /> | ||
</div> | ||
)} | ||
</div> | ||
) | ||
} | ||
|
||
export default LabelWithController |
8 changes: 8 additions & 0 deletions
8
apps/agent/src/Layout/Function/LabelWithController/interface.ts
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,8 @@ | ||
import { ReactNode } from "react" | ||
|
||
export interface ILabelWithControllerProps { | ||
title: string | ||
required?: boolean | ||
children: ReactNode | ||
errorMessage?: string | ||
} |
25 changes: 25 additions & 0 deletions
25
apps/agent/src/Layout/Function/LabelWithController/style.ts
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,25 @@ | ||
import { css } from "@emotion/react" | ||
|
||
export const labelWithContainerStyle = css` | ||
display: flex; | ||
gap: 16px; | ||
width: 100%; | ||
padding: 8px 0; | ||
` | ||
|
||
export const controllerContainerStyle = css` | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
` | ||
|
||
export const outerContainerStyle = css` | ||
display: flex; | ||
flex-direction: column; | ||
` | ||
|
||
export const errorMessageContainerStyle = css` | ||
width: 100%; | ||
display: flex; | ||
gap: 16px; | ||
` |
Oops, something went wrong.