@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.
Files changed (2) hide show
  1. package/dist/index.js +56 -52
  2. 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) => StyleSheet.create({
744
- root: {
745
- width: "100%",
746
- overflow: "hidden",
747
- borderWidth: 1,
748
- borderColor: theme.semantic.border.muted,
749
- borderRadius: theme.tokens.radius.lg,
750
- backgroundColor: theme.semantic.surface.default
751
- },
752
- rootDisabled: { opacity: .7 },
753
- item: {
754
- borderBottomWidth: 1,
755
- borderBottomColor: theme.semantic.border.muted
756
- },
757
- trigger: {
758
- minHeight: theme.tokens.spacing[10],
759
- justifyContent: "center",
760
- paddingHorizontal: theme.tokens.spacing[4],
761
- paddingVertical: theme.tokens.spacing[3],
762
- backgroundColor: theme.semantic.surface.default
763
- },
764
- triggerExpanded: { backgroundColor: theme.semantic.surface.subtle },
765
- triggerPressed: { backgroundColor: theme.semantic.surface.muted },
766
- triggerDisabled: { backgroundColor: theme.semantic.surface.subtle },
767
- triggerContent: {
768
- flexDirection: "row",
769
- alignItems: "center",
770
- justifyContent: "space-between",
771
- gap: theme.tokens.spacing[3]
772
- },
773
- triggerText: {
774
- flex: 1,
775
- color: theme.semantic.text.primary,
776
- fontSize: theme.tokens.typography.size.md,
777
- fontWeight: theme.tokens.typography.weight.medium,
778
- lineHeight: theme.tokens.typography.lineHeight.md
779
- },
780
- triggerTextDisabled: { color: theme.semantic.text.disabled },
781
- indicator: {
782
- width: theme.tokens.spacing[4],
783
- height: theme.tokens.spacing[4],
784
- alignItems: "center",
785
- justifyContent: "center"
786
- },
787
- indicatorExpanded: { transform: [{ rotate: "180deg" }] },
788
- content: {
789
- padding: theme.tokens.spacing[4],
790
- backgroundColor: theme.semantic.surface.subtle
791
- },
792
- contentHidden: { display: "none" }
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 ? theme.semantic.text.disabled : theme.semantic.text.secondary
851
+ color: disabled ? accordionTokens.trigger.disabled.fg : accordionTokens.indicator
848
852
  })
849
853
  })]
850
854
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellira-ui/react-native",
3
- "version": "2.93.0",
3
+ "version": "2.95.0",
4
4
  "description": "React Native components for Vellira Design System",
5
5
  "keywords": [
6
6
  "vellira",