aural-ui 2.1.12 → 2.1.14

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.
Files changed (218) hide show
  1. package/dist/components/drawer/index.tsx +1 -1
  2. package/dist/components/input/index.tsx +14 -13
  3. package/dist/components/select/index.tsx +2 -1
  4. package/dist/components/textarea/index.tsx +1 -1
  5. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +14 -6
  6. package/dist/icons/ai-avatar-icon/index.tsx +16 -5
  7. package/dist/icons/alert-icon/AlertIcon.stories.tsx +15 -7
  8. package/dist/icons/alert-icon/index.tsx +35 -20
  9. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +13 -5
  10. package/dist/icons/angle-down-icon/index.tsx +17 -7
  11. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +13 -5
  12. package/dist/icons/apple-logo-icon/index.tsx +17 -7
  13. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +14 -6
  14. package/dist/icons/arrow-box-left-icon/index.tsx +17 -7
  15. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +13 -5
  16. package/dist/icons/arrow-corner-up-left-icon/index.tsx +20 -7
  17. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +14 -6
  18. package/dist/icons/arrow-corner-up-right-icon/index.tsx +20 -7
  19. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +13 -5
  20. package/dist/icons/arrow-left-icon/index.tsx +16 -8
  21. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +14 -6
  22. package/dist/icons/arrow-right-icon/index.tsx +16 -8
  23. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +14 -6
  24. package/dist/icons/arrow-right-up-icon/index.tsx +17 -7
  25. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +16 -8
  26. package/dist/icons/art-board-icon/index.tsx +17 -7
  27. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +14 -6
  28. package/dist/icons/audio-bar-icon/index.tsx +17 -7
  29. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +14 -6
  30. package/dist/icons/backward-ten-seconds-icon/index.tsx +20 -7
  31. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +14 -6
  32. package/dist/icons/bubble-check-icon/index.tsx +17 -7
  33. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +14 -6
  34. package/dist/icons/bubble-crossed-icon/index.tsx +17 -7
  35. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +14 -6
  36. package/dist/icons/bubble-sparkle-icon/index.tsx +17 -7
  37. package/dist/icons/camera-icon/CameraIcon.stories.tsx +14 -6
  38. package/dist/icons/camera-icon/index.tsx +17 -7
  39. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +13 -5
  40. package/dist/icons/capital-a-letter-icon/index.tsx +35 -27
  41. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +13 -5
  42. package/dist/icons/chevron-double-left-icon/index.tsx +19 -8
  43. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +14 -6
  44. package/dist/icons/chevron-double-right-icon/index.tsx +19 -8
  45. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +13 -5
  46. package/dist/icons/chevron-down-icon/index.tsx +16 -8
  47. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +14 -6
  48. package/dist/icons/chevron-left-icon/index.tsx +16 -8
  49. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +14 -6
  50. package/dist/icons/chevron-right-icon/index.tsx +16 -8
  51. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +14 -6
  52. package/dist/icons/chevron-up-icon/index.tsx +16 -8
  53. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +14 -6
  54. package/dist/icons/circle-tick-icon/index.tsx +17 -7
  55. package/dist/icons/coin-icon/CoinIcon.stories.tsx +14 -6
  56. package/dist/icons/coin-icon/index.tsx +17 -7
  57. package/dist/icons/command-icon/CommandIcon.stories.tsx +13 -5
  58. package/dist/icons/command-icon/index.tsx +17 -7
  59. package/dist/icons/copy-icon/CopyIcon.stories.tsx +14 -6
  60. package/dist/icons/copy-icon/index.tsx +17 -7
  61. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +14 -6
  62. package/dist/icons/cross-circle-icon/index.tsx +17 -7
  63. package/dist/icons/cross-icon/CrossIcon.stories.tsx +14 -6
  64. package/dist/icons/cross-icon/index.tsx +17 -7
  65. package/dist/icons/download-icon/DownloadIcon.stories.tsx +14 -6
  66. package/dist/icons/download-icon/index.tsx +17 -7
  67. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +13 -5
  68. package/dist/icons/edit-big-icon/index.tsx +17 -7
  69. package/dist/icons/email-icon/EmailIcon.stories.tsx +13 -5
  70. package/dist/icons/email-icon/index.tsx +17 -7
  71. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +14 -6
  72. package/dist/icons/expand-icon/index.tsx +17 -7
  73. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +13 -6
  74. package/dist/icons/eye-close-icon/index.tsx +17 -7
  75. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +13 -5
  76. package/dist/icons/eye-open-icon/index.tsx +17 -7
  77. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +14 -6
  78. package/dist/icons/feature-shine-icon/index.tsx +17 -5
  79. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +13 -5
  80. package/dist/icons/file-chart-icon/index.tsx +17 -7
  81. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +15 -7
  82. package/dist/icons/file-text-icon/index.tsx +17 -7
  83. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +14 -6
  84. package/dist/icons/filter-bar-row-icon/index.tsx +17 -7
  85. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +14 -6
  86. package/dist/icons/forward-ten-seconds-icon/index.tsx +20 -7
  87. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +14 -6
  88. package/dist/icons/git-branch-icon/index.tsx +17 -7
  89. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +14 -6
  90. package/dist/icons/git-fork-icon/index.tsx +17 -7
  91. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +360 -0
  92. package/dist/icons/globe-icon/index.tsx +32 -0
  93. package/dist/icons/globe-icon/meta.ts +8 -0
  94. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +14 -6
  95. package/dist/icons/google-logo-icon/index.tsx +17 -7
  96. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +14 -6
  97. package/dist/icons/grip-vertical-icon/index.tsx +17 -7
  98. package/dist/icons/head-icon/HeadIcon.stories.tsx +13 -5
  99. package/dist/icons/head-icon/index.tsx +29 -21
  100. package/dist/icons/heart-icon/HeartIcon.stories.tsx +14 -6
  101. package/dist/icons/heart-icon/index.tsx +17 -7
  102. package/dist/icons/image-icon/ImageIcon.stories.tsx +13 -5
  103. package/dist/icons/image-icon/index.tsx +17 -7
  104. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +14 -6
  105. package/dist/icons/import-folder-icon/index.tsx +17 -7
  106. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +14 -6
  107. package/dist/icons/import-left-arrow-folder-icon/index.tsx +23 -6
  108. package/dist/icons/index.ts +1 -0
  109. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +14 -6
  110. package/dist/icons/indian-flag-icon/index.tsx +17 -7
  111. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +12 -6
  112. package/dist/icons/instagram-icon/index.tsx +17 -7
  113. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +13 -5
  114. package/dist/icons/layout-column-icon/index.tsx +17 -7
  115. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +14 -6
  116. package/dist/icons/layout-left-icon/index.tsx +17 -7
  117. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +14 -6
  118. package/dist/icons/layout-right-icon/index.tsx +17 -7
  119. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +14 -6
  120. package/dist/icons/light-bulb-simple-icon/index.tsx +18 -7
  121. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +11 -5
  122. package/dist/icons/linked-in-icon/index.tsx +17 -7
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +14 -6
  124. package/dist/icons/magic-book-icon/index.tsx +17 -7
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +14 -6
  126. package/dist/icons/maintenance-icon/index.tsx +17 -7
  127. package/dist/icons/message-icon/MessageIcon.stories.tsx +15 -7
  128. package/dist/icons/message-icon/index.tsx +17 -7
  129. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +14 -6
  130. package/dist/icons/minimize-icon/index.tsx +17 -7
  131. package/dist/icons/moon-icon/MoonIcon.stories.tsx +15 -7
  132. package/dist/icons/moon-icon/index.tsx +24 -16
  133. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +14 -6
  134. package/dist/icons/move-horizontal-icon/index.tsx +17 -7
  135. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +13 -5
  136. package/dist/icons/move-vertical-icon/index.tsx +17 -7
  137. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +14 -6
  138. package/dist/icons/musical-note-icon/index.tsx +28 -20
  139. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +14 -6
  140. package/dist/icons/notepad-icon/index.tsx +17 -7
  141. package/dist/icons/notes-icon/NotesIcon.stories.tsx +14 -6
  142. package/dist/icons/notes-icon/index.tsx +17 -7
  143. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +14 -6
  144. package/dist/icons/page-search-icon/index.tsx +17 -7
  145. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +14 -6
  146. package/dist/icons/paint-roll-icon/index.tsx +17 -7
  147. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +14 -6
  148. package/dist/icons/paper-plane-icon/index.tsx +17 -7
  149. package/dist/icons/pause-icon/PauseIcon.stories.tsx +14 -6
  150. package/dist/icons/pause-icon/index.tsx +17 -7
  151. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +14 -6
  152. package/dist/icons/pencil-icon/index.tsx +17 -7
  153. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +14 -6
  154. package/dist/icons/phone-icon/index.tsx +29 -21
  155. package/dist/icons/plus-icon/PlusIcon.stories.tsx +14 -6
  156. package/dist/icons/plus-icon/index.tsx +17 -7
  157. package/dist/icons/search-icon/SearchIcon.stories.tsx +13 -5
  158. package/dist/icons/search-icon/index.tsx +17 -7
  159. package/dist/icons/setting-icon/SettingIcon.stories.tsx +13 -5
  160. package/dist/icons/setting-icon/index.tsx +33 -25
  161. package/dist/icons/share-icon/ShareIcon.stories.tsx +13 -5
  162. package/dist/icons/share-icon/index.tsx +17 -7
  163. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +14 -6
  164. package/dist/icons/shield-icon/index.tsx +24 -16
  165. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +14 -6
  166. package/dist/icons/site-logo-icon/index.tsx +17 -5
  167. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +14 -6
  168. package/dist/icons/skip-backward-icon/index.tsx +17 -7
  169. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +13 -5
  170. package/dist/icons/skip-forward-icon/index.tsx +17 -7
  171. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +14 -6
  172. package/dist/icons/sparkles-soft-icon/index.tsx +17 -7
  173. package/dist/icons/spinner-gradient-icon/index.tsx +18 -7
  174. package/dist/icons/spinner-solid-icon/index.tsx +17 -7
  175. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +14 -6
  176. package/dist/icons/spinner-solid-neutral-icon/index.tsx +21 -6
  177. package/dist/icons/star-icon/StarIcon.stories.tsx +14 -6
  178. package/dist/icons/star-icon/index.tsx +17 -7
  179. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +14 -6
  180. package/dist/icons/store-coin-icon/index.tsx +16 -8
  181. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +13 -5
  182. package/dist/icons/suggestion-icon/index.tsx +17 -7
  183. package/dist/icons/sun-icon/SunIcon.stories.tsx +13 -5
  184. package/dist/icons/sun-icon/index.tsx +26 -18
  185. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +13 -5
  186. package/dist/icons/text-color-icon/index.tsx +17 -7
  187. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +14 -6
  188. package/dist/icons/text-indicator-icon/index.tsx +17 -7
  189. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +12 -6
  190. package/dist/icons/threads-icon/index.tsx +17 -7
  191. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +14 -6
  192. package/dist/icons/tick-circle-icon/index.tsx +17 -7
  193. package/dist/icons/tick-icon/TickIcon.stories.tsx +14 -6
  194. package/dist/icons/tick-icon/index.tsx +17 -7
  195. package/dist/icons/trash-icon/TrashIcon.stories.tsx +14 -6
  196. package/dist/icons/trash-icon/index.tsx +17 -7
  197. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +12 -6
  198. package/dist/icons/twitter-x-icon/index.tsx +17 -7
  199. package/dist/icons/upload-icon/UploadIcon.stories.tsx +13 -5
  200. package/dist/icons/upload-icon/index.tsx +17 -7
  201. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +13 -5
  202. package/dist/icons/vertical-menu-icon/index.tsx +17 -7
  203. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +14 -6
  204. package/dist/icons/video-play-list-icon/index.tsx +17 -7
  205. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +14 -6
  206. package/dist/icons/voice-playing-icon/index.tsx +17 -7
  207. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +14 -6
  208. package/dist/icons/volume-full-icon/index.tsx +17 -7
  209. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +14 -6
  210. package/dist/icons/volume-half-icon/index.tsx +17 -7
  211. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +14 -6
  212. package/dist/icons/volume-off-icon/index.tsx +17 -7
  213. package/dist/icons/warning-icon/WarningIcon.stories.tsx +14 -6
  214. package/dist/icons/warning-icon/index.tsx +17 -7
  215. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +14 -6
  216. package/dist/icons/youtube-icon/index.tsx +17 -7
  217. package/dist/index.js +1 -1
  218. package/package.json +1 -1
@@ -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>
@@ -203,16 +203,19 @@ function MyComponent() {
203
203
  </tr>
204
204
  </thead>
205
205
  <tbody>
206
- <tr className="border-b border-white/5">
207
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
208
- width
206
+ {" "}
207
+ <tr className="!bg-black/10">
208
+ <td className="px-6 py-4 font-mono text-sm !text-blue-300">
209
+ withAccessibility
209
210
  </td>
210
211
  <td className="px-6 py-4 text-sm !text-white/70">
211
- number | string
212
+ boolean
213
+ </td>
214
+ <td className="px-6 py-4 text-sm !text-white/50">
215
+ true
212
216
  </td>
213
- <td className="px-6 py-4 text-sm !text-white/50">40</td>
214
217
  <td className="px-6 py-4 text-sm !text-white/70">
215
- Width of the icon in pixels
218
+ Whether to wrap the icon with accessibility feature
216
219
  </td>
217
220
  </tr>
218
221
  <tr className="border-b border-white/5 !bg-black/10">
@@ -858,6 +861,10 @@ function CustomAiAvatarIcon({ label = "AI Assistant", ...props }) {
858
861
  control: { type: "range", min: 16, max: 120, step: 4 },
859
862
  description: "Width of the icon in pixels",
860
863
  },
864
+ withAccessibility: {
865
+ control: "boolean",
866
+ description: "Whether to wrap the icon with accessibility features",
867
+ },
861
868
  height: {
862
869
  control: { type: "range", min: 16, max: 120, step: 4 },
863
870
  description: "Height of the icon in pixels",
@@ -888,6 +895,7 @@ export const Default: Story = {
888
895
  width: 40,
889
896
  height: 40,
890
897
  className: "",
898
+ withAccessibility: true,
891
899
  },
892
900
  parameters: storyParameters,
893
901
  render: (args) => (
@@ -7,17 +7,22 @@ type AiAvatarIconProps = React.JSX.IntrinsicAttributes &
7
7
  circle?: string
8
8
  path?: string
9
9
  }
10
+ withAccessibility?: boolean
10
11
  }
11
12
 
12
- export const AiAvatarIcon = ({ classes = {}, ...props }: AiAvatarIconProps) => (
13
- <AccessibleIcon label="Ai Avatar icon">
13
+ export const AiAvatarIcon = ({
14
+ classes = {},
15
+ withAccessibility = true,
16
+ ...svgProps
17
+ }: AiAvatarIconProps) => {
18
+ const svg = (
14
19
  <svg
15
20
  width="40"
16
21
  height="40"
17
22
  viewBox="0 0 40 40"
18
23
  fill="none"
19
24
  xmlns="http://www.w3.org/2000/svg"
20
- {...props}
25
+ {...svgProps}
21
26
  >
22
27
  <circle
23
28
  cx="20"
@@ -32,5 +37,11 @@ export const AiAvatarIcon = ({ classes = {}, ...props }: AiAvatarIconProps) => (
32
37
  className={classes?.path}
33
38
  />
34
39
  </svg>
35
- </AccessibleIcon>
36
- )
40
+ )
41
+
42
+ if (withAccessibility) {
43
+ return <AccessibleIcon label="Ai Avatar icon">{svg}</AccessibleIcon>
44
+ }
45
+
46
+ return svg
47
+ }
@@ -201,16 +201,19 @@ function MyComponent() {
201
201
  </tr>
202
202
  </thead>
203
203
  <tbody>
204
- <tr className="border-b border-white/5">
205
- <td className="px-6 py-4 font-mono text-sm !text-orange-300">
206
- width
204
+ {" "}
205
+ <tr className="!bg-black/10">
206
+ <td className="px-6 py-4 font-mono text-sm !text-blue-300">
207
+ withAccessibility
207
208
  </td>
208
209
  <td className="px-6 py-4 text-sm !text-white/70">
209
- number | string
210
+ boolean
211
+ </td>
212
+ <td className="px-6 py-4 text-sm !text-white/50">
213
+ true
210
214
  </td>
211
- <td className="px-6 py-4 text-sm !text-white/50">16</td>
212
215
  <td className="px-6 py-4 text-sm !text-white/70">
213
- Width of the icon in pixels
216
+ Whether to wrap the icon with accessibility feature
214
217
  </td>
215
218
  </tr>
216
219
  <tr className="border-b border-white/5 !bg-black/10">
@@ -259,7 +262,7 @@ function MyComponent() {
259
262
  boolean
260
263
  </td>
261
264
  <td className="px-6 py-4 text-sm !text-white/50">
262
- false
265
+ true
263
266
  </td>
264
267
  <td className="px-6 py-4 text-sm !text-white/70">
265
268
  Whether to use filled variant
@@ -766,6 +769,10 @@ function CustomAlertIcon({ label = "Alert", ...props }) {
766
769
  control: { type: "range", min: 8, max: 96, step: 2 },
767
770
  description: "Width of the icon in pixels",
768
771
  },
772
+ withAccessibility: {
773
+ control: "boolean",
774
+ description: "Whether to wrap the icon with accessibility features",
775
+ },
769
776
  height: {
770
777
  control: { type: "range", min: 8, max: 96, step: 2 },
771
778
  description: "Height of the icon in pixels",
@@ -804,6 +811,7 @@ export const Default: Story = {
804
811
  width: 24,
805
812
  height: 24,
806
813
  className: "text-orange-400",
814
+ withAccessibility: true,
807
815
  },
808
816
  parameters: storyParameters,
809
817
  render: (args) => (
@@ -4,18 +4,23 @@ import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
4
4
  type AlertIconProps = React.JSX.IntrinsicAttributes &
5
5
  React.SVGProps<SVGSVGElement> & {
6
6
  filled?: boolean
7
+ withAccessibility?: boolean
7
8
  }
8
9
 
9
- export const AlertIcon = ({ filled = false, ...props }: AlertIconProps) => {
10
+ export const AlertIcon = ({
11
+ filled = false,
12
+ withAccessibility = true,
13
+ ...svgProps
14
+ }: AlertIconProps) => {
10
15
  if (filled) {
11
- return (
16
+ const filledSvg = (
12
17
  <svg
13
18
  width="16"
14
19
  height="16"
15
20
  viewBox="0 0 16 16"
16
21
  fill="none"
17
22
  xmlns="http://www.w3.org/2000/svg"
18
- {...props}
23
+ {...svgProps}
19
24
  >
20
25
  <path
21
26
  d="M24.5 19.5v8m0 4.98v.02m0-26-19 32h38z"
@@ -25,24 +30,34 @@ export const AlertIcon = ({ filled = false, ...props }: AlertIconProps) => {
25
30
  />
26
31
  </svg>
27
32
  )
33
+
34
+ if (withAccessibility) {
35
+ return <AccessibleIcon label="Alert icon">{filledSvg}</AccessibleIcon>
36
+ }
37
+
38
+ return filledSvg
28
39
  }
29
40
 
30
- return (
31
- <AccessibleIcon label="Alert icon">
32
- <svg
33
- xmlns="http://www.w3.org/2000/svg"
34
- width="16"
35
- height="16"
36
- viewBox="0 0 16 16"
37
- fill="currentColor"
38
- {...props}
39
- >
40
- <path
41
- fillRule="evenodd"
42
- clipRule="evenodd"
43
- d="M0.789062 13.3335L8.00074 1.1875L15.2125 13.3335H0.789062ZM8.5 6.00016V9.6668H7.5V6.00016H8.5ZM7.5 10.3335H8.5V11.3335H7.5V10.3335Z"
44
- />
45
- </svg>
46
- </AccessibleIcon>
41
+ const svg = (
42
+ <svg
43
+ xmlns="http://www.w3.org/2000/svg"
44
+ width="16"
45
+ height="16"
46
+ viewBox="0 0 16 16"
47
+ fill="currentColor"
48
+ {...svgProps}
49
+ >
50
+ <path
51
+ fillRule="evenodd"
52
+ clipRule="evenodd"
53
+ d="M0.789062 13.3335L8.00074 1.1875L15.2125 13.3335H0.789062ZM8.5 6.00016V9.6668H7.5V6.00016H8.5ZM7.5 10.3335H8.5V11.3335H7.5V10.3335Z"
54
+ />
55
+ </svg>
47
56
  )
57
+
58
+ if (withAccessibility) {
59
+ return <AccessibleIcon label="Alert icon">{svg}</AccessibleIcon>
60
+ }
61
+
62
+ return svg
48
63
  }
@@ -201,16 +201,19 @@ function DropdownButton() {
201
201
  </tr>
202
202
  </thead>
203
203
  <tbody>
204
- <tr className="border-b border-white/5">
204
+ {" "}
205
+ <tr className="!bg-black/10">
205
206
  <td className="px-6 py-4 font-mono text-sm !text-blue-300">
206
- width
207
+ withAccessibility
207
208
  </td>
208
209
  <td className="px-6 py-4 text-sm !text-white/70">
209
- number | string
210
+ boolean
211
+ </td>
212
+ <td className="px-6 py-4 text-sm !text-white/50">
213
+ true
210
214
  </td>
211
- <td className="px-6 py-4 text-sm !text-white/50">16</td>
212
215
  <td className="px-6 py-4 text-sm !text-white/70">
213
- Width of the icon in pixels
216
+ Whether to wrap the icon with accessibility feature
214
217
  </td>
215
218
  </tr>
216
219
  <tr className="border-b border-white/5 !bg-black/10">
@@ -781,6 +784,10 @@ function AccessibleDropdown() {
781
784
  control: { type: "range", min: 8, max: 96, step: 2 },
782
785
  description: "Width of the icon in pixels",
783
786
  },
787
+ withAccessibility: {
788
+ control: "boolean",
789
+ description: "Whether to wrap the icon with accessibility features",
790
+ },
784
791
  height: {
785
792
  control: { type: "range", min: 8, max: 96, step: 2 },
786
793
  description: "Height of the icon in pixels",
@@ -819,6 +826,7 @@ export const Default: Story = {
819
826
  width: 24,
820
827
  height: 24,
821
828
  className: "text-blue-400",
829
+ withAccessibility: true,
822
830
  },
823
831
  parameters: storyParameters,
824
832
  render: (args) => (
@@ -1,17 +1,21 @@
1
1
  import React from "react"
2
2
  import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
3
3
 
4
- export const AngleDownIcon = (
5
- props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>
6
- ) => (
7
- <AccessibleIcon label="Arrow Down icon">
4
+ export interface AngleDownIconProps extends React.SVGProps<SVGSVGElement> {
5
+ withAccessibility?: boolean
6
+ }
7
+
8
+ export const AngleDownIcon = (props: AngleDownIconProps) => {
9
+ const { withAccessibility = true, ...svgProps } = props
10
+
11
+ const svg = (
8
12
  <svg
9
13
  xmlns="http://www.w3.org/2000/svg"
10
14
  width="24"
11
15
  height="24"
12
16
  fill="none"
13
17
  viewBox="0 0 24 24"
14
- {...props}
18
+ {...svgProps}
15
19
  >
16
20
  <path
17
21
  stroke="currentColor"
@@ -21,5 +25,11 @@ export const AngleDownIcon = (
21
25
  d="m19 9-7 7-7-7"
22
26
  />
23
27
  </svg>
24
- </AccessibleIcon>
25
- )
28
+ )
29
+
30
+ if (withAccessibility) {
31
+ return <AccessibleIcon label="Arrow Down icon">{svg}</AccessibleIcon>
32
+ }
33
+
34
+ return svg
35
+ }
@@ -202,16 +202,19 @@ function LoginPage() {
202
202
  </tr>
203
203
  </thead>
204
204
  <tbody>
205
- <tr className="border-b border-white/5">
205
+ {" "}
206
+ <tr className="!bg-black/10">
206
207
  <td className="px-6 py-4 font-mono text-sm !text-blue-300">
207
- width
208
+ withAccessibility
208
209
  </td>
209
210
  <td className="px-6 py-4 text-sm !text-white/70">
210
- number | string
211
+ boolean
212
+ </td>
213
+ <td className="px-6 py-4 text-sm !text-white/50">
214
+ true
211
215
  </td>
212
- <td className="px-6 py-4 text-sm !text-white/50">20</td>
213
216
  <td className="px-6 py-4 text-sm !text-white/70">
214
- Width of the icon in pixels
217
+ Whether to wrap the icon with accessibility feature
215
218
  </td>
216
219
  </tr>
217
220
  <tr className="border-b border-white/5 !bg-black/10">
@@ -738,6 +741,10 @@ function CustomAppleIcon({ label = "Apple", ...props }) {
738
741
  control: { type: "range", min: 8, max: 96, step: 2 },
739
742
  description: "Width of the icon in pixels",
740
743
  },
744
+ withAccessibility: {
745
+ control: "boolean",
746
+ description: "Whether to wrap the icon with accessibility features",
747
+ },
741
748
  height: {
742
749
  control: { type: "range", min: 8, max: 96, step: 2 },
743
750
  description: "Height of the icon in pixels",
@@ -772,6 +779,7 @@ export const Default: Story = {
772
779
  width: 20,
773
780
  height: 20,
774
781
  className: "text-white",
782
+ withAccessibility: true,
775
783
  },
776
784
  parameters: storyParameters,
777
785
  render: (args) => (
@@ -1,15 +1,19 @@
1
1
  import React from "react"
2
2
  import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
3
3
 
4
- export const AppleLogoIcon = (
5
- props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>
6
- ) => (
7
- <AccessibleIcon label="Apple logo">
4
+ export interface AppleLogoIconProps extends React.SVGProps<SVGSVGElement> {
5
+ withAccessibility?: boolean
6
+ }
7
+
8
+ export const AppleLogoIcon = (props: AppleLogoIconProps) => {
9
+ const { withAccessibility = true, ...svgProps } = props
10
+
11
+ const svg = (
8
12
  <svg
9
13
  viewBox="0 0 20 20"
10
14
  fill="none"
11
15
  xmlns="http://www.w3.org/2000/svg"
12
- {...props}
16
+ {...svgProps}
13
17
  >
14
18
  <path
15
19
  d="M16.978 7.053c-2.84 1.756-2.541 5.845.522 7.294-.248.563-.447 1.151-.77 1.673-.48.778-1.01 1.548-1.598 2.251-.728.861-1.672 1.118-2.757.688-.14-.058-.29-.1-.422-.166-1.068-.48-2.128-.447-3.212-.008-1.615.662-2.327.488-3.452-.828-1.723-2.004-2.675-4.347-2.782-6.98-.075-1.895.455-3.617 2.053-4.826 1.15-.87 2.434-1.118 3.825-.62 2.053.736 1.416.695 3.46-.01 1.814-.628 3.42-.272 4.794 1.077.058.058.116.124.166.19.05.083.107.158.173.265z"
@@ -22,5 +26,11 @@ export const AppleLogoIcon = (
22
26
  fillOpacity=".99"
23
27
  />
24
28
  </svg>
25
- </AccessibleIcon>
26
- )
29
+ )
30
+
31
+ if (withAccessibility) {
32
+ return <AccessibleIcon label="Apple logo">{svg}</AccessibleIcon>
33
+ }
34
+
35
+ return svg
36
+ }
@@ -201,16 +201,19 @@ function BackButton() {
201
201
  </tr>
202
202
  </thead>
203
203
  <tbody>
204
- <tr className="border-b border-white/5">
205
- <td className="px-6 py-4 font-mono text-sm !text-emerald-300">
206
- width
204
+ {" "}
205
+ <tr className="!bg-black/10">
206
+ <td className="px-6 py-4 font-mono text-sm !text-blue-300">
207
+ withAccessibility
207
208
  </td>
208
209
  <td className="px-6 py-4 text-sm !text-white/70">
209
- number | string
210
+ boolean
211
+ </td>
212
+ <td className="px-6 py-4 text-sm !text-white/50">
213
+ true
210
214
  </td>
211
- <td className="px-6 py-4 text-sm !text-white/50">16</td>
212
215
  <td className="px-6 py-4 text-sm !text-white/70">
213
- Width of the icon in pixels
216
+ Whether to wrap the icon with accessibility feature
214
217
  </td>
215
218
  </tr>
216
219
  <tr className="border-b border-white/5 !bg-black/10">
@@ -820,6 +823,10 @@ function AccessibleBackButton({ onBack, children }) {
820
823
  control: { type: "range", min: 8, max: 96, step: 2 },
821
824
  description: "Width of the icon in pixels",
822
825
  },
826
+ withAccessibility: {
827
+ control: "boolean",
828
+ description: "Whether to wrap the icon with accessibility features",
829
+ },
823
830
  height: {
824
831
  control: { type: "range", min: 8, max: 96, step: 2 },
825
832
  description: "Height of the icon in pixels",
@@ -862,6 +869,7 @@ export const Default: Story = {
862
869
  width: 24,
863
870
  height: 24,
864
871
  className: "text-emerald-400",
872
+ withAccessibility: true,
865
873
  },
866
874
  parameters: storyParameters,
867
875
  render: (args) => (
@@ -1,17 +1,21 @@
1
1
  import React from "react"
2
2
  import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
3
3
 
4
- export const ArrowBoxLeftIcon = (
5
- props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>
6
- ) => (
7
- <AccessibleIcon label="Arrow Box Left icon">
4
+ export interface ArrowBoxLeftIconProps extends React.SVGProps<SVGSVGElement> {
5
+ withAccessibility?: boolean
6
+ }
7
+
8
+ export const ArrowBoxLeftIcon = (props: ArrowBoxLeftIconProps) => {
9
+ const { withAccessibility = true, ...svgProps } = props
10
+
11
+ const svg = (
8
12
  <svg
9
13
  width="24"
10
14
  height="24"
11
15
  viewBox="0 0 24 24"
12
16
  fill="none"
13
17
  xmlns="http://www.w3.org/2000/svg"
14
- {...props}
18
+ {...svgProps}
15
19
  >
16
20
  <path
17
21
  d="M11.25 20.25H3.75L3.75 3.75L11.25 3.75M9 12L19.5 12M15.75 16.5L20.25 12L15.75 7.5"
@@ -20,5 +24,11 @@ export const ArrowBoxLeftIcon = (
20
24
  strokeLinecap="square"
21
25
  />
22
26
  </svg>
23
- </AccessibleIcon>
24
- )
27
+ )
28
+
29
+ if (withAccessibility) {
30
+ return <AccessibleIcon label="Arrow Box Left icon">{svg}</AccessibleIcon>
31
+ }
32
+
33
+ return svg
34
+ }
@@ -203,16 +203,19 @@ function MyComponent() {
203
203
  </tr>
204
204
  </thead>
205
205
  <tbody>
206
- <tr className="border-b border-white/5">
206
+ {" "}
207
+ <tr className="!bg-black/10">
207
208
  <td className="px-6 py-4 font-mono text-sm !text-blue-300">
208
- width
209
+ withAccessibility
209
210
  </td>
210
211
  <td className="px-6 py-4 text-sm !text-white/70">
211
- number | string
212
+ boolean
213
+ </td>
214
+ <td className="px-6 py-4 text-sm !text-white/50">
215
+ true
212
216
  </td>
213
- <td className="px-6 py-4 text-sm !text-white/50">18</td>
214
217
  <td className="px-6 py-4 text-sm !text-white/70">
215
- Width of the icon in pixels
218
+ Whether to wrap the icon with accessibility feature
216
219
  </td>
217
220
  </tr>
218
221
  <tr className="border-b border-white/5 !bg-black/10">
@@ -764,6 +767,10 @@ function CustomArrowIcon({ label = "Navigate back", ...props }) {
764
767
  control: { type: "range", min: 8, max: 96, step: 2 },
765
768
  description: "Width of the icon in pixels",
766
769
  },
770
+ withAccessibility: {
771
+ control: "boolean",
772
+ description: "Whether to wrap the icon with accessibility features",
773
+ },
767
774
  height: {
768
775
  control: { type: "range", min: 8, max: 96, step: 2 },
769
776
  description: "Height of the icon in pixels",
@@ -802,6 +809,7 @@ export const Default: Story = {
802
809
  width: 24,
803
810
  height: 24,
804
811
  className: "text-blue-400",
812
+ withAccessibility: true,
805
813
  },
806
814
  parameters: storyParameters,
807
815
  render: (args) => (
@@ -1,17 +1,22 @@
1
1
  import React from "react"
2
2
  import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
3
3
 
4
- export const ArrowCornerUpLeftIcon = (
5
- props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>
6
- ) => (
7
- <AccessibleIcon label="Arrow Corner Up Left icon">
4
+ export interface ArrowCornerUpLeftIconProps
5
+ extends React.SVGProps<SVGSVGElement> {
6
+ withAccessibility?: boolean
7
+ }
8
+
9
+ export const ArrowCornerUpLeftIcon = (props: ArrowCornerUpLeftIconProps) => {
10
+ const { withAccessibility = true, ...svgProps } = props
11
+
12
+ const svg = (
8
13
  <svg
9
14
  xmlns="http://www.w3.org/2000/svg"
10
15
  width="18"
11
16
  height="18"
12
17
  viewBox="0 0 18 18"
13
18
  fill="none"
14
- {...props}
19
+ {...svgProps}
15
20
  >
16
21
  <path
17
22
  d="M15.1875 14.25V6.375H3.5625M5.8125 9.375L2.8125 6.375L5.8125 3.375"
@@ -20,5 +25,13 @@ export const ArrowCornerUpLeftIcon = (
20
25
  strokeLinecap="square"
21
26
  />
22
27
  </svg>
23
- </AccessibleIcon>
24
- )
28
+ )
29
+
30
+ if (withAccessibility) {
31
+ return (
32
+ <AccessibleIcon label="Arrow Corner Up Left icon">{svg}</AccessibleIcon>
33
+ )
34
+ }
35
+
36
+ return svg
37
+ }