@lets-events/react 12.1.13 → 12.2.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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- > @lets-events/react@12.1.13 build
3
+ > @lets-events/react@12.2.0 build
4
4
  > tsup src/index.tsx --format esm,cjs --dts --external react
5
5
 
6
6
  CLI Building entry: src/index.tsx
@@ -10,12 +10,12 @@
10
10
  CLI Target: es6
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 374.58 KB
14
- ESM ⚡️ Build success in 286ms
15
- CJS dist/index.js 388.40 KB
16
- CJS ⚡️ Build success in 286ms
13
+ CJS dist/index.js 391.96 KB
14
+ CJS ⚡️ Build success in 499ms
15
+ ESM dist/index.mjs 378.06 KB
16
+ ESM ⚡️ Build success in 501ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 91323ms
19
- DTS dist/index.d.mts 388.87 KB
20
- DTS dist/index.d.ts 388.87 KB
18
+ DTS ⚡️ Build success in 8126ms
19
+ DTS dist/index.d.mts 388.96 KB
20
+ DTS dist/index.d.ts 388.96 KB
21
21
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - MultiSelect added props
8
+
3
9
  ## 12.1.13
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -12595,9 +12595,14 @@ interface TooltipProps {
12595
12595
  }
12596
12596
  declare function Tooltip({ children, content, delayDuration, side, }: TooltipProps): react_jsx_runtime.JSX.Element;
12597
12597
 
12598
- declare const StyledTrigger: _stitches_react_types_styled_component.StyledComponent<"div", {
12599
- color?: "default" | "error" | undefined;
12600
- disabled?: boolean | "true" | undefined;
12598
+ declare const FlexStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<_radix_ui_themes.FlexProps & React$1.RefAttributes<HTMLDivElement>>, {
12599
+ display?: "flex" | "inline-flex" | undefined;
12600
+ align?: "end" | "stretch" | "center" | "start" | "baseline" | undefined;
12601
+ justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | undefined;
12602
+ direction?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
12603
+ gap?: 0 | 2 | "0" | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12604
+ gapY?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12605
+ gapX?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12601
12606
  }, {}, _stitches_react_types_css_util.CSS<{}, {
12602
12607
  colors: {
12603
12608
  brand50: string;
@@ -12968,32 +12973,15 @@ declare const StyledTrigger: _stitches_react_types_styled_component.StyledCompon
12968
12973
  transition: "transitions";
12969
12974
  zIndex: "zIndices";
12970
12975
  }, {}>>;
12971
- type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
12972
- placeholder?: string;
12973
- value?: string[];
12974
- onValueChange?: (v: string[]) => void;
12975
- options: Array<{
12976
- label: string;
12977
- value: string;
12978
- }>;
12979
- width?: string;
12980
- zIndex?: string;
12981
- showSelectedValues?: boolean;
12982
- singleSelect?: boolean;
12983
- selectedOrientation?: "row" | "column";
12984
- disabled?: boolean;
12985
- maxHeight?: string;
12976
+ type FlexProps = ComponentProps<typeof FlexStyled> & {
12977
+ as?: ElementType;
12978
+ children: React.ReactNode;
12986
12979
  };
12987
- declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
12980
+ declare function Flex({ children, ...props }: FlexProps): react_jsx_runtime.JSX.Element;
12988
12981
 
12989
- declare const FlexStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<_radix_ui_themes.FlexProps & React$1.RefAttributes<HTMLDivElement>>, {
12990
- display?: "flex" | "inline-flex" | undefined;
12991
- align?: "end" | "stretch" | "center" | "start" | "baseline" | undefined;
12992
- justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | undefined;
12993
- direction?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
12994
- gap?: 0 | 2 | "0" | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12995
- gapY?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12996
- gapX?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12982
+ declare const StyledTrigger: _stitches_react_types_styled_component.StyledComponent<"div", {
12983
+ color?: "default" | "error" | undefined;
12984
+ disabled?: boolean | "true" | undefined;
12997
12985
  }, {}, _stitches_react_types_css_util.CSS<{}, {
12998
12986
  colors: {
12999
12987
  brand50: string;
@@ -13364,11 +13352,27 @@ declare const FlexStyled: _stitches_react_types_styled_component.StyledComponent
13364
13352
  transition: "transitions";
13365
13353
  zIndex: "zIndices";
13366
13354
  }, {}>>;
13367
- type FlexProps = ComponentProps<typeof FlexStyled> & {
13368
- as?: ElementType;
13369
- children: React.ReactNode;
13355
+
13356
+ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
13357
+ placeholder?: string;
13358
+ value?: string[];
13359
+ onValueChange?: (v: string[]) => void;
13360
+ options: Array<{
13361
+ label: string;
13362
+ value: string;
13363
+ }>;
13364
+ width?: string;
13365
+ zIndex?: string;
13366
+ showSelectedValues?: boolean;
13367
+ singleSelect?: boolean;
13368
+ selectedOrientation?: "row" | "column";
13369
+ disabled?: boolean;
13370
+ maxHeight?: string;
13371
+ selectedAllOptions?: boolean;
13372
+ selectedAllText?: string;
13373
+ selectedScroll?: boolean;
13370
13374
  };
13371
- declare function Flex({ children, ...props }: FlexProps): react_jsx_runtime.JSX.Element;
13375
+ declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
13372
13376
 
13373
13377
  declare const Box: React$1.ForwardRefExoticComponent<_radix_ui_themes.BoxProps & React$1.RefAttributes<HTMLDivElement>>;
13374
13378
 
package/dist/index.d.ts CHANGED
@@ -12595,9 +12595,14 @@ interface TooltipProps {
12595
12595
  }
12596
12596
  declare function Tooltip({ children, content, delayDuration, side, }: TooltipProps): react_jsx_runtime.JSX.Element;
12597
12597
 
12598
- declare const StyledTrigger: _stitches_react_types_styled_component.StyledComponent<"div", {
12599
- color?: "default" | "error" | undefined;
12600
- disabled?: boolean | "true" | undefined;
12598
+ declare const FlexStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<_radix_ui_themes.FlexProps & React$1.RefAttributes<HTMLDivElement>>, {
12599
+ display?: "flex" | "inline-flex" | undefined;
12600
+ align?: "end" | "stretch" | "center" | "start" | "baseline" | undefined;
12601
+ justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | undefined;
12602
+ direction?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
12603
+ gap?: 0 | 2 | "0" | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12604
+ gapY?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12605
+ gapX?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12601
12606
  }, {}, _stitches_react_types_css_util.CSS<{}, {
12602
12607
  colors: {
12603
12608
  brand50: string;
@@ -12968,32 +12973,15 @@ declare const StyledTrigger: _stitches_react_types_styled_component.StyledCompon
12968
12973
  transition: "transitions";
12969
12974
  zIndex: "zIndices";
12970
12975
  }, {}>>;
12971
- type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
12972
- placeholder?: string;
12973
- value?: string[];
12974
- onValueChange?: (v: string[]) => void;
12975
- options: Array<{
12976
- label: string;
12977
- value: string;
12978
- }>;
12979
- width?: string;
12980
- zIndex?: string;
12981
- showSelectedValues?: boolean;
12982
- singleSelect?: boolean;
12983
- selectedOrientation?: "row" | "column";
12984
- disabled?: boolean;
12985
- maxHeight?: string;
12976
+ type FlexProps = ComponentProps<typeof FlexStyled> & {
12977
+ as?: ElementType;
12978
+ children: React.ReactNode;
12986
12979
  };
12987
- declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
12980
+ declare function Flex({ children, ...props }: FlexProps): react_jsx_runtime.JSX.Element;
12988
12981
 
12989
- declare const FlexStyled: _stitches_react_types_styled_component.StyledComponent<React$1.ForwardRefExoticComponent<_radix_ui_themes.FlexProps & React$1.RefAttributes<HTMLDivElement>>, {
12990
- display?: "flex" | "inline-flex" | undefined;
12991
- align?: "end" | "stretch" | "center" | "start" | "baseline" | undefined;
12992
- justify?: "end" | "center" | "start" | "between" | "around" | "evenly" | undefined;
12993
- direction?: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
12994
- gap?: 0 | 2 | "0" | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12995
- gapY?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12996
- gapX?: 2 | "2" | "4" | "6" | "8" | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 20 | 22 | 24 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 80 | "full" | "10" | "12" | "14" | "16" | "20" | "22" | "24" | "32" | "36" | "40" | "48" | "56" | "64" | "72" | "80" | undefined;
12982
+ declare const StyledTrigger: _stitches_react_types_styled_component.StyledComponent<"div", {
12983
+ color?: "default" | "error" | undefined;
12984
+ disabled?: boolean | "true" | undefined;
12997
12985
  }, {}, _stitches_react_types_css_util.CSS<{}, {
12998
12986
  colors: {
12999
12987
  brand50: string;
@@ -13364,11 +13352,27 @@ declare const FlexStyled: _stitches_react_types_styled_component.StyledComponent
13364
13352
  transition: "transitions";
13365
13353
  zIndex: "zIndices";
13366
13354
  }, {}>>;
13367
- type FlexProps = ComponentProps<typeof FlexStyled> & {
13368
- as?: ElementType;
13369
- children: React.ReactNode;
13355
+
13356
+ type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
13357
+ placeholder?: string;
13358
+ value?: string[];
13359
+ onValueChange?: (v: string[]) => void;
13360
+ options: Array<{
13361
+ label: string;
13362
+ value: string;
13363
+ }>;
13364
+ width?: string;
13365
+ zIndex?: string;
13366
+ showSelectedValues?: boolean;
13367
+ singleSelect?: boolean;
13368
+ selectedOrientation?: "row" | "column";
13369
+ disabled?: boolean;
13370
+ maxHeight?: string;
13371
+ selectedAllOptions?: boolean;
13372
+ selectedAllText?: string;
13373
+ selectedScroll?: boolean;
13370
13374
  };
13371
- declare function Flex({ children, ...props }: FlexProps): react_jsx_runtime.JSX.Element;
13375
+ declare const MultiSelect: React__default.ForwardRefExoticComponent<Omit<MultiSelectProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
13372
13376
 
13373
13377
  declare const Box: React$1.ForwardRefExoticComponent<_radix_ui_themes.BoxProps & React$1.RefAttributes<HTMLDivElement>>;
13374
13378
 
package/dist/index.js CHANGED
@@ -149,7 +149,7 @@ var require_react_is_development = __commonJS({
149
149
  var ContextProvider = REACT_PROVIDER_TYPE;
150
150
  var Element = REACT_ELEMENT_TYPE;
151
151
  var ForwardRef = REACT_FORWARD_REF_TYPE;
152
- var Fragment6 = REACT_FRAGMENT_TYPE;
152
+ var Fragment5 = REACT_FRAGMENT_TYPE;
153
153
  var Lazy = REACT_LAZY_TYPE;
154
154
  var Memo = REACT_MEMO_TYPE;
155
155
  var Portal = REACT_PORTAL_TYPE;
@@ -208,7 +208,7 @@ var require_react_is_development = __commonJS({
208
208
  exports2.ContextProvider = ContextProvider;
209
209
  exports2.Element = Element;
210
210
  exports2.ForwardRef = ForwardRef;
211
- exports2.Fragment = Fragment6;
211
+ exports2.Fragment = Fragment5;
212
212
  exports2.Lazy = Lazy;
213
213
  exports2.Memo = Memo;
214
214
  exports2.Portal = Portal;
@@ -9392,13 +9392,15 @@ function Tooltip({
9392
9392
  ] }) });
9393
9393
  }
9394
9394
 
9395
- // src/components/MultiSelect.tsx
9395
+ // src/components/MultiSelect/index.tsx
9396
9396
  var import_react16 = __toESM(require("react"));
9397
- var import_themes18 = require("@radix-ui/themes");
9397
+ var import_themes19 = require("@radix-ui/themes");
9398
9398
  var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
9399
9399
  var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
9400
9400
  var import_react17 = require("react");
9401
- var import_jsx_runtime26 = require("react/jsx-runtime");
9401
+
9402
+ // src/components/MultiSelect/styledComponents.ts
9403
+ var import_themes18 = require("@radix-ui/themes");
9402
9404
  var StyledContent = styled(import_themes18.DropdownMenu.Content, {
9403
9405
  backgroundColor: "$dark50",
9404
9406
  borderRadius: "$sm",
@@ -9482,12 +9484,67 @@ var StyledFlexWithMaxHeight = styled(Flex2, {
9482
9484
  hasMaxHeight: false
9483
9485
  }
9484
9486
  });
9487
+ var StyledFlexSelectedItems = styled(Flex2, {
9488
+ overflowY: "auto",
9489
+ margin: "8px 0",
9490
+ "&::-webkit-scrollbar": {
9491
+ width: "4px"
9492
+ },
9493
+ "&::-webkit-scrollbar-track": {
9494
+ backgroundColor: "$dark100",
9495
+ borderRadius: "2px"
9496
+ },
9497
+ "&::-webkit-scrollbar-thumb": {
9498
+ backgroundColor: "$dark300",
9499
+ borderRadius: "2px",
9500
+ "&:hover": {
9501
+ backgroundColor: "$dark400"
9502
+ }
9503
+ }
9504
+ });
9485
9505
  var StyledText = styled(Text, {
9486
9506
  flex: 1,
9487
9507
  overflow: "hidden",
9488
9508
  whiteSpace: "nowrap",
9489
9509
  textOverflow: "ellipsis"
9490
9510
  });
9511
+ var ButtonSelectAllStyled = styled("button", {
9512
+ display: "flex !important",
9513
+ alignItems: "center",
9514
+ justifyContent: "flex-start",
9515
+ gap: "$8",
9516
+ border: "none",
9517
+ "div": {
9518
+ backgroundCcolor: "#fff",
9519
+ borderRadius: "2px",
9520
+ height: "$16",
9521
+ width: "$16",
9522
+ position: "relative",
9523
+ border: "2px solid $dark300",
9524
+ cursor: "pointer",
9525
+ boxSizing: "border-box",
9526
+ "&.checked::before": {
9527
+ backgroundImage: `url("data:image/svg+xml,%3Csvg%20width='16'%20height='16'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20d='M2%200C0.896875%200%200%200.896875%200%202V12C0%2013.1031%200.896875%2014%202%2014H12C13.1031%2014%2014%2013.1031%2014%2012V2C14%200.896875%2013.1031%200%2012%200H2ZM10.5312%205.53125L6.53125%209.53125C6.2375%209.825%205.7625%209.825%205.47188%209.53125L3.47187%207.53125C3.17812%207.2375%203.17812%206.7625%203.47187%206.47188C3.76562%206.18125%204.24062%206.17813%204.53125%206.47188L6%207.94063L9.46875%204.46875C9.7625%204.175%2010.2375%204.175%2010.5281%204.46875C10.8187%204.7625%2010.8219%205.2375%2010.5281%205.52812L10.5312%205.53125Z'%20fill='%23004ED2'/%3E%3C/svg%3E")`,
9528
+ content: "",
9529
+ width: "1rem",
9530
+ height: "1rem",
9531
+ position: "absolute",
9532
+ top: "-1px",
9533
+ right: "-2px",
9534
+ zIndex: "2",
9535
+ backgroundRepeat: "no-repeat"
9536
+ }
9537
+ },
9538
+ "&:hover": {
9539
+ "div": {
9540
+ transition: "all 300ms ease-out",
9541
+ boxShadow: "rgba(56, 129, 255, 0.5) 0px 0px 0px 4px"
9542
+ }
9543
+ }
9544
+ });
9545
+
9546
+ // src/components/MultiSelect/index.tsx
9547
+ var import_jsx_runtime26 = require("react/jsx-runtime");
9491
9548
  var MultiSelect = import_react16.default.forwardRef(
9492
9549
  ({
9493
9550
  placeholder,
@@ -9501,10 +9558,14 @@ var MultiSelect = import_react16.default.forwardRef(
9501
9558
  singleSelect = false,
9502
9559
  selectedOrientation = "column",
9503
9560
  disabled = false,
9504
- maxHeight
9561
+ maxHeight,
9562
+ selectedAllOptions = false,
9563
+ selectedAllText,
9564
+ selectedScroll = false
9505
9565
  }, fowardedRef) => {
9506
9566
  const [isOpen, setIsOpen] = (0, import_react16.useState)(false);
9507
9567
  const triggerRef = (0, import_react16.useRef)(null);
9568
+ const [allOptionsSelected, setAllOptionsSelected] = (0, import_react16.useState)(false);
9508
9569
  const labelByValue = (0, import_react17.useMemo)(() => {
9509
9570
  return options.reduce((prev, curr) => {
9510
9571
  return __spreadProps(__spreadValues({}, prev), {
@@ -9519,6 +9580,21 @@ var MultiSelect = import_react16.default.forwardRef(
9519
9580
  },
9520
9581
  [selectedValues, onValueChange]
9521
9582
  );
9583
+ const handleSelectAll = (0, import_react16.useCallback)(
9584
+ (e) => {
9585
+ e.preventDefault();
9586
+ e.stopPropagation();
9587
+ const allSelected = selectedValues.length === options.length;
9588
+ if (allSelected) {
9589
+ onValueChange == null ? void 0 : onValueChange([]);
9590
+ setAllOptionsSelected(false);
9591
+ } else {
9592
+ onValueChange == null ? void 0 : onValueChange(options.map((o) => o.value));
9593
+ setAllOptionsSelected(true);
9594
+ }
9595
+ },
9596
+ [selectedValues, options, onValueChange]
9597
+ );
9522
9598
  const text = (0, import_react17.useMemo)(() => {
9523
9599
  if (selectedValues.length > 0 && singleSelect) {
9524
9600
  const value = selectedValues[0];
@@ -9539,9 +9615,9 @@ var MultiSelect = import_react16.default.forwardRef(
9539
9615
  },
9540
9616
  [disabled]
9541
9617
  );
9542
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes18.Theme, { children: [
9543
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes18.DropdownMenu.Root, { children: [
9544
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes18.DropdownMenu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9618
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes19.Theme, { style: width !== "100%" ? { width } : void 0, children: [
9619
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_themes19.DropdownMenu.Root, { open: isOpen, onOpenChange: setIsOpen, children: [
9620
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_themes19.DropdownMenu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9545
9621
  StyledTrigger,
9546
9622
  {
9547
9623
  ref: (r) => {
@@ -9549,9 +9625,7 @@ var MultiSelect = import_react16.default.forwardRef(
9549
9625
  triggerRef.current = r;
9550
9626
  if (fowardedRef) {
9551
9627
  if (typeof fowardedRef === "function") fowardedRef(r);
9552
- else {
9553
- fowardedRef.current = r;
9554
- }
9628
+ else fowardedRef.current = r;
9555
9629
  }
9556
9630
  },
9557
9631
  color,
@@ -9591,15 +9665,31 @@ var MultiSelect = import_react16.default.forwardRef(
9591
9665
  value: selectedValues,
9592
9666
  onValueChange: (v) => {
9593
9667
  onValueChange == null ? void 0 : onValueChange(v);
9668
+ if (allOptionsSelected) {
9669
+ setAllOptionsSelected(false);
9670
+ }
9594
9671
  },
9595
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9672
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9596
9673
  StyledFlexWithMaxHeight,
9597
9674
  {
9598
9675
  direction: "column",
9599
9676
  gap: 8,
9600
9677
  hasMaxHeight: !!maxHeight,
9601
9678
  style: maxHeight ? { maxHeight } : void 0,
9602
- children: options.map(({ value, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: label }) }, i))
9679
+ children: [
9680
+ selectedAllOptions && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9681
+ ButtonSelectAllStyled,
9682
+ {
9683
+ css: itemStyle,
9684
+ onClick: (e) => handleSelectAll(e),
9685
+ children: [
9686
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: allOptionsSelected ? "checked" : "" }),
9687
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: selectedAllText ? selectedAllText : "Selecionar Todos" })
9688
+ ]
9689
+ }
9690
+ ),
9691
+ options.map(({ value, label }, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Text, { typography: "labelSmall", children: label }) }, i))
9692
+ ]
9603
9693
  }
9604
9694
  )
9605
9695
  }
@@ -9616,14 +9706,14 @@ var MultiSelect = import_react16.default.forwardRef(
9616
9706
  }
9617
9707
  )
9618
9708
  ] }),
9619
- selectedValues.length > 0 && showSelectedValues && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9620
- Flex2,
9709
+ selectedValues.length > 0 && showSelectedValues && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
9710
+ StyledFlexSelectedItems,
9621
9711
  {
9622
9712
  direction: selectedOrientation,
9623
9713
  gap: 8,
9624
9714
  align: selectedOrientation === "column" ? "start" : "center",
9625
9715
  justify: "start",
9626
- css: { margin: "8px 0" },
9716
+ css: __spreadValues({}, selectedScroll && { maxHeight: maxHeight || "400px" }),
9627
9717
  children: selectedValues.map((value) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
9628
9718
  Flex2,
9629
9719
  {
@@ -9656,15 +9746,15 @@ var MultiSelect = import_react16.default.forwardRef(
9656
9746
  value
9657
9747
  ))
9658
9748
  }
9659
- ) })
9749
+ )
9660
9750
  ] });
9661
9751
  }
9662
9752
  );
9663
9753
 
9664
9754
  // src/components/Grid.tsx
9665
- var import_themes19 = require("@radix-ui/themes");
9755
+ var import_themes20 = require("@radix-ui/themes");
9666
9756
  var import_jsx_runtime27 = require("react/jsx-runtime");
9667
- var GridStyled = styled(import_themes19.Grid, {
9757
+ var GridStyled = styled(import_themes20.Grid, {
9668
9758
  display: "grid",
9669
9759
  variants: {
9670
9760
  display: {
@@ -9789,9 +9879,9 @@ function Grid(_a) {
9789
9879
  }
9790
9880
 
9791
9881
  // src/components/Container.tsx
9792
- var import_themes20 = require("@radix-ui/themes");
9882
+ var import_themes21 = require("@radix-ui/themes");
9793
9883
  var import_jsx_runtime28 = require("react/jsx-runtime");
9794
- var ContainerStyled = styled(import_themes20.Container, {
9884
+ var ContainerStyled = styled(import_themes21.Container, {
9795
9885
  variants: {
9796
9886
  size: {
9797
9887
  xs: { maxWidth: "576px" },
@@ -9824,9 +9914,9 @@ function Container(_a) {
9824
9914
  }
9825
9915
 
9826
9916
  // src/components/Section.tsx
9827
- var import_themes21 = require("@radix-ui/themes");
9917
+ var import_themes22 = require("@radix-ui/themes");
9828
9918
  var import_jsx_runtime29 = require("react/jsx-runtime");
9829
- var SectionStyled = styled(import_themes21.Section, {
9919
+ var SectionStyled = styled(import_themes22.Section, {
9830
9920
  variants: {
9831
9921
  size: {
9832
9922
  xs: { maxWidth: "576px" },