myshell-react-lib 0.2.21 → 0.2.22

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/index.d.cts CHANGED
@@ -1527,7 +1527,8 @@ declare function LogoLoading({ className, containerClassName, }: {
1527
1527
 
1528
1528
  declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
1529
1529
  interface ToastViewportProps extends React$1.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport> {
1530
- position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-center' | 'right-center';
1530
+ position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left-center" | "right-center";
1531
+ className?: string;
1531
1532
  }
1532
1533
  declare const ToastViewport: React$1.ForwardRefExoticComponent<ToastViewportProps & React$1.RefAttributes<HTMLOListElement>>;
1533
1534
  declare const Toast$1: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
package/dist/index.d.ts CHANGED
@@ -1527,7 +1527,8 @@ declare function LogoLoading({ className, containerClassName, }: {
1527
1527
 
1528
1528
  declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
1529
1529
  interface ToastViewportProps extends React$1.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport> {
1530
- position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-center' | 'right-center';
1530
+ position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left-center" | "right-center";
1531
+ className?: string;
1531
1532
  }
1532
1533
  declare const ToastViewport: React$1.ForwardRefExoticComponent<ToastViewportProps & React$1.RefAttributes<HTMLOListElement>>;
1533
1534
  declare const Toast$1: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
package/dist/index.js CHANGED
@@ -214,7 +214,7 @@ function _unsupported_iterable_to_array(o, minLen) {
214
214
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
215
215
  }
216
216
  function _ts_generator(thisArg, body) {
217
- var f, y, t, g, _ = {
217
+ var f, y, t, _ = {
218
218
  label: 0,
219
219
  sent: function() {
220
220
  if (t[0] & 1) throw t[1];
@@ -222,12 +222,8 @@ function _ts_generator(thisArg, body) {
222
222
  },
223
223
  trys: [],
224
224
  ops: []
225
- };
226
- return g = {
227
- next: verb(0),
228
- "throw": verb(1),
229
- "return": verb(2)
230
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
225
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
226
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
231
227
  return this;
232
228
  }), g;
233
229
  function verb(n) {
@@ -240,7 +236,7 @@ function _ts_generator(thisArg, body) {
240
236
  }
241
237
  function step(op) {
242
238
  if (f) throw new TypeError("Generator is already executing.");
243
- while(_)try {
239
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
244
240
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
245
241
  if (y = 0, t) op = [
246
242
  op[0] & 2,
@@ -7693,58 +7689,62 @@ var IosAudioPlayer = forwardRef13(function(props, ref) {
7693
7689
  }
7694
7690
  };
7695
7691
  }, []);
7696
- var handlePlay = useCallback(/*#__PURE__*/ _async_to_generator(function() {
7697
- var _audioRef_current, arrayBuffer;
7698
- return _ts_generator(this, function(_state) {
7699
- switch(_state.label){
7700
- case 0:
7701
- if (!((_audioRef_current = audioRef.current) === null || _audioRef_current === void 0 ? void 0 : _audioRef_current.paused)) return [
7702
- 2,
7703
- Promise.reject()
7704
- ];
7705
- if (!(props.src && loadTask.current)) return [
7706
- 3,
7707
- 2
7708
- ];
7709
- return [
7710
- 4,
7711
- loadTask.current
7712
- ];
7713
- case 1:
7714
- arrayBuffer = _state.sent();
7715
- if (arrayBuffer) {
7692
+ var handlePlay = useCallback(function() {
7693
+ return _async_to_generator(function() {
7694
+ var _audioRef_current, arrayBuffer;
7695
+ return _ts_generator(this, function(_state) {
7696
+ switch(_state.label){
7697
+ case 0:
7698
+ if (!((_audioRef_current = audioRef.current) === null || _audioRef_current === void 0 ? void 0 : _audioRef_current.paused)) return [
7699
+ 2,
7700
+ Promise.reject()
7701
+ ];
7702
+ if (!(props.src && loadTask.current)) return [
7703
+ 3,
7704
+ 2
7705
+ ];
7706
+ return [
7707
+ 4,
7708
+ loadTask.current
7709
+ ];
7710
+ case 1:
7711
+ arrayBuffer = _state.sent();
7712
+ if (arrayBuffer) {
7713
+ return [
7714
+ 2,
7715
+ audioApi.play(arrayBuffer, audioRef.current.currentTime)
7716
+ ];
7717
+ }
7718
+ _state.label = 2;
7719
+ case 2:
7716
7720
  return [
7717
7721
  2,
7718
- audioApi.play(arrayBuffer, audioRef.current.currentTime)
7722
+ Promise.resolve()
7719
7723
  ];
7720
- }
7721
- _state.label = 2;
7722
- case 2:
7723
- return [
7724
- 2,
7725
- Promise.resolve()
7726
- ];
7727
- }
7728
- });
7729
- }), []);
7730
- var handleLoad = useCallback(/*#__PURE__*/ _async_to_generator(function() {
7731
- return _ts_generator(this, function(_state) {
7732
- if (props.src) {
7733
- try {
7734
- loadTask.current = window.fetch(props.src).then(function(response) {
7735
- return response.arrayBuffer();
7736
- }).catch(function(error) {
7724
+ }
7725
+ });
7726
+ })();
7727
+ }, []);
7728
+ var handleLoad = useCallback(function() {
7729
+ return _async_to_generator(function() {
7730
+ return _ts_generator(this, function(_state) {
7731
+ if (props.src) {
7732
+ try {
7733
+ loadTask.current = window.fetch(props.src).then(function(response) {
7734
+ return response.arrayBuffer();
7735
+ }).catch(function(error) {
7736
+ console.error(error);
7737
+ });
7738
+ } catch (error) {
7737
7739
  console.error(error);
7738
- });
7739
- } catch (error) {
7740
- console.error(error);
7740
+ }
7741
7741
  }
7742
- }
7743
- return [
7744
- 2
7745
- ];
7746
- });
7747
- }), []);
7742
+ return [
7743
+ 2
7744
+ ];
7745
+ });
7746
+ })();
7747
+ }, []);
7748
7748
  useImperativeHandle(ref, function() {
7749
7749
  return {
7750
7750
  play: function() {
@@ -8266,7 +8266,7 @@ function AudioPlayer(param) {
8266
8266
  // node_modules/@radix-ui/react-primitive/dist/index.mjs
8267
8267
  import * as React16 from "react";
8268
8268
  import * as ReactDOM from "react-dom";
8269
- import { Slot as Slot3 } from "@radix-ui/react-slot";
8269
+ import { createSlot } from "@radix-ui/react-slot";
8270
8270
  import { jsx as jsx20 } from "react/jsx-runtime";
8271
8271
  var NODES = [
8272
8272
  "a",
@@ -8282,16 +8282,18 @@ var NODES = [
8282
8282
  "nav",
8283
8283
  "ol",
8284
8284
  "p",
8285
+ "select",
8285
8286
  "span",
8286
8287
  "svg",
8287
8288
  "ul"
8288
8289
  ];
8289
8290
  var Primitive = NODES.reduce(function(primitive, node) {
8291
+ var Slot5 = createSlot("Primitive.".concat(node));
8290
8292
  var Node = React16.forwardRef(function(props, forwardedRef) {
8291
8293
  var asChild = props.asChild, primitiveProps = _object_without_properties(props, [
8292
8294
  "asChild"
8293
8295
  ]);
8294
- var Comp = asChild ? Slot3 : node;
8296
+ var Comp = asChild ? Slot5 : node;
8295
8297
  if (typeof window !== "undefined") {
8296
8298
  window[Symbol.for("radix-ui")] = true;
8297
8299
  }
@@ -8437,7 +8439,7 @@ function Badge(props) {
8437
8439
  });
8438
8440
  }
8439
8441
  // src/components/button/link-button.tsx
8440
- import { Slot as Slot4 } from "@radix-ui/react-slot";
8442
+ import { Slot as Slot3 } from "@radix-ui/react-slot";
8441
8443
  import { Loader2 as Loader23 } from "lucide-react";
8442
8444
  import * as React18 from "react";
8443
8445
  import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -8460,7 +8462,7 @@ var LinkButton = React18.forwardRef(function(_param, ref) {
8460
8462
  "asset",
8461
8463
  "assetNumber"
8462
8464
  ]);
8463
- var Comp = asChild ? Slot4 : "button";
8465
+ var Comp = asChild ? Slot3 : "button";
8464
8466
  var disable = disabled || loading;
8465
8467
  return /* @__PURE__ */ jsxs12(Comp, _object_spread_props(_object_spread({
8466
8468
  className: noStyle ? className : cn(buttonVariants({
@@ -9541,7 +9543,7 @@ var DrawerDescription = React26.forwardRef(function(_param, ref) {
9541
9543
  });
9542
9544
  DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
9543
9545
  // src/components/form.tsx
9544
- import { Slot as Slot5 } from "@radix-ui/react-slot";
9546
+ import { Slot as Slot4 } from "@radix-ui/react-slot";
9545
9547
  import { cva as cva11 } from "class-variance-authority";
9546
9548
  import * as React28 from "react";
9547
9549
  import { Controller, FormProvider, useFormContext, useForm, useWatch } from "react-hook-form";
@@ -9660,7 +9662,7 @@ var FormControl = React28.forwardRef(function(_param, ref) {
9660
9662
  "children"
9661
9663
  ]);
9662
9664
  var _useFormField = useFormField(), error = _useFormField.error, formItemId = _useFormField.formItemId, formDescriptionId = _useFormField.formDescriptionId, formMessageId = _useFormField.formMessageId;
9663
- return /* @__PURE__ */ jsx34(Slot5, _object_spread_props(_object_spread({
9665
+ return /* @__PURE__ */ jsx34(Slot4, _object_spread_props(_object_spread({
9664
9666
  ref: ref,
9665
9667
  id: formItemId,
9666
9668
  "aria-describedby": !error ? "".concat(formDescriptionId) : "".concat(formDescriptionId, " ").concat(formMessageId),
@@ -11982,8 +11984,8 @@ var MultipleSelector = React41.forwardRef(function(param, ref) {
11982
11984
  var res = onSearchSync === null || onSearchSync === void 0 ? void 0 : onSearchSync(debouncedSearchTerm);
11983
11985
  setOptions(transToGroupOption(res || [], groupBy));
11984
11986
  };
11985
- var exec = /*#__PURE__*/ function() {
11986
- var _ref = _async_to_generator(function() {
11987
+ var exec = function() {
11988
+ return _async_to_generator(function() {
11987
11989
  return _ts_generator(this, function(_state) {
11988
11990
  if (!onSearchSync || !open) return [
11989
11991
  2
@@ -11998,11 +12000,8 @@ var MultipleSelector = React41.forwardRef(function(param, ref) {
11998
12000
  2
11999
12001
  ];
12000
12002
  });
12001
- });
12002
- return function exec() {
12003
- return _ref.apply(this, arguments);
12004
- };
12005
- }();
12003
+ })();
12004
+ };
12006
12005
  void exec();
12007
12006
  }, [
12008
12007
  debouncedSearchTerm,
@@ -12011,8 +12010,8 @@ var MultipleSelector = React41.forwardRef(function(param, ref) {
12011
12010
  triggerSearchOnFocus
12012
12011
  ]);
12013
12012
  useEffect11(function() {
12014
- var doSearch = /*#__PURE__*/ function() {
12015
- var _ref = _async_to_generator(function() {
12013
+ var doSearch = function() {
12014
+ return _async_to_generator(function() {
12016
12015
  var res;
12017
12016
  return _ts_generator(this, function(_state) {
12018
12017
  switch(_state.label){
@@ -12031,13 +12030,10 @@ var MultipleSelector = React41.forwardRef(function(param, ref) {
12031
12030
  ];
12032
12031
  }
12033
12032
  });
12034
- });
12035
- return function doSearch() {
12036
- return _ref.apply(this, arguments);
12037
- };
12038
- }();
12039
- var exec = /*#__PURE__*/ function() {
12040
- var _ref = _async_to_generator(function() {
12033
+ })();
12034
+ };
12035
+ var exec = function() {
12036
+ return _async_to_generator(function() {
12041
12037
  return _ts_generator(this, function(_state) {
12042
12038
  switch(_state.label){
12043
12039
  case 0:
@@ -12073,11 +12069,8 @@ var MultipleSelector = React41.forwardRef(function(param, ref) {
12073
12069
  ];
12074
12070
  }
12075
12071
  });
12076
- });
12077
- return function exec() {
12078
- return _ref.apply(this, arguments);
12079
- };
12080
- }();
12072
+ })();
12073
+ };
12081
12074
  void exec();
12082
12075
  }, [
12083
12076
  debouncedSearchTerm,