@next-degree/pickle-shared-js 0.3.22 → 0.3.24

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 (49) hide show
  1. package/dist/app/layout.css +106 -5
  2. package/dist/app/layout.css.map +1 -1
  3. package/dist/app/page.cjs +364 -4
  4. package/dist/app/page.cjs.map +1 -1
  5. package/dist/app/page.js +369 -4
  6. package/dist/app/page.js.map +1 -1
  7. package/dist/components/demos/InputDemo.cjs +175 -0
  8. package/dist/components/demos/InputDemo.cjs.map +1 -0
  9. package/dist/components/demos/InputDemo.d.cts +5 -0
  10. package/dist/components/demos/InputDemo.d.ts +5 -0
  11. package/dist/components/demos/InputDemo.js +152 -0
  12. package/dist/components/demos/InputDemo.js.map +1 -0
  13. package/dist/components/demos/SelectDemo.cjs +323 -0
  14. package/dist/components/demos/SelectDemo.cjs.map +1 -0
  15. package/dist/components/demos/SelectDemo.d.cts +5 -0
  16. package/dist/components/demos/SelectDemo.d.ts +5 -0
  17. package/dist/components/demos/SelectDemo.js +295 -0
  18. package/dist/components/demos/SelectDemo.js.map +1 -0
  19. package/dist/components/demos/index.cjs +362 -2
  20. package/dist/components/demos/index.cjs.map +1 -1
  21. package/dist/components/demos/index.js +367 -2
  22. package/dist/components/demos/index.js.map +1 -1
  23. package/dist/components/ui/ErrorMessage.cjs +41 -0
  24. package/dist/components/ui/ErrorMessage.cjs.map +1 -0
  25. package/dist/components/ui/ErrorMessage.d.cts +9 -0
  26. package/dist/components/ui/ErrorMessage.d.ts +9 -0
  27. package/dist/components/ui/ErrorMessage.js +18 -0
  28. package/dist/components/ui/ErrorMessage.js.map +1 -0
  29. package/dist/components/ui/Input.cjs +159 -0
  30. package/dist/components/ui/Input.cjs.map +1 -0
  31. package/dist/components/ui/Input.d.cts +22 -0
  32. package/dist/components/ui/Input.d.ts +22 -0
  33. package/dist/components/ui/Input.js +138 -0
  34. package/dist/components/ui/Input.js.map +1 -0
  35. package/dist/components/ui/Select.cjs +124 -105
  36. package/dist/components/ui/Select.cjs.map +1 -1
  37. package/dist/components/ui/Select.d.cts +3 -1
  38. package/dist/components/ui/Select.d.ts +3 -1
  39. package/dist/components/ui/Select.js +124 -105
  40. package/dist/components/ui/Select.js.map +1 -1
  41. package/dist/index.cjs +311 -190
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.cts +1 -0
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.js +301 -181
  46. package/dist/index.js.map +1 -1
  47. package/dist/styles/globals.css +106 -5
  48. package/dist/styles/globals.css.map +1 -1
  49. package/package.json +1 -1
@@ -0,0 +1,152 @@
1
+ // src/components/ui/Input.tsx
2
+ import { cva } from "cva";
3
+ import { icons, X } from "lucide-react";
4
+ import { forwardRef } from "react";
5
+
6
+ // src/lib/utils.ts
7
+ import { clsx } from "clsx";
8
+ import { twMerge } from "tailwind-merge";
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+
13
+ // src/components/ui/ErrorMessage.tsx
14
+ import { jsx } from "react/jsx-runtime";
15
+ function ErrorMessage({ message, className, ...props }) {
16
+ if (!message) return null;
17
+ return /* @__PURE__ */ jsx("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
18
+ }
19
+ var ErrorMessage_default = ErrorMessage;
20
+
21
+ // src/components/ui/Label.tsx
22
+ import { jsx as jsx2 } from "react/jsx-runtime";
23
+ function Label({ text, className, ...props }) {
24
+ if (!text) return null;
25
+ return /* @__PURE__ */ jsx2(
26
+ "label",
27
+ {
28
+ className: cn(
29
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
30
+ className
31
+ ),
32
+ ...props,
33
+ children: text
34
+ }
35
+ );
36
+ }
37
+ var Label_default = Label;
38
+
39
+ // src/components/ui/Input.tsx
40
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
41
+ var Input = forwardRef(
42
+ ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
43
+ const handleClear = () => {
44
+ onChange?.({ target: { value: "" } });
45
+ onClear?.();
46
+ };
47
+ const IconComponent = icon && icons[icon];
48
+ const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
49
+ const hasIcon = !!icon;
50
+ const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
51
+ return /* @__PURE__ */ jsxs("div", { className: "group flex w-full flex-col", "data-testid": `input-wrapper-${props.id}`, children: [
52
+ label && /* @__PURE__ */ jsx3(Label_default, { text: label, htmlFor: props.name, className: cn("body mb-1", classNames?.label) }),
53
+ /* @__PURE__ */ jsxs("div", { className: "relative flex flex-row items-center", children: [
54
+ IconComponent && /* @__PURE__ */ jsx3(
55
+ IconComponent,
56
+ {
57
+ className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
58
+ }
59
+ ),
60
+ /* @__PURE__ */ jsx3(
61
+ "input",
62
+ {
63
+ className: cn(inputVariants({ theme, hasIcon })),
64
+ ref,
65
+ placeholder,
66
+ value,
67
+ onChange,
68
+ "data-testid": `input-element-${props.id}`,
69
+ ...props
70
+ }
71
+ ),
72
+ hasIcon && value && /* @__PURE__ */ jsx3(
73
+ X,
74
+ {
75
+ className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
76
+ onClick: handleClear,
77
+ "data-testid": "clear-button"
78
+ }
79
+ )
80
+ ] }),
81
+ /* @__PURE__ */ jsx3(ErrorMessage_default, { message: error, className: "mt-1" })
82
+ ] });
83
+ }
84
+ );
85
+ Input.displayName = "Input";
86
+ var inputVariants = cva(
87
+ [
88
+ "border-input",
89
+ "placeholder:text-muted-foreground",
90
+ "focus-visible:ring-ring",
91
+ "inline-flex",
92
+ "w-full",
93
+ "h-11",
94
+ "items-center",
95
+ "justify-start",
96
+ "gap-3",
97
+ "rounded-lg",
98
+ "bg-transparent",
99
+ "px-3",
100
+ "pt-0.5",
101
+ "text-sm",
102
+ "shadow-sm",
103
+ "ring-grey-50",
104
+ "transition-colors",
105
+ "focus-visible:outline-none",
106
+ "focus-visible:ring-1",
107
+ "disabled:cursor-not-allowed",
108
+ "disabled:opacity-50",
109
+ "appearance-none",
110
+ "[&::-webkit-search-cancel-button]:appearance-none",
111
+ "[&::-webkit-search-decoration]:appearance-none",
112
+ "[&::-webkit-search-results-button]:appearance-none",
113
+ "[&::-webkit-search-results-decoration]:appearance-none",
114
+ "[&::-ms-clear]:display-none",
115
+ "[&::-ms-reveal]:display-none"
116
+ ],
117
+ {
118
+ variants: {
119
+ theme: {
120
+ light: "text-grey-80 border",
121
+ dark: "text-white"
122
+ },
123
+ hasIcon: {
124
+ false: "pl-3",
125
+ true: "pl-8"
126
+ }
127
+ },
128
+ defaultVariants: {
129
+ theme: "light",
130
+ hasIcon: false
131
+ }
132
+ }
133
+ );
134
+ var Input_default = Input;
135
+
136
+ // src/components/demos/InputDemo.tsx
137
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
138
+ function InputDemo() {
139
+ return /* @__PURE__ */ jsxs2("div", { className: "m-4", children: [
140
+ /* @__PURE__ */ jsx4("h3", { children: "Input" }),
141
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2 md:flex-row", children: [
142
+ /* @__PURE__ */ jsx4("div", { className: "bg-green-80 p-2", children: /* @__PURE__ */ jsx4(Input_default, { theme: "dark", icon: "Search" }) }),
143
+ /* @__PURE__ */ jsx4("div", { className: "p-2", children: /* @__PURE__ */ jsx4(Input_default, {}) }),
144
+ /* @__PURE__ */ jsx4("div", { className: "p-2", children: /* @__PURE__ */ jsx4(Input_default, { icon: "MapPin" }) })
145
+ ] })
146
+ ] });
147
+ }
148
+ var InputDemo_default = InputDemo;
149
+ export {
150
+ InputDemo_default as default
151
+ };
152
+ //# sourceMappingURL=InputDemo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ui/Input.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/demos/InputDemo.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'cva'\nimport { icons, X } from 'lucide-react'\nimport { type ChangeEvent, forwardRef, type InputHTMLAttributes } from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {\n label?: string\n error?: string\n icon?: keyof typeof icons\n onClear?: () => void\n classNames?: { label?: string }\n}\n\nconst Input = forwardRef<HTMLInputElement, Props>(\n ({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {\n const handleClear = () => {\n onChange?.({ target: { value: '' } } as ChangeEvent<HTMLInputElement>)\n onClear?.()\n }\n\n const IconComponent = icon && icons[icon]\n\n const placeholder = props.placeholder ?? (icon === 'Search' ? 'Search...' : '')\n const hasIcon = !!icon\n\n const iconColor = theme === 'dark' ? 'text-white' : 'text-grey-80'\n\n return (\n <div className=\"group flex w-full flex-col\" data-testid={`input-wrapper-${props.id}`}>\n {label && (\n <Label text={label} htmlFor={props.name} className={cn('body mb-1', classNames?.label)} />\n )}\n <div className=\"relative flex flex-row items-center\">\n {IconComponent && (\n <IconComponent\n className={`absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`}\n />\n )}\n <input\n className={cn(inputVariants({ theme, hasIcon }))}\n ref={ref}\n placeholder={placeholder}\n value={value}\n onChange={onChange}\n data-testid={`input-element-${props.id}`}\n {...props}\n />\n {hasIcon && value && (\n <X\n className={`absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`}\n onClick={handleClear}\n data-testid=\"clear-button\"\n />\n )}\n </div>\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </div>\n )\n }\n)\nInput.displayName = 'Input'\n\nconst inputVariants = cva(\n [\n 'border-input',\n 'placeholder:text-muted-foreground',\n 'focus-visible:ring-ring',\n 'inline-flex',\n 'w-full',\n 'h-11',\n 'items-center',\n 'justify-start',\n 'gap-3',\n 'rounded-lg',\n 'bg-transparent',\n 'px-3',\n 'pt-0.5',\n 'text-sm',\n 'shadow-sm',\n 'ring-grey-50',\n 'transition-colors',\n 'focus-visible:outline-none',\n 'focus-visible:ring-1',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none',\n '[&::-webkit-search-results-decoration]:appearance-none',\n '[&::-ms-clear]:display-none',\n '[&::-ms-reveal]:display-none',\n ],\n {\n variants: {\n theme: {\n light: 'text-grey-80 border',\n dark: 'text-white',\n },\n hasIcon: {\n false: 'pl-3',\n true: 'pl-8',\n },\n },\n defaultVariants: {\n theme: 'light',\n hasIcon: false,\n },\n }\n)\n\nexport default Input\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n","import Input from '@/components/ui/Input'\n\nfunction InputDemo() {\n return (\n <div className='m-4'>\n <h3>Input</h3>\n <div className=\"flex flex-col gap-2 md:flex-row\">\n <div className=\"bg-green-80 p-2\">\n <Input theme=\"dark\" icon=\"Search\" />\n </div>\n <div className=\"p-2\">\n <Input />\n </div>\n <div className=\"p-2\">\n <Input icon=\"MapPin\" />\n </div>\n </div>\n </div>\n )\n}\n\nexport default InputDemo\n"],"mappings":";AAAA,SAAS,WAA8B;AACvC,SAAS,OAAO,SAAS;AACzB,SAA2B,kBAA4C;;;ACFvE,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,oBAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO,uBAAQ;;;ACNX,gBAAAA,YAAA;AAJJ,SAAS,MAAM,EAAE,MAAM,WAAW,GAAG,MAAM,GAAoB;AAC7D,MAAI,CAAC,KAAM,QAAO;AAElB,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;;;AHSL,gBAAAC,MAEF,YAFE;AAjBV,IAAM,QAAQ;AAAA,EACZ,CAAC,EAAE,OAAO,OAAO,OAAO,MAAM,SAAS,OAAO,UAAU,YAAY,GAAG,MAAM,GAAG,QAAQ;AACtF,UAAM,cAAc,MAAM;AACxB,iBAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,CAAkC;AACrE,gBAAU;AAAA,IACZ;AAEA,UAAM,gBAAgB,QAAQ,MAAM,IAAI;AAExC,UAAM,cAAc,MAAM,gBAAgB,SAAS,WAAW,cAAc;AAC5E,UAAM,UAAU,CAAC,CAAC;AAElB,UAAM,YAAY,UAAU,SAAS,eAAe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OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;;;AI9GT,gBAAAC,MACA,QAAAC,aADA;AAHN,SAAS,YAAY;AACnB,SACE,gBAAAA,MAAC,SAAI,WAAU,OACb;AAAA,oBAAAD,KAAC,QAAG,mBAAK;AAAA,IACT,gBAAAC,MAAC,SAAI,WAAU,mCACb;AAAA,sBAAAD,KAAC,SAAI,WAAU,mBACb,0BAAAA,KAAC,iBAAM,OAAM,QAAO,MAAK,UAAS,GACpC;AAAA,MACA,gBAAAA,KAAC,SAAI,WAAU,OACb,0BAAAA,KAAC,iBAAM,GACT;AAAA,MACA,gBAAAA,KAAC,SAAI,WAAU,OACb,0BAAAA,KAAC,iBAAM,MAAK,UAAS,GACvB;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,oBAAQ;","names":["jsx","jsx","jsx","jsxs"]}
@@ -0,0 +1,323 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/demos/SelectDemo.tsx
31
+ var SelectDemo_exports = {};
32
+ __export(SelectDemo_exports, {
33
+ default: () => SelectDemo_default
34
+ });
35
+ module.exports = __toCommonJS(SelectDemo_exports);
36
+
37
+ // src/components/ui/Select.tsx
38
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
39
+ var import_lucide_react = require("lucide-react");
40
+ var import_react = require("react");
41
+
42
+ // src/lib/utils.ts
43
+ var import_clsx = require("clsx");
44
+ var import_tailwind_merge = require("tailwind-merge");
45
+ function cn(...inputs) {
46
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
47
+ }
48
+
49
+ // src/components/ui/ErrorMessage.tsx
50
+ var import_jsx_runtime = require("react/jsx-runtime");
51
+ function ErrorMessage({ message, className, ...props }) {
52
+ if (!message) return null;
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
54
+ }
55
+ var ErrorMessage_default = ErrorMessage;
56
+
57
+ // src/components/ui/Label.tsx
58
+ var import_jsx_runtime2 = require("react/jsx-runtime");
59
+ function Label({ text, className, ...props }) {
60
+ if (!text) return null;
61
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
62
+ "label",
63
+ {
64
+ className: cn(
65
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
66
+ className
67
+ ),
68
+ ...props,
69
+ children: text
70
+ }
71
+ );
72
+ }
73
+ var Label_default = Label;
74
+
75
+ // src/components/ui/Chip.tsx
76
+ var import_cva = require("cva");
77
+ var import_tailwind_merge2 = require("tailwind-merge");
78
+ var import_jsx_runtime3 = require("react/jsx-runtime");
79
+ var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_tailwind_merge2.twMerge)(chipVariants({ variant, size, className })), ...props });
80
+ var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
81
+ variants: {
82
+ variant: {
83
+ neutral: ["text-grey-80", "border-grey-10"],
84
+ primary: ["text-purple-100", "border-purple-20"],
85
+ danger: ["text-pumpkin-100", "border-pumpkin-20"],
86
+ onboarding: ["text-green-100", "bg-green-10", "cursor-pointer"],
87
+ onboardingSelected: ["text-white", "bg-green-90", "cursor-pointer"]
88
+ },
89
+ size: {
90
+ small: ["text-sm", "leading-5", "px-2", "py-1", "gap-1.5"],
91
+ medium: ["text-base", "leading-6", "px-3", "py-2", "gap-2"]
92
+ }
93
+ },
94
+ defaultVariants: {
95
+ variant: "neutral",
96
+ size: "medium"
97
+ }
98
+ });
99
+ var Chip_default = Chip;
100
+
101
+ // src/components/primitives/separator.tsx
102
+ var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
103
+ var React = __toESM(require("react"), 1);
104
+ var import_jsx_runtime4 = require("react/jsx-runtime");
105
+ var Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
106
+ SeparatorPrimitive.Root,
107
+ {
108
+ ref,
109
+ decorative,
110
+ orientation,
111
+ className: cn(
112
+ "shrink-0 bg-grey-10",
113
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
114
+ className
115
+ ),
116
+ ...props
117
+ }
118
+ ));
119
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
120
+
121
+ // src/components/ui/Select.tsx
122
+ var import_jsx_runtime5 = require("react/jsx-runtime");
123
+ var Select = (0, import_react.forwardRef)(
124
+ ({ label, options, placeholder, multiselect, classNames, error, id, ...props }, ref) => {
125
+ const { value, defaultValue, dir, className, onChange, ...rest } = props;
126
+ const [selected, setSelected] = (0, import_react.useState)([]);
127
+ const [open, setOpen] = (0, import_react.useState)(false);
128
+ const containerRef = (0, import_react.useRef)(null);
129
+ (0, import_react.useEffect)(() => {
130
+ if (!value) return setSelected([]);
131
+ setSelected(Array.isArray(value) ? value : [value]);
132
+ }, [value]);
133
+ const toggleOpen = () => setOpen((prev) => !prev);
134
+ const closeOnEscape = (event) => event.key === "Escape" && setOpen(false);
135
+ const setValueOnEnter = (event, value2) => event.key === "Enter" && handleChange(value2);
136
+ const chipLabels = selected?.map((s) => options?.find(({ value: value2 }) => value2 === s)).filter(Boolean);
137
+ function handleLabels() {
138
+ if (multiselect) {
139
+ return selected.map((o) => options?.find((option) => option.value === o)?.title).join(", ");
140
+ }
141
+ return options?.find((option) => option.value === selected.join())?.title;
142
+ }
143
+ function handleOnOpenChange(isOpen) {
144
+ if (!multiselect || isOpen) setOpen(isOpen);
145
+ }
146
+ function handleChange(newValue) {
147
+ let newSelected = [];
148
+ setSelected((prev) => {
149
+ newSelected = prev.includes(newValue) ? prev.filter((item) => item !== newValue) : [...prev, newValue];
150
+ return multiselect ? newSelected : [newValue];
151
+ });
152
+ onChange?.(multiselect ? newSelected : newValue);
153
+ }
154
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
155
+ "div",
156
+ {
157
+ className: cn("flex flex-col space-y-1", className),
158
+ ref: containerRef,
159
+ "data-testid": `${(label ?? id)?.toLowerCase()}-select-element`,
160
+ children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label_default, { text: label, className: classNames?.label }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
163
+ SelectPrimitive.Root,
164
+ {
165
+ open,
166
+ value: selected.join(","),
167
+ onOpenChange: handleOnOpenChange,
168
+ onValueChange: multiselect ? void 0 : handleChange,
169
+ defaultValue: typeof defaultValue === "string" ? defaultValue : void 0,
170
+ dir: dir === "rtl" ? "rtl" : "ltr",
171
+ ...rest,
172
+ children: [
173
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
174
+ SelectPrimitive.Trigger,
175
+ {
176
+ ref,
177
+ className: cn(
178
+ "group flex h-11 min-w-80 flex-row items-center justify-between gap-3 rounded-lg border px-4 py-3 text-sm font-normal focus:outline-purple-100 disabled:bg-grey-5 data-[placeholder]:text-grey-50 data-[placeholder]:disabled:text-grey-40",
179
+ classNames?.trigger
180
+ ),
181
+ children: [
182
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "truncate", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
183
+ SelectPrimitive.Value,
184
+ {
185
+ placeholder: placeholder ?? "Select an option",
186
+ "aria-label": handleLabels(),
187
+ children: handleLabels()
188
+ }
189
+ ) }),
190
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
191
+ import_lucide_react.ChevronDownIcon,
192
+ {
193
+ className: "transform text-black group-data-[state=open]:rotate-180",
194
+ size: "16"
195
+ }
196
+ )
197
+ ]
198
+ }
199
+ ),
200
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
201
+ SelectPrimitive.Content,
202
+ {
203
+ hideWhenDetached: true,
204
+ className: "z-10 max-h-[var(--radix-select-content-available-height)] w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md bg-white py-2 shadow-lg",
205
+ position: "popper",
206
+ sideOffset: 4,
207
+ onPointerDownOutside: toggleOpen,
208
+ onKeyDown: closeOnEscape,
209
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(SelectPrimitive.Viewport, { children: [
210
+ multiselect && !!chipLabels?.length && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
211
+ SelectPrimitive.Group,
212
+ {
213
+ className: "mb-2 flex flex-row flex-wrap gap-1 px-2",
214
+ "data-testid": "selected-labels",
215
+ children: chipLabels?.map(
216
+ (chip) => chip && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Chip_default, { size: "small", variant: "primary", children: [
217
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: chip.title }),
218
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
219
+ import_lucide_react.X,
220
+ {
221
+ size: 18,
222
+ "data-testid": `chip-remove-${chip.value}`,
223
+ className: "cursor-pointer",
224
+ onClick: () => handleChange(chip.value)
225
+ }
226
+ )
227
+ ] }, chip.title)
228
+ )
229
+ }
230
+ ),
231
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Separator, {}),
232
+ options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
233
+ SelectPrimitive.Item,
234
+ {
235
+ value: value2,
236
+ className: "group relative cursor-pointer px-4 py-2 text-left text-sm hover:bg-purple-50 focus:bg-purple-50 focus:outline-none data-[state=checked]:bg-purple-50 data-[state=checked]:pr-10 data-[state=checked]:text-purple-100",
237
+ "data-state": selected.includes(value2) ? "checked" : "unchecked",
238
+ onKeyDown: (e) => setValueOnEnter(e, value2),
239
+ onClick: () => handleChange(value2),
240
+ children: [
241
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.ItemText, { children: title }),
242
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
243
+ import_lucide_react.CheckIcon,
244
+ {
245
+ className: "absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
246
+ size: 16
247
+ }
248
+ )
249
+ ]
250
+ },
251
+ id2
252
+ ))
253
+ ] })
254
+ }
255
+ ) })
256
+ ]
257
+ }
258
+ ),
259
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ErrorMessage_default, { message: error, className: "mt-1" })
260
+ ]
261
+ }
262
+ );
263
+ }
264
+ );
265
+ Select.displayName = "Select";
266
+ var Select_default = Select;
267
+
268
+ // src/components/demos/SelectDemo.tsx
269
+ var import_jsx_runtime6 = require("react/jsx-runtime");
270
+ function SelectDemo() {
271
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "m-4", children: [
272
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { children: "Select" }),
273
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex max-w-sm flex-col gap-4 mt-2", children: [
274
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
275
+ Select_default,
276
+ {
277
+ label: "Label - Singleselect",
278
+ placeholder: "Select an option",
279
+ options: [
280
+ { id: "1", value: "1", title: "Option 1" },
281
+ { id: "2", value: "2", title: "Option 2" },
282
+ { id: "3", value: "3", title: "Option 3" }
283
+ ]
284
+ }
285
+ ),
286
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
287
+ Select_default,
288
+ {
289
+ multiselect: true,
290
+ label: "Label - Multiselect",
291
+ placeholder: "Select an option",
292
+ options: [
293
+ { id: "1", value: "1", title: "Option 1" },
294
+ { id: "2", value: "2", title: "Option 2" },
295
+ { id: "3", value: "3", title: "Option 3" },
296
+ { id: "4", value: "4", title: "Option 4" },
297
+ { id: "5", value: "5", title: "Option 5" },
298
+ { id: "6", value: "6", title: "Option 6" },
299
+ { id: "7", value: "7", title: "Option 7" },
300
+ { id: "8", value: "8", title: "Option 8" },
301
+ { id: "9", value: "9", title: "Option 9" },
302
+ { id: "10", value: "10", title: "Option 10" }
303
+ ]
304
+ }
305
+ ),
306
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
307
+ Select_default,
308
+ {
309
+ disabled: true,
310
+ label: "Label - Disabled",
311
+ placeholder: "Select an option",
312
+ options: [
313
+ { id: "1", value: "1", title: "Option 1" },
314
+ { id: "2", value: "2", title: "Option 2" },
315
+ { id: "3", value: "3", title: "Option 3" }
316
+ ]
317
+ }
318
+ )
319
+ ] })
320
+ ] });
321
+ }
322
+ var SelectDemo_default = SelectDemo;
323
+ //# sourceMappingURL=SelectDemo.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/demos/SelectDemo.tsx","../../../src/components/ui/Select.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/ui/Chip.tsx","../../../src/components/primitives/separator.tsx"],"sourcesContent":["import Select from '@/components/ui/Select'\n\nfunction SelectDemo() {\n return (\n <div className='m-4'>\n <h3>Select</h3>\n <div className=\"flex max-w-sm flex-col gap-4 mt-2\">\n <Select\n label=\"Label - Singleselect\"\n placeholder=\"Select an option\"\n options={[\n { id: '1', value: '1', title: 'Option 1' },\n { id: '2', value: '2', title: 'Option 2' },\n { id: '3', value: '3', title: 'Option 3' },\n ]}\n />\n <Select\n multiselect\n label=\"Label - Multiselect\"\n placeholder=\"Select an option\"\n options={[\n { id: '1', value: '1', title: 'Option 1' },\n { id: '2', value: '2', title: 'Option 2' },\n { id: '3', value: '3', title: 'Option 3' },\n { id: '4', value: '4', title: 'Option 4' },\n { id: '5', value: '5', title: 'Option 5' },\n { id: '6', value: '6', title: 'Option 6' },\n { id: '7', value: '7', title: 'Option 7' },\n { id: '8', value: '8', title: 'Option 8' },\n { id: '9', value: '9', title: 'Option 9' },\n { id: '10', value: '10', title: 'Option 10' },\n ]}\n />\n <Select\n disabled\n label=\"Label - Disabled\"\n placeholder=\"Select an option\"\n options={[\n { id: '1', value: '1', title: 'Option 1' },\n { id: '2', value: '2', title: 'Option 2' },\n { id: '3', value: '3', title: 'Option 3' },\n ]}\n />\n </div>\n </div>\n )\n}\n\nexport default SelectDemo","'use client'\n\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { CheckIcon, ChevronDownIcon, X } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type KeyboardEvent,\n useEffect,\n useRef,\n useState,\n} from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport Chip from '@/components/ui/Chip'\nimport { Separator } from '@/components/primitives/separator'\nimport { cn } from '@/lib/utils'\n\n\ninterface Props extends Omit<ComponentPropsWithoutRef<'select'>, 'value' | 'onChange'> {\n label?: string\n value?: string | string[]\n options?: { id: string | number; value: string; title: string }[]\n placeholder?: string\n multiselect?: boolean\n onChange?: (value: string | string[]) => void\n classNames?: { label?: string; trigger?: string }\n error?: string\n}\n\nconst Select = forwardRef<HTMLButtonElement, Props>(\n ({ label, options, placeholder, multiselect, classNames, error, id, ...props }, ref) => {\n const { value, defaultValue, dir, className, onChange, ...rest } = props\n const [selected, setSelected] = useState<string[]>([])\n const [open, setOpen] = useState(false)\n const containerRef = useRef<HTMLDivElement>(null)\n\n\n useEffect(() => {\n if (!value) return setSelected([])\n setSelected(Array.isArray(value) ? value : [value])\n }, [value])\n\n const toggleOpen = () => setOpen((prev) => !prev)\n const closeOnEscape = (event: KeyboardEvent) => event.key === 'Escape' && setOpen(false)\n const setValueOnEnter = (event: KeyboardEvent, value: string) =>\n event.key === 'Enter' && handleChange(value)\n\n const chipLabels = selected\n ?.map((s) => options?.find(({ value }) => value === s))\n .filter(Boolean)\n\n function handleLabels() {\n if (multiselect) {\n return selected.map((o) => options?.find((option) => option.value === o)?.title).join(', ')\n }\n return options?.find((option) => option.value === selected.join())?.title\n }\n\n function handleOnOpenChange(isOpen: boolean) {\n if (!multiselect || isOpen) setOpen(isOpen)\n }\n\n function handleChange(newValue: string) {\n let newSelected: string[] = []\n setSelected((prev) => {\n newSelected = prev.includes(newValue)\n ? prev.filter((item) => item !== newValue)\n : [...prev, newValue]\n return multiselect ? newSelected : [newValue]\n })\n onChange?.(multiselect ? newSelected : newValue)\n }\n\n return (\n <div\n className={cn('flex flex-col space-y-1', className)}\n ref={containerRef}\n data-testid={`${(label ?? id)?.toLowerCase()}-select-element`}\n >\n <Label text={label} className={classNames?.label} />\n\n <SelectPrimitive.Root\n open={open}\n value={selected.join(',')}\n onOpenChange={handleOnOpenChange}\n onValueChange={multiselect ? undefined : handleChange}\n defaultValue={typeof defaultValue === 'string' ? defaultValue : undefined}\n dir={dir === 'rtl' ? 'rtl' : 'ltr'}\n {...rest}\n >\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group flex h-11 min-w-80 flex-row items-center justify-between gap-3 rounded-lg border px-4 py-3 text-sm font-normal focus:outline-purple-100 disabled:bg-grey-5 data-[placeholder]:text-grey-50 data-[placeholder]:disabled:text-grey-40',\n classNames?.trigger\n )}\n >\n <span className=\"truncate\">\n <SelectPrimitive.Value\n placeholder={placeholder ?? 'Select an option'}\n aria-label={handleLabels()}\n >\n {handleLabels()}\n </SelectPrimitive.Value>\n </span>\n\n <ChevronDownIcon\n className=\"transform text-black group-data-[state=open]:rotate-180\"\n size=\"16\"\n />\n </SelectPrimitive.Trigger>\n\n <SelectPrimitive.Portal container={containerRef.current}>\n <SelectPrimitive.Content\n hideWhenDetached\n className=\"z-10 max-h-[var(--radix-select-content-available-height)] w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md bg-white py-2 shadow-lg\"\n position=\"popper\"\n sideOffset={4}\n onPointerDownOutside={toggleOpen}\n onKeyDown={closeOnEscape}\n >\n <SelectPrimitive.Viewport>\n {multiselect && !!chipLabels?.length && (\n <SelectPrimitive.Group\n className=\"mb-2 flex flex-row flex-wrap gap-1 px-2\"\n data-testid=\"selected-labels\"\n >\n {chipLabels?.map(\n (chip) =>\n chip && (\n <Chip key={chip.title} size=\"small\" variant=\"primary\">\n <span>{chip.title}</span>\n <X\n size={18}\n data-testid={`chip-remove-${chip.value}`}\n className=\"cursor-pointer\"\n onClick={() => handleChange(chip.value)}\n />\n </Chip>\n )\n )}\n </SelectPrimitive.Group>\n )}\n <Separator />\n {options?.map(({ id, title, value }) => (\n <SelectPrimitive.Item\n key={id}\n value={value}\n className=\"group relative cursor-pointer px-4 py-2 text-left text-sm hover:bg-purple-50 focus:bg-purple-50 focus:outline-none data-[state=checked]:bg-purple-50 data-[state=checked]:pr-10 data-[state=checked]:text-purple-100\"\n data-state={selected.includes(value) ? 'checked' : 'unchecked'}\n onKeyDown={(e) => setValueOnEnter(e, value)}\n onClick={() => handleChange(value)}\n >\n <SelectPrimitive.ItemText>{title}</SelectPrimitive.ItemText>\n <CheckIcon\n className=\"absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block\"\n size={16}\n />\n </SelectPrimitive.Item>\n ))}\n </SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n </SelectPrimitive.Root>\n <ErrorMessage message={error} className=\"mt-1\" />\n </div>\n )\n }\n)\n\nSelect.displayName = 'Select'\n\nexport default Select\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n","import { cva, type VariantProps } from 'cva'\nimport React from 'react'\nimport { twMerge } from 'tailwind-merge'\n\ninterface ChipProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof chipVariants> {}\n\nconst Chip = ({ className, variant, size, ...props }: ChipProps) => (\n <div className={twMerge(chipVariants({ variant, size, className }))} {...props} />\n)\n\nconst chipVariants = cva(['flex', 'items-center', 'rounded-3xl', 'border', 'w-fit'], {\n variants: {\n variant: {\n neutral: ['text-grey-80', 'border-grey-10'],\n primary: ['text-purple-100', 'border-purple-20'],\n danger: ['text-pumpkin-100', 'border-pumpkin-20'],\n onboarding: ['text-green-100', 'bg-green-10', 'cursor-pointer'],\n onboardingSelected: ['text-white', 'bg-green-90', 'cursor-pointer'],\n },\n size: {\n small: ['text-sm', 'leading-5', 'px-2', 'py-1', 'gap-1.5'],\n medium: ['text-base', 'leading-6', 'px-3', 'py-2', 'gap-2'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n})\n\nexport default Chip\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,sBAAiC;AACjC,0BAA8C;AAC9C,mBAOO;;;ACXP,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;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OAAO,WAAW;AAAA,YACzC,EAAE,IAAI,MAAM,OAAO,MAAM,OAAO,YAAY;AAAA,UAC9C;AAAA;AAAA,MACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,UAAQ;AAAA,UACR,OAAM;AAAA,UACN,aAAY;AAAA,UACZ,SAAS;AAAA,YACP,EAAE,IAAI,KAAK,OAAO,KAAK,OAAO,WAAW;AAAA,YACzC,EAAE,IAAI,KAAK,OAAO,KAAK,OAAO,WAAW;AAAA,YACzC,EAAE,IAAI,KAAK,OAAO,KAAK,OAAO,WAAW;AAAA,UAC3C;AAAA;AAAA,MACF;AAAA,OACF;AAAA,KACF;AAEJ;AAEA,IAAO,qBAAQ;","names":["import_jsx_runtime","import_tailwind_merge","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","value","id","import_jsx_runtime"]}
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function SelectDemo(): react_jsx_runtime.JSX.Element;
4
+
5
+ export { SelectDemo as default };
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function SelectDemo(): react_jsx_runtime.JSX.Element;
4
+
5
+ export { SelectDemo as default };