@ceed/cds 1.33.0 → 1.34.1
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/SearchBar/SearchBar.d.ts +21 -0
- package/dist/components/SearchBar/index.d.ts +3 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +5 -0
- package/dist/components/data-display/Markdown.md +62 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/SearchBar.md +180 -0
- package/dist/components/inputs/llms.txt +1 -0
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +88 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +137 -49
- package/dist/llms.txt +1 -0
- package/framer/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -157,6 +157,7 @@ __export(index_exports, {
|
|
|
157
157
|
RadioGroup: () => RadioGroup,
|
|
158
158
|
RadioList: () => RadioList,
|
|
159
159
|
RadioTileGroup: () => RadioTileGroup,
|
|
160
|
+
SearchBar: () => SearchBar,
|
|
160
161
|
Select: () => Select,
|
|
161
162
|
Sheet: () => Sheet,
|
|
162
163
|
Skeleton: () => import_joy61.Skeleton,
|
|
@@ -6974,6 +6975,92 @@ function RadioList(props) {
|
|
|
6974
6975
|
}
|
|
6975
6976
|
RadioList.displayName = "RadioList";
|
|
6976
6977
|
|
|
6978
|
+
// src/components/SearchBar/SearchBar.tsx
|
|
6979
|
+
var React43 = __toESM(require("react"));
|
|
6980
|
+
var import_styles = require("@mui/joy/styles");
|
|
6981
|
+
var import_Box5 = __toESM(require("@mui/joy/Box"));
|
|
6982
|
+
var import_SearchRounded = __toESM(require("@mui/icons-material/SearchRounded"));
|
|
6983
|
+
var import_CloseRounded = __toESM(require("@mui/icons-material/CloseRounded"));
|
|
6984
|
+
var SearchBarRoot = (0, import_styles.styled)(import_Box5.default, {
|
|
6985
|
+
name: "SearchBar",
|
|
6986
|
+
slot: "root",
|
|
6987
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
6988
|
+
})(({ theme, ownerState }) => ({
|
|
6989
|
+
display: "inline-flex",
|
|
6990
|
+
flexDirection: "row",
|
|
6991
|
+
minWidth: "220px",
|
|
6992
|
+
...ownerState.showSelect && { maxWidth: "330px" },
|
|
6993
|
+
backgroundColor: theme.vars.palette.background.surface,
|
|
6994
|
+
borderRadius: theme.vars.radius.sm,
|
|
6995
|
+
border: `1px solid ${theme.vars.palette.neutral.outlinedBorder}`,
|
|
6996
|
+
overflow: "hidden",
|
|
6997
|
+
flexShrink: 0
|
|
6998
|
+
}));
|
|
6999
|
+
var SearchBar = React43.forwardRef(function SearchBar2(inProps, ref) {
|
|
7000
|
+
const props = (0, import_styles.useThemeProps)({ props: inProps, name: "SearchBar" });
|
|
7001
|
+
const { showSelect = false, options, placeholder: placeholderProp, value, onChange, onSearch, ...other } = props;
|
|
7002
|
+
const [selectVal, setSelectVal] = React43.useState(options?.[0]?.value ?? "");
|
|
7003
|
+
const [isHovered, setIsHovered] = React43.useState(false);
|
|
7004
|
+
const ownerState = { showSelect };
|
|
7005
|
+
const selectedOption = options?.find((o) => o.value === selectVal);
|
|
7006
|
+
const placeholder = placeholderProp ?? selectedOption?.placeholder ?? "";
|
|
7007
|
+
const handleSearch = () => {
|
|
7008
|
+
onSearch?.({ selectValue: showSelect ? selectVal : void 0, inputValue: value });
|
|
7009
|
+
};
|
|
7010
|
+
const handleClear = () => {
|
|
7011
|
+
onChange("");
|
|
7012
|
+
};
|
|
7013
|
+
const handleKeyDown = (e) => {
|
|
7014
|
+
if (e.key === "Enter") {
|
|
7015
|
+
handleSearch();
|
|
7016
|
+
}
|
|
7017
|
+
};
|
|
7018
|
+
return /* @__PURE__ */ React43.createElement(SearchBarRoot, { ref, ownerState, ...other }, showSelect && options && /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(
|
|
7019
|
+
Select,
|
|
7020
|
+
{
|
|
7021
|
+
variant: "plain",
|
|
7022
|
+
size: "sm",
|
|
7023
|
+
color: "neutral",
|
|
7024
|
+
value: selectVal,
|
|
7025
|
+
options,
|
|
7026
|
+
onChange: (_, newValue) => setSelectVal(newValue),
|
|
7027
|
+
sx: { flex: 1, minWidth: "80px", maxWidth: "110px" },
|
|
7028
|
+
slotProps: {
|
|
7029
|
+
button: {
|
|
7030
|
+
style: { display: "block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
7031
|
+
}
|
|
7032
|
+
}
|
|
7033
|
+
}
|
|
7034
|
+
), /* @__PURE__ */ React43.createElement(Divider, { orientation: "vertical", sx: { height: (theme) => theme.spacing(4), alignSelf: "center" } })), /* @__PURE__ */ React43.createElement(
|
|
7035
|
+
Input,
|
|
7036
|
+
{
|
|
7037
|
+
variant: "plain",
|
|
7038
|
+
size: "sm",
|
|
7039
|
+
color: "neutral",
|
|
7040
|
+
placeholder,
|
|
7041
|
+
value,
|
|
7042
|
+
onChange: (e) => onChange(e.target.value),
|
|
7043
|
+
onKeyDown: handleKeyDown,
|
|
7044
|
+
sx: { flex: 1, minWidth: 0 },
|
|
7045
|
+
onMouseEnter: () => setIsHovered(true),
|
|
7046
|
+
onMouseLeave: () => setIsHovered(false),
|
|
7047
|
+
endDecorator: isHovered && value ? /* @__PURE__ */ React43.createElement(
|
|
7048
|
+
IconButton,
|
|
7049
|
+
{
|
|
7050
|
+
variant: "plain",
|
|
7051
|
+
size: "sm",
|
|
7052
|
+
color: "neutral",
|
|
7053
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
7054
|
+
onClick: handleClear,
|
|
7055
|
+
"aria-label": "Clear"
|
|
7056
|
+
},
|
|
7057
|
+
/* @__PURE__ */ React43.createElement(import_CloseRounded.default, null)
|
|
7058
|
+
) : void 0
|
|
7059
|
+
}
|
|
7060
|
+
), /* @__PURE__ */ React43.createElement(IconButton, { variant: "plain", size: "sm", color: "neutral", onClick: handleSearch, "aria-label": "Search" }, /* @__PURE__ */ React43.createElement(import_SearchRounded.default, null)));
|
|
7061
|
+
});
|
|
7062
|
+
SearchBar.displayName = "SearchBar";
|
|
7063
|
+
|
|
6977
7064
|
// src/components/Stepper/Stepper.tsx
|
|
6978
7065
|
var import_react46 = __toESM(require("react"));
|
|
6979
7066
|
var import_joy56 = require("@mui/joy");
|
|
@@ -7300,6 +7387,7 @@ var defaultTheme = (0, import_joy59.extendTheme)({
|
|
|
7300
7387
|
}
|
|
7301
7388
|
}
|
|
7302
7389
|
},
|
|
7390
|
+
SearchBar: {},
|
|
7303
7391
|
JoyTypography: {
|
|
7304
7392
|
defaultProps: {
|
|
7305
7393
|
levelMapping: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { useTheme, useColorScheme, useThemeProps, ButtonGroup, alertClasses, boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, accordionClasses, accordionDetailsClasses, accordionGroupClasses as accordionsClasses, accordionSummaryClasses, AutocompleteListbox, AutocompleteOption, autocompleteClasses, autocompleteListboxClasses, autocompleteOptionClasses, avatarClasses, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, breadcrumbsClasses, Card, cardClasses, CardActions, cardActionsClasses, CardContent, cardContentClasses, CardCover, cardCoverClasses, CardOverflow, cardOverflowClasses, Chip, chipClasses, CircularProgress, circularProgressClasses, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, stepClasses, StepButton, stepButtonClasses, stepperClasses, Skeleton, skeletonClasses, styled, } from '@mui/joy';
|
|
2
2
|
export type { ButtonProps, Theme } from '@mui/joy';
|
|
3
|
-
export { Autocomplete, Accordion, Alert, Accordions, AccordionDetails, AccordionSummary, Avatar, AvatarGroup, Box, Breadcrumbs, Button, Calendar, Checkbox, Container, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Drawer, Dropdown, extendTheme, FilterableCheckboxGroup, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, IconMenuButton, InfoSign, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, NavigationGroup, NavigationItem, Navigator, Pagination, PercentageInput, Radio, RadioGroup, RadioTileGroup, RadioList, Select, Step, StepIndicator, Stepper, Option, Sheet, Stack, Switch, theme, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, Uploader, } from './components';
|
|
3
|
+
export { Autocomplete, Accordion, Alert, Accordions, AccordionDetails, AccordionSummary, Avatar, AvatarGroup, Box, Breadcrumbs, Button, Calendar, Checkbox, Container, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Drawer, Dropdown, extendTheme, FilterableCheckboxGroup, InsetDrawer, FormControl, FormHelperText, FormLabel, Grid, IconButton, IconMenuButton, InfoSign, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, NavigationGroup, NavigationItem, Navigator, Pagination, PercentageInput, Radio, RadioGroup, RadioTileGroup, RadioList, SearchBar, Select, Step, StepIndicator, Stepper, Option, Sheet, Stack, Switch, theme, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, Uploader, } from './components';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
useTheme as useTheme2,
|
|
4
4
|
useColorScheme,
|
|
5
|
-
useThemeProps as
|
|
5
|
+
useThemeProps as useThemeProps10,
|
|
6
6
|
ButtonGroup,
|
|
7
7
|
alertClasses,
|
|
8
8
|
boxClasses,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
stepperClasses,
|
|
97
97
|
Skeleton as Skeleton2,
|
|
98
98
|
skeletonClasses,
|
|
99
|
-
styled as
|
|
99
|
+
styled as styled32
|
|
100
100
|
} from "@mui/joy";
|
|
101
101
|
|
|
102
102
|
// src/components/Accordions/Accordions.tsx
|
|
@@ -6876,23 +6876,109 @@ function RadioList(props) {
|
|
|
6876
6876
|
}
|
|
6877
6877
|
RadioList.displayName = "RadioList";
|
|
6878
6878
|
|
|
6879
|
+
// src/components/SearchBar/SearchBar.tsx
|
|
6880
|
+
import * as React43 from "react";
|
|
6881
|
+
import { styled as styled27, useThemeProps as useThemeProps9 } from "@mui/joy/styles";
|
|
6882
|
+
import Box2 from "@mui/joy/Box";
|
|
6883
|
+
import SearchRoundedIcon from "@mui/icons-material/SearchRounded";
|
|
6884
|
+
import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
|
|
6885
|
+
var SearchBarRoot = styled27(Box2, {
|
|
6886
|
+
name: "SearchBar",
|
|
6887
|
+
slot: "root",
|
|
6888
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
6889
|
+
})(({ theme, ownerState }) => ({
|
|
6890
|
+
display: "inline-flex",
|
|
6891
|
+
flexDirection: "row",
|
|
6892
|
+
minWidth: "220px",
|
|
6893
|
+
...ownerState.showSelect && { maxWidth: "330px" },
|
|
6894
|
+
backgroundColor: theme.vars.palette.background.surface,
|
|
6895
|
+
borderRadius: theme.vars.radius.sm,
|
|
6896
|
+
border: `1px solid ${theme.vars.palette.neutral.outlinedBorder}`,
|
|
6897
|
+
overflow: "hidden",
|
|
6898
|
+
flexShrink: 0
|
|
6899
|
+
}));
|
|
6900
|
+
var SearchBar = React43.forwardRef(function SearchBar2(inProps, ref) {
|
|
6901
|
+
const props = useThemeProps9({ props: inProps, name: "SearchBar" });
|
|
6902
|
+
const { showSelect = false, options, placeholder: placeholderProp, value, onChange, onSearch, ...other } = props;
|
|
6903
|
+
const [selectVal, setSelectVal] = React43.useState(options?.[0]?.value ?? "");
|
|
6904
|
+
const [isHovered, setIsHovered] = React43.useState(false);
|
|
6905
|
+
const ownerState = { showSelect };
|
|
6906
|
+
const selectedOption = options?.find((o) => o.value === selectVal);
|
|
6907
|
+
const placeholder = placeholderProp ?? selectedOption?.placeholder ?? "";
|
|
6908
|
+
const handleSearch = () => {
|
|
6909
|
+
onSearch?.({ selectValue: showSelect ? selectVal : void 0, inputValue: value });
|
|
6910
|
+
};
|
|
6911
|
+
const handleClear = () => {
|
|
6912
|
+
onChange("");
|
|
6913
|
+
};
|
|
6914
|
+
const handleKeyDown = (e) => {
|
|
6915
|
+
if (e.key === "Enter") {
|
|
6916
|
+
handleSearch();
|
|
6917
|
+
}
|
|
6918
|
+
};
|
|
6919
|
+
return /* @__PURE__ */ React43.createElement(SearchBarRoot, { ref, ownerState, ...other }, showSelect && options && /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(
|
|
6920
|
+
Select,
|
|
6921
|
+
{
|
|
6922
|
+
variant: "plain",
|
|
6923
|
+
size: "sm",
|
|
6924
|
+
color: "neutral",
|
|
6925
|
+
value: selectVal,
|
|
6926
|
+
options,
|
|
6927
|
+
onChange: (_, newValue) => setSelectVal(newValue),
|
|
6928
|
+
sx: { flex: 1, minWidth: "80px", maxWidth: "110px" },
|
|
6929
|
+
slotProps: {
|
|
6930
|
+
button: {
|
|
6931
|
+
style: { display: "block", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
6932
|
+
}
|
|
6933
|
+
}
|
|
6934
|
+
}
|
|
6935
|
+
), /* @__PURE__ */ React43.createElement(Divider, { orientation: "vertical", sx: { height: (theme) => theme.spacing(4), alignSelf: "center" } })), /* @__PURE__ */ React43.createElement(
|
|
6936
|
+
Input,
|
|
6937
|
+
{
|
|
6938
|
+
variant: "plain",
|
|
6939
|
+
size: "sm",
|
|
6940
|
+
color: "neutral",
|
|
6941
|
+
placeholder,
|
|
6942
|
+
value,
|
|
6943
|
+
onChange: (e) => onChange(e.target.value),
|
|
6944
|
+
onKeyDown: handleKeyDown,
|
|
6945
|
+
sx: { flex: 1, minWidth: 0 },
|
|
6946
|
+
onMouseEnter: () => setIsHovered(true),
|
|
6947
|
+
onMouseLeave: () => setIsHovered(false),
|
|
6948
|
+
endDecorator: isHovered && value ? /* @__PURE__ */ React43.createElement(
|
|
6949
|
+
IconButton,
|
|
6950
|
+
{
|
|
6951
|
+
variant: "plain",
|
|
6952
|
+
size: "sm",
|
|
6953
|
+
color: "neutral",
|
|
6954
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
6955
|
+
onClick: handleClear,
|
|
6956
|
+
"aria-label": "Clear"
|
|
6957
|
+
},
|
|
6958
|
+
/* @__PURE__ */ React43.createElement(CloseRoundedIcon, null)
|
|
6959
|
+
) : void 0
|
|
6960
|
+
}
|
|
6961
|
+
), /* @__PURE__ */ React43.createElement(IconButton, { variant: "plain", size: "sm", color: "neutral", onClick: handleSearch, "aria-label": "Search" }, /* @__PURE__ */ React43.createElement(SearchRoundedIcon, null)));
|
|
6962
|
+
});
|
|
6963
|
+
SearchBar.displayName = "SearchBar";
|
|
6964
|
+
|
|
6879
6965
|
// src/components/Stepper/Stepper.tsx
|
|
6880
|
-
import
|
|
6966
|
+
import React44 from "react";
|
|
6881
6967
|
import {
|
|
6882
6968
|
Stepper as JoyStepper,
|
|
6883
6969
|
Step as JoyStep,
|
|
6884
6970
|
StepIndicator as JoyStepIndicator,
|
|
6885
6971
|
stepClasses,
|
|
6886
6972
|
stepIndicatorClasses,
|
|
6887
|
-
styled as
|
|
6973
|
+
styled as styled28
|
|
6888
6974
|
} from "@mui/joy";
|
|
6889
6975
|
import CheckIcon from "@mui/icons-material/Check";
|
|
6890
6976
|
import { motion as motion27 } from "framer-motion";
|
|
6891
|
-
var Step =
|
|
6977
|
+
var Step = styled28(JoyStep)({});
|
|
6892
6978
|
Step.displayName = "Step";
|
|
6893
|
-
var StepIndicator =
|
|
6979
|
+
var StepIndicator = styled28(JoyStepIndicator)({});
|
|
6894
6980
|
StepIndicator.displayName = "StepIndicator";
|
|
6895
|
-
var StyledStepper =
|
|
6981
|
+
var StyledStepper = styled28(JoyStepper)(({ theme }) => ({
|
|
6896
6982
|
"--StepIndicator-size": "24px",
|
|
6897
6983
|
"--Step-gap": theme.spacing(2),
|
|
6898
6984
|
"--joy-palette-success-solidBg": "var(--joy-palette-success-400)",
|
|
@@ -6913,7 +6999,7 @@ function Stepper(props) {
|
|
|
6913
6999
|
stepOrientation = "horizontal"
|
|
6914
7000
|
} = props;
|
|
6915
7001
|
const effectiveStepOrientation = orientation === "vertical" ? "horizontal" : stepOrientation;
|
|
6916
|
-
return /* @__PURE__ */
|
|
7002
|
+
return /* @__PURE__ */ React44.createElement(
|
|
6917
7003
|
MotionStepper,
|
|
6918
7004
|
{
|
|
6919
7005
|
orientation,
|
|
@@ -6952,23 +7038,23 @@ function Stepper(props) {
|
|
|
6952
7038
|
const completed = activeStep > i + 1;
|
|
6953
7039
|
const disabled = activeStep < i + 1;
|
|
6954
7040
|
const hasContent = step.label || step.extraContent;
|
|
6955
|
-
return /* @__PURE__ */
|
|
7041
|
+
return /* @__PURE__ */ React44.createElement(
|
|
6956
7042
|
Step,
|
|
6957
7043
|
{
|
|
6958
7044
|
key: `step-${i}`,
|
|
6959
|
-
indicator: /* @__PURE__ */
|
|
7045
|
+
indicator: /* @__PURE__ */ React44.createElement(StepIndicator, { variant: disabled ? "outlined" : "solid", color: disabled ? "neutral" : "primary" }, completed ? /* @__PURE__ */ React44.createElement(CheckIcon, null) : step.indicatorContent),
|
|
6960
7046
|
active,
|
|
6961
7047
|
completed,
|
|
6962
7048
|
disabled,
|
|
6963
7049
|
orientation: effectiveStepOrientation
|
|
6964
7050
|
},
|
|
6965
|
-
hasContent && /* @__PURE__ */
|
|
7051
|
+
hasContent && /* @__PURE__ */ React44.createElement(
|
|
6966
7052
|
Stack_default,
|
|
6967
7053
|
{
|
|
6968
7054
|
sx: orientation === "horizontal" && effectiveStepOrientation === "vertical" ? { alignItems: "center" } : {}
|
|
6969
7055
|
},
|
|
6970
|
-
step.label && /* @__PURE__ */
|
|
6971
|
-
step.extraContent && /* @__PURE__ */
|
|
7056
|
+
step.label && /* @__PURE__ */ React44.createElement(Typography_default, { level: "title-sm" }, step.label),
|
|
7057
|
+
step.extraContent && /* @__PURE__ */ React44.createElement(Typography_default, { level: "body-xs" }, step.extraContent)
|
|
6972
7058
|
)
|
|
6973
7059
|
);
|
|
6974
7060
|
})
|
|
@@ -6977,11 +7063,11 @@ function Stepper(props) {
|
|
|
6977
7063
|
Stepper.displayName = "Stepper";
|
|
6978
7064
|
|
|
6979
7065
|
// src/components/Switch/Switch.tsx
|
|
6980
|
-
import
|
|
6981
|
-
import { Switch as JoySwitch, styled as
|
|
7066
|
+
import React45 from "react";
|
|
7067
|
+
import { Switch as JoySwitch, styled as styled29, switchClasses } from "@mui/joy";
|
|
6982
7068
|
import { motion as motion28 } from "framer-motion";
|
|
6983
7069
|
var MotionSwitch = motion28(JoySwitch);
|
|
6984
|
-
var StyledThumb =
|
|
7070
|
+
var StyledThumb = styled29(motion28.div)({
|
|
6985
7071
|
"--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
|
|
6986
7072
|
display: "inline-flex",
|
|
6987
7073
|
justifyContent: "center",
|
|
@@ -6999,14 +7085,14 @@ var StyledThumb = styled28(motion28.div)({
|
|
|
6999
7085
|
right: "var(--Switch-thumbOffset)"
|
|
7000
7086
|
}
|
|
7001
7087
|
});
|
|
7002
|
-
var Thumb = (props) => /* @__PURE__ */
|
|
7088
|
+
var Thumb = (props) => /* @__PURE__ */ React45.createElement(StyledThumb, { ...props, layout: true, transition: spring });
|
|
7003
7089
|
var spring = {
|
|
7004
7090
|
type: "spring",
|
|
7005
7091
|
stiffness: 700,
|
|
7006
7092
|
damping: 30
|
|
7007
7093
|
};
|
|
7008
7094
|
var Switch = (props) => {
|
|
7009
|
-
return /* @__PURE__ */
|
|
7095
|
+
return /* @__PURE__ */ React45.createElement(
|
|
7010
7096
|
MotionSwitch,
|
|
7011
7097
|
{
|
|
7012
7098
|
...props,
|
|
@@ -7020,21 +7106,21 @@ var Switch = (props) => {
|
|
|
7020
7106
|
Switch.displayName = "Switch";
|
|
7021
7107
|
|
|
7022
7108
|
// src/components/Tabs/Tabs.tsx
|
|
7023
|
-
import
|
|
7109
|
+
import React46, { forwardRef as forwardRef12 } from "react";
|
|
7024
7110
|
import {
|
|
7025
7111
|
Tabs as JoyTabs,
|
|
7026
7112
|
Tab as JoyTab,
|
|
7027
7113
|
TabList as JoyTabList,
|
|
7028
7114
|
TabPanel as JoyTabPanel,
|
|
7029
|
-
styled as
|
|
7115
|
+
styled as styled30,
|
|
7030
7116
|
tabClasses
|
|
7031
7117
|
} from "@mui/joy";
|
|
7032
|
-
var StyledTabs =
|
|
7118
|
+
var StyledTabs = styled30(JoyTabs)(({ theme }) => ({
|
|
7033
7119
|
backgroundColor: theme.palette.background.body
|
|
7034
7120
|
}));
|
|
7035
7121
|
var Tabs = StyledTabs;
|
|
7036
7122
|
Tabs.displayName = "Tabs";
|
|
7037
|
-
var StyledTab =
|
|
7123
|
+
var StyledTab = styled30(JoyTab)(({ theme }) => ({
|
|
7038
7124
|
gap: theme.spacing(2),
|
|
7039
7125
|
[`&:not(.${tabClasses.selected})`]: {
|
|
7040
7126
|
color: theme.palette.neutral[700]
|
|
@@ -7043,15 +7129,15 @@ var StyledTab = styled29(JoyTab)(({ theme }) => ({
|
|
|
7043
7129
|
backgroundColor: theme.palette.background.body
|
|
7044
7130
|
}
|
|
7045
7131
|
}));
|
|
7046
|
-
var Tab =
|
|
7047
|
-
return /* @__PURE__ */
|
|
7132
|
+
var Tab = forwardRef12(function Tab2({ startDecorator, endDecorator, children, ...props }, ref) {
|
|
7133
|
+
return /* @__PURE__ */ React46.createElement(StyledTab, { ...props, ref }, startDecorator, children, endDecorator);
|
|
7048
7134
|
});
|
|
7049
7135
|
Tab.displayName = "Tab";
|
|
7050
7136
|
var TabList = JoyTabList;
|
|
7051
7137
|
var TabPanel = JoyTabPanel;
|
|
7052
7138
|
|
|
7053
7139
|
// src/components/ThemeProvider/ThemeProvider.tsx
|
|
7054
|
-
import
|
|
7140
|
+
import React47 from "react";
|
|
7055
7141
|
import {
|
|
7056
7142
|
CssBaseline,
|
|
7057
7143
|
CssVarsProvider,
|
|
@@ -7222,6 +7308,7 @@ var defaultTheme = extendTheme({
|
|
|
7222
7308
|
}
|
|
7223
7309
|
}
|
|
7224
7310
|
},
|
|
7311
|
+
SearchBar: {},
|
|
7225
7312
|
JoyTypography: {
|
|
7226
7313
|
defaultProps: {
|
|
7227
7314
|
levelMapping: {
|
|
@@ -7307,13 +7394,13 @@ var defaultTheme = extendTheme({
|
|
|
7307
7394
|
});
|
|
7308
7395
|
function ThemeProvider(props) {
|
|
7309
7396
|
const theme = props.theme || defaultTheme;
|
|
7310
|
-
return /* @__PURE__ */
|
|
7397
|
+
return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(CssVarsProvider, { theme }, /* @__PURE__ */ React47.createElement(CssBaseline, null), props.children));
|
|
7311
7398
|
}
|
|
7312
7399
|
ThemeProvider.displayName = "ThemeProvider";
|
|
7313
7400
|
|
|
7314
7401
|
// src/components/Uploader/Uploader.tsx
|
|
7315
|
-
import
|
|
7316
|
-
import { styled as
|
|
7402
|
+
import React48, { useCallback as useCallback18, useEffect as useEffect13, useMemo as useMemo15, useRef as useRef12, useState as useState17 } from "react";
|
|
7403
|
+
import { styled as styled31, Input as Input2 } from "@mui/joy";
|
|
7317
7404
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
7318
7405
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
7319
7406
|
import MuiClearIcon from "@mui/icons-material/ClearRounded";
|
|
@@ -7335,7 +7422,7 @@ var esmFiles = {
|
|
|
7335
7422
|
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js"
|
|
7336
7423
|
)
|
|
7337
7424
|
};
|
|
7338
|
-
var VisuallyHiddenInput =
|
|
7425
|
+
var VisuallyHiddenInput = styled31(Input2)({
|
|
7339
7426
|
width: "1px",
|
|
7340
7427
|
height: "1px",
|
|
7341
7428
|
overflow: "hidden",
|
|
@@ -7344,18 +7431,18 @@ var VisuallyHiddenInput = styled30(Input2)({
|
|
|
7344
7431
|
clipPath: "inset(50%)",
|
|
7345
7432
|
position: "absolute"
|
|
7346
7433
|
});
|
|
7347
|
-
var PreviewRoot =
|
|
7434
|
+
var PreviewRoot = styled31(Stack_default, {
|
|
7348
7435
|
name: "Uploader",
|
|
7349
7436
|
slot: "PreviewRoot"
|
|
7350
7437
|
})({});
|
|
7351
|
-
var UploadCard =
|
|
7438
|
+
var UploadCard = styled31(Card, {
|
|
7352
7439
|
name: "Uploader",
|
|
7353
7440
|
slot: "UploadCard"
|
|
7354
7441
|
})(({ theme }) => ({
|
|
7355
7442
|
padding: theme.spacing(2.5),
|
|
7356
7443
|
border: `1px solid ${theme.palette.neutral.outlinedBorder}`
|
|
7357
7444
|
}));
|
|
7358
|
-
var UploadFileIcon =
|
|
7445
|
+
var UploadFileIcon = styled31(MuiUploadFileIcon, {
|
|
7359
7446
|
name: "Uploader",
|
|
7360
7447
|
slot: "UploadFileIcon"
|
|
7361
7448
|
})(({ theme }) => ({
|
|
@@ -7363,7 +7450,7 @@ var UploadFileIcon = styled30(MuiUploadFileIcon, {
|
|
|
7363
7450
|
width: "32px",
|
|
7364
7451
|
height: "32px"
|
|
7365
7452
|
}));
|
|
7366
|
-
var ClearIcon2 =
|
|
7453
|
+
var ClearIcon2 = styled31(MuiClearIcon, {
|
|
7367
7454
|
name: "Uploader",
|
|
7368
7455
|
slot: "ClearIcon"
|
|
7369
7456
|
})(({ theme }) => ({
|
|
@@ -7389,7 +7476,7 @@ var getFileSize = (n) => {
|
|
|
7389
7476
|
};
|
|
7390
7477
|
var Preview = (props) => {
|
|
7391
7478
|
const { files, uploaded, onDelete } = props;
|
|
7392
|
-
return /* @__PURE__ */
|
|
7479
|
+
return /* @__PURE__ */ React48.createElement(PreviewRoot, { gap: 1 }, [...uploaded, ...files].map((file) => /* @__PURE__ */ React48.createElement(UploadCard, { key: file.name, size: "sm", color: "neutral" }, /* @__PURE__ */ React48.createElement(Stack_default, { direction: "row", alignItems: "center", gap: 2 }, /* @__PURE__ */ React48.createElement(UploadFileIcon, null), /* @__PURE__ */ React48.createElement(Stack_default, { flex: "1", sx: { overflow: "hidden" } }, /* @__PURE__ */ React48.createElement(
|
|
7393
7480
|
Typography_default,
|
|
7394
7481
|
{
|
|
7395
7482
|
level: "body-sm",
|
|
@@ -7401,15 +7488,15 @@ var Preview = (props) => {
|
|
|
7401
7488
|
}
|
|
7402
7489
|
},
|
|
7403
7490
|
file.name
|
|
7404
|
-
), !!file.size && /* @__PURE__ */
|
|
7491
|
+
), !!file.size && /* @__PURE__ */ React48.createElement(Typography_default, { level: "body-xs", fontWeight: "300", lineHeight: "1.33", textColor: "text.tertiary" }, getFileSize(file.size))), /* @__PURE__ */ React48.createElement(IconButton_default, { onClick: () => onDelete?.(file) }, /* @__PURE__ */ React48.createElement(ClearIcon2, null))))));
|
|
7405
7492
|
};
|
|
7406
|
-
var UploaderRoot =
|
|
7493
|
+
var UploaderRoot = styled31(Stack_default, {
|
|
7407
7494
|
name: "Uploader",
|
|
7408
7495
|
slot: "root"
|
|
7409
7496
|
})(({ theme }) => ({
|
|
7410
7497
|
gap: theme.spacing(2)
|
|
7411
7498
|
}));
|
|
7412
|
-
var FileDropZone =
|
|
7499
|
+
var FileDropZone = styled31(Sheet_default, {
|
|
7413
7500
|
name: "Uploader",
|
|
7414
7501
|
slot: "dropZone",
|
|
7415
7502
|
shouldForwardProp: (prop) => prop !== "error" && prop !== "disabled"
|
|
@@ -7430,7 +7517,7 @@ var FileDropZone = styled30(Sheet_default, {
|
|
|
7430
7517
|
}
|
|
7431
7518
|
})
|
|
7432
7519
|
);
|
|
7433
|
-
var UploaderIcon =
|
|
7520
|
+
var UploaderIcon = styled31(MuiFileUploadIcon, {
|
|
7434
7521
|
name: "Uploader",
|
|
7435
7522
|
slot: "iconContainer",
|
|
7436
7523
|
shouldForwardProp: (prop) => prop !== "error" && prop !== "disabled"
|
|
@@ -7444,7 +7531,7 @@ var UploaderIcon = styled30(MuiFileUploadIcon, {
|
|
|
7444
7531
|
}
|
|
7445
7532
|
})
|
|
7446
7533
|
);
|
|
7447
|
-
var Uploader =
|
|
7534
|
+
var Uploader = React48.memo(
|
|
7448
7535
|
(props) => {
|
|
7449
7536
|
const {
|
|
7450
7537
|
accept,
|
|
@@ -7463,10 +7550,10 @@ var Uploader = React47.memo(
|
|
|
7463
7550
|
} = props;
|
|
7464
7551
|
const dropZoneRef = useRef12(null);
|
|
7465
7552
|
const inputRef = useRef12(null);
|
|
7466
|
-
const [errorText, setErrorText] =
|
|
7467
|
-
const [files, setFiles] =
|
|
7468
|
-
const [uploaded, setUploaded] =
|
|
7469
|
-
const [previewState, setPreviewState] =
|
|
7553
|
+
const [errorText, setErrorText] = useState17();
|
|
7554
|
+
const [files, setFiles] = useState17([]);
|
|
7555
|
+
const [uploaded, setUploaded] = useState17(props.uploaded || []);
|
|
7556
|
+
const [previewState, setPreviewState] = useState17("idle");
|
|
7470
7557
|
const accepts = useMemo15(() => accept.split(",").map((accept2) => accept2.trim()), [accept]);
|
|
7471
7558
|
const parsedAccepts = useMemo15(
|
|
7472
7559
|
() => accepts.flatMap((type) => {
|
|
@@ -7634,7 +7721,7 @@ var Uploader = React47.memo(
|
|
|
7634
7721
|
const handleUploaderButtonClick = useCallback18(() => {
|
|
7635
7722
|
inputRef.current?.click();
|
|
7636
7723
|
}, []);
|
|
7637
|
-
const uploader = /* @__PURE__ */
|
|
7724
|
+
const uploader = /* @__PURE__ */ React48.createElement(
|
|
7638
7725
|
FileDropZone,
|
|
7639
7726
|
{
|
|
7640
7727
|
state: previewState,
|
|
@@ -7643,8 +7730,8 @@ var Uploader = React47.memo(
|
|
|
7643
7730
|
ref: dropZoneRef,
|
|
7644
7731
|
onClick: handleUploaderButtonClick
|
|
7645
7732
|
},
|
|
7646
|
-
/* @__PURE__ */
|
|
7647
|
-
/* @__PURE__ */
|
|
7733
|
+
/* @__PURE__ */ React48.createElement(Stack_default, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React48.createElement(UploaderIcon, { state: previewState, error: !!(error || errorText), disabled })),
|
|
7734
|
+
/* @__PURE__ */ React48.createElement(
|
|
7648
7735
|
VisuallyHiddenInput,
|
|
7649
7736
|
{
|
|
7650
7737
|
disabled,
|
|
@@ -7667,7 +7754,7 @@ var Uploader = React47.memo(
|
|
|
7667
7754
|
}
|
|
7668
7755
|
)
|
|
7669
7756
|
);
|
|
7670
|
-
return /* @__PURE__ */
|
|
7757
|
+
return /* @__PURE__ */ React48.createElement(UploaderRoot, null, showDropZone && /* @__PURE__ */ React48.createElement(FormControl_default, { size, error: !!(error || errorText), disabled, required: !!minCount }, label && /* @__PURE__ */ React48.createElement(FormLabel_default, null, label), uploader, /* @__PURE__ */ React48.createElement(FormHelperText_default, null, /* @__PURE__ */ React48.createElement(Stack_default, null, errorText && /* @__PURE__ */ React48.createElement("div", null, errorText), /* @__PURE__ */ React48.createElement("div", null, helperText)))), [...uploaded, ...files].length > 0 && /* @__PURE__ */ React48.createElement(Preview, { files, uploaded, onDelete: handleDeleteFile }));
|
|
7671
7758
|
}
|
|
7672
7759
|
);
|
|
7673
7760
|
Uploader.displayName = "Uploader";
|
|
@@ -7749,6 +7836,7 @@ export {
|
|
|
7749
7836
|
RadioGroup,
|
|
7750
7837
|
RadioList,
|
|
7751
7838
|
RadioTileGroup,
|
|
7839
|
+
SearchBar,
|
|
7752
7840
|
Select,
|
|
7753
7841
|
Sheet,
|
|
7754
7842
|
Skeleton2 as Skeleton,
|
|
@@ -7833,7 +7921,7 @@ export {
|
|
|
7833
7921
|
stepButtonClasses,
|
|
7834
7922
|
stepClasses2 as stepClasses,
|
|
7835
7923
|
stepperClasses,
|
|
7836
|
-
|
|
7924
|
+
styled32 as styled,
|
|
7837
7925
|
switchClasses2 as switchClasses,
|
|
7838
7926
|
tabListClasses,
|
|
7839
7927
|
tabPanelClasses,
|
|
@@ -7845,5 +7933,5 @@ export {
|
|
|
7845
7933
|
typographyClasses,
|
|
7846
7934
|
useColorScheme,
|
|
7847
7935
|
useTheme2 as useTheme,
|
|
7848
|
-
|
|
7936
|
+
useThemeProps10 as useThemeProps
|
|
7849
7937
|
};
|
package/dist/llms.txt
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
- [Radio](./components/inputs/RadioButton.md)
|
|
40
40
|
- [RadioList](./components/inputs/RadioList.md)
|
|
41
41
|
- [RadioTileGroup](./components/inputs/RadioTileGroup.md)
|
|
42
|
+
- [SearchBar](./components/inputs/SearchBar.md)
|
|
42
43
|
- [Select](./components/inputs/Select.md)
|
|
43
44
|
- [Slider](./components/inputs/Slider.md)
|
|
44
45
|
- [Switch](./components/inputs/Switch.md)
|