@fransek/ui 0.2.4 → 0.2.5
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/cjs/components/{button/Button.js → button.js} +2 -2
- package/dist/cjs/components/button.js.map +1 -0
- package/dist/cjs/components/{checkbox-group/CheckboxGroup.d.ts → checkbox-group.d.ts} +2 -2
- package/dist/cjs/components/{checkbox-group/CheckboxGroup.js → checkbox-group.js} +4 -4
- package/dist/cjs/components/checkbox-group.js.map +1 -0
- package/dist/{esm/components/checkbox/Checkbox.d.ts → cjs/components/checkbox.d.ts} +2 -2
- package/dist/cjs/components/{checkbox/Checkbox.js → checkbox.js} +10 -10
- package/dist/cjs/components/checkbox.js.map +1 -0
- package/dist/cjs/components/{field/Field.d.ts → field.d.ts} +1 -1
- package/dist/cjs/components/{field/Field.js → field.js} +2 -2
- package/dist/cjs/components/field.js.map +1 -0
- package/dist/{esm/components/input/Input.d.ts → cjs/components/input.d.ts} +2 -2
- package/dist/cjs/components/{input/Input.js → input.js} +4 -4
- package/dist/cjs/components/input.js.map +1 -0
- package/dist/cjs/components/{radio-group/RadioGroup.d.ts → radio-group.d.ts} +2 -2
- package/dist/cjs/components/{radio/Radio.js → radio.js} +4 -4
- package/dist/cjs/components/radio.js.map +1 -0
- package/dist/cjs/components/{select/Select.d.ts → select.d.ts} +2 -2
- package/dist/cjs/components/{select/Select.js → select.js} +4 -4
- package/dist/cjs/components/select.js.map +1 -0
- package/dist/cjs/index.js +17 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/{button/Button.js → button.js} +2 -2
- package/dist/esm/components/button.js.map +1 -0
- package/dist/esm/components/{checkbox-group/CheckboxGroup.d.ts → checkbox-group.d.ts} +2 -2
- package/dist/esm/components/{checkbox-group/CheckboxGroup.js → checkbox-group.js} +3 -3
- package/dist/esm/components/checkbox-group.js.map +1 -0
- package/dist/{cjs/components/checkbox/Checkbox.d.ts → esm/components/checkbox.d.ts} +2 -2
- package/dist/esm/components/{checkbox/Checkbox.js → checkbox.js} +4 -4
- package/dist/esm/components/checkbox.js.map +1 -0
- package/dist/esm/components/{field/Field.d.ts → field.d.ts} +1 -1
- package/dist/esm/components/{field/Field.js → field.js} +2 -2
- package/dist/esm/components/field.js.map +1 -0
- package/dist/{cjs/components/input/Input.d.ts → esm/components/input.d.ts} +2 -2
- package/dist/esm/components/{input/Input.js → input.js} +3 -3
- package/dist/esm/components/input.js.map +1 -0
- package/dist/esm/components/{radio-group/RadioGroup.d.ts → radio-group.d.ts} +2 -2
- package/dist/esm/components/{radio/Radio.js → radio.js} +3 -3
- package/dist/esm/components/radio.js.map +1 -0
- package/dist/esm/components/{select/Select.d.ts → select.d.ts} +2 -2
- package/dist/esm/components/{select/Select.js → select.js} +3 -3
- package/dist/esm/components/select.js.map +1 -0
- package/dist/esm/index.js +7 -7
- package/package.json +3 -3
- package/dist/cjs/components/button/Button.js.map +0 -1
- package/dist/cjs/components/button/index.d.ts +0 -1
- package/dist/cjs/components/checkbox/Checkbox.js.map +0 -1
- package/dist/cjs/components/checkbox/index.d.ts +0 -1
- package/dist/cjs/components/checkbox-group/CheckboxGroup.js.map +0 -1
- package/dist/cjs/components/checkbox-group/index.d.ts +0 -1
- package/dist/cjs/components/field/Field.js.map +0 -1
- package/dist/cjs/components/field/index.d.ts +0 -1
- package/dist/cjs/components/input/Input.js.map +0 -1
- package/dist/cjs/components/input/index.d.ts +0 -1
- package/dist/cjs/components/radio/Radio.js.map +0 -1
- package/dist/cjs/components/radio/index.d.ts +0 -1
- package/dist/cjs/components/radio-group/index.d.ts +0 -1
- package/dist/cjs/components/select/Select.js.map +0 -1
- package/dist/cjs/components/select/index.d.ts +0 -1
- package/dist/esm/components/button/Button.js.map +0 -1
- package/dist/esm/components/button/index.d.ts +0 -1
- package/dist/esm/components/checkbox/Checkbox.js.map +0 -1
- package/dist/esm/components/checkbox/index.d.ts +0 -1
- package/dist/esm/components/checkbox-group/CheckboxGroup.js.map +0 -1
- package/dist/esm/components/checkbox-group/index.d.ts +0 -1
- package/dist/esm/components/field/Field.js.map +0 -1
- package/dist/esm/components/field/index.d.ts +0 -1
- package/dist/esm/components/input/Input.js.map +0 -1
- package/dist/esm/components/input/index.d.ts +0 -1
- package/dist/esm/components/radio/Radio.js.map +0 -1
- package/dist/esm/components/radio/index.d.ts +0 -1
- package/dist/esm/components/radio-group/index.d.ts +0 -1
- package/dist/esm/components/select/Select.js.map +0 -1
- package/dist/esm/components/select/index.d.ts +0 -1
- /package/dist/cjs/components/{button/Button.d.ts → button.d.ts} +0 -0
- /package/dist/cjs/components/{radio/Radio.d.ts → radio.d.ts} +0 -0
- /package/dist/esm/components/{button/Button.d.ts → button.d.ts} +0 -0
- /package/dist/esm/components/{radio/Radio.d.ts → radio.d.ts} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var button = require('@base-ui/react/button');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var utils = require('
|
|
5
|
+
var utils = require('../lib/utils.js');
|
|
6
6
|
|
|
7
7
|
function Button({ variant = "primary", size = "md", children, className, ...props }) {
|
|
8
8
|
return (React.createElement(button.Button, { className: utils.cn("font-inherit focus-visible:outline-highlight m-0 flex items-center justify-center gap-2 rounded-lg px-3 py-2 outline-0 select-none focus-visible:outline-2 focus-visible:outline-offset-2 data-disabled:cursor-not-allowed data-disabled:opacity-60", variantStyles[variant], sizeStyles[size], className), focusableWhenDisabled: true, ...props }, children));
|
|
@@ -24,4 +24,4 @@ const sizeStyles = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
exports.Button = Button;
|
|
27
|
-
//# sourceMappingURL=
|
|
27
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../src/components/button.tsx"],"sourcesContent":["import {\n Button as BaseButton,\n ButtonProps as BaseButtonProps,\n} from \"@base-ui/react/button\";\nimport React from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport interface ButtonProps extends BaseButtonProps {\n variant?: ButtonVariant;\n size?: ButtonSize;\n}\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n children,\n className,\n ...props\n}: ButtonProps) {\n return (\n <BaseButton\n className={cn(\n \"font-inherit focus-visible:outline-highlight m-0 flex items-center justify-center gap-2 rounded-lg px-3 py-2 outline-0 select-none focus-visible:outline-2 focus-visible:outline-offset-2 data-disabled:cursor-not-allowed data-disabled:opacity-60\",\n variantStyles[variant],\n sizeStyles[size],\n className,\n )}\n focusableWhenDisabled\n {...props}\n >\n {children}\n </BaseButton>\n );\n}\n\nconst variantStyles = {\n primary:\n \"bg-primary text-on-primary hover:bg-primary/90 active:bg-primary/80\",\n secondary:\n \"bg-secondary text-on-secondary hover:bg-secondary/90 active:bg-secondary/80\",\n muted: \"bg-muted text-on-muted hover:bg-muted/90 active:bg-muted/80\",\n error: \"bg-error text-on-error hover:bg-error/90 active:bg-error/80\",\n success:\n \"bg-success text-on-success hover:bg-success/90 active:bg-success/80\",\n outline:\n \"bg-transparent border text-foreground hover:bg-muted/10 active:bg-muted/20\",\n ghost: \"bg-transparent text-foreground hover:bg-muted/10 active:bg-muted/20\",\n link: \"bg-transparent text-link-foreground hover:underline underline-offset-4\",\n};\n\nconst sizeStyles = {\n sm: \"text-sm\",\n md: \"text-base\",\n lg: \"text-lg\",\n};\n\nexport type ButtonVariant = keyof typeof variantStyles;\nexport type ButtonSize = keyof typeof sizeStyles;\n"],"names":["BaseButton","cn"],"mappings":";;;;;;SAYgB,MAAM,CAAC,EACrB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACI,EAAA;AACZ,IAAA,QACE,KAAA,CAAA,aAAA,CAACA,aAAU,EAAA,EACT,SAAS,EAAEC,QAAE,CACX,qPAAqP,EACrP,aAAa,CAAC,OAAO,CAAC,EACtB,UAAU,CAAC,IAAI,CAAC,EAChB,SAAS,CACV,EACD,qBAAqB,EAAA,IAAA,EAAA,GACjB,KAAK,EAAA,EAER,QAAQ,CACE;AAEjB;AAEA,MAAM,aAAa,GAAG;AACpB,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,SAAS,EACP,6EAA6E;AAC/E,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,OAAO,EACL,4EAA4E;AAC9E,IAAA,KAAK,EAAE,qEAAqE;AAC5E,IAAA,IAAI,EAAE,wEAAwE;CAC/E;AAED,MAAM,UAAU,GAAG;AACjB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,SAAS;CACd;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CheckboxGroupProps as BaseCheckboxGroupProps } from "@base-ui/react/checkbox-group";
|
|
2
2
|
import { FieldsetLegendProps, FieldsetRootProps } from "@base-ui/react/fieldset";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { FieldAttributes } from "
|
|
5
|
-
import { FieldProps } from "
|
|
4
|
+
import { FieldAttributes } from "../lib/types";
|
|
5
|
+
import { FieldProps } from "./field";
|
|
6
6
|
export interface CheckboxGroupProps extends BaseCheckboxGroupProps, FieldAttributes {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
fieldProps?: FieldProps;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var checkboxGroup = require('@base-ui/react/checkbox-group');
|
|
4
4
|
var fieldset = require('@base-ui/react/fieldset');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var utils = require('
|
|
7
|
-
var
|
|
6
|
+
var utils = require('../lib/utils.js');
|
|
7
|
+
var field = require('./field.js');
|
|
8
8
|
|
|
9
9
|
function _interopNamespaceDefault(e) {
|
|
10
10
|
var n = Object.create(null);
|
|
@@ -27,7 +27,7 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
27
27
|
|
|
28
28
|
function CheckboxGroup({ children, label, isValidating, isValidatingMessage, errorMessage, description, fieldProps, fieldsetProps: { className: fieldsetClassName, ...fieldsetProps } = {}, legendProps: { className: legendClassName, ...legendProps } = {}, ...props }) {
|
|
29
29
|
return (React__namespace.createElement(CheckboxGroupContext.Provider, { value: true },
|
|
30
|
-
React__namespace.createElement(
|
|
30
|
+
React__namespace.createElement(field.Field, { isValidating: isValidating, isValidatingMessage: isValidatingMessage, errorMessage: errorMessage, description: description, ...fieldProps },
|
|
31
31
|
React__namespace.createElement(fieldset.Fieldset.Root, { render: React__namespace.createElement(checkboxGroup.CheckboxGroup, { ...props }), className: utils.cn("flex flex-col gap-1", fieldsetClassName), ...fieldsetProps },
|
|
32
32
|
React__namespace.createElement(fieldset.Fieldset.Legend, { className: utils.cn("text-foreground text-sm font-semibold", legendClassName), ...legendProps }, label),
|
|
33
33
|
children))));
|
|
@@ -39,4 +39,4 @@ function useCheckboxGroupContext() {
|
|
|
39
39
|
|
|
40
40
|
exports.CheckboxGroup = CheckboxGroup;
|
|
41
41
|
exports.useCheckboxGroupContext = useCheckboxGroupContext;
|
|
42
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sources":["../../../src/components/checkbox-group.tsx"],"sourcesContent":["import {\n CheckboxGroup as BaseCheckboxGroup,\n CheckboxGroupProps as BaseCheckboxGroupProps,\n} from \"@base-ui/react/checkbox-group\";\nimport {\n Fieldset,\n FieldsetLegendProps,\n FieldsetRootProps,\n} from \"@base-ui/react/fieldset\";\nimport * as React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { Field, FieldProps } from \"./field\";\n\nexport interface CheckboxGroupProps\n extends BaseCheckboxGroupProps, FieldAttributes {\n children?: React.ReactNode;\n fieldProps?: FieldProps;\n fieldsetProps?: FieldsetRootProps;\n legendProps?: FieldsetLegendProps;\n}\n\nexport function CheckboxGroup({\n children,\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n description,\n fieldProps,\n fieldsetProps: { className: fieldsetClassName, ...fieldsetProps } = {},\n legendProps: { className: legendClassName, ...legendProps } = {},\n ...props\n}: CheckboxGroupProps) {\n return (\n <CheckboxGroupContext.Provider value={true}>\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <Fieldset.Root\n render={<BaseCheckboxGroup {...props} />}\n className={cn(\"flex flex-col gap-1\", fieldsetClassName)}\n {...fieldsetProps}\n >\n <Fieldset.Legend\n className={cn(\n \"text-foreground text-sm font-semibold\",\n legendClassName,\n )}\n {...legendProps}\n >\n {label}\n </Fieldset.Legend>\n {children}\n </Fieldset.Root>\n </Field>\n </CheckboxGroupContext.Provider>\n );\n}\n\nconst CheckboxGroupContext = React.createContext<boolean>(false);\n\nexport function useCheckboxGroupContext() {\n return React.useContext(CheckboxGroupContext);\n}\n"],"names":["React","Field","Fieldset","BaseCheckboxGroup","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,SAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,aAAa,EAAE,GAAG,EAAE,EACtE,WAAW,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,WAAW,EAAE,GAAG,EAAE,EAChE,GAAG,KAAK,EACW,EAAA;IACnB,QACEA,+BAAC,oBAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,IAAI,EAAA;AACxC,QAAAA,gBAAA,CAAA,aAAA,CAACC,WAAK,EAAA,EACJ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,KACpB,UAAU,EAAA;YAEdD,gBAAA,CAAA,aAAA,CAACE,iBAAQ,CAAC,IAAI,EAAA,EACZ,MAAM,EAAEF,gBAAA,CAAA,aAAA,CAACG,2BAAiB,EAAA,EAAA,GAAK,KAAK,GAAI,EACxC,SAAS,EAAEC,QAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,EAAA,GACnD,aAAa,EAAA;AAEjB,gBAAAJ,gBAAA,CAAA,aAAA,CAACE,iBAAQ,CAAC,MAAM,EAAA,EACd,SAAS,EAAEE,QAAE,CACX,uCAAuC,EACvC,eAAe,CAChB,EAAA,GACG,WAAW,EAAA,EAEd,KAAK,CACU;AACjB,gBAAA,QAAQ,CACK,CACV,CACsB;AAEpC;AAEA,MAAM,oBAAoB,GAAGJ,gBAAK,CAAC,aAAa,CAAU,KAAK,CAAC;SAEhD,uBAAuB,GAAA;AACrC,IAAA,OAAOA,gBAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC;AAC/C;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CheckboxRootProps as BaseCheckboxRootProps, CheckboxIndicatorProps } from "@base-ui/react/checkbox";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface CheckboxProps extends BaseCheckboxRootProps, Omit<FieldAttributes, "label"> {
|
|
6
6
|
label?: React.ReactNode;
|
|
7
7
|
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var checkbox = require('@base-ui/react/checkbox');
|
|
4
|
-
var field = require('@base-ui/react/field');
|
|
4
|
+
var field$1 = require('@base-ui/react/field');
|
|
5
5
|
var lucideReact = require('lucide-react');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var utils = require('
|
|
8
|
-
var
|
|
9
|
-
var
|
|
7
|
+
var utils = require('../lib/utils.js');
|
|
8
|
+
var checkboxGroup = require('./checkbox-group.js');
|
|
9
|
+
var field = require('./field.js');
|
|
10
10
|
|
|
11
11
|
function Checkbox({ label, className, fieldProps, description, isValidating: _isValidating, isValidatingMessage, errorMessage, labelProps: { className: labelClassName, ...labelProps } = {}, indicatorProps: { className: indicatorClassName, ...indicatorProps } = {}, iconProps: { className: iconClassName, ...iconProps } = {}, ...props }) {
|
|
12
12
|
const labelId = React.useId();
|
|
13
|
-
const isInCheckboxGroup =
|
|
14
|
-
const { isValidating: groupIsValidating } =
|
|
13
|
+
const isInCheckboxGroup = checkboxGroup.useCheckboxGroupContext();
|
|
14
|
+
const { isValidating: groupIsValidating } = field.useFieldContext();
|
|
15
15
|
const isValidating = isInCheckboxGroup ? groupIsValidating : _isValidating;
|
|
16
|
-
const children = (React.createElement(field.Field.Label, { className: utils.cn("text-foreground flex items-center gap-2 text-base", labelClassName), ...labelProps },
|
|
16
|
+
const children = (React.createElement(field$1.Field.Label, { className: utils.cn("text-foreground flex items-center gap-2 text-base", labelClassName), ...labelProps },
|
|
17
17
|
React.createElement(checkbox.Checkbox.Root, { className: utils.cn("data-validating:not-data-invalid:animate-validating data-invalid:border-error-foreground data-invalid:data-checked:bg-error data-invalid:data-checked:border-error data-checked:bg-primary data-checked:border-primary focus-visible:outline-highlight flex size-5 items-center justify-center rounded-sm border outline-offset-2 focus-visible:outline-2", className), "aria-labelledby": labelId, "data-validating": isValidating ? "" : undefined, ...props },
|
|
18
18
|
React.createElement(checkbox.Checkbox.Indicator, { className: utils.cn("text-on-primary data-invalid:border-error data-invalid:bg-error flex data-unchecked:hidden", indicatorClassName), ...indicatorProps },
|
|
19
19
|
React.createElement(lucideReact.CheckIcon, { className: utils.cn("size-4", iconClassName), ...iconProps }))),
|
|
20
20
|
React.createElement("span", { id: labelId }, label)));
|
|
21
21
|
if (isInCheckboxGroup) {
|
|
22
|
-
return React.createElement(field.Field.Item, null, children);
|
|
22
|
+
return React.createElement(field$1.Field.Item, null, children);
|
|
23
23
|
}
|
|
24
|
-
return (React.createElement(
|
|
24
|
+
return (React.createElement(field.Field, { isValidating: isValidating, isValidatingMessage: isValidatingMessage, errorMessage: errorMessage, description: description, ...fieldProps }, children));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
exports.Checkbox = Checkbox;
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["../../../src/components/checkbox.tsx"],"sourcesContent":["import {\n Checkbox as BaseCheckbox,\n CheckboxRootProps as BaseCheckboxRootProps,\n CheckboxIndicatorProps,\n} from \"@base-ui/react/checkbox\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { CheckIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { useCheckboxGroupContext } from \"./checkbox-group\";\nimport { Field, FieldProps, useFieldContext } from \"./field\";\n\nexport interface CheckboxProps\n extends BaseCheckboxRootProps, Omit<FieldAttributes, \"label\"> {\n label?: React.ReactNode;\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;\n indicatorProps?: CheckboxIndicatorProps;\n iconProps?: React.SVGProps<SVGSVGElement>;\n fieldProps?: FieldProps;\n}\n\nexport function Checkbox({\n label,\n className,\n fieldProps,\n description,\n isValidating: _isValidating,\n isValidatingMessage,\n errorMessage,\n labelProps: { className: labelClassName, ...labelProps } = {},\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n ...props\n}: CheckboxProps) {\n const labelId = React.useId();\n const isInCheckboxGroup = useCheckboxGroupContext();\n const { isValidating: groupIsValidating } = useFieldContext();\n const isValidating = isInCheckboxGroup ? groupIsValidating : _isValidating;\n\n const children = (\n <BaseField.Label\n className={cn(\n \"text-foreground flex items-center gap-2 text-base\",\n labelClassName,\n )}\n {...labelProps}\n >\n <BaseCheckbox.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating data-invalid:border-error-foreground data-invalid:data-checked:bg-error data-invalid:data-checked:border-error data-checked:bg-primary data-checked:border-primary focus-visible:outline-highlight flex size-5 items-center justify-center rounded-sm border outline-offset-2 focus-visible:outline-2\",\n className,\n )}\n aria-labelledby={labelId}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseCheckbox.Indicator\n className={cn(\n \"text-on-primary data-invalid:border-error data-invalid:bg-error flex data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n >\n <CheckIcon className={cn(\"size-4\", iconClassName)} {...iconProps} />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n <span id={labelId}>{label}</span>\n </BaseField.Label>\n );\n\n if (isInCheckboxGroup) {\n return <BaseField.Item>{children}</BaseField.Item>;\n }\n\n return (\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n {children}\n </Field>\n );\n}\n"],"names":["useCheckboxGroupContext","useFieldContext","BaseField","cn","BaseCheckbox","CheckIcon","Field"],"mappings":";;;;;;;;;;AAsBM,SAAU,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EAAE,aAAa,EAC3B,mBAAmB,EACnB,YAAY,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,EAC7D,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,SAAS,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,EAC1D,GAAG,KAAK,EACM,EAAA;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B,UAAU,EAAA,EAEb,QAAQ,CACH;AAEZ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldRootProps as BaseFieldRootProps, FieldDescriptionProps, FieldErrorProps, FieldLabelProps } from "@base-ui/react/field";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
4
|
export interface FieldProps extends BaseFieldRootProps, FieldAttributes {
|
|
5
5
|
labelProps?: FieldLabelProps;
|
|
6
6
|
errorMessageProps?: FieldErrorProps;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var field = require('@base-ui/react/field');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var utils = require('
|
|
5
|
+
var utils = require('../lib/utils.js');
|
|
6
6
|
|
|
7
7
|
function Field({ label, isValidating, isValidatingMessage, errorMessage, className, description, children, labelProps: { className: labelClassName, ...labelProps } = {}, errorMessageProps: { className: errorMessageClassName, ...errorMessageProps } = {}, descriptionProps: { className: descriptionClassName, ...descriptionProps } = {}, isValidatingMessageProps: { className: isValidatingMessageClassName, ...isValidatingMessageProps } = {}, ...props }) {
|
|
8
8
|
const invalid = !!errorMessage;
|
|
@@ -24,4 +24,4 @@ function useFieldContext() {
|
|
|
24
24
|
exports.Field = Field;
|
|
25
25
|
exports.FieldContext = FieldContext;
|
|
26
26
|
exports.useFieldContext = useFieldContext;
|
|
27
|
-
//# sourceMappingURL=
|
|
27
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","sources":["../../../src/components/field.tsx"],"sourcesContent":["import {\n Field as BaseField,\n FieldRootProps as BaseFieldRootProps,\n FieldDescriptionProps,\n FieldErrorProps,\n FieldLabelProps,\n} from \"@base-ui/react/field\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\n\nexport interface FieldProps extends BaseFieldRootProps, FieldAttributes {\n labelProps?: FieldLabelProps;\n errorMessageProps?: FieldErrorProps;\n descriptionProps?: FieldDescriptionProps;\n isValidatingMessageProps?: FieldDescriptionProps;\n}\n\nexport function Field({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n children,\n labelProps: { className: labelClassName, ...labelProps } = {},\n errorMessageProps: {\n className: errorMessageClassName,\n ...errorMessageProps\n } = {},\n descriptionProps: {\n className: descriptionClassName,\n ...descriptionProps\n } = {},\n isValidatingMessageProps: {\n className: isValidatingMessageClassName,\n ...isValidatingMessageProps\n } = {},\n ...props\n}: FieldProps) {\n const invalid = !!errorMessage;\n\n return (\n <FieldContext.Provider value={{ isValidating: !!isValidating }}>\n <BaseField.Root\n className={cn(\"flex flex-col gap-1\", className)}\n invalid={invalid}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n {label && (\n <BaseField.Label\n className={cn(\n \"text-foreground text-sm font-semibold\",\n labelClassName,\n )}\n {...labelProps}\n >\n {label}\n </BaseField.Label>\n )}\n {children}\n <BaseField.Error\n className={cn(\"text-error-foreground text-sm\", errorMessageClassName)}\n match={invalid}\n {...errorMessageProps}\n >\n {errorMessage}\n </BaseField.Error>\n {isValidating && isValidatingMessage && !errorMessage && (\n <BaseField.Description\n className={cn(\n \"text-primary-foreground animate-validating-message text-sm\",\n isValidatingMessageClassName,\n )}\n {...isValidatingMessageProps}\n >\n {isValidatingMessage}\n </BaseField.Description>\n )}\n {description && (\n <BaseField.Description\n className={cn(\n \"text-muted-foreground text-sm\",\n descriptionClassName,\n )}\n {...descriptionProps}\n >\n {description}\n </BaseField.Description>\n )}\n </BaseField.Root>\n </FieldContext.Provider>\n );\n}\n\nexport const FieldContext = React.createContext({\n isValidating: false,\n});\n\nexport function useFieldContext() {\n return React.useContext(FieldContext);\n}\n"],"names":["BaseField","cn"],"mappings":";;;;;;AAkBM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,E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AA,EACpB,SAAS,EAAEC,QAAE,CACX,4DAA4D,EAC5D,4BAA4B,CAC7B,EAAA,GACG,wBAAwB,EAAA,EAE3B,mBAAmB,CACE,CACzB;YACA,WAAW,KACV,KAAA,CAAA,aAAA,CAACD,WAAS,CAAC,WAAW,EAAA,EACpB,SAAS,EAAEC,QAAE,CACX,+BAA+B,EAC/B,oBAAoB,CACrB,EAAA,GACG,gBAAgB,EAAA,EAEnB,WAAW,CACU,CACzB,CACc,CACK;AAE5B;AAEO,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC;AAC9C,IAAA,YAAY,EAAE,KAAK;AACpB,CAAA;SAEe,eAAe,GAAA;AAC7B,IAAA,OAAO,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC;AACvC;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputProps as BaseInputProps } from "@base-ui/react/input";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface InputProps extends BaseInputProps, FieldAttributes {
|
|
6
6
|
fieldProps?: FieldProps;
|
|
7
7
|
button?: React.ReactNode;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var input = require('@base-ui/react/input');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var utils = require('
|
|
6
|
-
var
|
|
5
|
+
var utils = require('../lib/utils.js');
|
|
6
|
+
var field = require('./field.js');
|
|
7
7
|
|
|
8
8
|
function Input({ label, isValidating, isValidatingMessage, errorMessage, className, description, fieldProps, button, ...props }) {
|
|
9
|
-
return (React.createElement(
|
|
9
|
+
return (React.createElement(field.Field, { label: label, isValidating: isValidating, isValidatingMessage: isValidatingMessage, errorMessage: errorMessage, description: description, ...fieldProps },
|
|
10
10
|
React.createElement("div", { className: "flex items-stretch gap-2" },
|
|
11
11
|
React.createElement(input.Input, { className: utils.cn("data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating focus:border-highlight placeholder:text-muted-foreground focus:inset-shadow-muted/50 w-full min-w-40 rounded-lg border p-2 transition-colors outline-none focus:inset-shadow-sm", className), "data-validating": isValidating ? "" : undefined, ...props }),
|
|
12
12
|
button)));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
exports.Input = Input;
|
|
16
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../src/components/input.tsx"],"sourcesContent":["import {\n Input as BaseInput,\n InputProps as BaseInputProps,\n} from \"@base-ui/react/input\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { Field, FieldProps } from \"./field\";\n\nexport interface InputProps extends BaseInputProps, FieldAttributes {\n fieldProps?: FieldProps;\n button?: React.ReactNode;\n}\n\nexport function Input({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n button,\n ...props\n}: InputProps) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <div className=\"flex items-stretch gap-2\">\n <BaseInput\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating focus:border-highlight placeholder:text-muted-foreground focus:inset-shadow-muted/50 w-full min-w-40 rounded-lg border p-2 transition-colors outline-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n />\n {button}\n </div>\n </Field>\n );\n}\n"],"names":["Field","BaseInput","cn"],"mappings":";;;;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,MAAM,EACN,GAAG,KAAK,EACG,EAAA;IACX,QACE,KAAA,CAAA,aAAA,CAACA,WAAK,EAAA,EACJ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,UAAU,EAAA;QAEd,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,EAAA;YACvC,KAAA,CAAA,aAAA,CAACC,WAAS,IACR,SAAS,EAAEC,QAAE,CACX,oRAAoR,EACpR,SAAS,CACV,EAAA,iBAAA,EACgB,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA,CACT;YACD,MAAM,CACH,CACA;AAEZ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RadioGroupProps as BaseRadioGroupProps } from "@base-ui/react";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface RadioGroupProps extends BaseRadioGroupProps, FieldAttributes {
|
|
6
6
|
fieldProps?: FieldProps;
|
|
7
7
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var radio = require('@base-ui/react/radio');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var utils = require('
|
|
6
|
-
var
|
|
5
|
+
var utils = require('../lib/utils.js');
|
|
6
|
+
var field = require('./field.js');
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
var n = Object.create(null);
|
|
@@ -26,7 +26,7 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
26
26
|
|
|
27
27
|
function Radio({ label, indicatorProps: { className: indicatorClassName, ...indicatorProps } = {}, ...props }) {
|
|
28
28
|
const id = React__namespace.useId();
|
|
29
|
-
const { isValidating } =
|
|
29
|
+
const { isValidating } = field.useFieldContext();
|
|
30
30
|
return (React__namespace.createElement("label", { className: "flex items-center gap-2", id: id },
|
|
31
31
|
React__namespace.createElement(radio.Radio.Root, { className: utils.cn("data-validating:not-data-invalid:animate-validating focus-visible:outline-highlight data-checked:border-primary-foreground data-invalid:border-error-foreground flex size-5 items-center justify-center rounded-full border focus-visible:outline-2 focus-visible:outline-offset-2"), "aria-labelledby": id, "data-validating": isValidating ? "" : undefined, ...props },
|
|
32
32
|
React__namespace.createElement(radio.Radio.Indicator, { className: utils.cn("before:bg-primary data-invalid:before:bg-error flex before:size-3 before:rounded-full data-unchecked:hidden", indicatorClassName), ...indicatorProps })),
|
|
@@ -34,4 +34,4 @@ function Radio({ label, indicatorProps: { className: indicatorClassName, ...indi
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
exports.Radio = Radio;
|
|
37
|
-
//# sourceMappingURL=
|
|
37
|
+
//# sourceMappingURL=radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../src/components/radio.tsx"],"sourcesContent":["import {\n Radio as BaseRadio,\n RadioIndicatorProps,\n RadioRootProps,\n} from \"@base-ui/react/radio\";\nimport * as React from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useFieldContext } from \"./field\";\n\nexport interface RadioProps extends RadioRootProps {\n label?: React.ReactNode;\n indicatorProps?: RadioIndicatorProps;\n}\n\nexport function Radio({\n label,\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n ...props\n}: RadioProps) {\n const id = React.useId();\n const { isValidating } = useFieldContext();\n\n return (\n <label className=\"flex items-center gap-2\" id={id}>\n <BaseRadio.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating focus-visible:outline-highlight data-checked:border-primary-foreground data-invalid:border-error-foreground flex size-5 items-center justify-center rounded-full border focus-visible:outline-2 focus-visible:outline-offset-2\",\n )}\n aria-labelledby={id}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseRadio.Indicator\n className={cn(\n \"before:bg-primary data-invalid:before:bg-error flex before:size-3 before:rounded-full data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n />\n </BaseRadio.Root>\n {label}\n </label>\n );\n}\n"],"names":["React","useFieldContext","BaseRadio","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,GAAG,KAAK,EACG,EAAA;AACX,IAAA,MAAM,EAAE,GAAGA,gBAAK,CAAC,KAAK,EAAE;AACxB,IAAA,MAAM,EAAE,YAAY,EAAE,GAAGC,qBAAe,EAAE;IAE1C,QACED,0CAAO,SAAS,EAAC,yBAAyB,EAAC,EAAE,EAAE,EAAE,EAAA;QAC/CA,gBAAA,CAAA,aAAA,CAACE,WAAS,CAAC,IAAI,EAAA,EACb,SAAS,EAAEC,QAAE,CACX,oRAAoR,CACrR,EAAA,iBAAA,EACgB,EAAE,EAAA,iBAAA,EACF,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;AAET,YAAAH,gBAAA,CAAA,aAAA,CAACE,WAAS,CAAC,SAAS,EAAA,EAClB,SAAS,EAAEC,QAAE,CACX,6GAA6G,EAC7G,kBAAkB,CACnB,EAAA,GACG,cAAc,GAClB,CACa;QAChB,KAAK,CACA;AAEZ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectIconProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectListProps, SelectPopupProps, SelectPortalProps, SelectPositionerProps, SelectRootProps, SelectScrollDownArrowProps, SelectScrollUpArrowProps, SelectTriggerProps, SelectValueProps } from "@base-ui/react/select";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface SelectProps<T> extends Omit<SelectTriggerProps, "value">, SelectRootProps<T>, FieldAttributes {
|
|
6
6
|
placeholder?: React.ReactNode;
|
|
7
7
|
triggerDisabled?: SelectTriggerProps["disabled"];
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var select = require('@base-ui/react/select');
|
|
4
4
|
var lucideReact = require('lucide-react');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var utils = require('
|
|
7
|
-
var
|
|
6
|
+
var utils = require('../lib/utils.js');
|
|
7
|
+
var field = require('./field.js');
|
|
8
8
|
|
|
9
9
|
function Select({ label, isValidating, isValidatingMessage, errorMessage, className, description, fieldProps, items, placeholder, actionsRef, autoComplete, defaultOpen, defaultValue, disabled, highlightItemOnHover, id, inputRef, isItemEqualToValue, itemToStringLabel, itemToStringValue, modal, multiple, name, onOpenChange, onOpenChangeComplete, onValueChange, open, readOnly, required, value, triggerDisabled, triggerId, triggerName, triggerValue, valueProps: { className: valueClassName, ...valueProps } = {}, selectIconProps: { className: selectIconClassName, ...selectIconProps } = {}, iconProps: { className: iconClassName, ...iconProps } = {}, portalProps, positionerProps: { className: positionerClassName, ...positionerProps } = {}, popupProps: { className: popupClassName, ...popupProps } = {}, scrollUpArrowProps: { className: scrollUpArrowClassName, ...scrollUpArrowProps } = {}, listProps: { className: listClassName, ...listProps } = {}, itemProps: { className: itemClassName, ...itemProps } = {}, itemIndicatorProps: { className: itemIndicatorClassName, ...itemIndicatorProps } = {}, checkIconProps: { className: checkIconClassName, ...checkIconProps } = {}, itemTextProps: { className: itemTextClassName, ...itemTextProps } = {}, scrollDownArrowProps: { className: scrollDownArrowClassName, ...scrollDownArrowProps } = {}, ...props }) {
|
|
10
|
-
return (React.createElement(
|
|
10
|
+
return (React.createElement(field.Field, { label: label, isValidating: isValidating, isValidatingMessage: isValidatingMessage, errorMessage: errorMessage, description: description, ...fieldProps },
|
|
11
11
|
React.createElement(select.Select.Root, { items: items, actionsRef: actionsRef, autoComplete: autoComplete, defaultOpen: defaultOpen, defaultValue: defaultValue, disabled: disabled, highlightItemOnHover: highlightItemOnHover, id: id, inputRef: inputRef, isItemEqualToValue: isItemEqualToValue, itemToStringLabel: itemToStringLabel, itemToStringValue: itemToStringValue, modal: modal, multiple: multiple, name: name, onOpenChange: onOpenChange, onOpenChangeComplete: onOpenChangeComplete, onValueChange: onValueChange, open: open, readOnly: readOnly, required: required, value: value },
|
|
12
12
|
React.createElement(select.Select.Trigger, { className: utils.cn("data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating hover:bg-card data-popup-open:bg-card focus-visible:border-highlight focus:inset-shadow-muted/50 flex min-w-40 items-center justify-between gap-3 rounded-lg border p-2 text-base transition-colors outline-none select-none focus:inset-shadow-sm", className), "data-validating": isValidating ? "" : undefined, disabled: triggerDisabled, id: triggerId, name: triggerName, value: triggerValue, ...props },
|
|
13
13
|
React.createElement(select.Select.Value, { className: utils.cn("data-placeholder:opacity-60", valueClassName), placeholder: placeholder, ...valueProps }),
|
|
@@ -26,4 +26,4 @@ function Select({ label, isValidating, isValidatingMessage, errorMessage, classN
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
exports.Select = Select;
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../../../src/components/select.tsx"],"sourcesContent":["import {\n Select as BaseSelect,\n SelectIconProps,\n SelectItemIndicatorProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectListProps,\n SelectPopupProps,\n SelectPortalProps,\n SelectPositionerProps,\n SelectRootProps,\n SelectScrollDownArrowProps,\n SelectScrollUpArrowProps,\n SelectTriggerProps,\n SelectValueProps,\n} from \"@base-ui/react/select\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { Field, FieldProps } from \"./field\";\n\nexport interface SelectProps<T>\n extends\n Omit<SelectTriggerProps, \"value\">,\n SelectRootProps<T>,\n FieldAttributes {\n placeholder?: React.ReactNode;\n triggerDisabled?: SelectTriggerProps[\"disabled\"];\n triggerId?: SelectTriggerProps[\"id\"];\n triggerName?: SelectTriggerProps[\"name\"];\n triggerValue?: SelectTriggerProps[\"value\"];\n fieldProps?: FieldProps;\n triggerProps?: SelectTriggerProps;\n valueProps?: SelectValueProps;\n selectIconProps?: SelectIconProps;\n iconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n portalProps?: SelectPortalProps;\n positionerProps?: SelectPositionerProps;\n popupProps?: SelectPopupProps;\n scrollUpArrowProps?: SelectScrollUpArrowProps;\n listProps?: SelectListProps;\n itemProps?: SelectItemProps;\n itemIndicatorProps?: SelectItemIndicatorProps;\n checkIconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n itemTextProps?: SelectItemTextProps;\n scrollDownArrowProps?: SelectScrollDownArrowProps;\n}\n\nexport function Select<T>({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n items,\n placeholder,\n actionsRef,\n autoComplete,\n defaultOpen,\n defaultValue,\n disabled,\n highlightItemOnHover,\n id,\n inputRef,\n isItemEqualToValue,\n itemToStringLabel,\n itemToStringValue,\n modal,\n multiple,\n name,\n onOpenChange,\n onOpenChangeComplete,\n onValueChange,\n open,\n readOnly,\n required,\n value,\n triggerDisabled,\n triggerId,\n triggerName,\n triggerValue,\n valueProps: { className: valueClassName, ...valueProps } = {},\n selectIconProps: { className: selectIconClassName, ...selectIconProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n portalProps,\n positionerProps: { className: positionerClassName, ...positionerProps } = {},\n popupProps: { className: popupClassName, ...popupProps } = {},\n scrollUpArrowProps: {\n className: scrollUpArrowClassName,\n ...scrollUpArrowProps\n } = {},\n listProps: { className: listClassName, ...listProps } = {},\n itemProps: { className: itemClassName, ...itemProps } = {},\n itemIndicatorProps: {\n className: itemIndicatorClassName,\n ...itemIndicatorProps\n } = {},\n checkIconProps: { className: checkIconClassName, ...checkIconProps } = {},\n itemTextProps: { className: itemTextClassName, ...itemTextProps } = {},\n scrollDownArrowProps: {\n className: scrollDownArrowClassName,\n ...scrollDownArrowProps\n } = {},\n ...props\n}: SelectProps<T>) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <BaseSelect.Root\n items={items}\n actionsRef={actionsRef}\n autoComplete={autoComplete}\n defaultOpen={defaultOpen}\n defaultValue={defaultValue}\n disabled={disabled}\n highlightItemOnHover={highlightItemOnHover}\n id={id}\n inputRef={inputRef}\n isItemEqualToValue={isItemEqualToValue}\n itemToStringLabel={itemToStringLabel}\n itemToStringValue={itemToStringValue}\n modal={modal}\n multiple={multiple}\n name={name}\n onOpenChange={onOpenChange}\n onOpenChangeComplete={onOpenChangeComplete}\n onValueChange={onValueChange}\n open={open}\n readOnly={readOnly}\n required={required}\n value={value}\n >\n <BaseSelect.Trigger\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating hover:bg-card data-popup-open:bg-card focus-visible:border-highlight focus:inset-shadow-muted/50 flex min-w-40 items-center justify-between gap-3 rounded-lg border p-2 text-base transition-colors outline-none select-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n disabled={triggerDisabled}\n id={triggerId}\n name={triggerName}\n value={triggerValue}\n {...props}\n >\n <BaseSelect.Value\n className={cn(\"data-placeholder:opacity-60\", valueClassName)}\n placeholder={placeholder}\n {...valueProps}\n />\n <BaseSelect.Icon\n className={cn(\"flex\", selectIconClassName)}\n {...selectIconProps}\n >\n <ChevronsUpDown\n className={cn(\"size-4\", iconClassName)}\n {...iconProps}\n />\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n <BaseSelect.Portal {...portalProps}>\n <BaseSelect.Positioner\n className={cn(\"z-10 outline-none select-none\", positionerClassName)}\n sideOffset={8}\n {...positionerProps}\n >\n <BaseSelect.Popup\n className={cn(\n \"group bg-background outline-border min-w-(--anchor-width) origin-(--transform-origin) rounded-lg bg-clip-padding shadow-lg outline transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] data-[side=none]:data-ending-style:transition-none data-[side=none]:data-starting-style:scale-100 data-[side=none]:data-starting-style:opacity-100 data-[side=none]:data-starting-style:transition-none\",\n popupClassName,\n )}\n {...popupProps}\n >\n <BaseSelect.ScrollUpArrow\n className={cn(\n \"bg-background top-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-top-full\",\n scrollUpArrowClassName,\n )}\n {...scrollUpArrowProps}\n />\n <BaseSelect.List\n className={cn(\n \"relative max-h-(--available-height) scroll-py-6 overflow-y-auto py-1\",\n listClassName,\n )}\n {...listProps}\n >\n {Array.isArray(items) &&\n items.map(({ label, value }) => (\n <BaseSelect.Item\n key={String(value)}\n value={value}\n className={cn(\n \"data-highlighted:before:bg-primary data-highlighted:text-on-primary grid cursor-default grid-cols-[0.75rem_1fr] items-center gap-2 py-2 pr-4 pl-2.5 text-sm leading-4 outline-none select-none group-data-[side=none]:pr-12 group-data-[side=none]:text-base group-data-[side=none]:leading-4 data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-1 data-highlighted:before:inset-y-0 data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm pointer-coarse:py-2.5 pointer-coarse:text-[0.925rem]\",\n itemClassName,\n )}\n {...itemProps}\n >\n <BaseSelect.ItemIndicator\n className={cn(\"col-start-1\", itemIndicatorClassName)}\n {...itemIndicatorProps}\n >\n <Check\n className={cn(\"size-3\", checkIconClassName)}\n {...checkIconProps}\n />\n </BaseSelect.ItemIndicator>\n <BaseSelect.ItemText\n className={cn(\"col-start-2\", itemTextClassName)}\n {...itemTextProps}\n >\n {label}\n </BaseSelect.ItemText>\n </BaseSelect.Item>\n ))}\n </BaseSelect.List>\n <BaseSelect.ScrollDownArrow\n className={cn(\n \"bg-background bottom-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-bottom-full\",\n scrollDownArrowClassName,\n )}\n {...scrollDownArrowProps}\n />\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n </BaseSelect.Root>\n </Field>\n );\n}\n"],"names":["Field","BaseSelect","cn","ChevronsUpDown","Check"],"mappings":";;;;;;;;AAiDM,SAAU,MAAM,CAAI,EACxB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,oBAAoB,EACpB,EAAE,EACF,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,EAC7D,eAAe,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,GAAG,eAAe,EAAE,GAAG,EAAE,EAC5E,SAAS,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,EAC1D,WAAW,EACX,e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,KAAK,CACc,CACN,CACnB,CAAC,CACY;wBAClB,KAAA,CAAA,aAAA,CAACD,aAAU,CAAC,eAAe,EAAA,EACzB,SAAS,EAAEC,QAAE,CACX,yOAAyO,EACzO,wBAAwB,CACzB,EAAA,GACG,oBAAoB,EAAA,CACxB,CACe,CACG,CACN,CACJ,CACZ;AAEZ;;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var button = require('./components/button.js');
|
|
4
|
+
var checkbox = require('./components/checkbox.js');
|
|
5
|
+
var checkboxGroup = require('./components/checkbox-group.js');
|
|
6
|
+
var field = require('./components/field.js');
|
|
7
|
+
var input = require('./components/input.js');
|
|
8
|
+
var radio = require('./components/radio.js');
|
|
9
|
+
var select = require('./components/select.js');
|
|
10
10
|
var utils = require('./lib/utils.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.Button =
|
|
15
|
-
exports.Checkbox =
|
|
16
|
-
exports.CheckboxGroup =
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
14
|
+
exports.Button = button.Button;
|
|
15
|
+
exports.Checkbox = checkbox.Checkbox;
|
|
16
|
+
exports.CheckboxGroup = checkboxGroup.CheckboxGroup;
|
|
17
|
+
exports.useCheckboxGroupContext = checkboxGroup.useCheckboxGroupContext;
|
|
18
|
+
exports.Field = field.Field;
|
|
19
|
+
exports.FieldContext = field.FieldContext;
|
|
20
|
+
exports.useFieldContext = field.useFieldContext;
|
|
21
|
+
exports.Input = input.Input;
|
|
22
|
+
exports.Radio = radio.Radio;
|
|
23
|
+
exports.Select = select.Select;
|
|
21
24
|
exports.cn = utils.cn;
|
|
22
25
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button as Button$1 } from '@base-ui/react/button';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
4
|
|
|
5
5
|
function Button({ variant = "primary", size = "md", children, className, ...props }) {
|
|
6
6
|
return (React__default.createElement(Button$1, { className: cn("font-inherit focus-visible:outline-highlight m-0 flex items-center justify-center gap-2 rounded-lg px-3 py-2 outline-0 select-none focus-visible:outline-2 focus-visible:outline-offset-2 data-disabled:cursor-not-allowed data-disabled:opacity-60", variantStyles[variant], sizeStyles[size], className), focusableWhenDisabled: true, ...props }, children));
|
|
@@ -22,4 +22,4 @@ const sizeStyles = {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export { Button };
|
|
25
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../src/components/button.tsx"],"sourcesContent":["import {\n Button as BaseButton,\n ButtonProps as BaseButtonProps,\n} from \"@base-ui/react/button\";\nimport React from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport interface ButtonProps extends BaseButtonProps {\n variant?: ButtonVariant;\n size?: ButtonSize;\n}\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n children,\n className,\n ...props\n}: ButtonProps) {\n return (\n <BaseButton\n className={cn(\n \"font-inherit focus-visible:outline-highlight m-0 flex items-center justify-center gap-2 rounded-lg px-3 py-2 outline-0 select-none focus-visible:outline-2 focus-visible:outline-offset-2 data-disabled:cursor-not-allowed data-disabled:opacity-60\",\n variantStyles[variant],\n sizeStyles[size],\n className,\n )}\n focusableWhenDisabled\n {...props}\n >\n {children}\n </BaseButton>\n );\n}\n\nconst variantStyles = {\n primary:\n \"bg-primary text-on-primary hover:bg-primary/90 active:bg-primary/80\",\n secondary:\n \"bg-secondary text-on-secondary hover:bg-secondary/90 active:bg-secondary/80\",\n muted: \"bg-muted text-on-muted hover:bg-muted/90 active:bg-muted/80\",\n error: \"bg-error text-on-error hover:bg-error/90 active:bg-error/80\",\n success:\n \"bg-success text-on-success hover:bg-success/90 active:bg-success/80\",\n outline:\n \"bg-transparent border text-foreground hover:bg-muted/10 active:bg-muted/20\",\n ghost: \"bg-transparent text-foreground hover:bg-muted/10 active:bg-muted/20\",\n link: \"bg-transparent text-link-foreground hover:underline underline-offset-4\",\n};\n\nconst sizeStyles = {\n sm: \"text-sm\",\n md: \"text-base\",\n lg: \"text-lg\",\n};\n\nexport type ButtonVariant = keyof typeof variantStyles;\nexport type ButtonSize = keyof typeof sizeStyles;\n"],"names":["React","BaseButton"],"mappings":";;;;SAYgB,MAAM,CAAC,EACrB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACI,EAAA;AACZ,IAAA,QACEA,cAAA,CAAA,aAAA,CAACC,QAAU,EAAA,EACT,SAAS,EAAE,EAAE,CACX,qPAAqP,EACrP,aAAa,CAAC,OAAO,CAAC,EACtB,UAAU,CAAC,IAAI,CAAC,EAChB,SAAS,CACV,EACD,qBAAqB,EAAA,IAAA,EAAA,GACjB,KAAK,EAAA,EAER,QAAQ,CACE;AAEjB;AAEA,MAAM,aAAa,GAAG;AACpB,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,SAAS,EACP,6EAA6E;AAC/E,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,OAAO,EACL,4EAA4E;AAC9E,IAAA,KAAK,EAAE,qEAAqE;AAC5E,IAAA,IAAI,EAAE,wEAAwE;CAC/E;AAED,MAAM,UAAU,GAAG;AACjB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,SAAS;CACd;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CheckboxGroupProps as BaseCheckboxGroupProps } from "@base-ui/react/checkbox-group";
|
|
2
2
|
import { FieldsetLegendProps, FieldsetRootProps } from "@base-ui/react/fieldset";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { FieldAttributes } from "
|
|
5
|
-
import { FieldProps } from "
|
|
4
|
+
import { FieldAttributes } from "../lib/types";
|
|
5
|
+
import { FieldProps } from "./field";
|
|
6
6
|
export interface CheckboxGroupProps extends BaseCheckboxGroupProps, FieldAttributes {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
fieldProps?: FieldProps;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CheckboxGroup as CheckboxGroup$1 } from '@base-ui/react/checkbox-group';
|
|
2
2
|
import { Fieldset } from '@base-ui/react/fieldset';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { cn } from '
|
|
5
|
-
import { Field } from '
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
import { Field } from './field.js';
|
|
6
6
|
|
|
7
7
|
function CheckboxGroup({ children, label, isValidating, isValidatingMessage, errorMessage, description, fieldProps, fieldsetProps: { className: fieldsetClassName, ...fieldsetProps } = {}, legendProps: { className: legendClassName, ...legendProps } = {}, ...props }) {
|
|
8
8
|
return (React.createElement(CheckboxGroupContext.Provider, { value: true },
|
|
@@ -17,4 +17,4 @@ function useCheckboxGroupContext() {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export { CheckboxGroup, useCheckboxGroupContext };
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sources":["../../../src/components/checkbox-group.tsx"],"sourcesContent":["import {\n CheckboxGroup as BaseCheckboxGroup,\n CheckboxGroupProps as BaseCheckboxGroupProps,\n} from \"@base-ui/react/checkbox-group\";\nimport {\n Fieldset,\n FieldsetLegendProps,\n FieldsetRootProps,\n} from \"@base-ui/react/fieldset\";\nimport * as React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { Field, FieldProps } from \"./field\";\n\nexport interface CheckboxGroupProps\n extends BaseCheckboxGroupProps, FieldAttributes {\n children?: React.ReactNode;\n fieldProps?: FieldProps;\n fieldsetProps?: FieldsetRootProps;\n legendProps?: FieldsetLegendProps;\n}\n\nexport function CheckboxGroup({\n children,\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n description,\n fieldProps,\n fieldsetProps: { className: fieldsetClassName, ...fieldsetProps } = {},\n legendProps: { className: legendClassName, ...legendProps } = {},\n ...props\n}: CheckboxGroupProps) {\n return (\n <CheckboxGroupContext.Provider value={true}>\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <Fieldset.Root\n render={<BaseCheckboxGroup {...props} />}\n className={cn(\"flex flex-col gap-1\", fieldsetClassName)}\n {...fieldsetProps}\n >\n <Fieldset.Legend\n className={cn(\n \"text-foreground text-sm font-semibold\",\n legendClassName,\n )}\n {...legendProps}\n >\n {label}\n </Fieldset.Legend>\n {children}\n </Fieldset.Root>\n </Field>\n </CheckboxGroupContext.Provider>\n );\n}\n\nconst CheckboxGroupContext = React.createContext<boolean>(false);\n\nexport function useCheckboxGroupContext() {\n return React.useContext(CheckboxGroupContext);\n}\n"],"names":["BaseCheckboxGroup"],"mappings":";;;;;;AAsBM,SAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,aAAa,EAAE,GAAG,EAAE,EACtE,WAAW,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,WAAW,EAAE,GAAG,EAAE,EAChE,GAAG,KAAK,EACW,EAAA;IACnB,QACE,oBAAC,oBAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,IAAI,EAAA;AACxC,QAAA,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EACJ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,KACpB,UAAU,EAAA;YAEd,KAAA,CAAA,aAAA,CAAC,QAAQ,CAAC,IAAI,EAAA,EACZ,MAAM,EAAE,KAAA,CAAA,aAAA,CAACA,eAAiB,EAAA,EAAA,GAAK,KAAK,GAAI,EACxC,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,EAAA,GACnD,aAAa,EAAA;AAEjB,gBAAA,KAAA,CAAA,aAAA,CAAC,QAAQ,CAAC,MAAM,EAAA,EACd,SAAS,EAAE,EAAE,CACX,uCAAuC,EACvC,eAAe,CAChB,EAAA,GACG,WAAW,EAAA,EAEd,KAAK,CACU;AACjB,gBAAA,QAAQ,CACK,CACV,CACsB;AAEpC;AAEA,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAU,KAAK,CAAC;SAEhD,uBAAuB,GAAA;AACrC,IAAA,OAAO,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC;AAC/C;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CheckboxRootProps as BaseCheckboxRootProps, CheckboxIndicatorProps } from "@base-ui/react/checkbox";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface CheckboxProps extends BaseCheckboxRootProps, Omit<FieldAttributes, "label"> {
|
|
6
6
|
label?: React.ReactNode;
|
|
7
7
|
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;
|
|
@@ -2,9 +2,9 @@ import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
|
|
|
2
2
|
import { Field } from '@base-ui/react/field';
|
|
3
3
|
import { CheckIcon } from 'lucide-react';
|
|
4
4
|
import React__default from 'react';
|
|
5
|
-
import { cn } from '
|
|
6
|
-
import { useCheckboxGroupContext } from '
|
|
7
|
-
import { useFieldContext, Field as Field$1 } from '
|
|
5
|
+
import { cn } from '../lib/utils.js';
|
|
6
|
+
import { useCheckboxGroupContext } from './checkbox-group.js';
|
|
7
|
+
import { useFieldContext, Field as Field$1 } from './field.js';
|
|
8
8
|
|
|
9
9
|
function Checkbox({ label, className, fieldProps, description, isValidating: _isValidating, isValidatingMessage, errorMessage, labelProps: { className: labelClassName, ...labelProps } = {}, indicatorProps: { className: indicatorClassName, ...indicatorProps } = {}, iconProps: { className: iconClassName, ...iconProps } = {}, ...props }) {
|
|
10
10
|
const labelId = React__default.useId();
|
|
@@ -23,4 +23,4 @@ function Checkbox({ label, className, fieldProps, description, isValidating: _is
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export { Checkbox };
|
|
26
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["../../../src/components/checkbox.tsx"],"sourcesContent":["import {\n Checkbox as BaseCheckbox,\n CheckboxRootProps as BaseCheckboxRootProps,\n CheckboxIndicatorProps,\n} from \"@base-ui/react/checkbox\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { CheckIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { useCheckboxGroupContext } from \"./checkbox-group\";\nimport { Field, FieldProps, useFieldContext } from \"./field\";\n\nexport interface CheckboxProps\n extends BaseCheckboxRootProps, Omit<FieldAttributes, \"label\"> {\n label?: React.ReactNode;\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;\n indicatorProps?: CheckboxIndicatorProps;\n iconProps?: React.SVGProps<SVGSVGElement>;\n fieldProps?: FieldProps;\n}\n\nexport function Checkbox({\n label,\n className,\n fieldProps,\n description,\n isValidating: _isValidating,\n isValidatingMessage,\n errorMessage,\n labelProps: { className: labelClassName, ...labelProps } = {},\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n ...props\n}: CheckboxProps) {\n const labelId = React.useId();\n const isInCheckboxGroup = useCheckboxGroupContext();\n const { isValidating: groupIsValidating } = useFieldContext();\n const isValidating = isInCheckboxGroup ? groupIsValidating : _isValidating;\n\n const children = (\n <BaseField.Label\n className={cn(\n \"text-foreground flex items-center gap-2 text-base\",\n labelClassName,\n )}\n {...labelProps}\n >\n <BaseCheckbox.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating data-invalid:border-error-foreground data-invalid:data-checked:bg-error data-invalid:data-checked:border-error data-checked:bg-primary data-checked:border-primary focus-visible:outline-highlight flex size-5 items-center justify-center rounded-sm border outline-offset-2 focus-visible:outline-2\",\n className,\n )}\n aria-labelledby={labelId}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseCheckbox.Indicator\n className={cn(\n \"text-on-primary data-invalid:border-error data-invalid:bg-error flex data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n >\n <CheckIcon className={cn(\"size-4\", iconClassName)} {...iconProps} />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n <span id={labelId}>{label}</span>\n </BaseField.Label>\n );\n\n if (isInCheckboxGroup) {\n return <BaseField.Item>{children}</BaseField.Item>;\n }\n\n return (\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n {children}\n </Field>\n );\n}\n"],"names":["React","BaseField","BaseCheckbox","Field"],"mappings":";;;;;;;;AAsBM,SAAU,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EAAE,aAAa,EAC3B,mBAAmB,EACnB,YAAY,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,EAC7D,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,SAAS,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,EAC1D,GAAG,KAAK,EACM,EAAA;AACd,IAAA,MAAM,OAAO,GAAGA,cAAK,CAAC,KAAK,EAAE;AAC7B,IAAA,MAAM,iBAAiB,GAAG,uBAAuB,EAAE;IACnD,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAG,eAAe,EAAE;IAC7D,MAAM,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,aAAa;AAE1E,IAAA,MAAM,QAAQ,IACZA,cAAA,CAAA,aAAA,CAACC,KAAS,CAAC,KAAK,EAAA,EACd,SAAS,EAAE,EAAE,CACX,mDAAmD,EACnD,cAAc,CACf,KACG,UAAU,EAAA;QAEdD,cAAA,CAAA,aAAA,CAACE,UAAY,CAAC,IAAI,EAAA,EAChB,SAAS,EAAE,EAAE,CACX,2VAA2V,EAC3V,SAAS,CACV,qBACgB,OAAO,EAAA,iBAAA,EACP,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;AAET,YAAAF,cAAA,CAAA,aAAA,CAACE,UAAY,CAAC,SAAS,EAAA,EACrB,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,kBAAkB,CACnB,KACG,cAAc,EAAA;AAElB,gBAAAF,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAA,GAAM,SAAS,EAAA,CAAI,CAC7C,CACP;QACpBA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,OAAO,EAAA,EAAG,KAAK,CAAQ,CACjB,CACnB;IAED,IAAI,iBAAiB,EAAE;AACrB,QAAA,OAAOA,6BAACC,KAAS,CAAC,IAAI,EAAA,IAAA,EAAE,QAAQ,CAAkB;IACpD;IAEA,QACED,cAAA,CAAA,aAAA,CAACG,OAAK,EAAA,EACJ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,UAAU,EAAA,EAEb,QAAQ,CACH;AAEZ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldRootProps as BaseFieldRootProps, FieldDescriptionProps, FieldErrorProps, FieldLabelProps } from "@base-ui/react/field";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
4
|
export interface FieldProps extends BaseFieldRootProps, FieldAttributes {
|
|
5
5
|
labelProps?: FieldLabelProps;
|
|
6
6
|
errorMessageProps?: FieldErrorProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Field as Field$1 } from '@base-ui/react/field';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
4
|
|
|
5
5
|
function Field({ label, isValidating, isValidatingMessage, errorMessage, className, description, children, labelProps: { className: labelClassName, ...labelProps } = {}, errorMessageProps: { className: errorMessageClassName, ...errorMessageProps } = {}, descriptionProps: { className: descriptionClassName, ...descriptionProps } = {}, isValidatingMessageProps: { className: isValidatingMessageClassName, ...isValidatingMessageProps } = {}, ...props }) {
|
|
6
6
|
const invalid = !!errorMessage;
|
|
@@ -20,4 +20,4 @@ function useFieldContext() {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export { Field, FieldContext, useFieldContext };
|
|
23
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","sources":["../../../src/components/field.tsx"],"sourcesContent":["import {\n Field as BaseField,\n FieldRootProps as BaseFieldRootProps,\n FieldDescriptionProps,\n FieldErrorProps,\n FieldLabelProps,\n} from \"@base-ui/react/field\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\n\nexport interface FieldProps extends BaseFieldRootProps, FieldAttributes {\n labelProps?: FieldLabelProps;\n errorMessageProps?: FieldErrorProps;\n descriptionProps?: FieldDescriptionProps;\n isValidatingMessageProps?: FieldDescriptionProps;\n}\n\nexport function Field({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n children,\n labelProps: { className: labelClassName, ...labelProps } = {},\n errorMessageProps: {\n className: errorMessageClassName,\n ...errorMessageProps\n } = {},\n descriptionProps: {\n className: descriptionClassName,\n ...descriptionProps\n } = {},\n isValidatingMessageProps: {\n className: isValidatingMessageClassName,\n ...isValidatingMessageProps\n } = {},\n ...props\n}: FieldProps) {\n const invalid = !!errorMessage;\n\n return (\n <FieldContext.Provider value={{ isValidating: !!isValidating }}>\n <BaseField.Root\n className={cn(\"flex flex-col gap-1\", className)}\n invalid={invalid}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n {label && (\n <BaseField.Label\n className={cn(\n \"text-foreground text-sm font-semibold\",\n labelClassName,\n )}\n {...labelProps}\n >\n {label}\n </BaseField.Label>\n )}\n {children}\n <BaseField.Error\n className={cn(\"text-error-foreground text-sm\", errorMessageClassName)}\n match={invalid}\n {...errorMessageProps}\n >\n {errorMessage}\n </BaseField.Error>\n {isValidating && isValidatingMessage && !errorMessage && (\n <BaseField.Description\n className={cn(\n \"text-primary-foreground animate-validating-message text-sm\",\n isValidatingMessageClassName,\n )}\n {...isValidatingMessageProps}\n >\n {isValidatingMessage}\n </BaseField.Description>\n )}\n {description && (\n <BaseField.Description\n className={cn(\n \"text-muted-foreground text-sm\",\n descriptionClassName,\n )}\n {...descriptionProps}\n >\n {description}\n </BaseField.Description>\n )}\n </BaseField.Root>\n </FieldContext.Provider>\n );\n}\n\nexport const FieldContext = React.createContext({\n isValidating: false,\n});\n\nexport function useFieldContext() {\n return React.useContext(FieldContext);\n}\n"],"names":["React","BaseField"],"mappings":";;;;AAkBM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,EAC7D,iBAAiB,EAAE,EACjB,SAAS,EAAE,qBAAqB,EAChC,GAAG,iBAAiB,EACrB,GAAG,EAAE,EACN,gBAAgB,EAAE,EAChB,SAAS,EAAE,oBAAoB,EAC/B,GAAG,gBAAgB,EACpB,GAAG,EAAE,EACN,wBAAwB,EAAE,EACxB,SAAS,EAAE,4BAA4B,EACvC,GAAG,wBAAwB,EAC5B,GAAG,EAAE,EACN,GAAG,KAAK,EACG,EAAA;AACX,IAAA,MAAM,OAAO,GAAG,CAAC,CAAC,YAAY;AAE9B,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,YAAY,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,EAAA;QAC5DA,cAAA,CAAA,aAAA,CAACC,OAAS,CAAC,IAAI,EAAA,EACb,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAC/C,OAAO,EAAE,OAAO,EAAA,iBAAA,EACC,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;YAER,KAAK,KACJD,cAAA,CAAA,aAAA,CAACC,OAAS,CAAC,KAAK,EAAA,EACd,SAAS,EAAE,EAAE,CACX,uCAAuC,EACvC,cAAc,CACf,EAAA,GACG,UAAU,EAAA,EAEb,KAAK,CACU,CACnB;YACA,QAAQ;YACTD,cAAA,CAAA,aAAA,CAACC,OAAS,CAAC,KAAK,EAAA,EACd,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,EACrE,KAAK,EAAE,OAAO,KACV,iBAAiB,EAAA,EAEpB,YAAY,CACG;YACjB,YAAY,IAAI,mBAAmB,IAAI,CAAC,YAAY,KACnDD,cAAA,CAAA,aAAA,CAACC,OAAS,CAAC,WAAW,EAAA,EACpB,SAAS,EAAE,EAAE,CACX,4DAA4D,EAC5D,4BAA4B,CAC7B,EAAA,GACG,wBAAwB,EAAA,EAE3B,mBAAmB,CACE,CACzB;YACA,WAAW,KACVD,cAAA,CAAA,aAAA,CAACC,OAAS,CAAC,WAAW,EAAA,EACpB,SAAS,EAAE,EAAE,CACX,+BAA+B,EAC/B,oBAAoB,CACrB,EAAA,GACG,gBAAgB,EAAA,EAEnB,WAAW,CACU,CACzB,CACc,CACK;AAE5B;AAEO,MAAM,YAAY,GAAGD,cAAK,CAAC,aAAa,CAAC;AAC9C,IAAA,YAAY,EAAE,KAAK;AACpB,CAAA;SAEe,eAAe,GAAA;AAC7B,IAAA,OAAOA,cAAK,CAAC,UAAU,CAAC,YAAY,CAAC;AACvC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputProps as BaseInputProps } from "@base-ui/react/input";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface InputProps extends BaseInputProps, FieldAttributes {
|
|
6
6
|
fieldProps?: FieldProps;
|
|
7
7
|
button?: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Input as Input$1 } from '@base-ui/react/input';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { cn } from '
|
|
4
|
-
import { Field } from '
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
import { Field } from './field.js';
|
|
5
5
|
|
|
6
6
|
function Input({ label, isValidating, isValidatingMessage, errorMessage, className, description, fieldProps, button, ...props }) {
|
|
7
7
|
return (React__default.createElement(Field, { label: label, isValidating: isValidating, isValidatingMessage: isValidatingMessage, errorMessage: errorMessage, description: description, ...fieldProps },
|
|
@@ -11,4 +11,4 @@ function Input({ label, isValidating, isValidatingMessage, errorMessage, classNa
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { Input };
|
|
14
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../src/components/input.tsx"],"sourcesContent":["import {\n Input as BaseInput,\n InputProps as BaseInputProps,\n} from \"@base-ui/react/input\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { Field, FieldProps } from \"./field\";\n\nexport interface InputProps extends BaseInputProps, FieldAttributes {\n fieldProps?: FieldProps;\n button?: React.ReactNode;\n}\n\nexport function Input({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n button,\n ...props\n}: InputProps) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <div className=\"flex items-stretch gap-2\">\n <BaseInput\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating focus:border-highlight placeholder:text-muted-foreground focus:inset-shadow-muted/50 w-full min-w-40 rounded-lg border p-2 transition-colors outline-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n />\n {button}\n </div>\n </Field>\n );\n}\n"],"names":["React","BaseInput"],"mappings":";;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,MAAM,EACN,GAAG,KAAK,EACG,EAAA;IACX,QACEA,cAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EACJ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,UAAU,EAAA;QAEdA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,EAAA;YACvCA,cAAA,CAAA,aAAA,CAACC,OAAS,IACR,SAAS,EAAE,EAAE,CACX,oRAAoR,EACpR,SAAS,CACV,EAAA,iBAAA,EACgB,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA,CACT;YACD,MAAM,CACH,CACA;AAEZ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RadioGroupProps as BaseRadioGroupProps } from "@base-ui/react";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface RadioGroupProps extends BaseRadioGroupProps, FieldAttributes {
|
|
6
6
|
fieldProps?: FieldProps;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Radio as Radio$1 } from '@base-ui/react/radio';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { cn } from '
|
|
4
|
-
import { useFieldContext } from '
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
import { useFieldContext } from './field.js';
|
|
5
5
|
|
|
6
6
|
function Radio({ label, indicatorProps: { className: indicatorClassName, ...indicatorProps } = {}, ...props }) {
|
|
7
7
|
const id = React.useId();
|
|
@@ -13,4 +13,4 @@ function Radio({ label, indicatorProps: { className: indicatorClassName, ...indi
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export { Radio };
|
|
16
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../src/components/radio.tsx"],"sourcesContent":["import {\n Radio as BaseRadio,\n RadioIndicatorProps,\n RadioRootProps,\n} from \"@base-ui/react/radio\";\nimport * as React from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { useFieldContext } from \"./field\";\n\nexport interface RadioProps extends RadioRootProps {\n label?: React.ReactNode;\n indicatorProps?: RadioIndicatorProps;\n}\n\nexport function Radio({\n label,\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n ...props\n}: RadioProps) {\n const id = React.useId();\n const { isValidating } = useFieldContext();\n\n return (\n <label className=\"flex items-center gap-2\" id={id}>\n <BaseRadio.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating focus-visible:outline-highlight data-checked:border-primary-foreground data-invalid:border-error-foreground flex size-5 items-center justify-center rounded-full border focus-visible:outline-2 focus-visible:outline-offset-2\",\n )}\n aria-labelledby={id}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseRadio.Indicator\n className={cn(\n \"before:bg-primary data-invalid:before:bg-error flex before:size-3 before:rounded-full data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n />\n </BaseRadio.Root>\n {label}\n </label>\n );\n}\n"],"names":["BaseRadio"],"mappings":";;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,GAAG,KAAK,EACG,EAAA;AACX,IAAA,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE;AACxB,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE;IAE1C,QACE,+BAAO,SAAS,EAAC,yBAAyB,EAAC,EAAE,EAAE,EAAE,EAAA;QAC/C,KAAA,CAAA,aAAA,CAACA,OAAS,CAAC,IAAI,EAAA,EACb,SAAS,EAAE,EAAE,CACX,oRAAoR,CACrR,EAAA,iBAAA,EACgB,EAAE,EAAA,iBAAA,EACF,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;AAET,YAAA,KAAA,CAAA,aAAA,CAACA,OAAS,CAAC,SAAS,EAAA,EAClB,SAAS,EAAE,EAAE,CACX,6GAA6G,EAC7G,kBAAkB,CACnB,EAAA,GACG,cAAc,GAClB,CACa;QAChB,KAAK,CACA;AAEZ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectIconProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectListProps, SelectPopupProps, SelectPortalProps, SelectPositionerProps, SelectRootProps, SelectScrollDownArrowProps, SelectScrollUpArrowProps, SelectTriggerProps, SelectValueProps } from "@base-ui/react/select";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { FieldAttributes } from "
|
|
4
|
-
import { FieldProps } from "
|
|
3
|
+
import { FieldAttributes } from "../lib/types";
|
|
4
|
+
import { FieldProps } from "./field";
|
|
5
5
|
export interface SelectProps<T> extends Omit<SelectTriggerProps, "value">, SelectRootProps<T>, FieldAttributes {
|
|
6
6
|
placeholder?: React.ReactNode;
|
|
7
7
|
triggerDisabled?: SelectTriggerProps["disabled"];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Select as Select$1 } from '@base-ui/react/select';
|
|
2
2
|
import { ChevronsUpDown, Check } from 'lucide-react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { cn } from '
|
|
5
|
-
import { Field } from '
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
import { Field } from './field.js';
|
|
6
6
|
|
|
7
7
|
function Select({ label, isValidating, isValidatingMessage, errorMessage, className, description, fieldProps, items, placeholder, actionsRef, autoComplete, defaultOpen, defaultValue, disabled, highlightItemOnHover, id, inputRef, isItemEqualToValue, itemToStringLabel, itemToStringValue, modal, multiple, name, onOpenChange, onOpenChangeComplete, onValueChange, open, readOnly, required, value, triggerDisabled, triggerId, triggerName, triggerValue, valueProps: { className: valueClassName, ...valueProps } = {}, selectIconProps: { className: selectIconClassName, ...selectIconProps } = {}, iconProps: { className: iconClassName, ...iconProps } = {}, portalProps, positionerProps: { className: positionerClassName, ...positionerProps } = {}, popupProps: { className: popupClassName, ...popupProps } = {}, scrollUpArrowProps: { className: scrollUpArrowClassName, ...scrollUpArrowProps } = {}, listProps: { className: listClassName, ...listProps } = {}, itemProps: { className: itemClassName, ...itemProps } = {}, itemIndicatorProps: { className: itemIndicatorClassName, ...itemIndicatorProps } = {}, checkIconProps: { className: checkIconClassName, ...checkIconProps } = {}, itemTextProps: { className: itemTextClassName, ...itemTextProps } = {}, scrollDownArrowProps: { className: scrollDownArrowClassName, ...scrollDownArrowProps } = {}, ...props }) {
|
|
8
8
|
return (React__default.createElement(Field, { label: label, isValidating: isValidating, isValidatingMessage: isValidatingMessage, errorMessage: errorMessage, description: description, ...fieldProps },
|
|
@@ -24,4 +24,4 @@ function Select({ label, isValidating, isValidatingMessage, errorMessage, classN
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export { Select };
|
|
27
|
-
//# sourceMappingURL=
|
|
27
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../../../src/components/select.tsx"],"sourcesContent":["import {\n Select as BaseSelect,\n SelectIconProps,\n SelectItemIndicatorProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectListProps,\n SelectPopupProps,\n SelectPortalProps,\n SelectPositionerProps,\n SelectRootProps,\n SelectScrollDownArrowProps,\n SelectScrollUpArrowProps,\n SelectTriggerProps,\n SelectValueProps,\n} from \"@base-ui/react/select\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../lib/types\";\nimport { cn } from \"../lib/utils\";\nimport { Field, FieldProps } from \"./field\";\n\nexport interface SelectProps<T>\n extends\n Omit<SelectTriggerProps, \"value\">,\n SelectRootProps<T>,\n FieldAttributes {\n placeholder?: React.ReactNode;\n triggerDisabled?: SelectTriggerProps[\"disabled\"];\n triggerId?: SelectTriggerProps[\"id\"];\n triggerName?: SelectTriggerProps[\"name\"];\n triggerValue?: SelectTriggerProps[\"value\"];\n fieldProps?: FieldProps;\n triggerProps?: SelectTriggerProps;\n valueProps?: SelectValueProps;\n selectIconProps?: SelectIconProps;\n iconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n portalProps?: SelectPortalProps;\n positionerProps?: SelectPositionerProps;\n popupProps?: SelectPopupProps;\n scrollUpArrowProps?: SelectScrollUpArrowProps;\n listProps?: SelectListProps;\n itemProps?: SelectItemProps;\n itemIndicatorProps?: SelectItemIndicatorProps;\n checkIconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n itemTextProps?: SelectItemTextProps;\n scrollDownArrowProps?: SelectScrollDownArrowProps;\n}\n\nexport function Select<T>({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n items,\n placeholder,\n actionsRef,\n autoComplete,\n defaultOpen,\n defaultValue,\n disabled,\n highlightItemOnHover,\n id,\n inputRef,\n isItemEqualToValue,\n itemToStringLabel,\n itemToStringValue,\n modal,\n multiple,\n name,\n onOpenChange,\n onOpenChangeComplete,\n onValueChange,\n open,\n readOnly,\n required,\n value,\n triggerDisabled,\n triggerId,\n triggerName,\n triggerValue,\n valueProps: { className: valueClassName, ...valueProps } = {},\n selectIconProps: { className: selectIconClassName, ...selectIconProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n portalProps,\n positionerProps: { className: positionerClassName, ...positionerProps } = {},\n popupProps: { className: popupClassName, ...popupProps } = {},\n scrollUpArrowProps: {\n className: scrollUpArrowClassName,\n ...scrollUpArrowProps\n } = {},\n listProps: { className: listClassName, ...listProps } = {},\n itemProps: { className: itemClassName, ...itemProps } = {},\n itemIndicatorProps: {\n className: itemIndicatorClassName,\n ...itemIndicatorProps\n } = {},\n checkIconProps: { className: checkIconClassName, ...checkIconProps } = {},\n itemTextProps: { className: itemTextClassName, ...itemTextProps } = {},\n scrollDownArrowProps: {\n className: scrollDownArrowClassName,\n ...scrollDownArrowProps\n } = {},\n ...props\n}: SelectProps<T>) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <BaseSelect.Root\n items={items}\n actionsRef={actionsRef}\n autoComplete={autoComplete}\n defaultOpen={defaultOpen}\n defaultValue={defaultValue}\n disabled={disabled}\n highlightItemOnHover={highlightItemOnHover}\n id={id}\n inputRef={inputRef}\n isItemEqualToValue={isItemEqualToValue}\n itemToStringLabel={itemToStringLabel}\n itemToStringValue={itemToStringValue}\n modal={modal}\n multiple={multiple}\n name={name}\n onOpenChange={onOpenChange}\n onOpenChangeComplete={onOpenChangeComplete}\n onValueChange={onValueChange}\n open={open}\n readOnly={readOnly}\n required={required}\n value={value}\n >\n <BaseSelect.Trigger\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating hover:bg-card data-popup-open:bg-card focus-visible:border-highlight focus:inset-shadow-muted/50 flex min-w-40 items-center justify-between gap-3 rounded-lg border p-2 text-base transition-colors outline-none select-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n disabled={triggerDisabled}\n id={triggerId}\n name={triggerName}\n value={triggerValue}\n {...props}\n >\n <BaseSelect.Value\n className={cn(\"data-placeholder:opacity-60\", valueClassName)}\n placeholder={placeholder}\n {...valueProps}\n />\n <BaseSelect.Icon\n className={cn(\"flex\", selectIconClassName)}\n {...selectIconProps}\n >\n <ChevronsUpDown\n className={cn(\"size-4\", iconClassName)}\n {...iconProps}\n />\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n <BaseSelect.Portal {...portalProps}>\n <BaseSelect.Positioner\n className={cn(\"z-10 outline-none select-none\", positionerClassName)}\n sideOffset={8}\n {...positionerProps}\n >\n <BaseSelect.Popup\n className={cn(\n \"group bg-background outline-border min-w-(--anchor-width) origin-(--transform-origin) rounded-lg bg-clip-padding shadow-lg outline transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] data-[side=none]:data-ending-style:transition-none data-[side=none]:data-starting-style:scale-100 data-[side=none]:data-starting-style:opacity-100 data-[side=none]:data-starting-style:transition-none\",\n popupClassName,\n )}\n {...popupProps}\n >\n <BaseSelect.ScrollUpArrow\n className={cn(\n \"bg-background top-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-top-full\",\n scrollUpArrowClassName,\n )}\n {...scrollUpArrowProps}\n />\n <BaseSelect.List\n className={cn(\n \"relative max-h-(--available-height) scroll-py-6 overflow-y-auto py-1\",\n listClassName,\n )}\n {...listProps}\n >\n {Array.isArray(items) &&\n items.map(({ label, value }) => (\n <BaseSelect.Item\n key={String(value)}\n value={value}\n className={cn(\n \"data-highlighted:before:bg-primary data-highlighted:text-on-primary grid cursor-default grid-cols-[0.75rem_1fr] items-center gap-2 py-2 pr-4 pl-2.5 text-sm leading-4 outline-none select-none group-data-[side=none]:pr-12 group-data-[side=none]:text-base group-data-[side=none]:leading-4 data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-1 data-highlighted:before:inset-y-0 data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm pointer-coarse:py-2.5 pointer-coarse:text-[0.925rem]\",\n itemClassName,\n )}\n {...itemProps}\n >\n <BaseSelect.ItemIndicator\n className={cn(\"col-start-1\", itemIndicatorClassName)}\n {...itemIndicatorProps}\n >\n <Check\n className={cn(\"size-3\", checkIconClassName)}\n {...checkIconProps}\n />\n </BaseSelect.ItemIndicator>\n <BaseSelect.ItemText\n className={cn(\"col-start-2\", itemTextClassName)}\n {...itemTextProps}\n >\n {label}\n </BaseSelect.ItemText>\n </BaseSelect.Item>\n ))}\n </BaseSelect.List>\n <BaseSelect.ScrollDownArrow\n className={cn(\n \"bg-background bottom-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-bottom-full\",\n scrollDownArrowClassName,\n )}\n {...scrollDownArrowProps}\n />\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n </BaseSelect.Root>\n </Field>\n );\n}\n"],"names":["React","BaseSelect"],"mappings":";;;;;;AAiDM,SAAU,MAAM,CAAI,EACxB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,oBAAoB,EACpB,EAAE,EACF,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,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AE,kBAAkB,CAAC,EAAA,GACvC,cAAc,GAClB,CACuB;gCAC3BA,cAAA,CAAA,aAAA,CAACC,QAAU,CAAC,QAAQ,EAAA,EAClB,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAAA,GAC3C,aAAa,EAAA,EAEhB,KAAK,CACc,CACN,CACnB,CAAC,CACY;wBAClBD,cAAA,CAAA,aAAA,CAACC,QAAU,CAAC,eAAe,EAAA,EACzB,SAAS,EAAE,EAAE,CACX,yOAAyO,EACzO,wBAAwB,CACzB,EAAA,GACG,oBAAoB,EAAA,CACxB,CACe,CACG,CACN,CACJ,CACZ;AAEZ;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { Button } from './components/button
|
|
2
|
-
export { Checkbox } from './components/checkbox
|
|
3
|
-
export { CheckboxGroup } from './components/checkbox-group
|
|
4
|
-
export { Field } from './components/field
|
|
5
|
-
export { Input } from './components/input
|
|
6
|
-
export { Radio } from './components/radio
|
|
7
|
-
export { Select } from './components/select
|
|
1
|
+
export { Button } from './components/button.js';
|
|
2
|
+
export { Checkbox } from './components/checkbox.js';
|
|
3
|
+
export { CheckboxGroup, useCheckboxGroupContext } from './components/checkbox-group.js';
|
|
4
|
+
export { Field, FieldContext, useFieldContext } from './components/field.js';
|
|
5
|
+
export { Input } from './components/input.js';
|
|
6
|
+
export { Radio } from './components/radio.js';
|
|
7
|
+
export { Select } from './components/select.js';
|
|
8
8
|
export { cn } from './lib/utils.js';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fransek/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Frans Ekman <fransedvinekman@gmail.com>",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"require": "./dist/cjs/theme.css"
|
|
33
33
|
},
|
|
34
34
|
"./*": {
|
|
35
|
-
"import": "./dist/esm/components
|
|
36
|
-
"require": "./dist/cjs/components
|
|
35
|
+
"import": "./dist/esm/components/*.js",
|
|
36
|
+
"require": "./dist/cjs/components/*.js"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"sideEffects": false,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import {\n Button as BaseButton,\n ButtonProps as BaseButtonProps,\n} from \"@base-ui/react/button\";\nimport React from \"react\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface ButtonProps extends BaseButtonProps {\n variant?: ButtonVariant;\n size?: ButtonSize;\n}\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n children,\n className,\n ...props\n}: ButtonProps) {\n return (\n <BaseButton\n className={cn(\n \"font-inherit focus-visible:outline-highlight m-0 flex items-center justify-center gap-2 rounded-lg px-3 py-2 outline-0 select-none focus-visible:outline-2 focus-visible:outline-offset-2 data-disabled:cursor-not-allowed data-disabled:opacity-60\",\n variantStyles[variant],\n sizeStyles[size],\n className,\n )}\n focusableWhenDisabled\n {...props}\n >\n {children}\n </BaseButton>\n );\n}\n\nconst variantStyles = {\n primary:\n \"bg-primary text-on-primary hover:bg-primary/90 active:bg-primary/80\",\n secondary:\n \"bg-secondary text-on-secondary hover:bg-secondary/90 active:bg-secondary/80\",\n muted: \"bg-muted text-on-muted hover:bg-muted/90 active:bg-muted/80\",\n error: \"bg-error text-on-error hover:bg-error/90 active:bg-error/80\",\n success:\n \"bg-success text-on-success hover:bg-success/90 active:bg-success/80\",\n outline:\n \"bg-transparent border text-foreground hover:bg-muted/10 active:bg-muted/20\",\n ghost: \"bg-transparent text-foreground hover:bg-muted/10 active:bg-muted/20\",\n link: \"bg-transparent text-link-foreground hover:underline underline-offset-4\",\n};\n\nconst sizeStyles = {\n sm: \"text-sm\",\n md: \"text-base\",\n lg: \"text-lg\",\n};\n\nexport type ButtonVariant = keyof typeof variantStyles;\nexport type ButtonSize = keyof typeof sizeStyles;\n"],"names":["BaseButton","cn"],"mappings":";;;;;;SAYgB,MAAM,CAAC,EACrB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACI,EAAA;AACZ,IAAA,QACE,KAAA,CAAA,aAAA,CAACA,aAAU,EAAA,EACT,SAAS,EAAEC,QAAE,CACX,qPAAqP,EACrP,aAAa,CAAC,OAAO,CAAC,EACtB,UAAU,CAAC,IAAI,CAAC,EAChB,SAAS,CACV,EACD,qBAAqB,EAAA,IAAA,EAAA,GACjB,KAAK,EAAA,EAER,QAAQ,CACE;AAEjB;AAEA,MAAM,aAAa,GAAG;AACpB,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,SAAS,EACP,6EAA6E;AAC/E,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,OAAO,EACL,4EAA4E;AAC9E,IAAA,KAAK,EAAE,qEAAqE;AAC5E,IAAA,IAAI,EAAE,wEAAwE;CAC/E;AAED,MAAM,UAAU,GAAG;AACjB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,SAAS;CACd;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button, ButtonProps, ButtonSize, ButtonVariant } from "./Button";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import {\n Checkbox as BaseCheckbox,\n CheckboxRootProps as BaseCheckboxRootProps,\n CheckboxIndicatorProps,\n} from \"@base-ui/react/checkbox\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { CheckIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { useCheckboxGroupContext } from \"../checkbox-group/CheckboxGroup\";\nimport { Field, FieldProps, useFieldContext } from \"../field/Field\";\n\nexport interface CheckboxProps\n extends BaseCheckboxRootProps, Omit<FieldAttributes, \"label\"> {\n label?: React.ReactNode;\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;\n indicatorProps?: CheckboxIndicatorProps;\n iconProps?: React.SVGProps<SVGSVGElement>;\n fieldProps?: FieldProps;\n}\n\nexport function Checkbox({\n label,\n className,\n fieldProps,\n description,\n isValidating: _isValidating,\n isValidatingMessage,\n errorMessage,\n labelProps: { className: labelClassName, ...labelProps } = {},\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n ...props\n}: CheckboxProps) {\n const labelId = React.useId();\n const isInCheckboxGroup = useCheckboxGroupContext();\n const { isValidating: groupIsValidating } = useFieldContext();\n const isValidating = isInCheckboxGroup ? groupIsValidating : _isValidating;\n\n const children = (\n <BaseField.Label\n className={cn(\n \"text-foreground flex items-center gap-2 text-base\",\n labelClassName,\n )}\n {...labelProps}\n >\n <BaseCheckbox.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating data-invalid:border-error-foreground data-invalid:data-checked:bg-error data-invalid:data-checked:border-error data-checked:bg-primary data-checked:border-primary focus-visible:outline-highlight flex size-5 items-center justify-center rounded-sm border outline-offset-2 focus-visible:outline-2\",\n className,\n )}\n aria-labelledby={labelId}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseCheckbox.Indicator\n className={cn(\n \"text-on-primary data-invalid:border-error data-invalid:bg-error flex data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n >\n <CheckIcon className={cn(\"size-4\", iconClassName)} {...iconProps} />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n <span id={labelId}>{label}</span>\n </BaseField.Label>\n );\n\n if (isInCheckboxGroup) {\n return <BaseField.Item>{children}</BaseField.Item>;\n }\n\n return (\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n {children}\n </Field>\n );\n}\n"],"names":["useCheckboxGroupContext","useFieldContext","BaseField","cn","BaseCheckbox","CheckIcon","Field"],"mappings":";;;;;;;;;;AAsBM,SAAU,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EAAE,aAAa,EAC3B,mBAAmB,EACnB,YAAY,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,EAC7D,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,SAAS,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,EAC1D,GAAG,KAAK,EACM,EAAA;AACd,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE;AAC7B,IAAA,MAAM,iBAAiB,GAAGA,qCAAuB,EAAE;IACnD,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAGC,qBAAe,EAAE;IAC7D,MAAM,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,aAAa;AAE1E,IAAA,MAAM,QAAQ,IACZ,KAAA,CAAA,aAAA,CAACC,WAAS,CAAC,KAAK,EAAA,EACd,SAAS,EAAEC,QAAE,CACX,mDAAmD,EACnD,cAAc,CACf,KACG,UAAU,EAAA;QAEd,KAAA,CAAA,aAAA,CAACC,iBAAY,CAAC,IAAI,EAAA,EAChB,SAAS,EAAED,QAAE,CACX,2VAA2V,EAC3V,SAAS,CACV,qBACgB,OAAO,EAAA,iBAAA,EACP,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;AAET,YAAA,KAAA,CAAA,aAAA,CAACC,iBAAY,CAAC,SAAS,EAAA,EACrB,SAAS,EAAED,QAAE,CACX,4FAA4F,EAC5F,kBAAkB,CACnB,KACG,cAAc,EAAA;AAElB,gBAAA,KAAA,CAAA,aAAA,CAACE,qBAAS,EAAA,EAAC,SAAS,EAAEF,QAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAA,GAAM,SAAS,EAAA,CAAI,CAC7C,CACP;QACpB,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,OAAO,EAAA,EAAG,KAAK,CAAQ,CACjB,CACnB;IAED,IAAI,iBAAiB,EAAE;AACrB,QAAA,OAAO,oBAACD,WAAS,CAAC,IAAI,EAAA,IAAA,EAAE,QAAQ,CAAkB;IACpD;IAEA,QACE,KAAA,CAAA,aAAA,CAACI,WAAK,EAAA,EACJ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,UAAU,EAAA,EAEb,QAAQ,CACH;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Checkbox, CheckboxProps } from "./Checkbox";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","sources":["../../../../src/components/checkbox-group/CheckboxGroup.tsx"],"sourcesContent":["import {\n CheckboxGroup as BaseCheckboxGroup,\n CheckboxGroupProps as BaseCheckboxGroupProps,\n} from \"@base-ui/react/checkbox-group\";\nimport {\n Fieldset,\n FieldsetLegendProps,\n FieldsetRootProps,\n} from \"@base-ui/react/fieldset\";\nimport * as React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { Field, FieldProps } from \"../field/Field\";\n\nexport interface CheckboxGroupProps\n extends BaseCheckboxGroupProps, FieldAttributes {\n children?: React.ReactNode;\n fieldProps?: FieldProps;\n fieldsetProps?: FieldsetRootProps;\n legendProps?: FieldsetLegendProps;\n}\n\nexport function CheckboxGroup({\n children,\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n description,\n fieldProps,\n fieldsetProps: { className: fieldsetClassName, ...fieldsetProps } = {},\n legendProps: { className: legendClassName, ...legendProps } = {},\n ...props\n}: CheckboxGroupProps) {\n return (\n <CheckboxGroupContext.Provider value={true}>\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <Fieldset.Root\n render={<BaseCheckboxGroup {...props} />}\n className={cn(\"flex flex-col gap-1\", fieldsetClassName)}\n {...fieldsetProps}\n >\n <Fieldset.Legend\n className={cn(\n \"text-foreground text-sm font-semibold\",\n legendClassName,\n )}\n {...legendProps}\n >\n {label}\n </Fieldset.Legend>\n {children}\n </Fieldset.Root>\n </Field>\n </CheckboxGroupContext.Provider>\n );\n}\n\nconst CheckboxGroupContext = React.createContext<boolean>(false);\n\nexport function useCheckboxGroupContext() {\n return React.useContext(CheckboxGroupContext);\n}\n"],"names":["React","Field","Fieldset","BaseCheckboxGroup","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBM,SAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,aAAa,EAAE,GAAG,EAAE,EACtE,WAAW,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,WAAW,EAAE,GAAG,EAAE,EAChE,GAAG,KAAK,EACW,EAAA;IACnB,QACEA,+BAAC,oBAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,IAAI,EAAA;AACxC,QAAAA,gBAAA,CAAA,aAAA,CAACC,WAAK,EAAA,EACJ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,KACpB,UAAU,EAAA;YAEdD,gBAAA,CAAA,aAAA,CAACE,iBAAQ,CAAC,IAAI,EAAA,EACZ,MAAM,EAAEF,gBAAA,CAAA,aAAA,CAACG,2BAAiB,EAAA,EAAA,GAAK,KAAK,GAAI,EACxC,SAAS,EAAEC,QAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,EAAA,GACnD,aAAa,EAAA;AAEjB,gBAAAJ,gBAAA,CAAA,aAAA,CAACE,iBAAQ,CAAC,MAAM,EAAA,EACd,SAAS,EAAEE,QAAE,CACX,uCAAuC,EACvC,eAAe,CAChB,EAAA,GACG,WAAW,EAAA,EAEd,KAAK,CACU;AACjB,gBAAA,QAAQ,CACK,CACV,CACsB;AAEpC;AAEA,MAAM,oBAAoB,GAAGJ,gBAAK,CAAC,aAAa,CAAU,KAAK,CAAC;SAEhD,uBAAuB,GAAA;AACrC,IAAA,OAAOA,gBAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC;AAC/C;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CheckboxGroup, CheckboxGroupProps } from "./CheckboxGroup";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../src/components/field/Field.tsx"],"sourcesContent":["import {\n Field as BaseField,\n FieldRootProps as BaseFieldRootProps,\n FieldDescriptionProps,\n FieldErrorProps,\n FieldLabelProps,\n} from \"@base-ui/react/field\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface FieldProps extends BaseFieldRootProps, FieldAttributes {\n labelProps?: FieldLabelProps;\n errorMessageProps?: FieldErrorProps;\n descriptionProps?: FieldDescriptionProps;\n isValidatingMessageProps?: FieldDescriptionProps;\n}\n\nexport function Field({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n children,\n labelProps: { className: labelClassName, ...labelProps } = {},\n errorMessageProps: {\n className: errorMessageClassName,\n ...errorMessageProps\n } = {},\n descriptionProps: {\n className: descriptionClassName,\n ...descriptionProps\n } = {},\n isValidatingMessageProps: {\n className: isValidatingMessageClassName,\n ...isValidatingMessageProps\n } = {},\n ...props\n}: FieldProps) {\n const invalid = !!errorMessage;\n\n return (\n <FieldContext.Provider value={{ isValidating: !!isValidating }}>\n <BaseField.Root\n className={cn(\"flex flex-col gap-1\", className)}\n invalid={invalid}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n {label && (\n <BaseField.Label\n className={cn(\n \"text-foreground text-sm font-semibold\",\n labelClassName,\n )}\n {...labelProps}\n >\n {label}\n </BaseField.Label>\n )}\n {children}\n <BaseField.Error\n className={cn(\"text-error-foreground text-sm\", errorMessageClassName)}\n match={invalid}\n {...errorMessageProps}\n >\n {errorMessage}\n </BaseField.Error>\n {isValidating && isValidatingMessage && !errorMessage && (\n <BaseField.Description\n className={cn(\n \"text-primary-foreground animate-validating-message text-sm\",\n isValidatingMessageClassName,\n )}\n {...isValidatingMessageProps}\n >\n {isValidatingMessage}\n </BaseField.Description>\n )}\n {description && (\n <BaseField.Description\n className={cn(\n \"text-muted-foreground text-sm\",\n descriptionClassName,\n )}\n {...descriptionProps}\n >\n {description}\n </BaseField.Description>\n )}\n </BaseField.Root>\n </FieldContext.Provider>\n );\n}\n\nexport const FieldContext = React.createContext({\n isValidating: false,\n});\n\nexport function useFieldContext() {\n return React.useContext(FieldContext);\n}\n"],"names":["BaseField","cn"],"mappings":";;;;;;AAkBM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,EAC7D,iBAAiB,EAAE,EACjB,SAAS,EAAE,qBAAqB,EAChC,GAAG,iBAAiB,EACrB,GAAG,EAAE,EACN,gBAA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ACX,+BAA+B,EAC/B,oBAAoB,CACrB,EAAA,GACG,gBAAgB,EAAA,EAEnB,WAAW,CACU,CACzB,CACc,CACK;AAE5B;AAEO,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC;AAC9C,IAAA,YAAY,EAAE,KAAK;AACpB,CAAA;SAEe,eAAe,GAAA;AAC7B,IAAA,OAAO,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC;AACvC;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Field, FieldProps } from "./Field";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import {\n Input as BaseInput,\n InputProps as BaseInputProps,\n} from \"@base-ui/react/input\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { Field, FieldProps } from \"../field/Field\";\n\nexport interface InputProps extends BaseInputProps, FieldAttributes {\n fieldProps?: FieldProps;\n button?: React.ReactNode;\n}\n\nexport function Input({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n button,\n ...props\n}: InputProps) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <div className=\"flex items-stretch gap-2\">\n <BaseInput\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating focus:border-highlight placeholder:text-muted-foreground focus:inset-shadow-muted/50 w-full min-w-40 rounded-lg border p-2 transition-colors outline-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n />\n {button}\n </div>\n </Field>\n );\n}\n"],"names":["Field","BaseInput","cn"],"mappings":";;;;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,MAAM,EACN,GAAG,KAAK,EACG,EAAA;IACX,QACE,KAAA,CAAA,aAAA,CAACA,WAAK,EAAA,EACJ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,UAAU,EAAA;QAEd,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,EAAA;YACvC,KAAA,CAAA,aAAA,CAACC,WAAS,IACR,SAAS,EAAEC,QAAE,CACX,oRAAoR,EACpR,SAAS,CACV,EAAA,iBAAA,EACgB,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA,CACT;YACD,MAAM,CACH,CACA;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Input, InputProps } from "./Input";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":["../../../../src/components/radio/Radio.tsx"],"sourcesContent":["import {\n Radio as BaseRadio,\n RadioIndicatorProps,\n RadioRootProps,\n} from \"@base-ui/react/radio\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { useFieldContext } from \"../field/Field\";\n\nexport interface RadioProps extends RadioRootProps {\n label?: React.ReactNode;\n indicatorProps?: RadioIndicatorProps;\n}\n\nexport function Radio({\n label,\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n ...props\n}: RadioProps) {\n const id = React.useId();\n const { isValidating } = useFieldContext();\n\n return (\n <label className=\"flex items-center gap-2\" id={id}>\n <BaseRadio.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating focus-visible:outline-highlight data-checked:border-primary-foreground data-invalid:border-error-foreground flex size-5 items-center justify-center rounded-full border focus-visible:outline-2 focus-visible:outline-offset-2\",\n )}\n aria-labelledby={id}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseRadio.Indicator\n className={cn(\n \"before:bg-primary data-invalid:before:bg-error flex before:size-3 before:rounded-full data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n />\n </BaseRadio.Root>\n {label}\n </label>\n );\n}\n"],"names":["React","useFieldContext","BaseRadio","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,GAAG,KAAK,EACG,EAAA;AACX,IAAA,MAAM,EAAE,GAAGA,gBAAK,CAAC,KAAK,EAAE;AACxB,IAAA,MAAM,EAAE,YAAY,EAAE,GAAGC,qBAAe,EAAE;IAE1C,QACED,0CAAO,SAAS,EAAC,yBAAyB,EAAC,EAAE,EAAE,EAAE,EAAA;QAC/CA,gBAAA,CAAA,aAAA,CAACE,WAAS,CAAC,IAAI,EAAA,EACb,SAAS,EAAEC,QAAE,CACX,oRAAoR,CACrR,EAAA,iBAAA,EACgB,EAAE,EAAA,iBAAA,EACF,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;AAET,YAAAH,gBAAA,CAAA,aAAA,CAACE,WAAS,CAAC,SAAS,EAAA,EAClB,SAAS,EAAEC,QAAE,CACX,6GAA6G,EAC7G,kBAAkB,CACnB,EAAA,GACG,cAAc,GAClB,CACa;QAChB,KAAK,CACA;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Radio, RadioProps } from "./Radio";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { RadioGroup, RadioGroupProps } from "./RadioGroup";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../../src/components/select/Select.tsx"],"sourcesContent":["import {\n Select as BaseSelect,\n SelectIconProps,\n SelectItemIndicatorProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectListProps,\n SelectPopupProps,\n SelectPortalProps,\n SelectPositionerProps,\n SelectRootProps,\n SelectScrollDownArrowProps,\n SelectScrollUpArrowProps,\n SelectTriggerProps,\n SelectValueProps,\n} from \"@base-ui/react/select\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { Field, FieldProps } from \"../field/Field\";\n\nexport interface SelectProps<T>\n extends\n Omit<SelectTriggerProps, \"value\">,\n SelectRootProps<T>,\n FieldAttributes {\n placeholder?: React.ReactNode;\n triggerDisabled?: SelectTriggerProps[\"disabled\"];\n triggerId?: SelectTriggerProps[\"id\"];\n triggerName?: SelectTriggerProps[\"name\"];\n triggerValue?: SelectTriggerProps[\"value\"];\n fieldProps?: FieldProps;\n triggerProps?: SelectTriggerProps;\n valueProps?: SelectValueProps;\n selectIconProps?: SelectIconProps;\n iconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n portalProps?: SelectPortalProps;\n positionerProps?: SelectPositionerProps;\n popupProps?: SelectPopupProps;\n scrollUpArrowProps?: SelectScrollUpArrowProps;\n listProps?: SelectListProps;\n itemProps?: SelectItemProps;\n itemIndicatorProps?: SelectItemIndicatorProps;\n checkIconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n itemTextProps?: SelectItemTextProps;\n scrollDownArrowProps?: SelectScrollDownArrowProps;\n}\n\nexport function Select<T>({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n items,\n placeholder,\n actionsRef,\n autoComplete,\n defaultOpen,\n defaultValue,\n disabled,\n highlightItemOnHover,\n id,\n inputRef,\n isItemEqualToValue,\n itemToStringLabel,\n itemToStringValue,\n modal,\n multiple,\n name,\n onOpenChange,\n onOpenChangeComplete,\n onValueChange,\n open,\n readOnly,\n required,\n value,\n triggerDisabled,\n triggerId,\n triggerName,\n triggerValue,\n valueProps: { className: valueClassName, ...valueProps } = {},\n selectIconProps: { className: selectIconClassName, ...selectIconProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n portalProps,\n positionerProps: { className: positionerClassName, ...positionerProps } = {},\n popupProps: { className: popupClassName, ...popupProps } = {},\n scrollUpArrowProps: {\n className: scrollUpArrowClassName,\n ...scrollUpArrowProps\n } = {},\n listProps: { className: listClassName, ...listProps } = {},\n itemProps: { className: itemClassName, ...itemProps } = {},\n itemIndicatorProps: {\n className: itemIndicatorClassName,\n ...itemIndicatorProps\n } = {},\n checkIconProps: { className: checkIconClassName, ...checkIconProps } = {},\n itemTextProps: { className: itemTextClassName, ...itemTextProps } = {},\n scrollDownArrowProps: {\n className: scrollDownArrowClassName,\n ...scrollDownArrowProps\n } = {},\n ...props\n}: SelectProps<T>) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <BaseSelect.Root\n items={items}\n actionsRef={actionsRef}\n autoComplete={autoComplete}\n defaultOpen={defaultOpen}\n defaultValue={defaultValue}\n disabled={disabled}\n highlightItemOnHover={highlightItemOnHover}\n id={id}\n inputRef={inputRef}\n isItemEqualToValue={isItemEqualToValue}\n itemToStringLabel={itemToStringLabel}\n itemToStringValue={itemToStringValue}\n modal={modal}\n multiple={multiple}\n name={name}\n onOpenChange={onOpenChange}\n onOpenChangeComplete={onOpenChangeComplete}\n onValueChange={onValueChange}\n open={open}\n readOnly={readOnly}\n required={required}\n value={value}\n >\n <BaseSelect.Trigger\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating hover:bg-card data-popup-open:bg-card focus-visible:border-highlight focus:inset-shadow-muted/50 flex min-w-40 items-center justify-between gap-3 rounded-lg border p-2 text-base transition-colors outline-none select-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n disabled={triggerDisabled}\n id={triggerId}\n name={triggerName}\n value={triggerValue}\n {...props}\n >\n <BaseSelect.Value\n className={cn(\"data-placeholder:opacity-60\", valueClassName)}\n placeholder={placeholder}\n {...valueProps}\n />\n <BaseSelect.Icon\n className={cn(\"flex\", selectIconClassName)}\n {...selectIconProps}\n >\n <ChevronsUpDown\n className={cn(\"size-4\", iconClassName)}\n {...iconProps}\n />\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n <BaseSelect.Portal {...portalProps}>\n <BaseSelect.Positioner\n className={cn(\"z-10 outline-none select-none\", positionerClassName)}\n sideOffset={8}\n {...positionerProps}\n >\n <BaseSelect.Popup\n className={cn(\n \"group bg-background outline-border min-w-(--anchor-width) origin-(--transform-origin) rounded-lg bg-clip-padding shadow-lg outline transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] data-[side=none]:data-ending-style:transition-none data-[side=none]:data-starting-style:scale-100 data-[side=none]:data-starting-style:opacity-100 data-[side=none]:data-starting-style:transition-none\",\n popupClassName,\n )}\n {...popupProps}\n >\n <BaseSelect.ScrollUpArrow\n className={cn(\n \"bg-background top-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-top-full\",\n scrollUpArrowClassName,\n )}\n {...scrollUpArrowProps}\n />\n <BaseSelect.List\n className={cn(\n \"relative max-h-(--available-height) scroll-py-6 overflow-y-auto py-1\",\n listClassName,\n )}\n {...listProps}\n >\n {Array.isArray(items) &&\n items.map(({ label, value }) => (\n <BaseSelect.Item\n key={String(value)}\n value={value}\n className={cn(\n \"data-highlighted:before:bg-primary data-highlighted:text-on-primary grid cursor-default grid-cols-[0.75rem_1fr] items-center gap-2 py-2 pr-4 pl-2.5 text-sm leading-4 outline-none select-none group-data-[side=none]:pr-12 group-data-[side=none]:text-base group-data-[side=none]:leading-4 data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-1 data-highlighted:before:inset-y-0 data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm pointer-coarse:py-2.5 pointer-coarse:text-[0.925rem]\",\n itemClassName,\n )}\n {...itemProps}\n >\n <BaseSelect.ItemIndicator\n className={cn(\"col-start-1\", itemIndicatorClassName)}\n {...itemIndicatorProps}\n >\n <Check\n className={cn(\"size-3\", checkIconClassName)}\n {...checkIconProps}\n />\n </BaseSelect.ItemIndicator>\n <BaseSelect.ItemText\n className={cn(\"col-start-2\", itemTextClassName)}\n {...itemTextProps}\n >\n {label}\n </BaseSelect.ItemText>\n </BaseSelect.Item>\n ))}\n </BaseSelect.List>\n <BaseSelect.ScrollDownArrow\n className={cn(\n \"bg-background bottom-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-bottom-full\",\n scrollDownArrowClassName,\n )}\n {...scrollDownArrowProps}\n />\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n </BaseSelect.Root>\n </Field>\n );\n}\n"],"names":["Field","BaseSelect","cn","ChevronsUpDown","Check"],"mappings":";;;;;;;;AAiDM,SAAU,MAAM,CAAI,EACxB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,oBAAoB,EACpB,EAAE,EACF,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAA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AE,kBAAkB,CAAC,EAAA,GACvC,cAAc,GAClB,CACuB;gCAC3B,KAAA,CAAA,aAAA,CAACD,aAAU,CAAC,QAAQ,EAAA,EAClB,SAAS,EAAEC,QAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAAA,GAC3C,aAAa,EAAA,EAEhB,KAAK,CACc,CACN,CACnB,CAAC,CACY;wBAClB,KAAA,CAAA,aAAA,CAACD,aAAU,CAAC,eAAe,EAAA,EACzB,SAAS,EAAEC,QAAE,CACX,yOAAyO,EACzO,wBAAwB,CACzB,EAAA,GACG,oBAAoB,EAAA,CACxB,CACe,CACG,CACN,CACJ,CACZ;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Select, SelectProps } from "./Select";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import {\n Button as BaseButton,\n ButtonProps as BaseButtonProps,\n} from \"@base-ui/react/button\";\nimport React from \"react\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface ButtonProps extends BaseButtonProps {\n variant?: ButtonVariant;\n size?: ButtonSize;\n}\n\nexport function Button({\n variant = \"primary\",\n size = \"md\",\n children,\n className,\n ...props\n}: ButtonProps) {\n return (\n <BaseButton\n className={cn(\n \"font-inherit focus-visible:outline-highlight m-0 flex items-center justify-center gap-2 rounded-lg px-3 py-2 outline-0 select-none focus-visible:outline-2 focus-visible:outline-offset-2 data-disabled:cursor-not-allowed data-disabled:opacity-60\",\n variantStyles[variant],\n sizeStyles[size],\n className,\n )}\n focusableWhenDisabled\n {...props}\n >\n {children}\n </BaseButton>\n );\n}\n\nconst variantStyles = {\n primary:\n \"bg-primary text-on-primary hover:bg-primary/90 active:bg-primary/80\",\n secondary:\n \"bg-secondary text-on-secondary hover:bg-secondary/90 active:bg-secondary/80\",\n muted: \"bg-muted text-on-muted hover:bg-muted/90 active:bg-muted/80\",\n error: \"bg-error text-on-error hover:bg-error/90 active:bg-error/80\",\n success:\n \"bg-success text-on-success hover:bg-success/90 active:bg-success/80\",\n outline:\n \"bg-transparent border text-foreground hover:bg-muted/10 active:bg-muted/20\",\n ghost: \"bg-transparent text-foreground hover:bg-muted/10 active:bg-muted/20\",\n link: \"bg-transparent text-link-foreground hover:underline underline-offset-4\",\n};\n\nconst sizeStyles = {\n sm: \"text-sm\",\n md: \"text-base\",\n lg: \"text-lg\",\n};\n\nexport type ButtonVariant = keyof typeof variantStyles;\nexport type ButtonSize = keyof typeof sizeStyles;\n"],"names":["React","BaseButton"],"mappings":";;;;SAYgB,MAAM,CAAC,EACrB,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACI,EAAA;AACZ,IAAA,QACEA,cAAA,CAAA,aAAA,CAACC,QAAU,EAAA,EACT,SAAS,EAAE,EAAE,CACX,qPAAqP,EACrP,aAAa,CAAC,OAAO,CAAC,EACtB,UAAU,CAAC,IAAI,CAAC,EAChB,SAAS,CACV,EACD,qBAAqB,EAAA,IAAA,EAAA,GACjB,KAAK,EAAA,EAER,QAAQ,CACE;AAEjB;AAEA,MAAM,aAAa,GAAG;AACpB,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,SAAS,EACP,6EAA6E;AAC/E,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,KAAK,EAAE,6DAA6D;AACpE,IAAA,OAAO,EACL,qEAAqE;AACvE,IAAA,OAAO,EACL,4EAA4E;AAC9E,IAAA,KAAK,EAAE,qEAAqE;AAC5E,IAAA,IAAI,EAAE,wEAAwE;CAC/E;AAED,MAAM,UAAU,GAAG;AACjB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,SAAS;CACd;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button, ButtonProps, ButtonSize, ButtonVariant } from "./Button";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import {\n Checkbox as BaseCheckbox,\n CheckboxRootProps as BaseCheckboxRootProps,\n CheckboxIndicatorProps,\n} from \"@base-ui/react/checkbox\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { CheckIcon } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { useCheckboxGroupContext } from \"../checkbox-group/CheckboxGroup\";\nimport { Field, FieldProps, useFieldContext } from \"../field/Field\";\n\nexport interface CheckboxProps\n extends BaseCheckboxRootProps, Omit<FieldAttributes, \"label\"> {\n label?: React.ReactNode;\n labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;\n indicatorProps?: CheckboxIndicatorProps;\n iconProps?: React.SVGProps<SVGSVGElement>;\n fieldProps?: FieldProps;\n}\n\nexport function Checkbox({\n label,\n className,\n fieldProps,\n description,\n isValidating: _isValidating,\n isValidatingMessage,\n errorMessage,\n labelProps: { className: labelClassName, ...labelProps } = {},\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n ...props\n}: CheckboxProps) {\n const labelId = React.useId();\n const isInCheckboxGroup = useCheckboxGroupContext();\n const { isValidating: groupIsValidating } = useFieldContext();\n const isValidating = isInCheckboxGroup ? groupIsValidating : _isValidating;\n\n const children = (\n <BaseField.Label\n className={cn(\n \"text-foreground flex items-center gap-2 text-base\",\n labelClassName,\n )}\n {...labelProps}\n >\n <BaseCheckbox.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating data-invalid:border-error-foreground data-invalid:data-checked:bg-error data-invalid:data-checked:border-error data-checked:bg-primary data-checked:border-primary focus-visible:outline-highlight flex size-5 items-center justify-center rounded-sm border outline-offset-2 focus-visible:outline-2\",\n className,\n )}\n aria-labelledby={labelId}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseCheckbox.Indicator\n className={cn(\n \"text-on-primary data-invalid:border-error data-invalid:bg-error flex data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n >\n <CheckIcon className={cn(\"size-4\", iconClassName)} {...iconProps} />\n </BaseCheckbox.Indicator>\n </BaseCheckbox.Root>\n <span id={labelId}>{label}</span>\n </BaseField.Label>\n );\n\n if (isInCheckboxGroup) {\n return <BaseField.Item>{children}</BaseField.Item>;\n }\n\n return (\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n {children}\n </Field>\n );\n}\n"],"names":["React","BaseField","BaseCheckbox","Field"],"mappings":";;;;;;;;AAsBM,SAAU,QAAQ,CAAC,EACvB,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EAAE,aAAa,EAC3B,mBAAmB,EACnB,YAAY,EACZ,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,EAC7D,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,SAAS,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,EAC1D,GAAG,KAAK,EACM,EAAA;AACd,IAAA,MAAM,OAAO,GAAGA,cAAK,CAAC,KAAK,EAAE;AAC7B,IAAA,MAAM,iBAAiB,GAAG,uBAAuB,EAAE;IACnD,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAG,eAAe,EAAE;IAC7D,MAAM,YAAY,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,aAAa;AAE1E,IAAA,MAAM,QAAQ,IACZA,cAAA,CAAA,aAAA,CAACC,KAAS,CAAC,KAAK,EAAA,EACd,SAAS,EAAE,EAAE,CACX,mDAAmD,EACnD,cAAc,CACf,KACG,UAAU,EAAA;QAEdD,cAAA,CAAA,aAAA,CAACE,UAAY,CAAC,IAAI,EAAA,EAChB,SAAS,EAAE,EAAE,CACX,2VAA2V,EAC3V,SAAS,CACV,qBACgB,OAAO,EAAA,iBAAA,EACP,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;AAET,YAAAF,cAAA,CAAA,aAAA,CAACE,UAAY,CAAC,SAAS,EAAA,EACrB,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,kBAAkB,CACnB,KACG,cAAc,EAAA;AAElB,gBAAAF,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAA,GAAM,SAAS,EAAA,CAAI,CAC7C,CACP;QACpBA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAE,OAAO,EAAA,EAAG,KAAK,CAAQ,CACjB,CACnB;IAED,IAAI,iBAAiB,EAAE;AACrB,QAAA,OAAOA,6BAACC,KAAS,CAAC,IAAI,EAAA,IAAA,EAAE,QAAQ,CAAkB;IACpD;IAEA,QACED,cAAA,CAAA,aAAA,CAACG,OAAK,EAAA,EACJ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,UAAU,EAAA,EAEb,QAAQ,CACH;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Checkbox, CheckboxProps } from "./Checkbox";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","sources":["../../../../src/components/checkbox-group/CheckboxGroup.tsx"],"sourcesContent":["import {\n CheckboxGroup as BaseCheckboxGroup,\n CheckboxGroupProps as BaseCheckboxGroupProps,\n} from \"@base-ui/react/checkbox-group\";\nimport {\n Fieldset,\n FieldsetLegendProps,\n FieldsetRootProps,\n} from \"@base-ui/react/fieldset\";\nimport * as React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { Field, FieldProps } from \"../field/Field\";\n\nexport interface CheckboxGroupProps\n extends BaseCheckboxGroupProps, FieldAttributes {\n children?: React.ReactNode;\n fieldProps?: FieldProps;\n fieldsetProps?: FieldsetRootProps;\n legendProps?: FieldsetLegendProps;\n}\n\nexport function CheckboxGroup({\n children,\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n description,\n fieldProps,\n fieldsetProps: { className: fieldsetClassName, ...fieldsetProps } = {},\n legendProps: { className: legendClassName, ...legendProps } = {},\n ...props\n}: CheckboxGroupProps) {\n return (\n <CheckboxGroupContext.Provider value={true}>\n <Field\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <Fieldset.Root\n render={<BaseCheckboxGroup {...props} />}\n className={cn(\"flex flex-col gap-1\", fieldsetClassName)}\n {...fieldsetProps}\n >\n <Fieldset.Legend\n className={cn(\n \"text-foreground text-sm font-semibold\",\n legendClassName,\n )}\n {...legendProps}\n >\n {label}\n </Fieldset.Legend>\n {children}\n </Fieldset.Root>\n </Field>\n </CheckboxGroupContext.Provider>\n );\n}\n\nconst CheckboxGroupContext = React.createContext<boolean>(false);\n\nexport function useCheckboxGroupContext() {\n return React.useContext(CheckboxGroupContext);\n}\n"],"names":["BaseCheckboxGroup"],"mappings":";;;;;;AAsBM,SAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,aAAa,EAAE,GAAG,EAAE,EACtE,WAAW,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,WAAW,EAAE,GAAG,EAAE,EAChE,GAAG,KAAK,EACW,EAAA;IACnB,QACE,oBAAC,oBAAoB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,IAAI,EAAA;AACxC,QAAA,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EACJ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,KACpB,UAAU,EAAA;YAEd,KAAA,CAAA,aAAA,CAAC,QAAQ,CAAC,IAAI,EAAA,EACZ,MAAM,EAAE,KAAA,CAAA,aAAA,CAACA,eAAiB,EAAA,EAAA,GAAK,KAAK,GAAI,EACxC,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,EAAA,GACnD,aAAa,EAAA;AAEjB,gBAAA,KAAA,CAAA,aAAA,CAAC,QAAQ,CAAC,MAAM,EAAA,EACd,SAAS,EAAE,EAAE,CACX,uCAAuC,EACvC,eAAe,CAChB,EAAA,GACG,WAAW,EAAA,EAEd,KAAK,CACU;AACjB,gBAAA,QAAQ,CACK,CACV,CACsB;AAEpC;AAEA,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAU,KAAK,CAAC;SAEhD,uBAAuB,GAAA;AACrC,IAAA,OAAO,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC;AAC/C;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CheckboxGroup, CheckboxGroupProps } from "./CheckboxGroup";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../src/components/field/Field.tsx"],"sourcesContent":["import {\n Field as BaseField,\n FieldRootProps as BaseFieldRootProps,\n FieldDescriptionProps,\n FieldErrorProps,\n FieldLabelProps,\n} from \"@base-ui/react/field\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\n\nexport interface FieldProps extends BaseFieldRootProps, FieldAttributes {\n labelProps?: FieldLabelProps;\n errorMessageProps?: FieldErrorProps;\n descriptionProps?: FieldDescriptionProps;\n isValidatingMessageProps?: FieldDescriptionProps;\n}\n\nexport function Field({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n children,\n labelProps: { className: labelClassName, ...labelProps } = {},\n errorMessageProps: {\n className: errorMessageClassName,\n ...errorMessageProps\n } = {},\n descriptionProps: {\n className: descriptionClassName,\n ...descriptionProps\n } = {},\n isValidatingMessageProps: {\n className: isValidatingMessageClassName,\n ...isValidatingMessageProps\n } = {},\n ...props\n}: FieldProps) {\n const invalid = !!errorMessage;\n\n return (\n <FieldContext.Provider value={{ isValidating: !!isValidating }}>\n <BaseField.Root\n className={cn(\"flex flex-col gap-1\", className)}\n invalid={invalid}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n {label && (\n <BaseField.Label\n className={cn(\n \"text-foreground text-sm font-semibold\",\n labelClassName,\n )}\n {...labelProps}\n >\n {label}\n </BaseField.Label>\n )}\n {children}\n <BaseField.Error\n className={cn(\"text-error-foreground text-sm\", errorMessageClassName)}\n match={invalid}\n {...errorMessageProps}\n >\n {errorMessage}\n </BaseField.Error>\n {isValidating && isValidatingMessage && !errorMessage && (\n <BaseField.Description\n className={cn(\n \"text-primary-foreground animate-validating-message text-sm\",\n isValidatingMessageClassName,\n )}\n {...isValidatingMessageProps}\n >\n {isValidatingMessage}\n </BaseField.Description>\n )}\n {description && (\n <BaseField.Description\n className={cn(\n \"text-muted-foreground text-sm\",\n descriptionClassName,\n )}\n {...descriptionProps}\n >\n {description}\n </BaseField.Description>\n )}\n </BaseField.Root>\n </FieldContext.Provider>\n );\n}\n\nexport const FieldContext = React.createContext({\n isValidating: false,\n});\n\nexport function useFieldContext() {\n return React.useContext(FieldContext);\n}\n"],"names":["React","BaseField"],"mappings":";;;;AAkBM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,GAA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EAAA,EAE3B,mBAAmB,CACE,CACzB;YACA,WAAW,KACVD,cAAA,CAAA,aAAA,CAACC,OAAS,CAAC,WAAW,EAAA,EACpB,SAAS,EAAE,EAAE,CACX,+BAA+B,EAC/B,oBAAoB,CACrB,EAAA,GACG,gBAAgB,EAAA,EAEnB,WAAW,CACU,CACzB,CACc,CACK;AAE5B;AAEO,MAAM,YAAY,GAAGD,cAAK,CAAC,aAAa,CAAC;AAC9C,IAAA,YAAY,EAAE,KAAK;AACpB,CAAA;SAEe,eAAe,GAAA;AAC7B,IAAA,OAAOA,cAAK,CAAC,UAAU,CAAC,YAAY,CAAC;AACvC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Field, FieldProps } from "./Field";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import {\n Input as BaseInput,\n InputProps as BaseInputProps,\n} from \"@base-ui/react/input\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { Field, FieldProps } from \"../field/Field\";\n\nexport interface InputProps extends BaseInputProps, FieldAttributes {\n fieldProps?: FieldProps;\n button?: React.ReactNode;\n}\n\nexport function Input({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n button,\n ...props\n}: InputProps) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <div className=\"flex items-stretch gap-2\">\n <BaseInput\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating focus:border-highlight placeholder:text-muted-foreground focus:inset-shadow-muted/50 w-full min-w-40 rounded-lg border p-2 transition-colors outline-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n />\n {button}\n </div>\n </Field>\n );\n}\n"],"names":["React","BaseInput"],"mappings":";;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,MAAM,EACN,GAAG,KAAK,EACG,EAAA;IACX,QACEA,cAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EACJ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EAAA,GACpB,UAAU,EAAA;QAEdA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,EAAA;YACvCA,cAAA,CAAA,aAAA,CAACC,OAAS,IACR,SAAS,EAAE,EAAE,CACX,oRAAoR,EACpR,SAAS,CACV,EAAA,iBAAA,EACgB,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA,CACT;YACD,MAAM,CACH,CACA;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Input, InputProps } from "./Input";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":["../../../../src/components/radio/Radio.tsx"],"sourcesContent":["import {\n Radio as BaseRadio,\n RadioIndicatorProps,\n RadioRootProps,\n} from \"@base-ui/react/radio\";\nimport * as React from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { useFieldContext } from \"../field/Field\";\n\nexport interface RadioProps extends RadioRootProps {\n label?: React.ReactNode;\n indicatorProps?: RadioIndicatorProps;\n}\n\nexport function Radio({\n label,\n indicatorProps: { className: indicatorClassName, ...indicatorProps } = {},\n ...props\n}: RadioProps) {\n const id = React.useId();\n const { isValidating } = useFieldContext();\n\n return (\n <label className=\"flex items-center gap-2\" id={id}>\n <BaseRadio.Root\n className={cn(\n \"data-validating:not-data-invalid:animate-validating focus-visible:outline-highlight data-checked:border-primary-foreground data-invalid:border-error-foreground flex size-5 items-center justify-center rounded-full border focus-visible:outline-2 focus-visible:outline-offset-2\",\n )}\n aria-labelledby={id}\n data-validating={isValidating ? \"\" : undefined}\n {...props}\n >\n <BaseRadio.Indicator\n className={cn(\n \"before:bg-primary data-invalid:before:bg-error flex before:size-3 before:rounded-full data-unchecked:hidden\",\n indicatorClassName,\n )}\n {...indicatorProps}\n />\n </BaseRadio.Root>\n {label}\n </label>\n );\n}\n"],"names":["BaseRadio"],"mappings":";;;;;AAcM,SAAU,KAAK,CAAC,EACpB,KAAK,EACL,cAAc,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,EACzE,GAAG,KAAK,EACG,EAAA;AACX,IAAA,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE;AACxB,IAAA,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE;IAE1C,QACE,+BAAO,SAAS,EAAC,yBAAyB,EAAC,EAAE,EAAE,EAAE,EAAA;QAC/C,KAAA,CAAA,aAAA,CAACA,OAAS,CAAC,IAAI,EAAA,EACb,SAAS,EAAE,EAAE,CACX,oRAAoR,CACrR,EAAA,iBAAA,EACgB,EAAE,EAAA,iBAAA,EACF,YAAY,GAAG,EAAE,GAAG,SAAS,EAAA,GAC1C,KAAK,EAAA;AAET,YAAA,KAAA,CAAA,aAAA,CAACA,OAAS,CAAC,SAAS,EAAA,EAClB,SAAS,EAAE,EAAE,CACX,6GAA6G,EAC7G,kBAAkB,CACnB,EAAA,GACG,cAAc,GAClB,CACa;QAChB,KAAK,CACA;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Radio, RadioProps } from "./Radio";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { RadioGroup, RadioGroupProps } from "./RadioGroup";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../../src/components/select/Select.tsx"],"sourcesContent":["import {\n Select as BaseSelect,\n SelectIconProps,\n SelectItemIndicatorProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectListProps,\n SelectPopupProps,\n SelectPortalProps,\n SelectPositionerProps,\n SelectRootProps,\n SelectScrollDownArrowProps,\n SelectScrollUpArrowProps,\n SelectTriggerProps,\n SelectValueProps,\n} from \"@base-ui/react/select\";\nimport { Check, ChevronsUpDown } from \"lucide-react\";\nimport React from \"react\";\nimport { FieldAttributes } from \"../../lib/types\";\nimport { cn } from \"../../lib/utils\";\nimport { Field, FieldProps } from \"../field/Field\";\n\nexport interface SelectProps<T>\n extends\n Omit<SelectTriggerProps, \"value\">,\n SelectRootProps<T>,\n FieldAttributes {\n placeholder?: React.ReactNode;\n triggerDisabled?: SelectTriggerProps[\"disabled\"];\n triggerId?: SelectTriggerProps[\"id\"];\n triggerName?: SelectTriggerProps[\"name\"];\n triggerValue?: SelectTriggerProps[\"value\"];\n fieldProps?: FieldProps;\n triggerProps?: SelectTriggerProps;\n valueProps?: SelectValueProps;\n selectIconProps?: SelectIconProps;\n iconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n portalProps?: SelectPortalProps;\n positionerProps?: SelectPositionerProps;\n popupProps?: SelectPopupProps;\n scrollUpArrowProps?: SelectScrollUpArrowProps;\n listProps?: SelectListProps;\n itemProps?: SelectItemProps;\n itemIndicatorProps?: SelectItemIndicatorProps;\n checkIconProps?: React.ComponentPropsWithoutRef<\"svg\">;\n itemTextProps?: SelectItemTextProps;\n scrollDownArrowProps?: SelectScrollDownArrowProps;\n}\n\nexport function Select<T>({\n label,\n isValidating,\n isValidatingMessage,\n errorMessage,\n className,\n description,\n fieldProps,\n items,\n placeholder,\n actionsRef,\n autoComplete,\n defaultOpen,\n defaultValue,\n disabled,\n highlightItemOnHover,\n id,\n inputRef,\n isItemEqualToValue,\n itemToStringLabel,\n itemToStringValue,\n modal,\n multiple,\n name,\n onOpenChange,\n onOpenChangeComplete,\n onValueChange,\n open,\n readOnly,\n required,\n value,\n triggerDisabled,\n triggerId,\n triggerName,\n triggerValue,\n valueProps: { className: valueClassName, ...valueProps } = {},\n selectIconProps: { className: selectIconClassName, ...selectIconProps } = {},\n iconProps: { className: iconClassName, ...iconProps } = {},\n portalProps,\n positionerProps: { className: positionerClassName, ...positionerProps } = {},\n popupProps: { className: popupClassName, ...popupProps } = {},\n scrollUpArrowProps: {\n className: scrollUpArrowClassName,\n ...scrollUpArrowProps\n } = {},\n listProps: { className: listClassName, ...listProps } = {},\n itemProps: { className: itemClassName, ...itemProps } = {},\n itemIndicatorProps: {\n className: itemIndicatorClassName,\n ...itemIndicatorProps\n } = {},\n checkIconProps: { className: checkIconClassName, ...checkIconProps } = {},\n itemTextProps: { className: itemTextClassName, ...itemTextProps } = {},\n scrollDownArrowProps: {\n className: scrollDownArrowClassName,\n ...scrollDownArrowProps\n } = {},\n ...props\n}: SelectProps<T>) {\n return (\n <Field\n label={label}\n isValidating={isValidating}\n isValidatingMessage={isValidatingMessage}\n errorMessage={errorMessage}\n description={description}\n {...fieldProps}\n >\n <BaseSelect.Root\n items={items}\n actionsRef={actionsRef}\n autoComplete={autoComplete}\n defaultOpen={defaultOpen}\n defaultValue={defaultValue}\n disabled={disabled}\n highlightItemOnHover={highlightItemOnHover}\n id={id}\n inputRef={inputRef}\n isItemEqualToValue={isItemEqualToValue}\n itemToStringLabel={itemToStringLabel}\n itemToStringValue={itemToStringValue}\n modal={modal}\n multiple={multiple}\n name={name}\n onOpenChange={onOpenChange}\n onOpenChangeComplete={onOpenChangeComplete}\n onValueChange={onValueChange}\n open={open}\n readOnly={readOnly}\n required={required}\n value={value}\n >\n <BaseSelect.Trigger\n className={cn(\n \"data-invalid:not-focus:border-error-foreground data-validating:not-data-invalid:animate-validating hover:bg-card data-popup-open:bg-card focus-visible:border-highlight focus:inset-shadow-muted/50 flex min-w-40 items-center justify-between gap-3 rounded-lg border p-2 text-base transition-colors outline-none select-none focus:inset-shadow-sm\",\n className,\n )}\n data-validating={isValidating ? \"\" : undefined}\n disabled={triggerDisabled}\n id={triggerId}\n name={triggerName}\n value={triggerValue}\n {...props}\n >\n <BaseSelect.Value\n className={cn(\"data-placeholder:opacity-60\", valueClassName)}\n placeholder={placeholder}\n {...valueProps}\n />\n <BaseSelect.Icon\n className={cn(\"flex\", selectIconClassName)}\n {...selectIconProps}\n >\n <ChevronsUpDown\n className={cn(\"size-4\", iconClassName)}\n {...iconProps}\n />\n </BaseSelect.Icon>\n </BaseSelect.Trigger>\n <BaseSelect.Portal {...portalProps}>\n <BaseSelect.Positioner\n className={cn(\"z-10 outline-none select-none\", positionerClassName)}\n sideOffset={8}\n {...positionerProps}\n >\n <BaseSelect.Popup\n className={cn(\n \"group bg-background outline-border min-w-(--anchor-width) origin-(--transform-origin) rounded-lg bg-clip-padding shadow-lg outline transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] data-[side=none]:data-ending-style:transition-none data-[side=none]:data-starting-style:scale-100 data-[side=none]:data-starting-style:opacity-100 data-[side=none]:data-starting-style:transition-none\",\n popupClassName,\n )}\n {...popupProps}\n >\n <BaseSelect.ScrollUpArrow\n className={cn(\n \"bg-background top-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-top-full\",\n scrollUpArrowClassName,\n )}\n {...scrollUpArrowProps}\n />\n <BaseSelect.List\n className={cn(\n \"relative max-h-(--available-height) scroll-py-6 overflow-y-auto py-1\",\n listClassName,\n )}\n {...listProps}\n >\n {Array.isArray(items) &&\n items.map(({ label, value }) => (\n <BaseSelect.Item\n key={String(value)}\n value={value}\n className={cn(\n \"data-highlighted:before:bg-primary data-highlighted:text-on-primary grid cursor-default grid-cols-[0.75rem_1fr] items-center gap-2 py-2 pr-4 pl-2.5 text-sm leading-4 outline-none select-none group-data-[side=none]:pr-12 group-data-[side=none]:text-base group-data-[side=none]:leading-4 data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-1 data-highlighted:before:inset-y-0 data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm pointer-coarse:py-2.5 pointer-coarse:text-[0.925rem]\",\n itemClassName,\n )}\n {...itemProps}\n >\n <BaseSelect.ItemIndicator\n className={cn(\"col-start-1\", itemIndicatorClassName)}\n {...itemIndicatorProps}\n >\n <Check\n className={cn(\"size-3\", checkIconClassName)}\n {...checkIconProps}\n />\n </BaseSelect.ItemIndicator>\n <BaseSelect.ItemText\n className={cn(\"col-start-2\", itemTextClassName)}\n {...itemTextProps}\n >\n {label}\n </BaseSelect.ItemText>\n </BaseSelect.Item>\n ))}\n </BaseSelect.List>\n <BaseSelect.ScrollDownArrow\n className={cn(\n \"bg-background bottom-0 z-1 flex h-4 w-full cursor-default items-center justify-center rounded-lg text-center text-xs before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-bottom-full\",\n scrollDownArrowClassName,\n )}\n {...scrollDownArrowProps}\n />\n </BaseSelect.Popup>\n </BaseSelect.Positioner>\n </BaseSelect.Portal>\n </BaseSelect.Root>\n </Field>\n );\n}\n"],"names":["React","BaseSelect"],"mappings":";;;;;;AAiDM,SAAU,MAAM,CAAI,EACxB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,oBAAoB,EACpB,EAAE,EACF,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EAAE,EA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EAAA,EACJ,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,kBAAkB,CAAC,EAAA,GACvC,cAAc,GAClB,CACuB;gCAC3BA,cAAA,CAAA,aAAA,CAACC,QAAU,CAAC,QAAQ,EAAA,EAClB,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAAA,GAC3C,aAAa,EAAA,EAEhB,KAAK,CACc,CACN,CACnB,CAAC,CACY;wBAClBD,cAAA,CAAA,aAAA,CAACC,QAAU,CAAC,eAAe,EAAA,EACzB,SAAS,EAAE,EAAE,CACX,yOAAyO,EACzO,wBAAwB,CACzB,EAAA,GACG,oBAAoB,EAAA,CACxB,CACe,CACG,CACN,CACJ,CACZ;AAEZ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Select, SelectProps } from "./Select";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|