@povio/ui 2.1.20 → 2.1.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/README.md CHANGED
@@ -32,7 +32,7 @@ This is required for buttons to behave as expected. It is based on [Tailwind Upg
32
32
  In order for Tailwind to also compile classes for @povio/ui package, you need to include @source directive in Tailwind config.
33
33
  In your globals.css add (make sure path is correct):
34
34
  ```css
35
- @source "../../node_modules/@povio/ui/dist";
35
+ @source "../../../../node_modules/@povio/ui/dist";
36
36
  ```
37
37
 
38
38
  ### React Aria
@@ -73,7 +73,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = fa
73
73
  exit: { opacity: 0 }
74
74
  }), /* @__PURE__ */ jsx(MotionModal, {
75
75
  isDismissable: true,
76
- className: clsx("pointer-events-none flex w-full flex-col items-stretch justify-end outline-none will-change-transform", isScrollable ? "h-auto" : "h-full"),
76
+ className: clsx("pointer-events-none flex h-full w-full flex-col items-stretch justify-end outline-none will-change-transform"),
77
77
  animate: {
78
78
  y: 0,
79
79
  opacity: 1
@@ -143,13 +143,13 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = fa
143
143
  tabIndex: -1
144
144
  }),
145
145
  /* @__PURE__ */ jsx("div", {
146
- className: clsx("flex min-h-0 grow flex-col items-stretch", isScrollable ? "shrink-0" : "shrink"),
146
+ className: "flex max-h-full min-h-0 flex-col items-stretch",
147
147
  ref: containerRef,
148
148
  children: typeof children === "function" ? children(close) : children
149
149
  }),
150
150
  /* @__PURE__ */ jsx("div", {
151
151
  className: "shrink-0",
152
- style: { height: `${footerHeight + sheetMarginBottom}px` }
152
+ style: { height: `${footerHeight + (isScrollable ? 0 : sheetMarginBottom)}px` }
153
153
  }),
154
154
  /* @__PURE__ */ jsx("div", { className: "absolute top-full h-screen w-full bg-elevation-fill-default-1" })
155
155
  ]
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { clsx } from "clsx";
9
9
  import { ComboBox, DialogTrigger, Popover } from "react-aria-components";
10
10
  import { Fragment as Fragment$1, useMemo, useRef } from "react";
11
- import { useLabel } from "react-aria";
11
+ import { useLabel, usePreventScroll } from "react-aria";
12
12
  import { mergeRefs } from "@react-aria/utils";
13
13
  import useMeasure from "react-use-measure";
14
14
  const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur,...props }) => {
@@ -31,6 +31,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
31
31
  const closeComboBoxRef = useRef(null);
32
32
  const [wrapperRef, { width }] = useMeasure();
33
33
  const { fieldState, isOpen, setIsOpen, onInputChange, onChange, onClear, onSelectAll, listItems, selectableListItems, selectedIds, isMultiple } = SelectContext.useSelect();
34
+ usePreventScroll({ isDisabled: !isOpen });
34
35
  const onSelectionChange = (value) => {
35
36
  if (!value) return;
36
37
  if (value === "all-item-id") {
@@ -136,7 +137,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
136
137
  offset: 0,
137
138
  children: /* @__PURE__ */ jsx(SelectListBox, {
138
139
  ...props,
139
- className: "max-h-80 rounded-list-rounding-dropdown border border-elevation-outline-default-1 bg-elevation-fill-default-1 shadow-5 [scrollbar-width:thin]",
140
+ className: "max-h-80! rounded-list-rounding-dropdown border border-elevation-outline-default-1 bg-elevation-fill-default-1 shadow-5 [scrollbar-width:thin]",
140
141
  autoFocus: !isSearchable
141
142
  })
142
143
  })]
@@ -48,7 +48,7 @@ const SelectListBox = ({ label, selectionMode, isSearchable, isScrollable = true
48
48
  ...props,
49
49
  "aria-label": label,
50
50
  selectionMode,
51
- className: clsx("flex-1 outline-none [&>div:last-child>*]:border-b-0", isScrollable ? "overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
51
+ className: clsx("flex-1 outline-none [&>div:last-child>*]:border-b-0", isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
52
52
  items: listItems,
53
53
  selectedKeys: selectedIds,
54
54
  onSelectionChange,
@@ -61,7 +61,7 @@ const SelectListBox = ({ label, selectionMode, isSearchable, isScrollable = true
61
61
  ...props,
62
62
  "aria-label": label,
63
63
  selectionMode,
64
- className: clsx("flex-1 outline-none [&>div:last-child]:border-b-0", isScrollable ? "overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
64
+ className: clsx("flex-1 outline-none [&>div:last-child]:border-b-0", isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
65
65
  items: listItems,
66
66
  selectedKeys: selectedIds,
67
67
  onSelectionChange,
@@ -83,7 +83,7 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
83
83
  footer: isMultiple && /* @__PURE__ */ jsx(SelectListBoxSelectionBar, {}),
84
84
  isDismissable: true,
85
85
  children: (close) => /* @__PURE__ */ jsxs("div", {
86
- className: "flex flex-col",
86
+ className: "flex max-h-full flex-col overflow-hidden",
87
87
  children: [isSearchable ? /* @__PURE__ */ jsx(TextInput, {
88
88
  ref: searchInputRef,
89
89
  label,
@@ -96,7 +96,7 @@ const SelectMobile = ({ ref, error, showSelectionContent, inputClassName, contai
96
96
  }) : /* @__PURE__ */ jsx(FormFieldHeader, {
97
97
  label,
98
98
  rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
99
- className: "!mb-1-5 px-4 pt-3"
99
+ className: "mb-1-5! px-4 pt-3"
100
100
  }), /* @__PURE__ */ jsx(SelectListBox, {
101
101
  ...props,
102
102
  autoFocus: !isSearchable,
package/dist/input.cva.js CHANGED
@@ -2,7 +2,7 @@ import { UIStyle } from "./uiStyle.context.js";
2
2
  import { uiOutlineClass } from "./outline.clsx.js";
3
3
  import { clsx } from "clsx";
4
4
  import { cva } from "class-variance-authority";
5
- const inputBase = cva([uiOutlineClass, "flex w-full truncate"], {
5
+ const inputBase = cva([uiOutlineClass, "flex w-full not-[textarea]:truncate"], {
6
6
  variants: {
7
7
  variant: {
8
8
  outlined: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.1.20",
3
+ "version": "2.1.22",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",