@aspprev/versi-ds 0.5.0 → 0.5.3

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.
@@ -289,11 +289,12 @@ var Divider = ({
289
289
  height = "h-[1px]",
290
290
  children,
291
291
  bgColor = "black",
292
+ className,
292
293
  ...rest
293
294
  }) => {
294
295
  const colorClass = colorClassMap[bgColor];
295
296
  const barClass = classNames(children ? "w-1/3" : "w-1/2", height, colorClass);
296
- return /* @__PURE__ */ jsxs3("div", { className: classNames(width, "flex items-center justify-center"), children: [
297
+ return /* @__PURE__ */ jsxs3("div", { ...rest, className: classNames(width, "flex items-center justify-center", className), children: [
297
298
  /* @__PURE__ */ jsx4("div", { className: barClass }),
298
299
  children && /* @__PURE__ */ jsxs3("div", { className: "px-3", children: [
299
300
  children,
@@ -621,7 +622,7 @@ var avatarSizeMap = {
621
622
  };
622
623
  function Inicials(name) {
623
624
  const nome = name;
624
- if (!!nome) {
625
+ if (nome) {
625
626
  const array = nome.split(" ");
626
627
  const primeiraLetra = nome.charAt(0);
627
628
  const posicaoUltimoEspaco = nome.lastIndexOf(" ");
@@ -645,7 +646,7 @@ var Avatar = ({
645
646
  ...rest
646
647
  }) => {
647
648
  const avatarSizeClass = avatarSizeMap[size];
648
- const avatarComponent = image ? /* @__PURE__ */ jsx11(AvatarImage_default, { src: image, altDescription: description }) : !!name ? /* @__PURE__ */ jsx11(
649
+ const avatarComponent = image ? /* @__PURE__ */ jsx11(AvatarImage_default, { src: image, altDescription: description }) : name ? /* @__PURE__ */ jsx11(
649
650
  "span",
650
651
  {
651
652
  className: classNames5(
@@ -888,10 +889,10 @@ function PageButtons(props) {
888
889
  const { currentPage, totalResults, perPage, onClick, size } = props;
889
890
  const pages = Math.max(1, Math.ceil(totalResults / perPage));
890
891
  const sizeClasses = PAGINATION_SIZE_CLASSES[size];
891
- let pagesAfter = pages - currentPage > 2 ? 2 : pages - currentPage;
892
- let pagesBefore = currentPage > 2 ? 2 : currentPage === 2 ? 1 : 0;
892
+ const pagesAfter = pages - currentPage > 2 ? 2 : pages - currentPage;
893
+ const pagesBefore = currentPage > 2 ? 2 : currentPage === 2 ? 1 : 0;
893
894
  let buttonsBefore = [];
894
- let buttonsAfter = [];
895
+ const buttonsAfter = [];
895
896
  for (let i = 1; i <= pagesBefore; i++) {
896
897
  const page = currentPage - i;
897
898
  buttonsBefore = [
@@ -1070,7 +1071,7 @@ function Checkbox({
1070
1071
  layout = "row",
1071
1072
  ...props
1072
1073
  }) {
1073
- let containerClass = "";
1074
+ let containerClass;
1074
1075
  if (layout === "col") {
1075
1076
  containerClass = "flex flex-col gap-y-3 mt-3";
1076
1077
  } else if (layout === "grid-2") {
@@ -1402,15 +1403,12 @@ var InputSlider = ({
1402
1403
  prefix,
1403
1404
  suffix,
1404
1405
  sufix,
1405
- marks,
1406
- valueLabelDisplay = "auto",
1407
1406
  showLabel = false,
1408
1407
  disabled = false,
1409
1408
  inputDisabled = false,
1410
1409
  valueFormmated,
1411
1410
  showInput = false,
1412
- ariaLabel,
1413
- ...rest
1411
+ ariaLabel
1414
1412
  }) => {
1415
1413
  const [value, setValue] = useState2(initialValue);
1416
1414
  const resolvedSuffix = suffix ?? sufix;
@@ -1421,7 +1419,7 @@ var InputSlider = ({
1421
1419
  const parsedValue = Number(newValue);
1422
1420
  setValue(parsedValue);
1423
1421
  },
1424
- [functionChange]
1422
+ []
1425
1423
  );
1426
1424
  const handleInputChange = useCallback2(
1427
1425
  (event) => {
@@ -1696,18 +1694,18 @@ function resolveOptionalValue(value, options = {}) {
1696
1694
  // src/components/info-grid/InfoGrid.tsx
1697
1695
  import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
1698
1696
  var COLUMN_STYLES2 = {
1699
- 1: "grid-cols-1",
1700
- 2: "grid-cols-1 mobile:grid-cols-2",
1701
- 3: "grid-cols-1 mobile:grid-cols-2 tablet:grid-cols-3",
1702
- 4: "grid-cols-1 mobile:grid-cols-2 desktop:grid-cols-4",
1703
- 6: "grid-cols-1 mobile:grid-cols-2 tablet:grid-cols-3 desktop:grid-cols-6"
1697
+ 1: "versi-info-grid--1",
1698
+ 2: "versi-info-grid--2",
1699
+ 3: "versi-info-grid--3",
1700
+ 4: "versi-info-grid--4",
1701
+ 6: "versi-info-grid--6"
1704
1702
  };
1705
1703
  function InfoGrid({ columns = 3, className, ...rest }) {
1706
1704
  return /* @__PURE__ */ jsx25(
1707
1705
  "dl",
1708
1706
  {
1709
1707
  className: classNames10(
1710
- "grid gap-x-8 gap-y-5",
1708
+ "versi-info-grid grid gap-x-8 gap-y-5",
1711
1709
  COLUMN_STYLES2[columns],
1712
1710
  className
1713
1711
  ),
@@ -2022,7 +2020,6 @@ function FormErrorNavigation() {
2022
2020
  cleanupPendingNavigation?.();
2023
2021
  const form = event.target;
2024
2022
  let handled = false;
2025
- let observer;
2026
2023
  const timers = [];
2027
2024
  const cleanup = () => {
2028
2025
  observer?.disconnect();
@@ -2036,7 +2033,7 @@ function FormErrorNavigation() {
2036
2033
  cleanup();
2037
2034
  navigateToInvalidField(field);
2038
2035
  };
2039
- observer = new MutationObserver(tryNavigate);
2036
+ const observer = new MutationObserver(tryNavigate);
2040
2037
  observer.observe(form, {
2041
2038
  attributeFilter: ["aria-invalid"],
2042
2039
  attributes: true,
@@ -3214,15 +3211,13 @@ function resolveContainerBreakpoint(width, breakpoints = defaultContainerBreakpo
3214
3211
  );
3215
3212
  }
3216
3213
  function getBreakpointMapKey(breakpoints) {
3217
- return Object.entries(breakpoints).sort(([first], [second]) => first.localeCompare(second)).map(([name, threshold]) => `${name}:${threshold}`).join("|");
3214
+ return JSON.stringify(Object.entries(breakpoints).sort(([, first], [, second]) => first - second));
3218
3215
  }
3219
3216
  function useContainerBreakpoint(ref, options = {}) {
3220
3217
  const thresholds = options.breakpoints ?? defaultContainerBreakpoints;
3221
3218
  const thresholdsKey = getBreakpointMapKey(thresholds);
3222
3219
  const sortedThresholds = useMemo4(
3223
- () => Object.entries(thresholds).sort(
3224
- ([, first], [, second]) => first === second ? 0 : first - second
3225
- ),
3220
+ () => JSON.parse(thresholdsKey),
3226
3221
  [thresholdsKey]
3227
3222
  );
3228
3223
  const [current, setCurrent] = useState6();
@@ -3287,4 +3282,4 @@ export {
3287
3282
  resolveContainerBreakpoint,
3288
3283
  useContainerBreakpoint
3289
3284
  };
3290
- //# sourceMappingURL=chunk-5Q7V22OH.js.map
3285
+ //# sourceMappingURL=chunk-7GTKG537.js.map