blimpui 0.0.29 → 0.0.32

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.
@@ -1,7 +1,7 @@
1
+ import * as React from "react";
1
2
  import { type CalendarProps } from "./calendar";
2
3
  import { type FormFieldProps } from "./form-field";
3
4
  import { PopoverContent } from "./popover";
4
- import * as React from "react";
5
5
  type DatePickerProps = Omit<FormFieldProps, "children" | "value" | "defaultValue" | "onValueChange" | "onFocus" | "onBlur" | "placeholder"> & {
6
6
  value?: Date;
7
7
  defaultValue?: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/datepicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,EAAW,cAAc,EAAkB,MAAM,WAAW,CAAC;AAGpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,eAAe,GAAG,IAAI,CAC1B,cAAc,EACZ,UAAU,GACV,OAAO,GACP,cAAc,GACd,eAAe,GACf,SAAS,GACT,QAAQ,GACR,aAAa,CACf,GAAG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,KAAK,MAAM,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC3C,aAAa,CAAC,EAAE,IAAI,CACnB,aAAa,EACb,OAAO,GAAG,cAAc,GAAG,eAAe,CAC1C,CAAC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AAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,KAAK,MAAM,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IAC3C,aAAa,CAAC,EAAE,IAAI,CACnB,aAAa,EACb,OAAO,GAAG,cAAc,GAAG,eAAe,CAC1C,CAAC;IACF,mBAAmB,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACvC,CAAC;AAcF,iBAAS,UAAU,CAAC,EACnB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAA6B,EAC7B,UAAU,EACV,MAAM,EACN,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,cAAc,EACd,GAAG,cAAc,EACjB,EAAE,eAAe,2CAsHjB;kBAvIQ,UAAU;;;AA2InB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -22,14 +22,14 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
24
  import { cn } from "../../../$/lib/utils";
25
+ import * as React from "react";
26
+ import { Pressable, useWindowDimensions, View } from "react-native";
25
27
  import { useControllableState } from "../primitives/calendar/use-controllable-state";
26
28
  import { Calendar } from "./calendar";
27
29
  import { FormField } from "./form-field";
28
30
  import { Icon } from "./icon";
29
- import { Text } from "./text";
30
31
  import { Popover } from "./popover";
31
- import * as React from "react";
32
- import { Pressable, useWindowDimensions, View } from "react-native";
32
+ import { Text } from "./text";
33
33
  var buildDefaultFormatter = function (locale, formatOptions) {
34
34
  var formatter = new Intl.DateTimeFormat(locale, formatOptions !== null && formatOptions !== void 0 ? formatOptions : { dateStyle: "medium" });
35
35
  return function (date) { return (date ? formatter.format(date) : ""); };
@@ -10,6 +10,7 @@ type InputFieldProps = {
10
10
  onFieldFocus?: FormFieldProps["onFocus"];
11
11
  /** Optional blur callback tied to the floating label container. */
12
12
  onFieldBlur?: FormFieldProps["onBlur"];
13
+ className?: string;
13
14
  } & Omit<FormFieldProps, "children" | "className" | "onFocus" | "onBlur" | "placeholder"> & (TextInputProps & {
14
15
  placeholderTextColorClassName?: string;
15
16
  });
@@ -22,6 +23,7 @@ declare const InputField: React.ForwardRefExoticComponent<{
22
23
  onFieldFocus?: FormFieldProps["onFocus"];
23
24
  /** Optional blur callback tied to the floating label container. */
24
25
  onFieldBlur?: FormFieldProps["onBlur"];
26
+ className?: string;
25
27
  } & Omit<FormFieldProps, "children" | "className" | "onBlur" | "onFocus" | "placeholder"> & TextInputProps & {
26
28
  placeholderTextColorClassName?: string;
27
29
  } & React.RefAttributes<TextInput>>;
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,SAAS,EAET,KAAK,cAAc,EAEnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,KAAK,eAAe,GAAG;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oEAAoE;IACpE,YAAY,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACzC,mEAAmE;IACnE,WAAW,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,C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CAAC,QAAQ,CAAC;gBAC1B,MAAM;;oCAKkC,MAAM;mCAqF1D,CAAC;AAIF,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,CAAC;AAC/B,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -10,6 +10,7 @@ type TextareaFieldProps = {
10
10
  onFieldFocus?: FormFieldProps["onFocus"];
11
11
  /** Optional blur callback tied to the floating label container. */
12
12
  onFieldBlur?: FormFieldProps["onBlur"];
13
+ className?: string;
13
14
  } & Omit<FormFieldProps, "children" | "className" | "onFocus" | "onBlur" | "placeholder"> & (TextInputProps & {
14
15
  placeholderTextColorClassName?: string;
15
16
  });
@@ -22,6 +23,7 @@ declare const TextareaField: React.ForwardRefExoticComponent<{
22
23
  onFieldFocus?: FormFieldProps["onFocus"];
23
24
  /** Optional blur callback tied to the floating label container. */
24
25
  onFieldBlur?: FormFieldProps["onBlur"];
26
+ className?: string;
25
27
  } & Omit<FormFieldProps, "children" | "className" | "onBlur" | "onFocus" | "placeholder"> & TextInputProps & {
26
28
  placeholderTextColorClassName?: string;
27
29
  } & React.RefAttributes<TextInput>>;
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/textarea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEN,SAAS,EAGT,KAAK,cAAc,EACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9D,KAAK,kBAAkB,GAAG;IACzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oEAAoE;IACpE,YAAY,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACzC,mEAAmE;IACnE,WAAW,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACvC,GAAG,IAAI,CACP,cAAc,EACd,UAAU,GAAG,WAAW,GAAG,SAAS,GA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,CAAC;AAIF,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,CAAC;AACrC,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -37,7 +37,7 @@ export * from "./$/components/ui/portal";
37
37
  export * from "./$/providers/Provider";
38
38
  export * from "./$/components/ui/radio-group";
39
39
  export * from "./$/components/ui/range-calendar";
40
- export * from "./$/components/ui/select";
40
+ export * from "./$/components/ui/select/index";
41
41
  export * from "./$/components/ui/separator";
42
42
  export * from "./$/components/ui/switch";
43
43
  export * from "./$/components/ui/skeleton";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAE5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,yBAAyB,CAAC;AAExC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAExC,cAA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ist/index.js CHANGED
@@ -37,7 +37,7 @@ export * from "./$/components/ui/portal";
37
37
  export * from "./$/providers/Provider";
38
38
  export * from "./$/components/ui/radio-group";
39
39
  export * from "./$/components/ui/range-calendar";
40
- export * from "./$/components/ui/select";
40
+ export * from "./$/components/ui/select/index";
41
41
  export * from "./$/components/ui/separator";
42
42
  export * from "./$/components/ui/switch";
43
43
  export * from "./$/components/ui/skeleton";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blimpui",
3
- "version": "0.0.29",
3
+ "version": "0.0.32",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- export { Icon } from "../primitives/icon";
2
- //# sourceMappingURL=icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- export { Icon } from "../primitives/icon";
@@ -1,75 +0,0 @@
1
- import { NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, type Option as PrimitiveOption, type TriggerRef } from "../primitives/select";
2
- import { type FormFieldProps } from "./form-field";
3
- import * as SelectPrimitive from "@rn-primitives/select";
4
- import * as React from "react";
5
- import { View } from "react-native";
6
- type SelectOption = {
7
- label: string;
8
- value: string;
9
- disabled?: boolean;
10
- renderOption?: (option: SelectOption, state: OptionRenderState) => React.ReactNode;
11
- };
12
- type OptionRenderState = {
13
- isSelected: boolean;
14
- isDisabled: boolean;
15
- };
16
- type SelectClassNames = {
17
- trigger?: string;
18
- value?: string;
19
- content?: string;
20
- optionList?: string;
21
- optionItemContainer?: string;
22
- optionItemLabel?: string;
23
- optionItemActiveContainer?: string;
24
- optionItemDisabledContainer?: string;
25
- optionItemIndicator?: string;
26
- };
27
- type SelectProps = Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, "children" | "value" | "defaultValue" | "onValueChange"> & {
28
- options: SelectOption[];
29
- value?: string;
30
- defaultValue?: string;
31
- placeholder?: string;
32
- renderOption?: (option: SelectOption, state: OptionRenderState) => React.ReactNode;
33
- classNames?: SelectClassNames;
34
- triggerProps?: React.ComponentPropsWithoutRef<typeof SelectTrigger>;
35
- contentProps?: React.ComponentPropsWithoutRef<typeof SelectContent>;
36
- valueProps?: Omit<React.ComponentPropsWithoutRef<typeof SelectValue>, "placeholder">;
37
- scrollViewProps?: React.ComponentProps<typeof NativeSelectScrollView>;
38
- onValueChange?: (value: string | undefined, option?: SelectOption) => void;
39
- onOptionChange?: (option: PrimitiveOption) => void;
40
- };
41
- type SelectFieldProps = SelectProps & Omit<FormFieldProps, "children" | "value" | "defaultValue" | "onValueChange" | "onFocus" | "onBlur" | "placeholder"> & {
42
- onFieldFocus?: FormFieldProps["onFocus"];
43
- onFieldBlur?: FormFieldProps["onBlur"];
44
- };
45
- declare const SelectField: React.ForwardRefExoticComponent<Omit<Omit<import("react-native").ViewProps & {
46
- asChild?: boolean;
47
- } & {
48
- value?: import("@rn-primitives/select").Option;
49
- defaultValue?: import("@rn-primitives/select").Option;
50
- onValueChange?: (option: import("@rn-primitives/select").Option) => void;
51
- onOpenChange?: (open: boolean) => void;
52
- disabled?: boolean;
53
- dir?: "ltr" | "rtl";
54
- name?: string;
55
- required?: boolean;
56
- } & React.RefAttributes<View>, "ref">, "children" | "value" | "defaultValue" | "onValueChange"> & {
57
- options: SelectOption[];
58
- value?: string;
59
- defaultValue?: string;
60
- placeholder?: string;
61
- renderOption?: (option: SelectOption, state: OptionRenderState) => React.ReactNode;
62
- classNames?: SelectClassNames;
63
- triggerProps?: React.ComponentPropsWithoutRef<typeof SelectTrigger>;
64
- contentProps?: React.ComponentPropsWithoutRef<typeof SelectContent>;
65
- valueProps?: Omit<React.ComponentPropsWithoutRef<typeof SelectValue>, "placeholder">;
66
- scrollViewProps?: React.ComponentProps<typeof NativeSelectScrollView>;
67
- onValueChange?: (value: string | undefined, option?: SelectOption) => void;
68
- onOptionChange?: (option: PrimitiveOption) => void;
69
- } & Omit<FormFieldProps, "children" | "onBlur" | "onFocus" | "value" | "defaultValue" | "onValueChange" | "placeholder"> & {
70
- onFieldFocus?: FormFieldProps["onFocus"];
71
- onFieldBlur?: FormFieldProps["onBlur"];
72
- } & React.RefAttributes<TriggerRef>>;
73
- export type { OptionRenderState, SelectClassNames, SelectOption, SelectProps, SelectFieldProps, };
74
- export { SelectField as Select, NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, };
75
- //# sourceMappingURL=select.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../$/components/ui/select.tsx"],"names":[],"mappings":"AACA,OAAO,EACN,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,WAAW,EACX,KAAK,MAAM,IAAI,eAAe,EAC9B,KAAK,UAAU,EACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,YAAY,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CACd,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,iBAAiB,KACpB,KAAK,CAAC,SAAS,CAAC;CACrB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf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AAK,gBAAgB,GAAG,WAAW,GAClC,IAAI,CACH,cAAc,EACZ,UAAU,GACV,OAAO,GACP,cAAc,GACd,eAAe,GACf,SAAS,GACT,QAAQ,GACR,aAAa,CACf,GAAG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACvC,CAAC;AA4KH,QAAA,MAAM,WAAW;;;;;;;;;;;;aA7MP,YAAY,EAAE;YACf,MAAM;mBACC,MAAM;kBACP,MAAM;mBACL,CACd,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,iBAAiB,KACpB,KAAK,CAAC,SAAS;iBACP,gBAAgB;mBACd,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC;mBACpD,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC;iBACtD,IAAI,CAChB,KAAK,CAAC,wBAAwB,CAAC,OAAO,WAAW,CAAC,EAClD,aAAa,CACb;sBACiB,KAAK,CAAC,cAAc,CAAC,OAAO,sBAAsB,CAAC;oBACrD,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,YAAY,KAAK,IAAI;qBACzD,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI;;mBAclC,cAAc,CAAC,SAAS,CAAC;kBAC1B,cAAc,CAAC,QAAQ,CAAC;oCAwRvC,CAAC;AAIF,YAAY,EACX,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,gBAAgB,GAChB,CAAC;AACF,OAAO,EACN,WAAW,IAAI,MAAM,EACrB,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,WAAW,GACX,CAAC"}
@@ -1,105 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
- import { Icon } from "../../../$/components/primitives/icon";
25
- import { NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, } from "../primitives/select";
26
- import { cn } from "../../../$/lib/utils";
27
- import { FormField } from "./form-field";
28
- import * as SelectPrimitive from "@rn-primitives/select";
29
- import { Check } from "lucide-react-native";
30
- import * as React from "react";
31
- import { Platform, View } from "react-native";
32
- var toPrimitiveOption = function (optionValue, optionsMap) {
33
- if (!optionValue)
34
- return undefined;
35
- var match = optionsMap.get(optionValue);
36
- if (match)
37
- return { value: match.value, label: match.label };
38
- return { value: optionValue, label: optionValue };
39
- };
40
- var OptionList = function (_a) {
41
- var options = _a.options, renderOption = _a.renderOption, classNames = _a.classNames;
42
- var value = SelectPrimitive.useRootContext().value;
43
- var selectedValue = value === null || value === void 0 ? void 0 : value.value;
44
- return (_jsx(_Fragment, { children: options.map(function (option) {
45
- var _a, _b;
46
- var isSelected = selectedValue === option.value;
47
- var isDisabled = !!option.disabled;
48
- var renderer = (_a = option.renderOption) !== null && _a !== void 0 ? _a : renderOption;
49
- var content = (_b = renderer === null || renderer === void 0 ? void 0 : renderer(option, { isSelected: isSelected, isDisabled: isDisabled })) !== null && _b !== void 0 ? _b : (_jsx(SelectPrimitive.ItemText, { className: cn("text-foreground text-sm", classNames === null || classNames === void 0 ? void 0 : classNames.optionItemLabel) }));
50
- return (_jsxs(SelectPrimitive.Item, { value: option.value, label: option.label, disabled: option.disabled, className: cn("group relative flex w-full flex-row items-center gap-2 rounded-sm py-2 pl-3 pr-8 sm:py-1.5", Platform.select({
51
- web: cn("focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none", "[&_svg]:pointer-events-none"),
52
- }), classNames === null || classNames === void 0 ? void 0 : classNames.optionItemContainer, isSelected && (classNames === null || classNames === void 0 ? void 0 : classNames.optionItemActiveContainer), isDisabled && (classNames === null || classNames === void 0 ? void 0 : classNames.optionItemDisabledContainer)), children: [_jsx(View, { className: cn("absolute right-2 flex size-3.5 items-center justify-center", classNames === null || classNames === void 0 ? void 0 : classNames.optionItemIndicator), children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Icon, { as: Check, className: "text-muted-foreground size-4 shrink-0" }) }) }), content] }, option.value));
53
- }) }));
54
- };
55
- var Select = React.forwardRef(function (props, ref) {
56
- var options = props.options, value = props.value, defaultValue = props.defaultValue, _a = props.placeholder, placeholder = _a === void 0 ? "Select an option" : _a, renderOption = props.renderOption, classNames = props.classNames, triggerProps = props.triggerProps, contentProps = props.contentProps, valueProps = props.valueProps, scrollViewProps = props.scrollViewProps, onValueChange = props.onValueChange, onOptionChange = props.onOptionChange, rootProps = __rest(props, ["options", "value", "defaultValue", "placeholder", "renderOption", "classNames", "triggerProps", "contentProps", "valueProps", "scrollViewProps", "onValueChange", "onOptionChange"]);
57
- var optionsMap = React.useMemo(function () { return new Map(options.map(function (option) { return [option.value, option]; })); }, [options]);
58
- var resolvedValue = React.useMemo(function () { return toPrimitiveOption(value, optionsMap); }, [value, optionsMap]);
59
- var resolvedDefaultValue = React.useMemo(function () { return toPrimitiveOption(defaultValue, optionsMap); }, [defaultValue, optionsMap]);
60
- var handleValueChange = React.useCallback(function (option) {
61
- var _a, _b;
62
- onOptionChange === null || onOptionChange === void 0 ? void 0 : onOptionChange(option);
63
- var matchingOption = (option === null || option === void 0 ? void 0 : option.value)
64
- ? (_a = optionsMap.get(option.value)) !== null && _a !== void 0 ? _a : (option
65
- ? { label: (_b = option.label) !== null && _b !== void 0 ? _b : option.value, value: option.value }
66
- : undefined)
67
- : undefined;
68
- onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(option === null || option === void 0 ? void 0 : option.value, matchingOption);
69
- }, [onOptionChange, onValueChange, optionsMap]);
70
- return (_jsxs(SelectPrimitive.Root, __assign({ value: resolvedValue, defaultValue: resolvedDefaultValue, onValueChange: handleValueChange }, rootProps, { className: cn("w-full", rootProps.className), children: [_jsx(SelectTrigger, __assign({ ref: ref }, triggerProps, { className: cn("border-none bg-transparent text-foreground placeholder:text-muted-foreground w-full", triggerProps === null || triggerProps === void 0 ? void 0 : triggerProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.trigger), children: _jsx(SelectValue, __assign({ placeholder: placeholder }, valueProps, { className: cn("text-foreground placeholder:text-muted-foreground", valueProps === null || valueProps === void 0 ? void 0 : valueProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.value) })) })), _jsx(SelectContent, __assign({}, contentProps, { className: cn(contentProps === null || contentProps === void 0 ? void 0 : contentProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.content), children: _jsx(NativeSelectScrollView, __assign({}, scrollViewProps, { className: cn(scrollViewProps === null || scrollViewProps === void 0 ? void 0 : scrollViewProps.className, classNames === null || classNames === void 0 ? void 0 : classNames.optionList), children: _jsx(OptionList, { options: options, renderOption: renderOption, classNames: classNames }) })) }))] })));
71
- });
72
- Select.displayName = "Select";
73
- var SelectField = React.forwardRef(function (props, ref) {
74
- var onFieldFocus = props.onFieldFocus, onFieldBlur = props.onFieldBlur, className = props.className, fieldClassName = props.fieldClassName, labelClassName = props.labelClassName, contentClassName = props.contentClassName, messageClassName = props.messageClassName, errorClassName = props.errorClassName, successClassName = props.successClassName, variant = props.variant, label = props.label, helperText = props.helperText, error = props.error, success = props.success, startContent = props.startContent, endContent = props.endContent, required = props.required, labelPlacement = props.labelPlacement, placeholder = props.placeholder, disabled = props.disabled, classNames = props.classNames, triggerProps = props.triggerProps, selectProps = __rest(props, ["onFieldFocus", "onFieldBlur", "className", "fieldClassName", "labelClassName", "contentClassName", "messageClassName", "errorClassName", "successClassName", "variant", "label", "helperText", "error", "success", "startContent", "endContent", "required", "labelPlacement", "placeholder", "disabled", "classNames", "triggerProps"]);
75
- var resolvedPlaceholder = placeholder !== null && placeholder !== void 0 ? placeholder : "Select an option";
76
- return (_jsx(FormField, { className: className, fieldClassName: cn("h-16", fieldClassName), labelClassName: labelClassName, contentClassName: contentClassName, messageClassName: messageClassName, errorClassName: errorClassName, successClassName: successClassName, variant: variant, label: label, required: required, labelPlacement: labelPlacement, placeholder: resolvedPlaceholder, helperText: helperText, error: error, success: success, startContent: startContent, endContent: endContent, value: selectProps.value, defaultValue: selectProps.defaultValue, onFocus: onFieldFocus, onBlur: onFieldBlur, disabled: disabled, children: function (_a) {
77
- var _b;
78
- var inputProps = _a.inputProps, isFocused = _a.isFocused, hasError = _a.hasError, hasSuccess = _a.hasSuccess, inputRef = _a.inputRef;
79
- var statefulTriggerClassName = cn(classNames === null || classNames === void 0 ? void 0 : classNames.trigger, hasError && "border-destructive/70 ring-1 ring-destructive/20", hasSuccess &&
80
- !hasError &&
81
- "border-primary/70 ring-1 ring-primary/20", !hasError &&
82
- !hasSuccess &&
83
- isFocused &&
84
- "border-primary/80 ring-1 ring-primary/10", disabled && "opacity-60");
85
- var mergedTriggerProps = __assign(__assign({}, triggerProps), { "aria-invalid": hasError || undefined, disabled: (_b = triggerProps === null || triggerProps === void 0 ? void 0 : triggerProps.disabled) !== null && _b !== void 0 ? _b : disabled });
86
- var handleValueChange = function (selectedValue, option) {
87
- var _a;
88
- inputProps.onChangeText(selectedValue !== null && selectedValue !== void 0 ? selectedValue : "");
89
- (_a = selectProps.onValueChange) === null || _a === void 0 ? void 0 : _a.call(selectProps, selectedValue, option);
90
- };
91
- var handleOpenChange = function (nextOpen) {
92
- var _a;
93
- if (nextOpen) {
94
- inputProps.onFocus();
95
- }
96
- else {
97
- inputProps.onBlur();
98
- }
99
- (_a = selectProps.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(selectProps, nextOpen);
100
- };
101
- return (_jsx(Select, __assign({}, selectProps, { placeholder: resolvedPlaceholder, classNames: __assign(__assign({}, classNames), { trigger: statefulTriggerClassName }), triggerProps: mergedTriggerProps, onValueChange: handleValueChange, onOpenChange: handleOpenChange, ref: inputRef })));
102
- } }));
103
- });
104
- SelectField.displayName = "SelectField";
105
- export { SelectField as Select, NativeSelectScrollView, SelectContent, SelectTrigger, SelectValue, };