aural-ui 2.0.0 → 2.0.1

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 (59) hide show
  1. package/dist/components/badge/Badge.stories.tsx +7 -0
  2. package/dist/components/banner/Banner.stories.tsx +7 -0
  3. package/dist/components/button/Button.stories.tsx +7 -0
  4. package/dist/components/char-count/CharCount.stories.tsx +7 -0
  5. package/dist/components/checkbox/Checkbox.stories.tsx +7 -0
  6. package/dist/components/chip/Chip.stories.tsx +10 -0
  7. package/dist/components/collapsible/Collapsible.stories.tsx +7 -0
  8. package/dist/components/dropdown/index.tsx +16 -0
  9. package/dist/components/form/Form.stories.tsx +7 -0
  10. package/dist/components/helper-text/HelperText.stories.tsx +7 -0
  11. package/dist/components/icon-button/IconButton.stories.tsx +4 -0
  12. package/dist/components/if-else/if-else.stories.tsx +7 -0
  13. package/dist/components/input/Input.stories.tsx +7 -0
  14. package/dist/components/label/Label.stories.tsx +7 -0
  15. package/dist/components/overlay/index.tsx +1 -1
  16. package/dist/components/pagination/Pagination.stories.tsx +7 -0
  17. package/dist/components/radio/Radio.stories.tsx +7 -0
  18. package/dist/components/scroll-area/index.tsx +18 -5
  19. package/dist/components/select/Select.stories.tsx +7 -0
  20. package/dist/components/stepper/Stepper.stories.tsx +7 -0
  21. package/dist/components/switch/Switch.stories.tsx +7 -0
  22. package/dist/components/switch-case/SwitchCase.stories.tsx +7 -0
  23. package/dist/components/tag/Tag.stories.tsx +7 -0
  24. package/dist/components/textarea/TextArea.stories.tsx +7 -0
  25. package/dist/components/textarea/index.tsx +2 -0
  26. package/dist/components/toast/Toast.stories.tsx +7 -0
  27. package/dist/components/typography/Typography.stories.tsx +7 -0
  28. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +1101 -0
  29. package/dist/icons/ai-avatar-icon/index.tsx +36 -0
  30. package/dist/icons/ai-avatar-icon/meta.ts +8 -0
  31. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +1013 -0
  32. package/dist/icons/arrow-corner-up-left-icon/index.tsx +24 -0
  33. package/dist/icons/arrow-corner-up-left-icon/meta.ts +8 -0
  34. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +1056 -0
  35. package/dist/icons/arrow-corner-up-right-icon/index.tsx +24 -0
  36. package/dist/icons/arrow-corner-up-right-icon/meta.ts +8 -0
  37. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +1027 -0
  38. package/dist/icons/layout-column-icon/index.tsx +23 -0
  39. package/dist/icons/layout-column-icon/meta.ts +8 -0
  40. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +1007 -0
  41. package/dist/icons/layout-left-icon/index.tsx +26 -0
  42. package/dist/icons/layout-left-icon/meta.ts +8 -0
  43. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +1001 -0
  44. package/dist/icons/layout-right-icon/index.tsx +26 -0
  45. package/dist/icons/layout-right-icon/meta.ts +8 -0
  46. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +1010 -0
  47. package/dist/icons/paint-roll-icon/index.tsx +24 -0
  48. package/dist/icons/paint-roll-icon/meta.ts +8 -0
  49. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +1018 -0
  50. package/dist/icons/sparkles-soft-icon/index.tsx +29 -0
  51. package/dist/icons/sparkles-soft-icon/meta.ts +8 -0
  52. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +1006 -0
  53. package/dist/icons/text-color-icon/index.tsx +35 -0
  54. package/dist/icons/text-color-icon/meta.ts +8 -0
  55. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +1039 -0
  56. package/dist/icons/text-indicator-icon/index.tsx +24 -0
  57. package/dist/icons/text-indicator-icon/meta.ts +8 -0
  58. package/dist/index.js +124 -99
  59. package/package.json +1 -1
@@ -9,6 +9,13 @@ const meta: Meta<typeof Badge> = {
9
9
  component: Badge,
10
10
  parameters: {
11
11
  layout: "centered",
12
+ backgrounds: {
13
+ default: "dark",
14
+ values: [
15
+ { name: "dark", value: "#0a0a0a" },
16
+ { name: "light", value: "#ffffff" },
17
+ ],
18
+ },
12
19
  },
13
20
  tags: ["autodocs"],
14
21
  argTypes: {
@@ -8,6 +8,13 @@ const meta: Meta<typeof Banner> = {
8
8
  component: Banner,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  },
12
19
  tags: ["autodocs"],
13
20
  argTypes: {
@@ -7,6 +7,13 @@ const meta: Meta<typeof Button> = {
7
7
  component: Button,
8
8
  parameters: {
9
9
  layout: "centered",
10
+ backgrounds: {
11
+ default: "dark",
12
+ values: [
13
+ { name: "dark", value: "#0a0a0a" },
14
+ { name: "light", value: "#ffffff" },
15
+ ],
16
+ },
10
17
  },
11
18
  tags: ["autodocs"],
12
19
  argTypes: {
@@ -8,6 +8,13 @@ const meta: Meta<typeof CharCount> = {
8
8
  component: CharCount,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  },
12
19
  tags: ["autodocs"],
13
20
  argTypes: {
@@ -10,6 +10,13 @@ const meta: Meta<typeof Checkbox> = {
10
10
  component: Checkbox,
11
11
  parameters: {
12
12
  layout: "centered",
13
+ backgrounds: {
14
+ default: "dark",
15
+ values: [
16
+ { name: "dark", value: "#0a0a0a" },
17
+ { name: "light", value: "#ffffff" },
18
+ ],
19
+ },
13
20
  },
14
21
  tags: ["autodocs"],
15
22
  }
@@ -10,6 +10,16 @@ const meta: Meta<typeof Chip> = {
10
10
  title: "Components/UI/Chip",
11
11
  component: Chip,
12
12
  tags: ["autodocs"],
13
+ parameters: {
14
+ layout: "centered",
15
+ backgrounds: {
16
+ default: "dark",
17
+ values: [
18
+ { name: "dark", value: "#0a0a0a" },
19
+ { name: "light", value: "#ffffff" },
20
+ ],
21
+ },
22
+ },
13
23
  argTypes: {
14
24
  selected: {
15
25
  control: "boolean",
@@ -16,6 +16,13 @@ const meta: Meta<typeof Collapsible> = {
16
16
  component: Collapsible,
17
17
  parameters: {
18
18
  layout: "centered",
19
+ backgrounds: {
20
+ default: "dark",
21
+ values: [
22
+ { name: "dark", value: "#0a0a0a" },
23
+ { name: "light", value: "#ffffff" },
24
+ ],
25
+ },
19
26
  docs: {
20
27
  description: {
21
28
  component:
@@ -446,6 +446,22 @@ function DropdownMenuSubContent({
446
446
  )
447
447
  }
448
448
 
449
+ export const useOpenState = () => {
450
+ const [open, setOpen] = React.useState(false)
451
+
452
+ const onOpenChange = React.useCallback(
453
+ (_value = !open) => {
454
+ setOpen(_value)
455
+ },
456
+ [open]
457
+ )
458
+
459
+ return {
460
+ open,
461
+ onOpenChange,
462
+ }
463
+ }
464
+
449
465
  export {
450
466
  DropdownMenu,
451
467
  DropdownMenuPortal,
@@ -151,6 +151,13 @@ const meta: Meta<typeof FormExample> = {
151
151
  component: FormExample,
152
152
  parameters: {
153
153
  layout: "centered",
154
+ backgrounds: {
155
+ default: "dark",
156
+ values: [
157
+ { name: "dark", value: "#0a0a0a" },
158
+ { name: "light", value: "#ffffff" },
159
+ ],
160
+ },
154
161
  },
155
162
  tags: ["autodocs"],
156
163
  argTypes: {
@@ -8,6 +8,13 @@ const meta: Meta<typeof HelperText> = {
8
8
  component: HelperText,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  },
12
19
  tags: ["autodocs"],
13
20
  argTypes: {
@@ -13,6 +13,10 @@ const meta: Meta<typeof IconButton> = {
13
13
  layout: "centered",
14
14
  backgrounds: {
15
15
  default: "dark",
16
+ values: [
17
+ { name: "dark", value: "#0a0a0a" },
18
+ { name: "light", value: "#ffffff" },
19
+ ],
16
20
  },
17
21
  },
18
22
  tags: ["autodocs"],
@@ -8,6 +8,13 @@ const meta = {
8
8
  component: IfElse,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  },
12
19
  tags: ["autodocs"],
13
20
  } satisfies Meta<typeof IfElse>
@@ -10,6 +10,13 @@ const meta: Meta<typeof Input> = {
10
10
  component: Input,
11
11
  parameters: {
12
12
  layout: "centered",
13
+ backgrounds: {
14
+ default: "dark",
15
+ values: [
16
+ { name: "dark", value: "#0a0a0a" },
17
+ { name: "light", value: "#ffffff" },
18
+ ],
19
+ },
13
20
  },
14
21
  tags: ["autodocs"],
15
22
  argTypes: {
@@ -8,6 +8,13 @@ const meta: Meta<typeof Label> = {
8
8
  component: Label,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  },
12
19
  tags: ["autodocs"],
13
20
  argTypes: {
@@ -3,7 +3,7 @@ import { cn } from "@lib/utils"
3
3
  import { cva, type VariantProps } from "class-variance-authority"
4
4
 
5
5
  const overlayVariants = cva(
6
- "fixed inset-0 z-40 data-[state=open]:animate-fm-fadeIn data-[state=closed]:animate-fm-fadeOut ",
6
+ "fixed inset-0 z-40 data-[state=open]:animate-fm-fadeIn data-[state=closed]:animate-fm-fadeOut",
7
7
  {
8
8
  variants: {
9
9
  opacity: {
@@ -22,6 +22,13 @@ const meta: Meta<typeof Pagination> = {
22
22
  component: Pagination,
23
23
  parameters: {
24
24
  layout: "centered",
25
+ backgrounds: {
26
+ default: "dark",
27
+ values: [
28
+ { name: "dark", value: "#0a0a0a" },
29
+ { name: "light", value: "#ffffff" },
30
+ ],
31
+ },
25
32
  docs: {
26
33
  description: {
27
34
  component:
@@ -9,6 +9,13 @@ const meta: Meta<typeof RadioGroup> = {
9
9
  component: RadioGroup,
10
10
  parameters: {
11
11
  layout: "centered",
12
+ backgrounds: {
13
+ default: "dark",
14
+ values: [
15
+ { name: "dark", value: "#0a0a0a" },
16
+ { name: "light", value: "#ffffff" },
17
+ ],
18
+ },
12
19
  },
13
20
  tags: ["autodocs"],
14
21
  }
@@ -2,25 +2,38 @@ import * as React from "react"
2
2
  import { cn } from "@lib/utils"
3
3
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
4
4
 
5
+ type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {
6
+ classes?: {
7
+ root?: string
8
+ viewport?: string
9
+ scrollbar?: string
10
+ corner?: string
11
+ }
12
+ }
13
+
5
14
  function ScrollArea({
6
15
  className,
7
16
  children,
17
+ classes = {},
8
18
  ...props
9
- }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
19
+ }: ScrollAreaProps) {
10
20
  return (
11
21
  <ScrollAreaPrimitive.Root
12
22
  data-slot="scroll-area"
13
- className={cn("relative", className)}
23
+ className={cn("relative", className, classes?.root)}
14
24
  {...props}
15
25
  >
16
26
  <ScrollAreaPrimitive.Viewport
17
27
  data-slot="scroll-area-viewport"
18
- className="focus-visible:ring-fm-secondary-1000/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
28
+ className={cn(
29
+ "focus-visible:ring-fm-secondary-1000/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
30
+ classes?.viewport
31
+ )}
19
32
  >
20
33
  {children}
21
34
  </ScrollAreaPrimitive.Viewport>
22
- <ScrollBar />
23
- <ScrollAreaPrimitive.Corner />
35
+ <ScrollBar className={classes?.scrollbar} />
36
+ <ScrollAreaPrimitive.Corner className={classes?.corner} />
24
37
  </ScrollAreaPrimitive.Root>
25
38
  )
26
39
  }
@@ -22,6 +22,13 @@ const meta: Meta<typeof SelectField> = {
22
22
  component: SelectField,
23
23
  parameters: {
24
24
  layout: "centered",
25
+ backgrounds: {
26
+ default: "dark",
27
+ values: [
28
+ { name: "dark", value: "#0a0a0a" },
29
+ { name: "light", value: "#ffffff" },
30
+ ],
31
+ },
25
32
  docs: {
26
33
  description: {
27
34
  component: `
@@ -8,6 +8,13 @@ const meta: Meta<typeof Stepper> = {
8
8
  component: Stepper,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  docs: {
12
19
  description: {
13
20
  component:
@@ -10,6 +10,13 @@ const meta: Meta<typeof Switch> = {
10
10
  component: Switch,
11
11
  parameters: {
12
12
  layout: "centered",
13
+ backgrounds: {
14
+ default: "dark",
15
+ values: [
16
+ { name: "dark", value: "#0a0a0a" },
17
+ { name: "light", value: "#ffffff" },
18
+ ],
19
+ },
13
20
  },
14
21
  tags: ["autodocs"],
15
22
  argTypes: {
@@ -8,6 +8,13 @@ const meta = {
8
8
  component: SwitchCase,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  },
12
19
  tags: ["autodocs"],
13
20
  } satisfies Meta<typeof SwitchCase>
@@ -8,6 +8,13 @@ const meta: Meta<typeof Tag> = {
8
8
  component: Tag,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  },
12
19
  tags: ["autodocs"],
13
20
  argTypes: {
@@ -8,6 +8,13 @@ const meta: Meta<typeof TextArea> = {
8
8
  component: TextArea,
9
9
  parameters: {
10
10
  layout: "centered",
11
+ backgrounds: {
12
+ default: "dark",
13
+ values: [
14
+ { name: "dark", value: "#0a0a0a" },
15
+ { name: "light", value: "#ffffff" },
16
+ ],
17
+ },
11
18
  docs: {
12
19
  description: {
13
20
  component:
@@ -25,6 +25,8 @@ interface TextAreaBaseProps {
25
25
  className?: string
26
26
  placeholder?: string
27
27
  value?: string
28
+ autoComplete?: string
29
+ autoFocus?: boolean
28
30
  onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void
29
31
  onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void
30
32
  onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void
@@ -10,6 +10,13 @@ const meta: Meta<typeof Toaster> = {
10
10
  component: Toaster,
11
11
  parameters: {
12
12
  layout: "fullscreen",
13
+ backgrounds: {
14
+ default: "dark",
15
+ values: [
16
+ { name: "dark", value: "#0a0a0a" },
17
+ { name: "light", value: "#ffffff" },
18
+ ],
19
+ },
13
20
  docs: {
14
21
  description: {
15
22
  component: `
@@ -25,6 +25,13 @@ const meta: Meta<typeof Typography> = {
25
25
  component: Typography,
26
26
  parameters: {
27
27
  layout: "centered",
28
+ backgrounds: {
29
+ default: "dark",
30
+ values: [
31
+ { name: "dark", value: "#0a0a0a" },
32
+ { name: "light", value: "#ffffff" },
33
+ ],
34
+ },
28
35
  },
29
36
  tags: ["autodocs"],
30
37
  argTypes: {