@vellira-ui/react-native 2.93.0 → 2.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +56 -52
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -740,57 +740,60 @@ function useThemeStyles(createStyles) {
|
|
|
740
740
|
}
|
|
741
741
|
//#endregion
|
|
742
742
|
//#region src/components/Accordion/Accordion.styles.ts
|
|
743
|
-
const createStyles$23 = (theme) =>
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}
|
|
743
|
+
const createStyles$23 = (theme) => {
|
|
744
|
+
const accordion = theme.components.accordion;
|
|
745
|
+
return StyleSheet.create({
|
|
746
|
+
root: {
|
|
747
|
+
width: "100%",
|
|
748
|
+
overflow: "hidden",
|
|
749
|
+
borderWidth: 1,
|
|
750
|
+
borderColor: accordion.root.border,
|
|
751
|
+
borderRadius: theme.tokens.radius.lg,
|
|
752
|
+
backgroundColor: accordion.root.bg
|
|
753
|
+
},
|
|
754
|
+
rootDisabled: { opacity: .7 },
|
|
755
|
+
item: {
|
|
756
|
+
borderBottomWidth: 1,
|
|
757
|
+
borderBottomColor: accordion.divider
|
|
758
|
+
},
|
|
759
|
+
trigger: {
|
|
760
|
+
minHeight: theme.tokens.spacing[10],
|
|
761
|
+
justifyContent: "center",
|
|
762
|
+
paddingHorizontal: theme.tokens.spacing[4],
|
|
763
|
+
paddingVertical: theme.tokens.spacing[3],
|
|
764
|
+
backgroundColor: accordion.trigger.default.bg
|
|
765
|
+
},
|
|
766
|
+
triggerExpanded: { backgroundColor: accordion.trigger.expanded.bg },
|
|
767
|
+
triggerPressed: { backgroundColor: accordion.trigger.pressed.bg },
|
|
768
|
+
triggerDisabled: { backgroundColor: accordion.trigger.disabled.bg },
|
|
769
|
+
triggerContent: {
|
|
770
|
+
flexDirection: "row",
|
|
771
|
+
alignItems: "center",
|
|
772
|
+
justifyContent: "space-between",
|
|
773
|
+
gap: theme.tokens.spacing[3]
|
|
774
|
+
},
|
|
775
|
+
triggerText: {
|
|
776
|
+
flex: 1,
|
|
777
|
+
color: accordion.trigger.default.fg,
|
|
778
|
+
fontSize: theme.tokens.typography.size.md,
|
|
779
|
+
fontWeight: theme.tokens.typography.weight.medium,
|
|
780
|
+
lineHeight: theme.tokens.typography.lineHeight.md
|
|
781
|
+
},
|
|
782
|
+
triggerTextDisabled: { color: accordion.trigger.disabled.fg },
|
|
783
|
+
indicator: {
|
|
784
|
+
width: theme.tokens.spacing[4],
|
|
785
|
+
height: theme.tokens.spacing[4],
|
|
786
|
+
alignItems: "center",
|
|
787
|
+
justifyContent: "center"
|
|
788
|
+
},
|
|
789
|
+
indicatorExpanded: { transform: [{ rotate: "180deg" }] },
|
|
790
|
+
content: {
|
|
791
|
+
padding: theme.tokens.spacing[4],
|
|
792
|
+
backgroundColor: accordion.content.bg
|
|
793
|
+
},
|
|
794
|
+
contentHidden: { display: "none" }
|
|
795
|
+
});
|
|
796
|
+
};
|
|
794
797
|
//#endregion
|
|
795
798
|
//#region src/components/Accordion/Content/AccordionContent.tsx
|
|
796
799
|
function AccordionContent({ children, forceMount = false, hidden = false }) {
|
|
@@ -817,6 +820,7 @@ function AccordionItem({ children }) {
|
|
|
817
820
|
function AccordionTrigger({ children, disabled = false, expanded = false, onActivate }) {
|
|
818
821
|
const { theme } = useTheme();
|
|
819
822
|
const styles = createStyles$23(theme);
|
|
823
|
+
const accordionTokens = theme.components.accordion;
|
|
820
824
|
return /* @__PURE__ */ jsx(Pressable, {
|
|
821
825
|
disabled,
|
|
822
826
|
accessibilityRole: "button",
|
|
@@ -844,7 +848,7 @@ function AccordionTrigger({ children, disabled = false, expanded = false, onActi
|
|
|
844
848
|
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
845
849
|
width: 16,
|
|
846
850
|
height: 16,
|
|
847
|
-
color: disabled ?
|
|
851
|
+
color: disabled ? accordionTokens.trigger.disabled.fg : accordionTokens.indicator
|
|
848
852
|
})
|
|
849
853
|
})]
|
|
850
854
|
})
|