@ceed/cds 1.15.0-next.7 → 1.15.0-next.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/components/FilterableCheckboxGroup/FilterableCheckboxGroup.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -0
- package/dist/components/navigation/Pagination.md +2 -2
- package/dist/index.cjs +338 -200
- package/dist/index.js +161 -23
- package/framer/index.js +51 -51
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3466,8 +3466,10 @@ TableBody.displayName = "TableBody";
|
|
|
3466
3466
|
|
|
3467
3467
|
// src/components/Pagination/Pagination.tsx
|
|
3468
3468
|
import React24, { useCallback as useCallback10, useEffect as useEffect6 } from "react";
|
|
3469
|
-
import PreviousIcon from "@mui/icons-material/
|
|
3470
|
-
import NextIcon from "@mui/icons-material/
|
|
3469
|
+
import PreviousIcon from "@mui/icons-material/ChevronLeftRounded";
|
|
3470
|
+
import NextIcon from "@mui/icons-material/ChevronRightRounded";
|
|
3471
|
+
import FirstPageIcon from "@mui/icons-material/FirstPageRounded";
|
|
3472
|
+
import LastPageIcon from "@mui/icons-material/LastPageRounded";
|
|
3471
3473
|
import { styled as styled13 } from "@mui/joy";
|
|
3472
3474
|
var PaginationButton = styled13(Button_default, {
|
|
3473
3475
|
name: "Pagination",
|
|
@@ -3526,6 +3528,7 @@ function Pagination(props) {
|
|
|
3526
3528
|
onPageChange,
|
|
3527
3529
|
rowCount,
|
|
3528
3530
|
size = "md",
|
|
3531
|
+
variant = "standard",
|
|
3529
3532
|
...innerProps
|
|
3530
3533
|
} = props;
|
|
3531
3534
|
const [paginationModel, setPaginationModel] = useControlledState(
|
|
@@ -3552,6 +3555,87 @@ function Pagination(props) {
|
|
|
3552
3555
|
setPaginationModel({ ...paginationModel, page: lastPage });
|
|
3553
3556
|
}
|
|
3554
3557
|
}, [rowCount, paginationModel, lastPage, setPaginationModel]);
|
|
3558
|
+
const pageOptions = Array.from({ length: lastPage }, (_, i) => ({
|
|
3559
|
+
label: `${i + 1}`,
|
|
3560
|
+
value: `${i + 1}`
|
|
3561
|
+
}));
|
|
3562
|
+
if (variant === "compact") {
|
|
3563
|
+
return /* @__PURE__ */ React24.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React24.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React24.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ React24.createElement(
|
|
3564
|
+
PaginationIconButton,
|
|
3565
|
+
{
|
|
3566
|
+
size,
|
|
3567
|
+
variant: "plain",
|
|
3568
|
+
color: "neutral",
|
|
3569
|
+
onClick: () => handlePageChange(firstPage),
|
|
3570
|
+
disabled: paginationModel.page === firstPage,
|
|
3571
|
+
"aria-label": "First page"
|
|
3572
|
+
},
|
|
3573
|
+
/* @__PURE__ */ React24.createElement(FirstPageIcon, null)
|
|
3574
|
+
), /* @__PURE__ */ React24.createElement(
|
|
3575
|
+
PaginationIconButton,
|
|
3576
|
+
{
|
|
3577
|
+
size,
|
|
3578
|
+
variant: "plain",
|
|
3579
|
+
color: "neutral",
|
|
3580
|
+
onClick: () => handlePageChange(paginationModel.page - 1),
|
|
3581
|
+
disabled: paginationModel.page === firstPage,
|
|
3582
|
+
"aria-label": "Previous page"
|
|
3583
|
+
},
|
|
3584
|
+
/* @__PURE__ */ React24.createElement(PreviousIcon, null)
|
|
3585
|
+
)), /* @__PURE__ */ React24.createElement(
|
|
3586
|
+
Autocomplete_default,
|
|
3587
|
+
{
|
|
3588
|
+
size,
|
|
3589
|
+
value: `${paginationModel.page}`,
|
|
3590
|
+
onChange: (event) => {
|
|
3591
|
+
if (event.target.value) {
|
|
3592
|
+
handlePageChange(parseInt(event.target.value, 10));
|
|
3593
|
+
}
|
|
3594
|
+
},
|
|
3595
|
+
options: pageOptions,
|
|
3596
|
+
sx: {
|
|
3597
|
+
width: {
|
|
3598
|
+
sm: "80px",
|
|
3599
|
+
md: "100px",
|
|
3600
|
+
lg: "120px"
|
|
3601
|
+
}[size]
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
), /* @__PURE__ */ React24.createElement(
|
|
3605
|
+
Typography_default,
|
|
3606
|
+
{
|
|
3607
|
+
level: `body-${size}`,
|
|
3608
|
+
sx: (theme) => ({
|
|
3609
|
+
color: theme.palette.text.secondary,
|
|
3610
|
+
fontWeight: 500
|
|
3611
|
+
})
|
|
3612
|
+
},
|
|
3613
|
+
"/ ",
|
|
3614
|
+
lastPage
|
|
3615
|
+
), /* @__PURE__ */ React24.createElement(Stack_default, { direction: "row" }, /* @__PURE__ */ React24.createElement(
|
|
3616
|
+
PaginationIconButton,
|
|
3617
|
+
{
|
|
3618
|
+
size,
|
|
3619
|
+
variant: "plain",
|
|
3620
|
+
color: "neutral",
|
|
3621
|
+
onClick: () => handlePageChange(paginationModel.page + 1),
|
|
3622
|
+
disabled: paginationModel.page === lastPage,
|
|
3623
|
+
"aria-label": "Next page"
|
|
3624
|
+
},
|
|
3625
|
+
/* @__PURE__ */ React24.createElement(NextIcon, null)
|
|
3626
|
+
), /* @__PURE__ */ React24.createElement(
|
|
3627
|
+
PaginationIconButton,
|
|
3628
|
+
{
|
|
3629
|
+
size,
|
|
3630
|
+
variant: "plain",
|
|
3631
|
+
color: "neutral",
|
|
3632
|
+
onClick: () => handlePageChange(lastPage),
|
|
3633
|
+
disabled: paginationModel.page === lastPage,
|
|
3634
|
+
"aria-label": "Last page"
|
|
3635
|
+
},
|
|
3636
|
+
/* @__PURE__ */ React24.createElement(LastPageIcon, null)
|
|
3637
|
+
))));
|
|
3638
|
+
}
|
|
3555
3639
|
return /* @__PURE__ */ React24.createElement(PaginationRoot, { ...innerProps }, /* @__PURE__ */ React24.createElement(PaginationContainer, { direction: "row", size, alignItems: "center" }, /* @__PURE__ */ React24.createElement(
|
|
3556
3640
|
PaginationIconButton,
|
|
3557
3641
|
{
|
|
@@ -3573,7 +3657,7 @@ function Pagination(props) {
|
|
|
3573
3657
|
"aria-label": "More previous pages"
|
|
3574
3658
|
},
|
|
3575
3659
|
"..."
|
|
3576
|
-
), beforePages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React24.createElement(PaginationButton, { active: "
|
|
3660
|
+
), beforePages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), /* @__PURE__ */ React24.createElement(PaginationButton, { active: "true", size, "aria-current": "page" }, paginationModel.page), afterPages.map((p) => /* @__PURE__ */ React24.createElement(PaginationButton, { key: p, size, variant: "plain", color: "neutral", onClick: () => handlePageChange(p) }, p)), isMoreAfterPages && /* @__PURE__ */ React24.createElement(
|
|
3577
3661
|
PaginationButton,
|
|
3578
3662
|
{
|
|
3579
3663
|
size,
|
|
@@ -4444,11 +4528,52 @@ var InsetDrawer = styled20(JoyDrawer2)(({ theme }) => ({
|
|
|
4444
4528
|
|
|
4445
4529
|
// src/components/FilterableCheckboxGroup/FilterableCheckboxGroup.tsx
|
|
4446
4530
|
import React31, { useCallback as useCallback13, useEffect as useEffect8, useMemo as useMemo12, useRef as useRef8, useState as useState10 } from "react";
|
|
4447
|
-
import { Input as Input2, Stack as Stack2 } from "@mui/joy";
|
|
4448
4531
|
import SearchIcon from "@mui/icons-material/Search";
|
|
4449
4532
|
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
4533
|
+
function LabelWithTooltip(props) {
|
|
4534
|
+
const { label, size } = props;
|
|
4535
|
+
const labelContentRef = useRef8(null);
|
|
4536
|
+
const [isOverflowing, setIsOverflowing] = useState10(false);
|
|
4537
|
+
const labelContent = /* @__PURE__ */ React31.createElement(
|
|
4538
|
+
"span",
|
|
4539
|
+
{
|
|
4540
|
+
ref: labelContentRef,
|
|
4541
|
+
style: {
|
|
4542
|
+
textOverflow: "ellipsis",
|
|
4543
|
+
overflow: "hidden",
|
|
4544
|
+
whiteSpace: "nowrap",
|
|
4545
|
+
display: "block",
|
|
4546
|
+
position: "relative",
|
|
4547
|
+
zIndex: 1,
|
|
4548
|
+
cursor: "pointer"
|
|
4549
|
+
}
|
|
4550
|
+
},
|
|
4551
|
+
label
|
|
4552
|
+
);
|
|
4553
|
+
useEffect8(() => {
|
|
4554
|
+
const element = labelContentRef.current;
|
|
4555
|
+
if (element) {
|
|
4556
|
+
setIsOverflowing(element.scrollWidth > element.clientWidth);
|
|
4557
|
+
}
|
|
4558
|
+
}, [label]);
|
|
4559
|
+
if (isOverflowing) {
|
|
4560
|
+
return /* @__PURE__ */ React31.createElement(Tooltip_default, { variant: "solid", size, title: label, placement: "bottom-start" }, labelContent);
|
|
4561
|
+
}
|
|
4562
|
+
return labelContent;
|
|
4563
|
+
}
|
|
4450
4564
|
function FilterableCheckboxGroup(props) {
|
|
4451
|
-
const {
|
|
4565
|
+
const {
|
|
4566
|
+
value,
|
|
4567
|
+
options,
|
|
4568
|
+
label,
|
|
4569
|
+
placeholder,
|
|
4570
|
+
helperText,
|
|
4571
|
+
size = "md",
|
|
4572
|
+
required,
|
|
4573
|
+
onChange,
|
|
4574
|
+
maxHeight = 300,
|
|
4575
|
+
disabled
|
|
4576
|
+
} = props;
|
|
4452
4577
|
const [searchTerm, setSearchTerm] = useState10("");
|
|
4453
4578
|
const [sortedOptions, setSortedOptions] = useState10(options);
|
|
4454
4579
|
const [internalValue, setInternalValue] = useControlledState(
|
|
@@ -4526,37 +4651,47 @@ function FilterableCheckboxGroup(props) {
|
|
|
4526
4651
|
const handleSelectAll = useCallback13(
|
|
4527
4652
|
(event) => {
|
|
4528
4653
|
const checked = event.target.checked;
|
|
4654
|
+
const enabledOptions = filteredOptions.filter((option) => !option.disabled);
|
|
4655
|
+
const disabledSelectedValues = internalValue.filter(
|
|
4656
|
+
(v) => filteredOptions.some((opt) => opt.value === v && opt.disabled)
|
|
4657
|
+
);
|
|
4529
4658
|
if (checked) {
|
|
4530
|
-
|
|
4659
|
+
const enabledValues = enabledOptions.map((option) => option.value);
|
|
4660
|
+
setInternalValue([...disabledSelectedValues, ...enabledValues]);
|
|
4531
4661
|
} else {
|
|
4532
|
-
setInternalValue(
|
|
4662
|
+
setInternalValue(disabledSelectedValues);
|
|
4533
4663
|
}
|
|
4534
4664
|
},
|
|
4535
|
-
[filteredOptions, setInternalValue]
|
|
4665
|
+
[filteredOptions, internalValue, setInternalValue]
|
|
4536
4666
|
);
|
|
4537
|
-
const
|
|
4538
|
-
const
|
|
4539
|
-
|
|
4540
|
-
|
|
4667
|
+
const enabledFilteredOptions = useMemo12(() => filteredOptions.filter((option) => !option.disabled), [filteredOptions]);
|
|
4668
|
+
const isAllSelected = enabledFilteredOptions.length > 0 && enabledFilteredOptions.every((option) => internalValue.includes(option.value));
|
|
4669
|
+
const isIndeterminate = !isAllSelected && enabledFilteredOptions.some((option) => internalValue.includes(option.value));
|
|
4670
|
+
return /* @__PURE__ */ React31.createElement("div", { style: { width: "100%" } }, /* @__PURE__ */ React31.createElement(
|
|
4671
|
+
Input_default,
|
|
4541
4672
|
{
|
|
4673
|
+
label,
|
|
4674
|
+
helperText,
|
|
4675
|
+
required,
|
|
4542
4676
|
variant: "outlined",
|
|
4543
4677
|
color: "neutral",
|
|
4544
4678
|
placeholder,
|
|
4545
4679
|
value: searchTerm,
|
|
4546
4680
|
onChange: handleSearchChange,
|
|
4547
4681
|
size,
|
|
4682
|
+
disabled,
|
|
4548
4683
|
endDecorator: /* @__PURE__ */ React31.createElement(SearchIcon, null)
|
|
4549
4684
|
}
|
|
4550
|
-
),
|
|
4551
|
-
|
|
4685
|
+
), filteredOptions.length === 0 ? /* @__PURE__ */ React31.createElement(
|
|
4686
|
+
Stack_default,
|
|
4552
4687
|
{
|
|
4553
|
-
sx: {
|
|
4688
|
+
sx: (theme) => ({
|
|
4554
4689
|
padding: "20px 12px",
|
|
4555
4690
|
justifyContent: "center",
|
|
4556
4691
|
alignItems: "center",
|
|
4557
4692
|
fontSize: noOptionsFontSize,
|
|
4558
|
-
color:
|
|
4559
|
-
}
|
|
4693
|
+
color: theme.palette.neutral.softDisabledColor
|
|
4694
|
+
})
|
|
4560
4695
|
},
|
|
4561
4696
|
"No options found."
|
|
4562
4697
|
) : /* @__PURE__ */ React31.createElement(
|
|
@@ -4578,6 +4713,7 @@ function FilterableCheckboxGroup(props) {
|
|
|
4578
4713
|
indeterminate: isIndeterminate,
|
|
4579
4714
|
onChange: handleSelectAll,
|
|
4580
4715
|
size,
|
|
4716
|
+
disabled,
|
|
4581
4717
|
slotProps: {
|
|
4582
4718
|
action: {
|
|
4583
4719
|
sx: { top: 0, left: 0, bottom: 0, right: 0 }
|
|
@@ -4587,7 +4723,7 @@ function FilterableCheckboxGroup(props) {
|
|
|
4587
4723
|
}
|
|
4588
4724
|
),
|
|
4589
4725
|
/* @__PURE__ */ React31.createElement(
|
|
4590
|
-
|
|
4726
|
+
Stack_default,
|
|
4591
4727
|
{
|
|
4592
4728
|
sx: {
|
|
4593
4729
|
height: `${virtualizer.getTotalSize()}px`,
|
|
@@ -4600,13 +4736,15 @@ function FilterableCheckboxGroup(props) {
|
|
|
4600
4736
|
Checkbox_default,
|
|
4601
4737
|
{
|
|
4602
4738
|
key: virtualRow.key,
|
|
4603
|
-
label: option.label,
|
|
4739
|
+
label: /* @__PURE__ */ React31.createElement(LabelWithTooltip, { label: option.label, size }),
|
|
4604
4740
|
checked: internalValue.includes(option.value),
|
|
4605
4741
|
onChange: handleCheckboxChange(option.value),
|
|
4606
4742
|
size,
|
|
4743
|
+
disabled: disabled || option.disabled,
|
|
4607
4744
|
slotProps: {
|
|
4608
4745
|
action: {
|
|
4609
4746
|
sx: { top: 0, left: 0, bottom: 0, right: 0 }
|
|
4747
|
+
// NOTE: 불필요한 좌우 스크롤 방지
|
|
4610
4748
|
}
|
|
4611
4749
|
},
|
|
4612
4750
|
sx: {
|
|
@@ -5291,7 +5429,7 @@ import {
|
|
|
5291
5429
|
AccordionDetails as JoyAccordionDetails2,
|
|
5292
5430
|
styled as styled23,
|
|
5293
5431
|
accordionSummaryClasses,
|
|
5294
|
-
Stack as
|
|
5432
|
+
Stack as Stack2
|
|
5295
5433
|
} from "@mui/joy";
|
|
5296
5434
|
var AccordionSummary2 = styled23(JoyAccordionSummary2, {
|
|
5297
5435
|
name: "NavigationGroup",
|
|
@@ -5315,7 +5453,7 @@ var AccordionDetails2 = styled23(JoyAccordionDetails2, {
|
|
|
5315
5453
|
}));
|
|
5316
5454
|
function NavigationGroup(props) {
|
|
5317
5455
|
const { title, children, startDecorator, level, ...rest } = props;
|
|
5318
|
-
return /* @__PURE__ */ React37.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React37.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React37.createElement(
|
|
5456
|
+
return /* @__PURE__ */ React37.createElement(JoyAccordion2, { ...rest }, /* @__PURE__ */ React37.createElement(AccordionSummary2, { useIcon: !!startDecorator, level }, /* @__PURE__ */ React37.createElement(Stack2, { direction: "row", gap: 4 }, startDecorator, title)), /* @__PURE__ */ React37.createElement(AccordionDetails2, null, children));
|
|
5319
5457
|
}
|
|
5320
5458
|
|
|
5321
5459
|
// src/components/NavigationItem/NavigationItem.tsx
|
|
@@ -5978,7 +6116,7 @@ ThemeProvider.displayName = "ThemeProvider";
|
|
|
5978
6116
|
|
|
5979
6117
|
// src/components/Uploader/Uploader.tsx
|
|
5980
6118
|
import React46, { useCallback as useCallback17, useEffect as useEffect12, useMemo as useMemo15, useRef as useRef11, useState as useState15 } from "react";
|
|
5981
|
-
import { styled as styled29, Input as
|
|
6119
|
+
import { styled as styled29, Input as Input2 } from "@mui/joy";
|
|
5982
6120
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
5983
6121
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
5984
6122
|
import MuiClearIcon from "@mui/icons-material/ClearRounded";
|
|
@@ -6000,7 +6138,7 @@ var esmFiles = {
|
|
|
6000
6138
|
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js"
|
|
6001
6139
|
)
|
|
6002
6140
|
};
|
|
6003
|
-
var VisuallyHiddenInput = styled29(
|
|
6141
|
+
var VisuallyHiddenInput = styled29(Input2)({
|
|
6004
6142
|
width: "1px",
|
|
6005
6143
|
height: "1px",
|
|
6006
6144
|
overflow: "hidden",
|