Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev bqx #41

Merged
merged 26 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5c17c8e
Merge branch 'main' into dev-bqx
BQXBQX Apr 16, 2024
008c55c
feat(table): export table
BQXBQX Apr 16, 2024
6a91f30
ci: release package
BQXBQX Apr 16, 2024
c0367c3
Merge branch 'dev-bqx' of https://github.com/NJUPT-SAST/SAST-UI into …
BQXBQX Apr 17, 2024
0edae54
fix(select): maximum update depth exceeded
BQXBQX Apr 20, 2024
ae4d849
fix(global): fix font family global
BQXBQX Apr 21, 2024
f2f13bf
Merge branch 'main' into dev-bqx
BQXBQX Apr 21, 2024
66d84ee
feat(table): 完成样式封装
BQXBQX Apr 23, 2024
815c4fa
fix(carousel): 完善轮播图功能
BQXBQX Apr 23, 2024
daf80d7
Merge branch 'dev-bqx' of https://github.com/NJUPT-SAST/SAST-UI into …
BQXBQX Apr 23, 2024
1f29673
Merge branch 'main' into dev-bqx
BQXBQX Apr 23, 2024
b51d8be
feat(carousel): add classname on carousel
BQXBQX Apr 23, 2024
959a243
Merge branch 'dev-bqx' of https://github.com/NJUPT-SAST/SAST-UI into …
BQXBQX Apr 23, 2024
7317809
Merge branch 'main' into dev-bqx
BQXBQX Apr 23, 2024
532600c
feat(carousel): add classname #2
BQXBQX Apr 23, 2024
522fdb9
Merge branch 'dev-bqx' of https://github.com/NJUPT-SAST/SAST-UI into …
BQXBQX Apr 23, 2024
0a255d7
Merge branch 'main' into dev-bqx
BQXBQX Apr 23, 2024
7acb19d
fix(dialog): show area
BQXBQX Apr 25, 2024
b15824b
Merge branch 'dev-bqx' of https://github.com/NJUPT-SAST/SAST-UI into …
BQXBQX Apr 25, 2024
01d4432
Merge branch 'main' into dev-bqx
BQXBQX Apr 25, 2024
1cc5b84
fix(pagination): fix update bug
BQXBQX Apr 26, 2024
b0b24c2
Merge branch 'dev-bqx' of https://github.com/NJUPT-SAST/SAST-UI into …
BQXBQX Apr 26, 2024
9a427a1
Merge branch 'main' into dev-bqx
BQXBQX Apr 26, 2024
63b21a2
style: 增加样式参数
BQXBQX May 2, 2024
40b86f3
Merge branch 'dev-bqx' of https://github.com/NJUPT-SAST/SAST-UI into …
BQXBQX May 2, 2024
3fc9080
Merge branch 'main' into dev-bqx
BQXBQX May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions packages/ui-react/lib/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,28 @@ export interface CheckboxProps extends React.ButtonHTMLAttributes<HTMLButtonElem
* onchange of the checkbox
*/
onChecked?: (type: 'add' | 'delete', value: string) => void;
/**
* fontsize
*/
fontsize?: number;
/**
* labelClass
*/
labelClass?: string;
}

export const Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>(
(
{ value, checked, label = 'SAST', disabled = false, onChecked = function () {}, ...rest },
{
value,
checked,
label = 'SAST',
disabled = false,
fontsize,
labelClass,
onChecked = function () {},
...rest
},
ref,
) => {
const checkboxClass = classNames(`${styles['base']} ${styles[disabled ? 'disabled' : '']}`);
Expand Down Expand Up @@ -62,7 +79,12 @@ export const Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>(
/>
)}
</button>
<label className={styles['labelSpan']}>{label}</label>
<label
className={`${labelClass} ${styles['labelSpan']}`}
style={{ fontSize: `${fontsize}px` }}
>
{label}
</label>
</div>
);
},
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-react/lib/Sheet/Sheet.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $padding-left-right-distance: 20px;
position: fixed;
left: 0;
top: 0;
z-index: 1;
z-index: 999;
box-sizing: border-box;
&.mask {
backdrop-filter: blur(var(--blur));
Expand All @@ -60,7 +60,7 @@ $padding-left-right-distance: 20px;
height: 100vh;
background-color: $white-color;
position: absolute;
z-index: 2;
z-index: 1000;
box-sizing: border-box;
right: 0;
padding: $padding-left-right-distance;
Expand Down
7 changes: 6 additions & 1 deletion packages/ui-react/lib/Sheet/Sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export interface SheetProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
* placement : left|right
*/
placement?: 'left' | 'right';
/**
* isFooter
*/
isFooter?: boolean;
}

export const Sheet = React.forwardRef<HTMLDivElement, SheetProps>(
Expand All @@ -67,6 +71,7 @@ export const Sheet = React.forwardRef<HTMLDivElement, SheetProps>(
mask = true,
maskStyle,
placement = 'right',
isFooter,
...rest
},
ref,
Expand Down Expand Up @@ -124,7 +129,7 @@ export const Sheet = React.forwardRef<HTMLDivElement, SheetProps>(
content={sheetTitle}
></SheetHeader>
<div className={styles['sheetMainContent']}>{mainContent}</div>
<SheetFooter onCancel={onCancel}>{sheetFooter}</SheetFooter>
{isFooter && <SheetFooter onCancel={onCancel}>{sheetFooter}</SheetFooter>}
</div>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ui-aurora/react",
"version": "0.0.12",
"version": "0.0.13",
"description": "A React UI library built for SASTOJ",
"author": "sast",
"license": "MIT",
Expand Down
Loading