@bwp-web/components 1.10.1 → 1.11.0
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/README.md +70 -54
- package/dist/BiampTable/BiampTable.d.ts +1 -1
- package/dist/BiampTable/BiampTable.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableRow.d.ts +1 -1
- package/dist/BiampTable/BiampTableRow.d.ts.map +1 -1
- package/dist/LandingPage/LandingFormPanel.d.ts +81 -0
- package/dist/LandingPage/LandingFormPanel.d.ts.map +1 -0
- package/dist/LandingPage/OrganizationsPanel.d.ts +93 -0
- package/dist/LandingPage/OrganizationsPanel.d.ts.map +1 -0
- package/dist/LandingPage/index.d.ts +5 -0
- package/dist/LandingPage/index.d.ts.map +1 -0
- package/dist/OrganizationSelector/OrganizationSelector.d.ts +4 -0
- package/dist/OrganizationSelector/OrganizationSelector.d.ts.map +1 -1
- package/dist/index.cjs +464 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +468 -18
- package/dist/index.js.map +1 -1
- package/dist/slotProps.d.ts +11 -0
- package/dist/slotProps.d.ts.map +1 -0
- package/package.json +13 -7
- package/dist/BiampTable/slotProps.d.ts +0 -5
- package/dist/BiampTable/slotProps.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './BiampBanner';
|
|
|
10
10
|
export * from './BiampSegmentedButton';
|
|
11
11
|
export * from './BiampGlobalSearch';
|
|
12
12
|
export * from './OrganizationSelector';
|
|
13
|
+
export * from './LandingPage';
|
|
13
14
|
export * from './UserInitialsIcon';
|
|
14
15
|
export * from './DynamicSvgIcon';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -154,8 +154,8 @@ var require_randomColor = __commonJS({
|
|
|
154
154
|
return "hsl(" + hsl[0] + ", " + hsl[1] + "%, " + hsl[2] + "%)";
|
|
155
155
|
case "hsla":
|
|
156
156
|
var hslColor = HSVtoHSL(hsv);
|
|
157
|
-
var
|
|
158
|
-
return "hsla(" + hslColor[0] + ", " + hslColor[1] + "%, " + hslColor[2] + "%, " +
|
|
157
|
+
var alpha7 = options.alpha || Math.random();
|
|
158
|
+
return "hsla(" + hslColor[0] + ", " + hslColor[1] + "%, " + hslColor[2] + "%, " + alpha7 + ")";
|
|
159
159
|
case "rgbArray":
|
|
160
160
|
return HSVtoRGB(hsv);
|
|
161
161
|
case "rgb":
|
|
@@ -163,8 +163,8 @@ var require_randomColor = __commonJS({
|
|
|
163
163
|
return "rgb(" + rgb.join(", ") + ")";
|
|
164
164
|
case "rgba":
|
|
165
165
|
var rgbColor = HSVtoRGB(hsv);
|
|
166
|
-
var
|
|
167
|
-
return "rgba(" + rgbColor.join(", ") + ", " +
|
|
166
|
+
var alpha7 = options.alpha || Math.random();
|
|
167
|
+
return "rgba(" + rgbColor.join(", ") + ", " + alpha7 + ")";
|
|
168
168
|
default:
|
|
169
169
|
return HSVtoHex(hsv);
|
|
170
170
|
}
|
|
@@ -2077,7 +2077,7 @@ function BiampTableTruncatedCell({
|
|
|
2077
2077
|
);
|
|
2078
2078
|
}
|
|
2079
2079
|
|
|
2080
|
-
// src/
|
|
2080
|
+
// src/slotProps.ts
|
|
2081
2081
|
function resolveSlot(slot, ctx) {
|
|
2082
2082
|
if (!slot) return void 0;
|
|
2083
2083
|
return typeof slot === "function" ? slot(ctx) : slot;
|
|
@@ -2085,6 +2085,12 @@ function resolveSlot(slot, ctx) {
|
|
|
2085
2085
|
function mergeSx(...inputs) {
|
|
2086
2086
|
return inputs.filter((v) => Boolean(v)).flatMap((v) => Array.isArray(v) ? v : [v]);
|
|
2087
2087
|
}
|
|
2088
|
+
function mergeSlotProps(ownProps, userProps) {
|
|
2089
|
+
return typeof userProps === "function" ? (ownerState) => ({
|
|
2090
|
+
...ownProps,
|
|
2091
|
+
...userProps(ownerState)
|
|
2092
|
+
}) : { ...ownProps, ...userProps };
|
|
2093
|
+
}
|
|
2088
2094
|
|
|
2089
2095
|
// src/BiampTable/cellSx.ts
|
|
2090
2096
|
var stickyHoverBg = {
|
|
@@ -3930,11 +3936,447 @@ function OrganizationSelectorPopover({
|
|
|
3930
3936
|
);
|
|
3931
3937
|
}
|
|
3932
3938
|
|
|
3939
|
+
// src/LandingPage/LandingFormPanel.tsx
|
|
3940
|
+
import {
|
|
3941
|
+
Checkbox as Checkbox4,
|
|
3942
|
+
FormControlLabel,
|
|
3943
|
+
Stack as Stack10,
|
|
3944
|
+
TextField as TextField3,
|
|
3945
|
+
Typography as Typography9
|
|
3946
|
+
} from "@mui/material";
|
|
3947
|
+
import { useId as useId2 } from "react";
|
|
3948
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3949
|
+
function LandingFormPanel({
|
|
3950
|
+
children,
|
|
3951
|
+
onSubmit,
|
|
3952
|
+
width = 441,
|
|
3953
|
+
noValidate = true,
|
|
3954
|
+
sx,
|
|
3955
|
+
...stackProps
|
|
3956
|
+
}) {
|
|
3957
|
+
const handleSubmit = (event) => {
|
|
3958
|
+
event.preventDefault();
|
|
3959
|
+
onSubmit?.();
|
|
3960
|
+
};
|
|
3961
|
+
return /* @__PURE__ */ jsx31(
|
|
3962
|
+
Stack10,
|
|
3963
|
+
{
|
|
3964
|
+
component: "form",
|
|
3965
|
+
onSubmit: handleSubmit,
|
|
3966
|
+
noValidate,
|
|
3967
|
+
gap: 2,
|
|
3968
|
+
p: 1.5,
|
|
3969
|
+
borderRadius: 4,
|
|
3970
|
+
width,
|
|
3971
|
+
maxWidth: "100%",
|
|
3972
|
+
sx: mergeSx(
|
|
3973
|
+
{
|
|
3974
|
+
// Figma's `background_default` (#F5F5F5) is `grey[100]` here, not
|
|
3975
|
+
// `palette.background.default` — that token is #FFFFFF in light mode.
|
|
3976
|
+
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100]
|
|
3977
|
+
},
|
|
3978
|
+
sx
|
|
3979
|
+
),
|
|
3980
|
+
...stackProps,
|
|
3981
|
+
children
|
|
3982
|
+
}
|
|
3983
|
+
);
|
|
3984
|
+
}
|
|
3985
|
+
var fieldSx = {
|
|
3986
|
+
"& .MuiOutlinedInput-root": {
|
|
3987
|
+
backgroundColor: "background.paper"
|
|
3988
|
+
},
|
|
3989
|
+
// `Mui-disabled` is deliberately not excluded: the theme has no disabled
|
|
3990
|
+
// outline colour, so dropping it here would fall back to MUI's faint default.
|
|
3991
|
+
"& .MuiOutlinedInput-root:not(.Mui-error):not(.Mui-focused) .MuiOutlinedInput-notchedOutline": {
|
|
3992
|
+
borderColor: ({ palette }) => palette.dividers.secondary
|
|
3993
|
+
}
|
|
3994
|
+
};
|
|
3995
|
+
function LandingFormField({
|
|
3996
|
+
label,
|
|
3997
|
+
id,
|
|
3998
|
+
slotProps,
|
|
3999
|
+
sx,
|
|
4000
|
+
...textFieldProps
|
|
4001
|
+
}) {
|
|
4002
|
+
const {
|
|
4003
|
+
container: containerSlotProps,
|
|
4004
|
+
label: labelSlotProps,
|
|
4005
|
+
...fieldSlotProps
|
|
4006
|
+
} = slotProps ?? {};
|
|
4007
|
+
const generatedId = useId2();
|
|
4008
|
+
const fieldId = id ?? generatedId;
|
|
4009
|
+
const labelId = labelSlotProps?.id ?? `${fieldId}-label`;
|
|
4010
|
+
return /* @__PURE__ */ jsxs14(Stack10, { gap: 0.5, width: "100%", ...containerSlotProps, children: [
|
|
4011
|
+
/* @__PURE__ */ jsx31(
|
|
4012
|
+
Typography9,
|
|
4013
|
+
{
|
|
4014
|
+
component: "label",
|
|
4015
|
+
id: labelId,
|
|
4016
|
+
htmlFor: fieldId,
|
|
4017
|
+
fontSize: 12,
|
|
4018
|
+
fontWeight: 600,
|
|
4019
|
+
color: "text.primary",
|
|
4020
|
+
...labelSlotProps,
|
|
4021
|
+
children: label
|
|
4022
|
+
}
|
|
4023
|
+
),
|
|
4024
|
+
/* @__PURE__ */ jsx31(
|
|
4025
|
+
TextField3,
|
|
4026
|
+
{
|
|
4027
|
+
id: fieldId,
|
|
4028
|
+
fullWidth: true,
|
|
4029
|
+
variant: "outlined",
|
|
4030
|
+
slotProps: {
|
|
4031
|
+
...fieldSlotProps,
|
|
4032
|
+
// `select` renders a `div[role="combobox"]`, which `<label for>`
|
|
4033
|
+
// cannot name — and MUI points its `aria-labelledby` at the div
|
|
4034
|
+
// itself, so the name would come out as the selected value. Naming
|
|
4035
|
+
// the label explicitly is what MUI's own floating label does.
|
|
4036
|
+
// Inert on a text field: `slotProps.select` only reaches a `Select`.
|
|
4037
|
+
select: mergeSlotProps({ labelId }, fieldSlotProps.select)
|
|
4038
|
+
},
|
|
4039
|
+
sx: mergeSx(fieldSx, sx),
|
|
4040
|
+
...textFieldProps
|
|
4041
|
+
}
|
|
4042
|
+
)
|
|
4043
|
+
] });
|
|
4044
|
+
}
|
|
4045
|
+
function LandingFormActions(props) {
|
|
4046
|
+
return /* @__PURE__ */ jsx31(Stack10, { direction: "row", gap: 1, width: "100%", ...props });
|
|
4047
|
+
}
|
|
4048
|
+
function LandingFormCheckbox({
|
|
4049
|
+
label,
|
|
4050
|
+
slotProps,
|
|
4051
|
+
sx,
|
|
4052
|
+
...formControlLabelProps
|
|
4053
|
+
}) {
|
|
4054
|
+
const { checkbox, ...labelSlotProps } = slotProps ?? {};
|
|
4055
|
+
return /* @__PURE__ */ jsx31(
|
|
4056
|
+
FormControlLabel,
|
|
4057
|
+
{
|
|
4058
|
+
control: /* @__PURE__ */ jsx31(
|
|
4059
|
+
Checkbox4,
|
|
4060
|
+
{
|
|
4061
|
+
...checkbox,
|
|
4062
|
+
sx: mergeSx({ p: 0 }, checkbox?.sx)
|
|
4063
|
+
}
|
|
4064
|
+
),
|
|
4065
|
+
label,
|
|
4066
|
+
slotProps: {
|
|
4067
|
+
...labelSlotProps,
|
|
4068
|
+
typography: mergeSlotProps(
|
|
4069
|
+
{ variant: "body2" },
|
|
4070
|
+
labelSlotProps.typography
|
|
4071
|
+
)
|
|
4072
|
+
},
|
|
4073
|
+
...formControlLabelProps,
|
|
4074
|
+
sx: mergeSx({ m: 0, gap: 1, alignItems: "center" }, sx)
|
|
4075
|
+
}
|
|
4076
|
+
);
|
|
4077
|
+
}
|
|
4078
|
+
|
|
4079
|
+
// src/LandingPage/OrganizationsPanel.tsx
|
|
4080
|
+
import {
|
|
4081
|
+
alpha as alpha6,
|
|
4082
|
+
Box as Box17,
|
|
4083
|
+
Divider as Divider5,
|
|
4084
|
+
InputAdornment as InputAdornment3,
|
|
4085
|
+
ListItemButton as ListItemButton4,
|
|
4086
|
+
Stack as Stack11,
|
|
4087
|
+
TextField as TextField4,
|
|
4088
|
+
Typography as Typography10
|
|
4089
|
+
} from "@mui/material";
|
|
4090
|
+
import {
|
|
4091
|
+
Children as Children3,
|
|
4092
|
+
cloneElement as cloneElement2,
|
|
4093
|
+
Fragment as Fragment9,
|
|
4094
|
+
isValidElement as isValidElement2
|
|
4095
|
+
} from "react";
|
|
4096
|
+
import { ChevronRightIcon as ChevronRightIcon3, SearchIcon as SearchIcon3 } from "@bwp-web/assets";
|
|
4097
|
+
import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4098
|
+
function OrganizationRow({
|
|
4099
|
+
primaryText,
|
|
4100
|
+
secondaryText,
|
|
4101
|
+
logo,
|
|
4102
|
+
logoBackground = true,
|
|
4103
|
+
disabled = false,
|
|
4104
|
+
sx,
|
|
4105
|
+
...props
|
|
4106
|
+
}) {
|
|
4107
|
+
return /* @__PURE__ */ jsxs15(
|
|
4108
|
+
ListItemButton4,
|
|
4109
|
+
{
|
|
4110
|
+
disabled,
|
|
4111
|
+
disableRipple: true,
|
|
4112
|
+
sx: mergeSx(
|
|
4113
|
+
{
|
|
4114
|
+
p: 1.5,
|
|
4115
|
+
gap: 2,
|
|
4116
|
+
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100],
|
|
4117
|
+
// Disabled rows keep full opacity; only the logo dims (below).
|
|
4118
|
+
"&.Mui-disabled": { opacity: 1 },
|
|
4119
|
+
...!disabled && {
|
|
4120
|
+
"&:hover": { backgroundColor: "action.hover" }
|
|
4121
|
+
}
|
|
4122
|
+
},
|
|
4123
|
+
sx
|
|
4124
|
+
),
|
|
4125
|
+
...props,
|
|
4126
|
+
children: [
|
|
4127
|
+
/* @__PURE__ */ jsx32(
|
|
4128
|
+
Box17,
|
|
4129
|
+
{
|
|
4130
|
+
sx: {
|
|
4131
|
+
width: 40,
|
|
4132
|
+
height: 40,
|
|
4133
|
+
borderRadius: "6px",
|
|
4134
|
+
overflow: "hidden",
|
|
4135
|
+
flexShrink: 0,
|
|
4136
|
+
display: "flex",
|
|
4137
|
+
alignItems: "center",
|
|
4138
|
+
justifyContent: "center",
|
|
4139
|
+
opacity: disabled ? 0.5 : 1,
|
|
4140
|
+
backgroundColor: ({ palette }) => logoBackground ? palette.mode === "dark" ? palette.grey[800] : palette.grey[200] : "transparent"
|
|
4141
|
+
},
|
|
4142
|
+
children: typeof logo === "string" ? /* @__PURE__ */ jsx32(
|
|
4143
|
+
Box17,
|
|
4144
|
+
{
|
|
4145
|
+
component: "img",
|
|
4146
|
+
src: logo,
|
|
4147
|
+
alt: "",
|
|
4148
|
+
sx: { width: "100%", height: "100%", objectFit: "cover" }
|
|
4149
|
+
}
|
|
4150
|
+
) : logo
|
|
4151
|
+
}
|
|
4152
|
+
),
|
|
4153
|
+
/* @__PURE__ */ jsxs15(Stack11, { sx: { minWidth: 0, flex: 1, textAlign: "left" }, children: [
|
|
4154
|
+
/* @__PURE__ */ jsx32(
|
|
4155
|
+
Typography10,
|
|
4156
|
+
{
|
|
4157
|
+
noWrap: true,
|
|
4158
|
+
variant: "body2",
|
|
4159
|
+
fontWeight: 600,
|
|
4160
|
+
color: disabled ? "text.secondary" : "text.primary",
|
|
4161
|
+
children: primaryText
|
|
4162
|
+
}
|
|
4163
|
+
),
|
|
4164
|
+
secondaryText && /* @__PURE__ */ jsx32(Typography10, { noWrap: true, variant: "caption", color: "text.secondary", children: secondaryText })
|
|
4165
|
+
] }),
|
|
4166
|
+
!disabled && /* @__PURE__ */ jsx32(
|
|
4167
|
+
ChevronRightIcon3,
|
|
4168
|
+
{
|
|
4169
|
+
variant: "xs",
|
|
4170
|
+
sx: {
|
|
4171
|
+
width: 16,
|
|
4172
|
+
height: 16,
|
|
4173
|
+
flexShrink: 0,
|
|
4174
|
+
color: "text.primary"
|
|
4175
|
+
}
|
|
4176
|
+
}
|
|
4177
|
+
)
|
|
4178
|
+
]
|
|
4179
|
+
}
|
|
4180
|
+
);
|
|
4181
|
+
}
|
|
4182
|
+
var outlineSx = {
|
|
4183
|
+
border: 0.6,
|
|
4184
|
+
borderColor: ({ palette }) => palette.dividers.secondary,
|
|
4185
|
+
borderRadius: "6px",
|
|
4186
|
+
boxShadow: ({ palette }) => `0px 1px 1px 0px ${alpha6(palette.common.black, 0.05)}`
|
|
4187
|
+
};
|
|
4188
|
+
function OrganizationRowGroup({
|
|
4189
|
+
children,
|
|
4190
|
+
maxHeight,
|
|
4191
|
+
sx,
|
|
4192
|
+
...boxProps
|
|
4193
|
+
}) {
|
|
4194
|
+
const items = Children3.toArray(children).filter(isValidElement2);
|
|
4195
|
+
return /* @__PURE__ */ jsx32(
|
|
4196
|
+
Box17,
|
|
4197
|
+
{
|
|
4198
|
+
sx: mergeSx(
|
|
4199
|
+
{
|
|
4200
|
+
width: "100%",
|
|
4201
|
+
...outlineSx,
|
|
4202
|
+
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100],
|
|
4203
|
+
overflow: "hidden",
|
|
4204
|
+
...maxHeight !== void 0 && { overflowY: "auto", maxHeight }
|
|
4205
|
+
},
|
|
4206
|
+
sx
|
|
4207
|
+
),
|
|
4208
|
+
...boxProps,
|
|
4209
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs15(Fragment9, { children: [
|
|
4210
|
+
item,
|
|
4211
|
+
i !== items.length - 1 && /* @__PURE__ */ jsx32(Divider5, {})
|
|
4212
|
+
] }, item.key ?? i))
|
|
4213
|
+
}
|
|
4214
|
+
);
|
|
4215
|
+
}
|
|
4216
|
+
function TextDivider({ children, sx, ...props }) {
|
|
4217
|
+
return /* @__PURE__ */ jsx32(
|
|
4218
|
+
Divider5,
|
|
4219
|
+
{
|
|
4220
|
+
sx: mergeSx(
|
|
4221
|
+
{
|
|
4222
|
+
width: "100%",
|
|
4223
|
+
userSelect: "none",
|
|
4224
|
+
color: "text.primary",
|
|
4225
|
+
fontWeight: 600,
|
|
4226
|
+
fontSize: 14
|
|
4227
|
+
},
|
|
4228
|
+
sx
|
|
4229
|
+
),
|
|
4230
|
+
...props,
|
|
4231
|
+
children
|
|
4232
|
+
}
|
|
4233
|
+
);
|
|
4234
|
+
}
|
|
4235
|
+
function OrganizationsEmptyState({
|
|
4236
|
+
icon = /* @__PURE__ */ jsx32(SearchIcon3, {}),
|
|
4237
|
+
title = "No results found",
|
|
4238
|
+
description,
|
|
4239
|
+
...stackProps
|
|
4240
|
+
}) {
|
|
4241
|
+
return /* @__PURE__ */ jsxs15(
|
|
4242
|
+
Stack11,
|
|
4243
|
+
{
|
|
4244
|
+
role: "status",
|
|
4245
|
+
alignItems: "center",
|
|
4246
|
+
gap: 0.5,
|
|
4247
|
+
width: "100%",
|
|
4248
|
+
py: 2,
|
|
4249
|
+
px: 2,
|
|
4250
|
+
...stackProps,
|
|
4251
|
+
children: [
|
|
4252
|
+
cloneElement2(icon, {
|
|
4253
|
+
"aria-hidden": true,
|
|
4254
|
+
sx: {
|
|
4255
|
+
width: 24,
|
|
4256
|
+
height: 24,
|
|
4257
|
+
mb: 0.5,
|
|
4258
|
+
color: "text.secondary",
|
|
4259
|
+
...icon.props.sx
|
|
4260
|
+
}
|
|
4261
|
+
}),
|
|
4262
|
+
/* @__PURE__ */ jsx32(
|
|
4263
|
+
Typography10,
|
|
4264
|
+
{
|
|
4265
|
+
variant: "body2",
|
|
4266
|
+
fontWeight: 600,
|
|
4267
|
+
color: "text.primary",
|
|
4268
|
+
textAlign: "center",
|
|
4269
|
+
children: title
|
|
4270
|
+
}
|
|
4271
|
+
),
|
|
4272
|
+
description && /* @__PURE__ */ jsx32(Typography10, { variant: "caption", color: "text.secondary", textAlign: "center", children: description })
|
|
4273
|
+
]
|
|
4274
|
+
}
|
|
4275
|
+
);
|
|
4276
|
+
}
|
|
4277
|
+
var DEFAULT_MAX_LIST_HEIGHT = 3 * 64 + 2;
|
|
4278
|
+
function OrganizationsPanel({
|
|
4279
|
+
search,
|
|
4280
|
+
personalOrgItem,
|
|
4281
|
+
organizationsLabel,
|
|
4282
|
+
organizationItems,
|
|
4283
|
+
orLabel,
|
|
4284
|
+
empty = false,
|
|
4285
|
+
joinAction,
|
|
4286
|
+
createAction,
|
|
4287
|
+
width = 441,
|
|
4288
|
+
maxListHeight = DEFAULT_MAX_LIST_HEIGHT,
|
|
4289
|
+
slotProps,
|
|
4290
|
+
sx,
|
|
4291
|
+
...stackProps
|
|
4292
|
+
}) {
|
|
4293
|
+
const {
|
|
4294
|
+
sx: searchSx,
|
|
4295
|
+
slotProps: searchFieldSlotProps,
|
|
4296
|
+
...searchSlotProps
|
|
4297
|
+
} = slotProps?.search ?? {};
|
|
4298
|
+
return /* @__PURE__ */ jsxs15(
|
|
4299
|
+
Stack11,
|
|
4300
|
+
{
|
|
4301
|
+
gap: 2,
|
|
4302
|
+
alignItems: "center",
|
|
4303
|
+
justifyContent: "center",
|
|
4304
|
+
p: 1.5,
|
|
4305
|
+
borderRadius: 4,
|
|
4306
|
+
width,
|
|
4307
|
+
maxWidth: "100%",
|
|
4308
|
+
sx: mergeSx(
|
|
4309
|
+
{
|
|
4310
|
+
// Figma's `background_default` (#F5F5F5) is `grey[100]` here, not
|
|
4311
|
+
// `palette.background.default` — that token is #FFFFFF in light mode.
|
|
4312
|
+
backgroundColor: ({ palette }) => palette.mode === "dark" ? palette.grey[700] : palette.grey[100]
|
|
4313
|
+
},
|
|
4314
|
+
sx
|
|
4315
|
+
),
|
|
4316
|
+
...stackProps,
|
|
4317
|
+
children: [
|
|
4318
|
+
search && /* @__PURE__ */ jsx32(
|
|
4319
|
+
TextField4,
|
|
4320
|
+
{
|
|
4321
|
+
variant: "outlined",
|
|
4322
|
+
placeholder: search.placeholder,
|
|
4323
|
+
value: search.value,
|
|
4324
|
+
onChange: search.onChange,
|
|
4325
|
+
fullWidth: true,
|
|
4326
|
+
sx: mergeSx(
|
|
4327
|
+
{
|
|
4328
|
+
"& .MuiOutlinedInput-root": {
|
|
4329
|
+
backgroundColor: "background.paper"
|
|
4330
|
+
},
|
|
4331
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
4332
|
+
borderColor: ({ palette }) => palette.dividers.secondary
|
|
4333
|
+
}
|
|
4334
|
+
},
|
|
4335
|
+
searchSx
|
|
4336
|
+
),
|
|
4337
|
+
slotProps: {
|
|
4338
|
+
...searchFieldSlotProps,
|
|
4339
|
+
input: mergeSlotProps(
|
|
4340
|
+
{
|
|
4341
|
+
startAdornment: /* @__PURE__ */ jsx32(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx32(SearchIcon3, { sx: { ml: 1 } }) })
|
|
4342
|
+
},
|
|
4343
|
+
searchFieldSlotProps?.input
|
|
4344
|
+
),
|
|
4345
|
+
htmlInput: mergeSlotProps(
|
|
4346
|
+
{ "aria-label": search.placeholder },
|
|
4347
|
+
searchFieldSlotProps?.htmlInput
|
|
4348
|
+
)
|
|
4349
|
+
},
|
|
4350
|
+
...searchSlotProps
|
|
4351
|
+
}
|
|
4352
|
+
),
|
|
4353
|
+
personalOrgItem && /* @__PURE__ */ jsx32(OrganizationRowGroup, { ...slotProps?.personalOrgGroup, children: personalOrgItem }),
|
|
4354
|
+
organizationItems && /* @__PURE__ */ jsxs15(Fragment10, { children: [
|
|
4355
|
+
organizationsLabel && /* @__PURE__ */ jsx32(TextDivider, { ...slotProps?.organizationsLabel, children: organizationsLabel }),
|
|
4356
|
+
/* @__PURE__ */ jsx32(
|
|
4357
|
+
OrganizationRowGroup,
|
|
4358
|
+
{
|
|
4359
|
+
maxHeight: maxListHeight,
|
|
4360
|
+
...slotProps?.organizationsGroup,
|
|
4361
|
+
children: organizationItems
|
|
4362
|
+
}
|
|
4363
|
+
)
|
|
4364
|
+
] }),
|
|
4365
|
+
empty ? empty === true ? /* @__PURE__ */ jsx32(OrganizationsEmptyState, {}) : empty : orLabel && /* @__PURE__ */ jsx32(TextDivider, { ...slotProps?.orLabel, children: orLabel }),
|
|
4366
|
+
(joinAction || createAction) && /* @__PURE__ */ jsxs15(Stack11, { gap: 1, width: "100%", ...slotProps?.actions, children: [
|
|
4367
|
+
joinAction && /* @__PURE__ */ jsx32(OrganizationRowGroup, { ...slotProps?.joinGroup, children: joinAction }),
|
|
4368
|
+
createAction && /* @__PURE__ */ jsx32(OrganizationRowGroup, { ...slotProps?.createGroup, children: createAction })
|
|
4369
|
+
] })
|
|
4370
|
+
]
|
|
4371
|
+
}
|
|
4372
|
+
);
|
|
4373
|
+
}
|
|
4374
|
+
|
|
3933
4375
|
// src/UserInitialsIcon/UserInitialsIcon.tsx
|
|
3934
4376
|
var import_randomcolor = __toESM(require_randomColor(), 1);
|
|
3935
|
-
import { Box as
|
|
4377
|
+
import { Box as Box18, Typography as Typography11 } from "@mui/material";
|
|
3936
4378
|
import { darken } from "@mui/material/styles";
|
|
3937
|
-
import { jsx as
|
|
4379
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3938
4380
|
var DEFAULT_SIZE = 40;
|
|
3939
4381
|
var DEFAULT_BORDER_RADIUS = 1.5;
|
|
3940
4382
|
var TEXT_RATIO = 0.4;
|
|
@@ -3952,8 +4394,8 @@ function UserInitialsIcon({
|
|
|
3952
4394
|
const textColor = darken((0, import_randomcolor.default)({ luminosity: "dark", seed: id }), 0.3);
|
|
3953
4395
|
const size = typeof width === "number" ? width : DEFAULT_SIZE;
|
|
3954
4396
|
const fontSize = size * TEXT_RATIO;
|
|
3955
|
-
return /* @__PURE__ */
|
|
3956
|
-
|
|
4397
|
+
return /* @__PURE__ */ jsx33(
|
|
4398
|
+
Box18,
|
|
3957
4399
|
{
|
|
3958
4400
|
minWidth: width,
|
|
3959
4401
|
width,
|
|
@@ -3966,8 +4408,8 @@ function UserInitialsIcon({
|
|
|
3966
4408
|
justifyContent: "center",
|
|
3967
4409
|
sx: { ...sx },
|
|
3968
4410
|
...props,
|
|
3969
|
-
children: /* @__PURE__ */
|
|
3970
|
-
|
|
4411
|
+
children: /* @__PURE__ */ jsx33(
|
|
4412
|
+
Typography11,
|
|
3971
4413
|
{
|
|
3972
4414
|
variant: "h3",
|
|
3973
4415
|
color: textColor,
|
|
@@ -3989,9 +4431,9 @@ var getInitials = (name) => {
|
|
|
3989
4431
|
};
|
|
3990
4432
|
|
|
3991
4433
|
// src/DynamicSvgIcon/DynamicSvgIcon.tsx
|
|
3992
|
-
import { SvgIcon, Skeleton, Box as
|
|
4434
|
+
import { SvgIcon, Skeleton, Box as Box19 } from "@mui/material";
|
|
3993
4435
|
import { useEffect as useEffect6, useState as useState9 } from "react";
|
|
3994
|
-
import { jsx as
|
|
4436
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3995
4437
|
var svgCache = /* @__PURE__ */ new Map();
|
|
3996
4438
|
function clearDynamicSvgIconCache() {
|
|
3997
4439
|
svgCache.clear();
|
|
@@ -4093,7 +4535,7 @@ function DynamicSvgIcon({
|
|
|
4093
4535
|
onError
|
|
4094
4536
|
});
|
|
4095
4537
|
if (loading) {
|
|
4096
|
-
return /* @__PURE__ */
|
|
4538
|
+
return /* @__PURE__ */ jsx34(
|
|
4097
4539
|
Skeleton,
|
|
4098
4540
|
{
|
|
4099
4541
|
variant: skeletonVariant,
|
|
@@ -4103,8 +4545,8 @@ function DynamicSvgIcon({
|
|
|
4103
4545
|
);
|
|
4104
4546
|
}
|
|
4105
4547
|
if (error || !svgContent) {
|
|
4106
|
-
return /* @__PURE__ */
|
|
4107
|
-
|
|
4548
|
+
return /* @__PURE__ */ jsx34(
|
|
4549
|
+
Box19,
|
|
4108
4550
|
{
|
|
4109
4551
|
sx: {
|
|
4110
4552
|
width,
|
|
@@ -4123,7 +4565,7 @@ function DynamicSvgIcon({
|
|
|
4123
4565
|
}
|
|
4124
4566
|
);
|
|
4125
4567
|
}
|
|
4126
|
-
return /* @__PURE__ */
|
|
4568
|
+
return /* @__PURE__ */ jsx34(
|
|
4127
4569
|
SvgIcon,
|
|
4128
4570
|
{
|
|
4129
4571
|
...svgIconProps,
|
|
@@ -4133,7 +4575,7 @@ function DynamicSvgIcon({
|
|
|
4133
4575
|
width,
|
|
4134
4576
|
height
|
|
4135
4577
|
},
|
|
4136
|
-
children: /* @__PURE__ */
|
|
4578
|
+
children: /* @__PURE__ */ jsx34("g", { dangerouslySetInnerHTML: { __html: svgContent } })
|
|
4137
4579
|
}
|
|
4138
4580
|
);
|
|
4139
4581
|
}
|
|
@@ -4190,11 +4632,19 @@ export {
|
|
|
4190
4632
|
BiampTableTruncatedCell,
|
|
4191
4633
|
BiampWrapper,
|
|
4192
4634
|
DynamicSvgIcon,
|
|
4635
|
+
LandingFormActions,
|
|
4636
|
+
LandingFormCheckbox,
|
|
4637
|
+
LandingFormField,
|
|
4638
|
+
LandingFormPanel,
|
|
4193
4639
|
OrganizationItem,
|
|
4194
4640
|
OrganizationItemList,
|
|
4641
|
+
OrganizationRow,
|
|
4642
|
+
OrganizationRowGroup,
|
|
4195
4643
|
OrganizationSelector,
|
|
4196
4644
|
OrganizationSelectorButton,
|
|
4197
4645
|
OrganizationSelectorPopover,
|
|
4646
|
+
OrganizationsEmptyState,
|
|
4647
|
+
OrganizationsPanel,
|
|
4198
4648
|
SegmentedButton,
|
|
4199
4649
|
SegmentedButtonGroup,
|
|
4200
4650
|
UserInitialsIcon,
|