sodtrack-web-ui 0.1.2 → 0.1.4

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.js CHANGED
@@ -1,39 +1,10 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
8
  var __export = (target, all) => {
38
9
  for (var name in all)
39
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -117,7 +88,6 @@ function createClassUtils(config) {
117
88
  };
118
89
  }
119
90
  function getGroupRecursive(classParts, classPartObject) {
120
- var _a;
121
91
  if (classParts.length === 0) {
122
92
  return classPartObject.classGroupId;
123
93
  }
@@ -131,15 +101,15 @@ function getGroupRecursive(classParts, classPartObject) {
131
101
  return void 0;
132
102
  }
133
103
  const classRest = classParts.join(CLASS_PART_SEPARATOR);
134
- return (_a = classPartObject.validators.find(({
104
+ return classPartObject.validators.find(({
135
105
  validator
136
- }) => validator(classRest))) == null ? void 0 : _a.classGroupId;
106
+ }) => validator(classRest))?.classGroupId;
137
107
  }
138
108
  var arbitraryPropertyRegex = /^\[(.+)\]$/;
139
109
  function getGroupIdForArbitraryProperty(className) {
140
110
  if (arbitraryPropertyRegex.test(className)) {
141
111
  const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
142
- const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
112
+ const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
143
113
  if (property) {
144
114
  return "arbitrary.." + property;
145
115
  }
@@ -317,10 +287,11 @@ function sortModifiers(modifiers) {
317
287
  return sortedModifiers;
318
288
  }
319
289
  function createConfigUtils(config) {
320
- return __spreadValues({
290
+ return {
321
291
  cache: createLruCache(config.cacheSize),
322
- splitModifiers: createSplitModifiers(config)
323
- }, createClassUtils(config));
292
+ splitModifiers: createSplitModifiers(config),
293
+ ...createClassUtils(config)
294
+ };
324
295
  }
325
296
  var SPLIT_CLASSES_REGEX = /\s+/;
326
297
  function mergeClassList(classList, configUtils) {
@@ -2622,10 +2593,16 @@ var cva = (base, config) => {
2622
2593
  return acc;
2623
2594
  }, {});
2624
2595
  const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1) => {
2625
- let _a = param1, { class: cvClass, className: cvClassName } = _a, compoundVariantOptions = __objRest(_a, ["class", "className"]);
2596
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param1;
2626
2597
  return Object.entries(compoundVariantOptions).every((param) => {
2627
2598
  let [key, value] = param;
2628
- return Array.isArray(value) ? value.includes(__spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key]) : __spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key] === value;
2599
+ return Array.isArray(value) ? value.includes({
2600
+ ...defaultVariants,
2601
+ ...propsWithoutUndefined
2602
+ }[key]) : {
2603
+ ...defaultVariants,
2604
+ ...propsWithoutUndefined
2605
+ }[key] === value;
2629
2606
  }) ? [
2630
2607
  ...acc,
2631
2608
  cvClass,
@@ -2663,35 +2640,28 @@ var defaultAttributes = {
2663
2640
 
2664
2641
  // node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
2665
2642
  var Icon = (0, import_react.forwardRef)(
2666
- (_a, ref) => {
2667
- var _b = _a, {
2668
- color = "currentColor",
2669
- size = 24,
2670
- strokeWidth = 2,
2671
- absoluteStrokeWidth,
2672
- className = "",
2673
- children,
2674
- iconNode
2675
- } = _b, rest = __objRest(_b, [
2676
- "color",
2677
- "size",
2678
- "strokeWidth",
2679
- "absoluteStrokeWidth",
2680
- "className",
2681
- "children",
2682
- "iconNode"
2683
- ]);
2643
+ ({
2644
+ color = "currentColor",
2645
+ size = 24,
2646
+ strokeWidth = 2,
2647
+ absoluteStrokeWidth,
2648
+ className = "",
2649
+ children,
2650
+ iconNode,
2651
+ ...rest
2652
+ }, ref) => {
2684
2653
  return (0, import_react.createElement)(
2685
2654
  "svg",
2686
- __spreadValues(__spreadProps(__spreadValues({
2687
- ref
2688
- }, defaultAttributes), {
2655
+ {
2656
+ ref,
2657
+ ...defaultAttributes,
2689
2658
  width: size,
2690
2659
  height: size,
2691
2660
  stroke: color,
2692
2661
  strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
2693
- className: mergeClasses("lucide", className)
2694
- }), rest),
2662
+ className: mergeClasses("lucide", className),
2663
+ ...rest
2664
+ },
2695
2665
  [
2696
2666
  ...iconNode.map(([tag, attrs]) => (0, import_react.createElement)(tag, attrs)),
2697
2667
  ...Array.isArray(children) ? children : [children]
@@ -2703,14 +2673,12 @@ var Icon = (0, import_react.forwardRef)(
2703
2673
  // node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
2704
2674
  var createLucideIcon = (iconName, iconNode) => {
2705
2675
  const Component = (0, import_react2.forwardRef)(
2706
- (_a, ref) => {
2707
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2708
- return (0, import_react2.createElement)(Icon, __spreadValues({
2709
- ref,
2710
- iconNode,
2711
- className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className)
2712
- }, props));
2713
- }
2676
+ ({ className, ...props }, ref) => (0, import_react2.createElement)(Icon, {
2677
+ ref,
2678
+ iconNode,
2679
+ className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
2680
+ ...props
2681
+ })
2714
2682
  );
2715
2683
  Component.displayName = `${iconName}`;
2716
2684
  return Component;
@@ -2769,32 +2737,24 @@ var InfoIcon = Info;
2769
2737
  var TriangleAlertIcon = TriangleAlert;
2770
2738
 
2771
2739
  // src/components/button.tsx
2772
- var Button = (_a) => {
2773
- var _b = _a, {
2774
- children,
2775
- className,
2776
- variant = "contained",
2777
- size = "medium",
2778
- startIcon,
2779
- endIcon,
2780
- loading = false,
2781
- disabled = false
2782
- } = _b, props = __objRest(_b, [
2783
- "children",
2784
- "className",
2785
- "variant",
2786
- "size",
2787
- "startIcon",
2788
- "endIcon",
2789
- "loading",
2790
- "disabled"
2791
- ]);
2740
+ var Button = ({
2741
+ children,
2742
+ className,
2743
+ variant = "contained",
2744
+ size = "medium",
2745
+ startIcon,
2746
+ endIcon,
2747
+ loading = false,
2748
+ disabled = false,
2749
+ ...props
2750
+ }) => {
2792
2751
  return /* @__PURE__ */ import_react3.default.createElement(
2793
2752
  "button",
2794
- __spreadProps(__spreadValues({}, props), {
2753
+ {
2754
+ ...props,
2795
2755
  disabled: loading || disabled,
2796
2756
  className: cn(button({ variant, size, loading }), className)
2797
- }),
2757
+ },
2798
2758
  loading && /* @__PURE__ */ import_react3.default.createElement(
2799
2759
  LoaderCircleIcon,
2800
2760
  {
@@ -2915,15 +2875,14 @@ var iconButton = cva(
2915
2875
  }
2916
2876
  );
2917
2877
  var IconButton = (0, import_react5.forwardRef)(
2918
- (_a, ref) => {
2919
- var _b = _a, { children, className, variant = "contained", size = "medium" } = _b, props = __objRest(_b, ["children", "className", "variant", "size"]);
2878
+ ({ children, className, variant = "contained", size = "medium", ...props }, ref) => {
2920
2879
  return /* @__PURE__ */ import_react5.default.createElement(
2921
2880
  "button",
2922
- __spreadProps(__spreadValues({
2923
- ref
2924
- }, props), {
2881
+ {
2882
+ ref,
2883
+ ...props,
2925
2884
  className: iconButton({ variant, size, className })
2926
- }),
2885
+ },
2927
2886
  children
2928
2887
  );
2929
2888
  }