aural-ui 2.1.12 → 2.1.13

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.
@@ -125,7 +125,7 @@ const DrawerContent = React.forwardRef<
125
125
  "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg",
126
126
  "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg",
127
127
  "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-lg data-[vaul-drawer-direction=right]:sm:max-w-sm",
128
- "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-lg data-[vaul-drawer-direction=left]:sm:max-w-sm",
128
+ "overflow-auto [scrollbar-width:none] data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-lg data-[vaul-drawer-direction=left]:sm:max-w-sm",
129
129
  className,
130
130
  classes?.content
131
131
  )}
@@ -7,6 +7,7 @@ import React, {
7
7
  } from "react"
8
8
  import CharCount from "@components/char-count"
9
9
  import HelperText from "@components/helper-text"
10
+ import { IconButton } from "@components/icon-button"
10
11
  import { Else, If, IfElse } from "@components/if-else"
11
12
  import { Label } from "@components/label"
12
13
  import { EyeCloseIcon } from "@icons/eye-close-icon"
@@ -175,7 +176,7 @@ const EndIcon = forwardRef<
175
176
  <div
176
177
  ref={ref}
177
178
  className={cn(
178
- "absolute inset-y-0 right-0 flex items-center pr-3",
179
+ "absolute inset-y-0 right-0 flex items-center pl-3",
179
180
  className
180
181
  )}
181
182
  >
@@ -192,24 +193,24 @@ const PasswordToggle = forwardRef<
192
193
  className?: string
193
194
  }
194
195
  >(({ isVisible, onToggle, className = "" }, ref) => (
195
- <button
196
+ <IconButton
196
197
  ref={ref}
197
198
  type="button"
198
199
  onClick={onToggle}
200
+ variant="ghost"
201
+ icon={
202
+ isVisible ? (
203
+ <EyeCloseIcon className="text-fm-primary size-6" />
204
+ ) : (
205
+ <EyeOpenIcon className="text-fm-primary size-6" />
206
+ )
207
+ }
208
+ label={isVisible ? "Hide password" : "Show password"}
199
209
  className={cn(
200
- "text-fm-primary hover:text-fm-primary/90 h-full focus:outline-none",
210
+ "text-fm-primary hover:text-fm-primary/90 h-full hover:bg-transparent focus:outline-none",
201
211
  className
202
212
  )}
203
- >
204
- <IfElse condition={isVisible}>
205
- <If>
206
- <EyeCloseIcon />
207
- </If>
208
- <Else>
209
- <EyeOpenIcon />
210
- </Else>
211
- </IfElse>
212
- </button>
213
+ />
213
214
  ))
214
215
 
215
216
  PasswordToggle.displayName = "PasswordToggle"
@@ -413,7 +413,8 @@ const SelectField = React.forwardRef<
413
413
  ref
414
414
  ) => {
415
415
  // Generate unique IDs for accessibility
416
- const selectId = id || `select-${Math.random().toString(36).substr(2, 9)}`
416
+ const generatedId = React.useId()
417
+ const selectId = id || `select-${generatedId}`
417
418
  const helperTextId = helperText ? `${selectId}-helper` : undefined
418
419
  const labelId = label ? `${selectId}-label` : undefined
419
420
 
@@ -411,7 +411,7 @@ const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
411
411
  currentLength={currentLength}
412
412
  maxLength={maxLength}
413
413
  id={charCountId}
414
- className="ml-auto"
414
+ className={cn("ml-auto", classes?.charCount)}
415
415
  />
416
416
  )}
417
417
  </div>