periplo-ui 1.9.2 → 1.10.0
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/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/create-plugin.js +5 -0
- package/dist/_virtual/create-plugin.js.map +1 -0
- package/dist/_virtual/createPlugin.js +5 -0
- package/dist/_virtual/createPlugin.js.map +1 -0
- package/dist/_virtual/jsx-runtime.js +5 -0
- package/dist/_virtual/jsx-runtime.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.js +5 -0
- package/dist/_virtual/react-jsx-runtime.development.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +5 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/components/Avatar/Avatar.js +45 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/index.js +7 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Badge/Badge.js +32 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Badge/index.js +5 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Button/Button.js +66 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/index.js +6 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Card/Card.js +33 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/index.js +7 -0
- package/dist/components/Card/index.js.map +1 -0
- package/dist/components/Carousel/Carousel.js +149 -0
- package/dist/components/Carousel/Carousel.js.map +1 -0
- package/dist/components/Carousel/index.js +10 -0
- package/dist/components/Carousel/index.js.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +15 -0
- package/dist/components/Combobox/Combobox.js +61 -0
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Combobox/index.d.ts +1 -0
- package/dist/components/Combobox/index.js +5 -0
- package/dist/components/Combobox/index.js.map +1 -0
- package/dist/components/Command/Command.d.ts +51 -0
- package/dist/components/Command/Command.js +82 -0
- package/dist/components/Command/Command.js.map +1 -0
- package/dist/components/Command/index.d.ts +1 -0
- package/dist/components/Command/index.js +13 -0
- package/dist/components/Command/index.js.map +1 -0
- package/dist/components/Dialog/Dialog.js +67 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Dialog/index.js +14 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/Form/Form.d.ts +2 -1
- package/dist/components/Form/Form.js +75 -0
- package/dist/components/Form/Form.js.map +1 -0
- package/dist/components/Form/index.js +12 -0
- package/dist/components/Form/index.js.map +1 -0
- package/dist/components/Input/Input.js +65 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/index.js +5 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/components/Label/Label.js +12 -0
- package/dist/components/Label/Label.js.map +1 -0
- package/dist/components/Label/index.js +5 -0
- package/dist/components/Label/index.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +13 -0
- package/dist/components/Popover/Popover.js +32 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Popover/index.js +9 -0
- package/dist/components/Popover/index.js.map +1 -0
- package/dist/components/Select/Select.js +118 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/index.js +15 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Textarea/Textarea.js +24 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Textarea/index.js +5 -0
- package/dist/components/Textarea/index.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +32 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/index.js +9 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/Typography/Typography.js +56 -0
- package/dist/components/Typography/Typography.js.map +1 -0
- package/dist/components/Typography/index.js +6 -0
- package/dist/components/Typography/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/plugin.js +123 -0
- package/dist/lib/plugin.js.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +14 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +520 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +374 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +183 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +109 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +121 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +20 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +61 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +89 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +21 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +19 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +45 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +825 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-focus-scope/dist/index.js +189 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-popper/dist/index.js +216 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +38 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +38 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +50 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +602 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +33 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/node_modules/react/jsx-runtime.js +9 -0
- package/dist/node_modules/react/jsx-runtime.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +13 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +110 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +63 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +63 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/tailwindcss/lib/public/create-plugin.js +21 -0
- package/dist/node_modules/tailwindcss/lib/public/create-plugin.js.map +1 -0
- package/dist/node_modules/tailwindcss/lib/util/createPlugin.js +29 -0
- package/dist/node_modules/tailwindcss/lib/util/createPlugin.js.map +1 -0
- package/dist/node_modules/tailwindcss/plugin.js +10 -0
- package/dist/node_modules/tailwindcss/plugin.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +31 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/vite-env.d.js +2 -0
- package/dist/vite-env.d.js.map +1 -0
- package/package.json +44 -40
- package/dist/components/Avatar/Avatar.stories.d.ts +0 -23
- package/dist/components/Avatar/Avatar.test.d.ts +0 -1
- package/dist/components/Badge/Badge.stories.d.ts +0 -13
- package/dist/components/Badge/Badge.test.d.ts +0 -1
- package/dist/components/Button/Button.stories.d.ts +0 -22
- package/dist/components/Button/Button.test.d.ts +0 -1
- package/dist/components/Card/Card.stories.d.ts +0 -13
- package/dist/components/Card/Card.test.d.ts +0 -1
- package/dist/components/Carousel/Carousel.stories.d.ts +0 -13
- package/dist/components/Carousel/Carousel.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -21
- package/dist/components/Dialog/Dialog.test.d.ts +0 -1
- package/dist/components/Input/Input.stories.d.ts +0 -20
- package/dist/components/Input/Input.test.d.ts +0 -1
- package/dist/components/Label/Label.test.d.ts +0 -1
- package/dist/components/Select/Select.stories.d.ts +0 -15
- package/dist/components/Select/Select.test.d.ts +0 -1
- package/dist/components/Textarea/Textarea.stories.d.ts +0 -15
- package/dist/components/Textarea/Textarea.test.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -13
- package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
- package/dist/components/Typography/Typography.stories.d.ts +0 -27
- package/dist/components/Typography/Typography.test.d.ts +0 -1
- package/dist/lib/plugin.test.d.ts +0 -1
- package/dist/periplo-ui.js +0 -4997
- package/dist/periplo-ui.umd.cjs +0 -67
- package/dist/setup.d.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-plugin.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPlugin.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-jsx-runtime.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-jsx-runtime.production.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "../../node_modules/react/jsx-runtime.js";
|
|
3
|
+
import * as l from "@radix-ui/react-avatar";
|
|
4
|
+
import { cva as f } from "class-variance-authority";
|
|
5
|
+
import s from "react";
|
|
6
|
+
import { cn as m } from "../../lib/utils.js";
|
|
7
|
+
const i = f("h-10 w-10 relative flex shrink-0 rounded-full", {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
sm: "h-8 w-8",
|
|
11
|
+
md: "h-10 w-10",
|
|
12
|
+
lg: "h-12 w-12"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: "md"
|
|
17
|
+
}
|
|
18
|
+
}), d = s.forwardRef(
|
|
19
|
+
({ className: a, size: r, ...e }, o) => /* @__PURE__ */ t.jsx(l.Root, { ref: o, className: m(i({ size: r, className: a })), ...e })
|
|
20
|
+
);
|
|
21
|
+
d.displayName = "Avatar";
|
|
22
|
+
const n = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t.jsx(
|
|
23
|
+
l.Image,
|
|
24
|
+
{
|
|
25
|
+
ref: e,
|
|
26
|
+
className: m("aspect-square h-full w-full shrink-0 overflow-hidden rounded-full", a),
|
|
27
|
+
...r
|
|
28
|
+
}
|
|
29
|
+
));
|
|
30
|
+
n.displayName = "AvatarImage";
|
|
31
|
+
const c = s.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t.jsx(
|
|
32
|
+
l.Fallback,
|
|
33
|
+
{
|
|
34
|
+
ref: e,
|
|
35
|
+
className: m("bg-muted flex h-full w-full items-center justify-center rounded-full", a),
|
|
36
|
+
...r
|
|
37
|
+
}
|
|
38
|
+
));
|
|
39
|
+
c.displayName = "AvatarFallback";
|
|
40
|
+
export {
|
|
41
|
+
d as Avatar,
|
|
42
|
+
c as AvatarFallback,
|
|
43
|
+
n as AvatarImage
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["'use client'\n\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nimport { cn } from '../../lib/utils'\n\nconst avatarVariants = cva('h-10 w-10 relative flex shrink-0 rounded-full', {\n variants: {\n size: {\n sm: 'h-8 w-8',\n md: 'h-10 w-10',\n lg: 'h-12 w-12',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n})\n\nexport interface AvatarProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof avatarVariants> {}\n\nconst Avatar = React.forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, AvatarProps>(\n ({ className, size, ...props }, ref) => (\n <AvatarPrimitive.Root ref={ref} className={cn(avatarVariants({ size, className }))} {...props} />\n ),\n)\nAvatar.displayName = 'Avatar'\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn('aspect-square h-full w-full shrink-0 overflow-hidden rounded-full', className)}\n {...props}\n />\n))\nAvatarImage.displayName = 'AvatarImage'\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn('bg-muted flex h-full w-full items-center justify-center rounded-full', className)}\n {...props}\n />\n))\nAvatarFallback.displayName = 'AvatarFallback'\n\nexport { Avatar, AvatarImage, AvatarFallback }\n"],"names":["Avatar","AvatarImage","AvatarFallback"],"mappings":";;;;;;AAQA;AAA4E;AAChE;AACF;AACA;AACA;AACA;AACN;AACF;AACiB;AACT;AAEV;AAIqB;AAIrB;AACAA;AAEM;AAIJ;AAAiB;AAAhB;AACC;AAC4F;AACxF;AACN;AAEFC;AAEM;AAIJ;AAAiB;AAAhB;AACC;AAC+F;AAC3F;AACN;AAEFC;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { j as a } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { cva as l } from "class-variance-authority";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { cn as r } from "../../lib/utils.js";
|
|
5
|
+
const s = l("rounded-full", {
|
|
6
|
+
variants: {
|
|
7
|
+
intent: {
|
|
8
|
+
neutral: "bg-neutral",
|
|
9
|
+
primary: "bg-primary",
|
|
10
|
+
accent: "bg-accent",
|
|
11
|
+
success: "bg-success",
|
|
12
|
+
warning: "bg-warning",
|
|
13
|
+
error: "bg-error"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
intent: "primary"
|
|
18
|
+
}
|
|
19
|
+
}), c = o.forwardRef(({ className: n, intent: e, ...t }, i) => /* @__PURE__ */ a.jsxs("span", { className: r(n, "absolute right-0 top-0 flex h-3 w-3"), ref: i, ...t, children: [
|
|
20
|
+
/* @__PURE__ */ a.jsx(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
className: r(s({ intent: e }), "absolute inline-flex h-full w-full animate-ping opacity-75")
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ a.jsx("span", { className: r(s({ intent: e }), "relative inline-flex h-3 w-3") })
|
|
27
|
+
] }));
|
|
28
|
+
c.displayName = "Badge";
|
|
29
|
+
export {
|
|
30
|
+
c as Badge
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '../../lib/utils'\n\nconst badgeVariants = cva('rounded-full', {\n variants: {\n intent: {\n neutral: 'bg-neutral',\n primary: 'bg-primary',\n accent: 'bg-accent',\n success: 'bg-success',\n warning: 'bg-warning',\n error: 'bg-error',\n },\n },\n defaultVariants: {\n intent: 'primary',\n },\n})\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof badgeVariants> {}\n\nconst Badge = React.forwardRef<HTMLButtonElement, BadgeProps>(({ className, intent, ...props }, ref) => (\n <span className={cn(className, 'absolute right-0 top-0 flex h-3 w-3')} ref={ref} {...props}>\n <span\n className={cn(badgeVariants({ intent }), 'absolute inline-flex h-full w-full animate-ping opacity-75')}\n ></span>\n <span className={cn(badgeVariants({ intent }), 'relative inline-flex h-3 w-3')}></span>\n </span>\n))\n\nBadge.displayName = 'Badge'\n\nexport { Badge }\n"],"names":["badgeVariants","cva","Badge","React","className","intent","props","ref","jsxs","cn","jsx"],"mappings":";;;;AAKA,MAAMA,IAAgBC,EAAI,gBAAgB;AAAA,EACxC,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,QAAQ;AAAA,EACV;AACF,CAAC,GAIKC,IAAQC,EAAM,WAA0C,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,EAAM,GAAGC,MAC7FC,gBAAAA,EAAAA,KAAA,QAAA,EAAK,WAAWC,EAAGL,GAAW,qCAAqC,GAAG,KAAAG,GAAW,GAAGD,GACnF,UAAA;AAAA,EAAAI,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD,EAAGT,EAAc,EAAE,QAAAK,EAAQ,CAAA,GAAG,4DAA4D;AAAA,IAAA;AAAA,EACtG;AAAA,EACDK,gBAAAA,MAAC,QAAK,EAAA,WAAWD,EAAGT,EAAc,EAAE,QAAAK,EAAQ,CAAA,GAAG,8BAA8B,GAAG;AAAA,EAAA,CAClF,CACD;AAEDH,EAAM,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { j as c } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { cva as g } from "class-variance-authority";
|
|
3
|
+
import b from "react";
|
|
4
|
+
import { cn as d } from "../../lib/utils.js";
|
|
5
|
+
const l = g(
|
|
6
|
+
"inline-flex items-center gap-2 justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
intent: {
|
|
10
|
+
neutral: "bg-neutral text-neutral-foreground hover:bg-neutral-600 active:bg-neutral-700 disabled:bg-neutral-200",
|
|
11
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 disabled:bg-primary-200",
|
|
12
|
+
accent: "bg-accent text-accent-foreground hover:bg-accent-600 active:bg-accent-700 disabled:bg-accent-200",
|
|
13
|
+
success: "bg-success text-success-foreground hover:bg-success-600 active:bg-success-700 disabled:bg-success-200",
|
|
14
|
+
warning: "bg-warning text-warning-foreground hover:bg-warning-600 active:bg-warning-700 disabled:bg-warning-200",
|
|
15
|
+
error: "bg-error text-error-foreground hover:bg-error-600 active:bg-error-700 disabled:bg-error-200",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
variant: {
|
|
19
|
+
filled: "",
|
|
20
|
+
outlined: "bg-transparent border-neutral-950 border disabled:bg-neutral-50",
|
|
21
|
+
text: "bg-transparent",
|
|
22
|
+
elevated: "shadow-lg",
|
|
23
|
+
tonal: ""
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
sm: " text-xs py-2 px-4",
|
|
27
|
+
md: "text-sm py-2.5 px-4",
|
|
28
|
+
lg: "text-base py-3 px-4",
|
|
29
|
+
icon: "h-10 w-10 rounded-full"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
compoundVariants: [
|
|
33
|
+
{
|
|
34
|
+
variant: "outlined",
|
|
35
|
+
intent: "primary",
|
|
36
|
+
className: "hover:bg-[#FAD264] active:bg-[#FAD264]"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
variant: "text",
|
|
40
|
+
intent: "primary",
|
|
41
|
+
className: "hover:bg-[#FAD264] active:bg-[#FAD264]"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
variant: "tonal",
|
|
45
|
+
intent: "primary",
|
|
46
|
+
className: "bg-primary-400 hover:bg-[#FFCA1A] active:bg-[#FFB61A]"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
intent: "primary",
|
|
51
|
+
size: "md"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
), u = b.forwardRef(
|
|
55
|
+
({ className: r, variant: t, intent: n, size: a, endContent: i, startContent: o, ...e }, s) => /* @__PURE__ */ c.jsxs("button", { className: d(l({ variant: t, size: a, intent: n, className: r })), ref: s, ...e, children: [
|
|
56
|
+
o,
|
|
57
|
+
e.children,
|
|
58
|
+
i
|
|
59
|
+
] })
|
|
60
|
+
);
|
|
61
|
+
u.displayName = "Button";
|
|
62
|
+
export {
|
|
63
|
+
u as Button,
|
|
64
|
+
l as buttonVariants
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport React, { ReactNode } from 'react'\n\nimport { cn } from '../../lib/utils'\n\nconst buttonVariants = cva(\n 'inline-flex items-center gap-2 justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n intent: {\n neutral:\n 'bg-neutral text-neutral-foreground hover:bg-neutral-600 active:bg-neutral-700 disabled:bg-neutral-200',\n primary:\n 'bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 disabled:bg-primary-200',\n accent: 'bg-accent text-accent-foreground hover:bg-accent-600 active:bg-accent-700 disabled:bg-accent-200',\n success:\n 'bg-success text-success-foreground hover:bg-success-600 active:bg-success-700 disabled:bg-success-200',\n warning:\n 'bg-warning text-warning-foreground hover:bg-warning-600 active:bg-warning-700 disabled:bg-warning-200',\n error: 'bg-error text-error-foreground hover:bg-error-600 active:bg-error-700 disabled:bg-error-200',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n variant: {\n filled: '',\n outlined: 'bg-transparent border-neutral-950 border disabled:bg-neutral-50',\n text: 'bg-transparent',\n elevated: 'shadow-lg',\n tonal: '',\n },\n size: {\n sm: ' text-xs py-2 px-4',\n md: 'text-sm py-2.5 px-4',\n lg: 'text-base py-3 px-4',\n icon: 'h-10 w-10 rounded-full',\n },\n },\n compoundVariants: [\n {\n variant: 'outlined',\n intent: 'primary',\n className: 'hover:bg-[#FAD264] active:bg-[#FAD264]',\n },\n {\n variant: 'text',\n intent: 'primary',\n className: 'hover:bg-[#FAD264] active:bg-[#FAD264]',\n },\n {\n variant: 'tonal',\n intent: 'primary',\n className: 'bg-primary-400 hover:bg-[#FFCA1A] active:bg-[#FFB61A]',\n },\n ],\n defaultVariants: {\n intent: 'primary',\n size: 'md',\n },\n },\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n endContent?: ReactNode\n startContent?: ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, intent, size, endContent, startContent, ...props }, ref) => {\n return (\n <button className={cn(buttonVariants({ variant, size, intent, className }))} ref={ref} {...props}>\n {startContent}\n {props.children}\n {endContent}\n </button>\n )\n },\n)\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"names":["buttonVariants","cva","Button","React","className","variant","intent","size","endContent","startContent","props","ref","jsxs","cn"],"mappings":";;;;AAKA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,QAAQ;AAAA,QACN,SACE;AAAA,QACF,SACE;AAAA,QACF,QAAQ;AAAA,QACR,SACE;AAAA,QACF,SACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,QAAQ;AAAA,QACR,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,OAAO;AAAA,MACT;AAAA,MACA,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,WAAW;AAAA,MACb;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,WAAW;AAAA,MACb;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,WAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AACF,GASMC,IAASC,EAAM;AAAA,EACnB,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,QAAAC,GAAQ,MAAAC,GAAM,YAAAC,GAAY,cAAAC,GAAc,GAAGC,EAAM,GAAGC,MAEtEC,gBAAAA,EAAAA,KAAA,UAAA,EAAO,WAAWC,EAAGb,EAAe,EAAE,SAAAK,GAAS,MAAAE,GAAM,QAAAD,GAAQ,WAAAF,GAAW,CAAC,GAAG,KAAAO,GAAW,GAAGD,GACxF,UAAA;AAAA,IAAAD;AAAA,IACAC,EAAM;AAAA,IACNF;AAAA,EACH,EAAA,CAAA;AAGN;AACAN,EAAO,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { j as o } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { cn as s } from "../../lib/utils.js";
|
|
4
|
+
const l = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ o.jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
ref: r,
|
|
8
|
+
className: s("flex h-full flex-col justify-between rounded-lg text-card-foreground shadow-sm", e),
|
|
9
|
+
...a
|
|
10
|
+
}
|
|
11
|
+
));
|
|
12
|
+
l.displayName = "Card";
|
|
13
|
+
const m = d.forwardRef(({ className: e, alt: a, src: r, ...t }, f) => /* @__PURE__ */ o.jsx(
|
|
14
|
+
"img",
|
|
15
|
+
{
|
|
16
|
+
alt: a,
|
|
17
|
+
src: r,
|
|
18
|
+
ref: f,
|
|
19
|
+
className: s("h-full overflow-hidden rounded-t-[0.438rem] object-cover", e),
|
|
20
|
+
...t
|
|
21
|
+
}
|
|
22
|
+
));
|
|
23
|
+
m.displayName = "CardMedia";
|
|
24
|
+
const i = d.forwardRef(
|
|
25
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ o.jsx("div", { ref: r, className: s("flex flex-col gap-2 p-4", e), ...a })
|
|
26
|
+
);
|
|
27
|
+
i.displayName = "CardContent";
|
|
28
|
+
export {
|
|
29
|
+
l as Card,
|
|
30
|
+
i as CardContent,
|
|
31
|
+
m as CardMedia
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '../../lib/utils'\n\nexport interface CardMediaProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n alt: string\n src: string\n}\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex h-full flex-col justify-between rounded-lg text-card-foreground shadow-sm', className)}\n {...props}\n />\n))\nCard.displayName = 'Card'\n\nconst CardMedia = React.forwardRef<HTMLImageElement, CardMediaProps>(({ className, alt, src, ...props }, ref) => (\n <img\n alt={alt}\n src={src}\n ref={ref}\n className={cn('h-full overflow-hidden rounded-t-[0.438rem] object-cover', className)}\n {...props}\n />\n))\nCardMedia.displayName = 'CardMedia'\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={cn('flex flex-col gap-2 p-4', className)} {...props} />,\n)\nCardContent.displayName = 'CardContent'\n\nexport { Card, CardMedia, CardContent }\n"],"names":["Card","React","className","props","ref","jsx","cn","CardMedia","alt","src","CardContent"],"mappings":";;;AASM,MAAAA,IAAOC,EAAM,WAAiE,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC5GC,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWE,EAAG,kFAAkFJ,CAAS;AAAA,IACxG,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAK,cAAc;AAEb,MAAAO,IAAYN,EAAM,WAA6C,CAAC,EAAE,WAAAC,GAAW,KAAAM,GAAK,KAAAC,GAAK,GAAGN,KAASC,MACvGC,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAG;AAAA,IACA,KAAAC;AAAA,IACA,KAAAL;AAAA,IACA,WAAWE,EAAG,6DAA6DJ,CAAS;AAAA,IACnF,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAU,cAAc;AAExB,MAAMG,IAAcT,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,KAASC,MAAQC,gBAAAA,EAAA,IAAC,OAAI,EAAA,KAAAD,GAAU,WAAWE,EAAG,2BAA2BJ,CAAS,GAAI,GAAGC,GAAO;AACnH;AACAO,EAAY,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "../../node_modules/react/jsx-runtime.js";
|
|
3
|
+
import { ArrowLeft as y, ArrowRight as R } from "@phosphor-icons/react";
|
|
4
|
+
import k from "embla-carousel-react";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { cn as c } from "../../lib/utils.js";
|
|
7
|
+
import { Button as w } from "../Button/Button.js";
|
|
8
|
+
const j = r.createContext(null);
|
|
9
|
+
function m() {
|
|
10
|
+
const o = r.useContext(j);
|
|
11
|
+
if (!o)
|
|
12
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
13
|
+
return o;
|
|
14
|
+
}
|
|
15
|
+
const z = r.forwardRef(
|
|
16
|
+
({ orientation: o = "horizontal", opts: s, setApi: l, plugins: a, className: n, children: i, ...u }, f) => {
|
|
17
|
+
const [C, e] = k(
|
|
18
|
+
{
|
|
19
|
+
...s,
|
|
20
|
+
axis: o === "horizontal" ? "x" : "y"
|
|
21
|
+
},
|
|
22
|
+
a
|
|
23
|
+
), [N, b] = r.useState(!1), [h, P] = r.useState(!1), d = r.useCallback((x) => {
|
|
24
|
+
/* istanbul ignore next -- @preserve */
|
|
25
|
+
if (!x) {
|
|
26
|
+
/* istanbul ignore next -- @preserve */
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
b(x.canScrollPrev()), P(x.canScrollNext());
|
|
30
|
+
}, []), v = r.useCallback(() => {
|
|
31
|
+
/* istanbul ignore next -- @preserve */
|
|
32
|
+
e?.scrollPrev();
|
|
33
|
+
}, [e]), p = r.useCallback(() => {
|
|
34
|
+
/* istanbul ignore next -- @preserve */
|
|
35
|
+
e?.scrollNext();
|
|
36
|
+
}, [e]);
|
|
37
|
+
r.useEffect(() => {
|
|
38
|
+
/* istanbul ignore next -- @preserve */
|
|
39
|
+
if (!e || !l)
|
|
40
|
+
return;
|
|
41
|
+
/* istanbul ignore next -- @preserve */
|
|
42
|
+
l(e);
|
|
43
|
+
}, [e, l]), r.useEffect(() => {
|
|
44
|
+
if (e)
|
|
45
|
+
return d(e), e.on("reInit", d), e.on("select", d), () => {
|
|
46
|
+
e.off("select", d);
|
|
47
|
+
};
|
|
48
|
+
}, [e, d]);
|
|
49
|
+
const S = r.useMemo(
|
|
50
|
+
() => ({
|
|
51
|
+
carouselRef: C,
|
|
52
|
+
api: e,
|
|
53
|
+
opts: s,
|
|
54
|
+
orientation: o,
|
|
55
|
+
scrollPrev: v,
|
|
56
|
+
scrollNext: p,
|
|
57
|
+
canScrollPrev: N,
|
|
58
|
+
canScrollNext: h
|
|
59
|
+
}),
|
|
60
|
+
[e, h, N, C, s, o, p, v]
|
|
61
|
+
);
|
|
62
|
+
return /* @__PURE__ */ t.jsx(j.Provider, { value: S, children: /* @__PURE__ */ t.jsx("div", { ref: f, className: c("relative", n), "aria-roledescription": "carousel", ...u, children: i }) });
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
z.displayName = "Carousel";
|
|
66
|
+
const E = r.forwardRef(
|
|
67
|
+
({ className: o, ...s }, l) => {
|
|
68
|
+
const { carouselRef: a, orientation: n } = m();
|
|
69
|
+
return /* @__PURE__ */ t.jsx("div", { ref: a, className: c("overflow-hidden", o), children: /* @__PURE__ */ t.jsx("div", { ref: l, className: c("flex", n === "horizontal" ? "-ml-4" : "-mt-4 flex-col"), ...s }) });
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
E.displayName = "CarouselContent";
|
|
73
|
+
const g = r.forwardRef(
|
|
74
|
+
({ className: o, ...s }, l) => {
|
|
75
|
+
const { orientation: a } = m();
|
|
76
|
+
return /* @__PURE__ */ t.jsx(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
ref: l,
|
|
80
|
+
"aria-roledescription": "slide",
|
|
81
|
+
className: c("min-w-0 shrink-0 grow-0 basis-full", a === "horizontal" ? "pl-4" : "pt-4", o),
|
|
82
|
+
...s
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
g.displayName = "CarouselItem";
|
|
88
|
+
const I = r.forwardRef(
|
|
89
|
+
({ className: o, variant: s = "outlined", size: l = "icon", ...a }, n) => {
|
|
90
|
+
const { orientation: i, scrollPrev: u, canScrollPrev: f } = m();
|
|
91
|
+
return /* @__PURE__ */ t.jsxs(
|
|
92
|
+
w,
|
|
93
|
+
{
|
|
94
|
+
ref: n,
|
|
95
|
+
variant: s,
|
|
96
|
+
size: l,
|
|
97
|
+
className: c(
|
|
98
|
+
"absolute h-8 w-8 rounded-full",
|
|
99
|
+
i === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
100
|
+
o
|
|
101
|
+
),
|
|
102
|
+
disabled: !f,
|
|
103
|
+
onClick: u,
|
|
104
|
+
...a,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ t.jsx(y, { className: "h-5 w-5" }),
|
|
107
|
+
/* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
I.displayName = "CarouselPrevious";
|
|
114
|
+
const B = r.forwardRef(
|
|
115
|
+
({ className: o, variant: s = "outlined", size: l = "icon", ...a }, n) => {
|
|
116
|
+
const { orientation: i, scrollNext: u, canScrollNext: f } = m();
|
|
117
|
+
return /* @__PURE__ */ t.jsxs(
|
|
118
|
+
w,
|
|
119
|
+
{
|
|
120
|
+
ref: n,
|
|
121
|
+
variant: s,
|
|
122
|
+
size: l,
|
|
123
|
+
className: c(
|
|
124
|
+
"absolute h-8 w-8 rounded-full",
|
|
125
|
+
/* istanbul ignore next -- @preserve */
|
|
126
|
+
i === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
127
|
+
o
|
|
128
|
+
),
|
|
129
|
+
disabled: !f,
|
|
130
|
+
onClick: u,
|
|
131
|
+
...a,
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ t.jsx(R, { className: "h-5 w-5" }),
|
|
134
|
+
/* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Next slide" })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
B.displayName = "CarouselNext";
|
|
141
|
+
export {
|
|
142
|
+
z as Carousel,
|
|
143
|
+
E as CarouselContent,
|
|
144
|
+
j as CarouselContext,
|
|
145
|
+
g as CarouselItem,
|
|
146
|
+
B as CarouselNext,
|
|
147
|
+
I as CarouselPrevious
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=Carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Carousel.js","sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["'use client'\nimport { ArrowLeft, ArrowRight } from '@phosphor-icons/react'\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react'\nimport * as React from 'react'\n\nimport { cn } from '../../lib/utils'\nimport { Button } from '../Button'\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\nexport interface CarouselProps {\n opts?: CarouselOptions\n plugins?: CarouselPlugin\n orientation?: 'horizontal' | 'vertical'\n setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n api: ReturnType<typeof useEmblaCarousel>[1]\n scrollPrev: () => void\n scrollNext: () => void\n canScrollPrev: boolean\n canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext)\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />')\n }\n\n return context\n}\n\nconst Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(\n ({ orientation = 'horizontal', opts, setApi, plugins, className, children, ...props }, ref) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n )\n const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n /* istanbul ignore next -- @preserve */\n if (!api) {\n /* istanbul ignore next -- @preserve */\n return\n }\n\n setCanScrollPrev(api.canScrollPrev())\n setCanScrollNext(api.canScrollNext())\n }, [])\n\n const scrollPrev = React.useCallback(() => {\n /* istanbul ignore next -- @preserve */\n api?.scrollPrev()\n }, [api])\n\n const scrollNext = React.useCallback(() => {\n /* istanbul ignore next -- @preserve */\n api?.scrollNext()\n }, [api])\n\n React.useEffect(() => {\n /* istanbul ignore next -- @preserve */\n if (!api || !setApi) {\n return\n }\n /* istanbul ignore next -- @preserve */\n setApi(api)\n }, [api, setApi])\n\n React.useEffect(() => {\n if (!api) {\n return\n }\n\n onSelect(api)\n api.on('reInit', onSelect)\n api.on('select', onSelect)\n\n return () => {\n api.off('select', onSelect)\n }\n }, [api, onSelect])\n const obj = React.useMemo(\n () => ({\n carouselRef,\n api: api,\n opts,\n orientation: orientation,\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }),\n [api, canScrollNext, canScrollPrev, carouselRef, opts, orientation, scrollNext, scrollPrev],\n )\n return (\n <CarouselContext.Provider value={obj}>\n <div ref={ref} className={cn('relative', className)} aria-roledescription=\"carousel\" {...props}>\n {children}\n </div>\n </CarouselContext.Provider>\n )\n },\n)\nCarousel.displayName = 'Carousel'\n\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { carouselRef, orientation } = useCarousel()\n\n return (\n <div ref={carouselRef} className={cn('overflow-hidden', className)}>\n <div ref={ref} className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col')} {...props} />\n </div>\n )\n },\n)\nCarouselContent.displayName = 'CarouselContent'\n\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { orientation } = useCarousel()\n\n return (\n <div\n ref={ref}\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n {...props}\n />\n )\n },\n)\nCarouselItem.displayName = 'CarouselItem'\n\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'outlined', size = 'icon', ...props }, ref) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n orientation === 'horizontal'\n ? '-left-12 top-1/2 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeft className=\"h-5 w-5\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n )\n },\n)\nCarouselPrevious.displayName = 'CarouselPrevious'\n\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\n ({ className, variant = 'outlined', size = 'icon', ...props }, ref) => {\n const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={cn(\n 'absolute h-8 w-8 rounded-full',\n /* istanbul ignore next -- @preserve */\n orientation === 'horizontal'\n ? '-right-12 top-1/2 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRight className=\"h-5 w-5\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n )\n },\n)\nCarouselNext.displayName = 'CarouselNext'\n\nexport { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, CarouselContext }\n"],"names":["api","Carousel","CarouselContent","CarouselItem","CarouselPrevious","CarouselNext"],"mappings":";;;;;;;AA6BM;AAEN;AACQ;AAEN;AACQ;AAGD;AACT;AAEA;AAAuB;AAEb;AAAqB;AACzB;AACK;AACwC;AAC7C;AACA;AAKuD;AAEvD;AAAU;AAER;AAAA;AAGeA;AACmB;AAGK;AAEzC;AAAgB;AAGyB;AAEzC;AAAgB;AAGlB;AAAsB;AAEhB;AACF;AAAA;AAGF;AAAU;AAIV;AAIA;AAKM;AAAsB;AAAA;AAG9B;AAAkB;AACT;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEwF;AAE5F;AAKE;AAGN;AACAC;AAEA;AAA8B;AAE1B;AAGE;AAEA;AAGN;AACAC;AAEA;AAA2B;AAEjB;AAGJ;AAAA;AAAC;AAAA;AACC;AACqB;AACwF;AACzG;AAAA;AAAA;AAIZ;AACAC;AAEA;AAA+B;AAE3B;AAGE;AAAA;AAAC;AAAA;AACC;AACA;AACA;AACW;AACT;AAGI;AACJ;AACF;AACW;AACF;AACL;AAEJ;AAA+B;AACS;AAAA;AAAA;AAAA;AAIhD;AACAC;AAEA;AAA2B;AAEvB;AAGE;AAAA;AAAC;AAAA;AACC;AACA;AACA;AACW;AACT;AAAA;AAII;AACJ;AACF;AACW;AACF;AACL;AAEJ;AAAgC;AACI;AAAA;AAAA;AAAA;AAI5C;AACAC;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Carousel as r, CarouselContent as C, CarouselContext as s, CarouselItem as t, CarouselNext as u, CarouselPrevious as a } from "./Carousel.js";
|
|
2
|
+
export {
|
|
3
|
+
r as Carousel,
|
|
4
|
+
C as CarouselContent,
|
|
5
|
+
s as CarouselContext,
|
|
6
|
+
t as CarouselItem,
|
|
7
|
+
u as CarouselNext,
|
|
8
|
+
a as CarouselPrevious
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ComboboxProps {
|
|
3
|
+
options: Array<{
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
noResults?: string | React.ReactNode;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
error: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function Combobox({ options, placeholder, noResults, onChange, defaultValue, disabled, error, }: Readonly<ComboboxProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "../../node_modules/react/jsx-runtime.js";
|
|
3
|
+
import { CaretUpDown as u, Check as f } from "@phosphor-icons/react";
|
|
4
|
+
import * as l from "react";
|
|
5
|
+
import { Button as b } from "../Button/Button.js";
|
|
6
|
+
import { Command as v, CommandInput as C, CommandEmpty as g, CommandList as w, CommandGroup as y, CommandItem as N } from "../Command/Command.js";
|
|
7
|
+
import { Popover as P, PopoverTrigger as S, PopoverContent as k } from "../Popover/Popover.js";
|
|
8
|
+
import { cn as d } from "../../lib/utils.js";
|
|
9
|
+
function L({
|
|
10
|
+
options: s,
|
|
11
|
+
placeholder: n,
|
|
12
|
+
noResults: m,
|
|
13
|
+
onChange: c,
|
|
14
|
+
defaultValue: p,
|
|
15
|
+
disabled: x,
|
|
16
|
+
error: h
|
|
17
|
+
}) {
|
|
18
|
+
const [t, i] = l.useState(!1), [a, j] = l.useState(p ?? "");
|
|
19
|
+
return /* @__PURE__ */ e.jsxs(P, { open: t, onOpenChange: i, children: [
|
|
20
|
+
/* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
21
|
+
b,
|
|
22
|
+
{
|
|
23
|
+
variant: "outlined",
|
|
24
|
+
"aria-expanded": t,
|
|
25
|
+
role: "combobox",
|
|
26
|
+
className: d(
|
|
27
|
+
h && "border-none ring-1 ring-error-400 focus-within:ring-error-700",
|
|
28
|
+
"w-[200px] justify-between hover:bg-transparent active:bg-transparent"
|
|
29
|
+
),
|
|
30
|
+
disabled: x,
|
|
31
|
+
children: [
|
|
32
|
+
a ? s.find((r) => r.value === a)?.label : n,
|
|
33
|
+
/* @__PURE__ */ e.jsx(u, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
) }),
|
|
37
|
+
/* @__PURE__ */ e.jsx(k, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(v, { children: [
|
|
38
|
+
/* @__PURE__ */ e.jsx(C, { placeholder: n }),
|
|
39
|
+
m && /* @__PURE__ */ e.jsx(g, { children: m }),
|
|
40
|
+
/* @__PURE__ */ e.jsx(w, { children: /* @__PURE__ */ e.jsx(y, { children: s.map((r) => /* @__PURE__ */ e.jsxs(
|
|
41
|
+
N,
|
|
42
|
+
{
|
|
43
|
+
value: r.value,
|
|
44
|
+
disabled: r.disabled,
|
|
45
|
+
onSelect: (o) => {
|
|
46
|
+
j(o === a ? "" : o), i(!1), c(o);
|
|
47
|
+
},
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ e.jsx(f, { className: d("mr-2 h-4 w-4", a === r.value ? "opacity-100" : "opacity-0") }),
|
|
50
|
+
r.label
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
r.value
|
|
54
|
+
)) }) })
|
|
55
|
+
] }) })
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
L as Combobox
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=Combobox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.js","sources":["../../../src/components/Combobox/Combobox.tsx"],"sourcesContent":["'use client'\n\nimport { Check, CaretUpDown } from '@phosphor-icons/react'\nimport * as React from 'react'\n\nimport { Button } from '../Button'\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '../Command'\nimport { Popover, PopoverContent, PopoverTrigger } from '../Popover'\n\nimport { cn } from '@/lib/utils'\n\nexport interface ComboboxProps {\n options: Array<{ value: string; label: string; disabled?: boolean }>\n placeholder: string\n noResults?: string | React.ReactNode\n defaultValue?: string\n onChange: (value: string) => void\n disabled?: boolean\n error: boolean\n}\n\nexport function Combobox({\n options,\n placeholder,\n noResults,\n onChange,\n defaultValue,\n disabled,\n error,\n}: Readonly<ComboboxProps>) {\n const [open, setOpen] = React.useState(false)\n const [value, setValue] = React.useState(defaultValue ?? '')\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outlined\"\n aria-expanded={open}\n role=\"combobox\"\n className={cn(\n error && 'border-none ring-1 ring-error-400 focus-within:ring-error-700',\n 'w-[200px] justify-between hover:bg-transparent active:bg-transparent',\n )}\n disabled={disabled}\n >\n {value ? options.find((option) => option.value === value)?.label : placeholder}\n <CaretUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[200px] p-0\">\n <Command>\n <CommandInput placeholder={placeholder} />\n {noResults && <CommandEmpty>{noResults}</CommandEmpty>}\n <CommandList>\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n onSelect={(currentValue) => {\n setValue(currentValue === value ? '' : currentValue)\n setOpen(false)\n onChange(currentValue)\n }}\n >\n <Check className={cn('mr-2 h-4 w-4', value === option.value ? 'opacity-100' : 'opacity-0')} />\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n"],"names":[],"mappings":";;;;;;;;AAqBO;AAAkB;AACvB;AACA;AACA;AACA;AACA;AACA;AAEF;AACE;AAGA;AAEI;AACE;AAAC;AAAA;AACS;AACO;AACV;AACM;AACA;AACT;AACF;AACA;AAEC;AAAkE;AACT;AAAA;AAAA;AAE9D;AAGI;AAAwC;AACD;AAIjC;AAAC;AAAA;AAEe;AACG;AAEN;AAEY;AACvB;AAEA;AAA4F;AACpF;AAAA;AAAA;AAVI;AAcpB;AAEJ;AAGN;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Combobox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|