@avenue-ticketing/native 0.1.0 → 0.1.2
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/button.js +16 -4
- package/dist/button.js.map +1 -1
- package/dist/date-picker.js +15 -4
- package/dist/date-picker.js.map +1 -1
- package/dist/dropdown.d.ts +2 -0
- package/dist/dropdown.js +12 -4
- package/dist/dropdown.js.map +1 -1
- package/dist/input.js +15 -4
- package/dist/input.js.map +1 -1
- package/package.json +1 -1
package/dist/dropdown.js
CHANGED
|
@@ -891,6 +891,7 @@ var DropdownItem = ({
|
|
|
891
891
|
selectionIndicator = "checkmark",
|
|
892
892
|
isDisabled = false,
|
|
893
893
|
className,
|
|
894
|
+
onAction,
|
|
894
895
|
children
|
|
895
896
|
}) => {
|
|
896
897
|
const root = useDropdown();
|
|
@@ -913,15 +914,16 @@ var DropdownItem = ({
|
|
|
913
914
|
selection.select(itemId);
|
|
914
915
|
return;
|
|
915
916
|
}
|
|
917
|
+
onAction?.();
|
|
916
918
|
root.close();
|
|
917
919
|
};
|
|
918
920
|
const indicator = showSelection && /* @__PURE__ */ jsxs(View, { className: cx(selectionOnLeft ? "mr-2" : "ml-1", !isSelected && selectionIndicator === "checkmark" && dropdownStyles.checkHidden), children: [
|
|
919
|
-
selectionIndicator === "checkmark" && /* @__PURE__ */ jsx(CheckIcon, { size:
|
|
921
|
+
selectionIndicator === "checkmark" && /* @__PURE__ */ jsx(CheckIcon, { size: 20, color: fgBrand }),
|
|
920
922
|
selectionIndicator === "checkbox" && /* @__PURE__ */ jsx(CheckboxBase, { size: "sm", isSelected: isSelected && !openSubmenu, isIndeterminate: isSelected && Boolean(openSubmenu) }),
|
|
921
923
|
selectionIndicator === "radio" && /* @__PURE__ */ jsx(RadioButtonBase, { size: "sm", isSelected }),
|
|
922
924
|
selectionIndicator === "toggle" && /* @__PURE__ */ jsx(ToggleBase, { slim: true, size: "sm", isSelected })
|
|
923
925
|
] });
|
|
924
|
-
const iconNode = isReactComponent(Icon) ? /* @__PURE__ */ jsx(Icon, { size:
|
|
926
|
+
const iconNode = isReactComponent(Icon) ? /* @__PURE__ */ jsx(Icon, { size: 20, color: fgSecondary }) : isValidElement(Icon) && Icon;
|
|
925
927
|
if (unstyled) {
|
|
926
928
|
return /* @__PURE__ */ jsx(Pressable, { disabled: isDisabled, onPress, className, children: typeof children === "function" ? children({ isSelected }) : children });
|
|
927
929
|
}
|
|
@@ -932,12 +934,18 @@ var DropdownItem = ({
|
|
|
932
934
|
accessibilityState: { disabled: isDisabled, selected: isSelected },
|
|
933
935
|
disabled: isDisabled,
|
|
934
936
|
onPress,
|
|
935
|
-
className: cx(
|
|
937
|
+
className: cx(
|
|
938
|
+
dropdownStyles.item,
|
|
939
|
+
"py-2.5",
|
|
940
|
+
openSubmenu && dropdownStyles.itemSubmenu,
|
|
941
|
+
isDisabled && dropdownStyles.itemDisabled,
|
|
942
|
+
className
|
|
943
|
+
),
|
|
936
944
|
children: [
|
|
937
945
|
selectionOnLeft && indicator,
|
|
938
946
|
avatarUrl && /* @__PURE__ */ jsx(View, { className: "mr-2", children: /* @__PURE__ */ jsx(Avatar, { size: "xs", src: avatarUrl, alt: text }) }),
|
|
939
947
|
iconNode && /* @__PURE__ */ jsx(View, { className: dropdownStyles.iconWrap, children: iconNode }),
|
|
940
|
-
typeof children === "function" ? children({ isSelected }) : text ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, className: dropdownStyles.label, children: text }) : children,
|
|
948
|
+
typeof children === "function" ? children({ isSelected }) : text ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, className: cx(dropdownStyles.label, "text-md"), children: text }) : children,
|
|
941
949
|
addon && /* @__PURE__ */ jsx(Text, { className: dropdownStyles.addon, children: addon }),
|
|
942
950
|
!selectionOnLeft && indicator,
|
|
943
951
|
openSubmenu && /* @__PURE__ */ jsx(View, { className: "ml-auto", children: /* @__PURE__ */ jsx(CaretRightIcon, { size: 16, color: fgSecondary }) })
|