@emeraldemperaur/vector-sigma 1.4.22 → 1.4.24

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/README.md CHANGED
@@ -96,7 +96,7 @@ const App = () => {
96
96
 
97
97
  <li><strong>🧩Exported UI Components</strong></br>
98
98
  <p align="justify">Explicitly exported reusable form UI components with material, outline and neumorphic design variants from package entry point <code>src/index.ts</code> to enable developer-friendly use as lightweight component library.</p>
99
- <p><em>Container, Row, Column, Theme, Accordion, Codex, AvatarInput, ButtonInput, CheckboxGroupInput, ConditionalTrigger, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File, FileMultiple, FlagIcon, Icon, Image, Input, PasswordInput, PhoneInput, CreditCardInput, CurrencyInput, StockInput, RadioGroupInput, OptionSelect, MultipleSelect, RangeSlider, SliderInput, Toggle, SectionTitle</em></p>
99
+ <p><em>Container, Row, Column, Theme, Accordion, AccordionItem, Codex, CodexItem, CodexControls, AvatarInput, ButtonInput, CheckboxGroupInput, ConditionalTrigger, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File, FileMultiple, FlagIcon, Icon, Image, Input, PasswordInput, PhoneInput, CreditCardInput, CurrencyInput, StockInput, RadioGroupInput, OptionSelect, MultipleSelect, RangeSlider, SliderInput, Toggle, SectionTitle</em></p>
100
100
 
101
101
  ```javascript
102
102
  import { Container, Column, Row, CheckboxGroup, Dropdown, File, RangeSlider }
package/lib/index.cjs CHANGED
@@ -48522,7 +48522,7 @@ const Row = ({ children, className, gap = "4" }) => {
48522
48522
  };
48523
48523
 
48524
48524
  const AccordionContext = React.createContext({ design: 'outline' });
48525
- const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = false, width = 12, newRow, className, style, children }) => {
48525
+ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = false, brandcolor, width = 12, newRow, className, style, children }) => {
48526
48526
  const containerRef = React.useRef(null);
48527
48527
  const [neuVars, setNeuVars] = React.useState({});
48528
48528
  React.useEffect(() => {
@@ -48540,9 +48540,9 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48540
48540
  children
48541
48541
  };
48542
48542
  const accordionRoot = allowMultiple ? (React.createElement(Root2$4, Object.assign({ type: "multiple", defaultValue: defaultOpenId ? [defaultOpenId] : undefined }, sharedProps))) : (React.createElement(Root2$4, Object.assign({ type: "single", defaultValue: defaultOpenId || undefined, collapsible: true }, sharedProps)));
48543
- return (React.createElement(AccordionContext.Provider, { value: { design } },
48543
+ return (React.createElement(AccordionContext.Provider, { value: { design, brandcolor } },
48544
48544
  React.createElement(Column, { span: width, newLine: newRow },
48545
- React.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
48545
+ React.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign(Object.assign({ width: '100%' }, style), neuVars), (brandcolor ? { '--accordion-header-bg': brandcolor } : {})) },
48546
48546
  React.createElement("style", { dangerouslySetInnerHTML: { __html: `
48547
48547
  @keyframes slideDown {
48548
48548
  from { height: 0; opacity: 0; }
@@ -48572,6 +48572,7 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48572
48572
  border: 1px solid var(--gray-6);
48573
48573
  border-radius: var(--radius-3);
48574
48574
  background-color: transparent;
48575
+ overflow: hidden; /* Clips the background color to the rounded corners */
48575
48576
  }
48576
48577
  .v-accordion-item-outline {
48577
48578
  border-bottom: 1px solid var(--gray-6);
@@ -48584,6 +48585,7 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48584
48585
  border-radius: var(--radius-3);
48585
48586
  background-color: var(--color-surface);
48586
48587
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
48588
+ overflow: hidden; /* Clips the background color to the rounded corners */
48587
48589
  }
48588
48590
  .v-accordion-item-material {
48589
48591
  border-bottom: 1px solid var(--gray-4);
@@ -48598,16 +48600,16 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48598
48600
  .v-accordion-root-neumorphic {
48599
48601
  display: flex;
48600
48602
  flex-direction: column;
48601
- gap: 16px; /* Neumorphic items look best separated */
48603
+ gap: 16px;
48602
48604
  }
48603
48605
  .v-accordion-item-neumorphic {
48604
48606
  background-color: var(--neu-bg);
48605
48607
  border-radius: 12px;
48606
48608
  box-shadow: 6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light);
48607
48609
  transition: all 0.3s ease;
48610
+ overflow: hidden; /* Clips the background color to the rounded corners */
48608
48611
  }
48609
48612
  .v-accordion-item-neumorphic[data-state='open'] {
48610
- /* Pressed-in effect when open */
48611
48613
  box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
48612
48614
  }
48613
48615
 
@@ -48621,6 +48623,7 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48621
48623
  cursor: pointer;
48622
48624
  font-family: var(--default-font-family);
48623
48625
  box-sizing: border-box;
48626
+ background-color: var(--accordion-header-bg, transparent); /* Applies the custom color */
48624
48627
  }
48625
48628
  .v-accordion-trigger:disabled {
48626
48629
  cursor: not-allowed;
@@ -48649,7 +48652,7 @@ const CodexContext = React.createContext({
48649
48652
  design: 'outline'
48650
48653
  });
48651
48654
  const useStepper = () => React.useContext(CodexContext);
48652
- const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, className, style, children }) => {
48655
+ const Codex = ({ design = 'outline', defaultStepId, brandColor, width = 12, newRow, className, style, children }) => {
48653
48656
  const containerRef = React.useRef(null);
48654
48657
  const [neuVars, setNeuVars] = React.useState({});
48655
48658
  const steps = React.Children.toArray(children)
@@ -48680,9 +48683,9 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48680
48683
  }
48681
48684
  }, [design]);
48682
48685
  const activeIndex = steps.findIndex(s => s.id === activeStepId);
48683
- return (React.createElement(CodexContext.Provider, { value: { activeStepId, setActiveStepId, design } },
48686
+ return (React.createElement(CodexContext.Provider, { value: { activeStepId, setActiveStepId, design, brandColor } },
48684
48687
  React.createElement(Column, { span: width, newLine: newRow },
48685
- React.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
48688
+ React.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign(Object.assign({ width: '100%' }, style), neuVars), { '--codex-brand': brandColor || 'var(--accent-9)' }) },
48686
48689
  React.createElement("style", { dangerouslySetInnerHTML: { __html: `
48687
48690
  .v-step-circle {
48688
48691
  width: 40px;
@@ -48710,42 +48713,45 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48710
48713
  to { opacity: 1; transform: translateY(0); }
48711
48714
  }
48712
48715
 
48716
+ /* --- OUTLINE --- */
48713
48717
  .v-stepper-outline .v-step-circle.pending {
48714
48718
  border: 2px solid var(--gray-6);
48715
48719
  background: transparent;
48716
48720
  color: var(--gray-10);
48717
48721
  }
48718
48722
  .v-stepper-outline .v-step-circle.active {
48719
- border: 2px solid var(--accent-9);
48723
+ border: 2px solid var(--codex-brand);
48720
48724
  background: var(--accent-2);
48721
- color: var(--accent-9);
48725
+ color: var(--codex-brand);
48722
48726
  }
48723
48727
  .v-stepper-outline .v-step-circle.completed {
48724
- border: 2px solid var(--accent-9);
48725
- background: var(--accent-9);
48728
+ border: 2px solid var(--codex-brand);
48729
+ background: var(--codex-brand);
48726
48730
  color: white;
48727
48731
  }
48728
48732
  .v-stepper-outline .v-step-line.pending { background-color: var(--gray-5); }
48729
- .v-stepper-outline .v-step-line.completed { background-color: var(--accent-9); }
48733
+ .v-stepper-outline .v-step-line.completed { background-color: var(--codex-brand); }
48730
48734
 
48735
+ /* --- MATERIAL --- */
48731
48736
  .v-stepper-material .v-step-circle.pending {
48732
48737
  background: var(--color-surface);
48733
48738
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
48734
48739
  color: var(--gray-10);
48735
48740
  }
48736
48741
  .v-stepper-material .v-step-circle.active {
48737
- background: var(--accent-9);
48742
+ background: var(--codex-brand);
48738
48743
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
48739
48744
  color: white;
48740
48745
  transform: scale(1.1);
48741
48746
  }
48742
48747
  .v-stepper-material .v-step-circle.completed {
48743
- background: var(--accent-9);
48748
+ background: var(--codex-brand);
48744
48749
  color: white;
48745
48750
  }
48746
48751
  .v-stepper-material .v-step-line.pending { background-color: var(--gray-5); }
48747
- .v-stepper-material .v-step-line.completed { background-color: var(--accent-9); }
48752
+ .v-stepper-material .v-step-line.completed { background-color: var(--codex-brand); }
48748
48753
 
48754
+ /* --- NEUMORPHIC --- */
48749
48755
  .v-stepper-neumorphic .v-step-circle {
48750
48756
  background: var(--neu-bg);
48751
48757
  border: none;
@@ -48756,19 +48762,19 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48756
48762
  }
48757
48763
  .v-stepper-neumorphic .v-step-circle.active {
48758
48764
  box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
48759
- color: var(--accent-9);
48765
+ color: var(--codex-brand);
48760
48766
  }
48761
48767
  .v-stepper-neumorphic .v-step-circle.completed {
48762
48768
  box-shadow: inset 2px 2px 4px var(--neu-shadow-dark), inset -2px -2px 4px var(--neu-shadow-light);
48763
- color: var(--accent-9);
48769
+ color: var(--codex-brand);
48764
48770
  }
48765
48771
  .v-stepper-neumorphic .v-step-line.pending {
48766
48772
  background-color: transparent;
48767
48773
  box-shadow: inset 1px 1px 2px var(--neu-shadow-dark), inset -1px -1px 2px var(--neu-shadow-light);
48768
48774
  }
48769
48775
  .v-stepper-neumorphic .v-step-line.completed {
48770
- background-color: var(--accent-9);
48771
- box-shadow: 0 0 4px var(--accent-9);
48776
+ background-color: var(--codex-brand);
48777
+ box-shadow: 0 0 4px var(--codex-brand);
48772
48778
  }
48773
48779
  ` } }),
48774
48780
  React.createElement(p$8, { className: `v-stepper-${design}`, style: { paddingBottom: '60px', paddingTop: '10px' } },
@@ -48776,6 +48782,8 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48776
48782
  const isCompleted = index < activeIndex;
48777
48783
  const isActive = index === activeIndex;
48778
48784
  const statusClass = isActive ? 'active' : isCompleted ? 'completed' : 'pending';
48785
+ const isFirst = index === 0;
48786
+ const isLast = index === steps.length - 1;
48779
48787
  return (React.createElement(React.Fragment, { key: step.id },
48780
48788
  React.createElement(p$8, { style: { position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center' } },
48781
48789
  React.createElement("div", { className: `v-step-circle ${statusClass}`, onClick: () => setActiveStepId(step.id) }, isCompleted ? (React.createElement(Icon, { name: "check", width: "20", height: "20" })) : (step.icon ? step.icon : React.createElement("span", null, index + 1))),
@@ -48784,8 +48792,11 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48784
48792
  top: '100%',
48785
48793
  marginTop: '12px',
48786
48794
  width: '120px',
48787
- textAlign: 'center',
48788
- cursor: 'pointer'
48795
+ cursor: 'pointer',
48796
+ left: isFirst ? '0' : isLast ? 'auto' : '50%',
48797
+ right: isLast ? '0' : 'auto',
48798
+ transform: (!isFirst && !isLast) ? 'translateX(-50%)' : 'none',
48799
+ textAlign: isFirst ? 'left' : isLast ? 'right' : 'center',
48789
48800
  }, onClick: () => setActiveStepId(step.id) },
48790
48801
  React.createElement(p$d, { size: "2", weight: isActive ? "bold" : "regular", style: { color: isActive ? 'var(--gray-12)' : 'var(--gray-10)', display: 'block', lineHeight: 1.2 } }, step.title),
48791
48802
  step.description && (React.createElement(p$d, { size: "1", color: "gray", style: { display: 'block', marginTop: '4px' } }, step.description)))),
@@ -48801,7 +48812,7 @@ const CodexItem = ({ stepId, children, }) => {
48801
48812
  };
48802
48813
 
48803
48814
  const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLabel = "Back", finishLabel = "Submit", prevIcon = "doublearrowleft", nextIcon = "doublearrowright", finishIcon = "paperplane", onNext, onPrev, onFinish }) => {
48804
- const { setActiveStepId } = useStepper();
48815
+ const { setActiveStepId, brandColor } = useStepper();
48805
48816
  const handlePrev = () => {
48806
48817
  if (onPrev)
48807
48818
  onPrev();
@@ -48821,17 +48832,19 @@ const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLab
48821
48832
  };
48822
48833
  return (React.createElement(p$5, { gap: "3", mt: "6", justify: "between", align: "center", style: { borderTop: '1px solid var(--gray-5)', paddingTop: '20px', width: '100%' } },
48823
48834
  prevStepId ? (React.createElement(o$a, { variant: "soft", color: "gray", onClick: handlePrev, style: { cursor: 'pointer' } },
48824
- prevIcon ? React.createElement(React.Fragment, null,
48835
+ prevIcon && (React.createElement(React.Fragment, null,
48825
48836
  React.createElement(Icon, { name: prevIcon }),
48826
- "\u00A0") : null,
48837
+ "\u00A0")),
48827
48838
  prevLabel)) : (React.createElement("div", null)),
48828
- React.createElement(o$a, { variant: "solid", color: nextStepId ? "blue" : "green", onClick: handleNext, style: { cursor: 'pointer' } },
48829
- nextStepId && nextIcon ? React.createElement(React.Fragment, null,
48839
+ React.createElement(o$a, { variant: "solid", color: brandColor ? undefined : (nextStepId ? "blue" : "green"), onClick: handleNext, style: Object.assign({ cursor: 'pointer' }, (brandColor ? { backgroundColor: 'var(--codex-brand)', color: '#fff' } : {})) }, nextStepId ? (React.createElement(React.Fragment, null,
48840
+ nextIcon && React.createElement(React.Fragment, null,
48830
48841
  React.createElement(Icon, { name: nextIcon }),
48831
- "\u00A0") : React.createElement(React.Fragment, null,
48842
+ "\u00A0"),
48843
+ nextLabel)) : (React.createElement(React.Fragment, null,
48844
+ finishIcon && React.createElement(React.Fragment, null,
48832
48845
  React.createElement(Icon, { name: finishIcon }),
48833
48846
  "\u00A0"),
48834
- nextStepId ? nextLabel : finishLabel)));
48847
+ finishLabel)))));
48835
48848
  };
48836
48849
 
48837
48850
  /** A special constant with type `never` */
package/lib/index.esm.js CHANGED
@@ -48502,7 +48502,7 @@ const Row = ({ children, className, gap = "4" }) => {
48502
48502
  };
48503
48503
 
48504
48504
  const AccordionContext = createContext({ design: 'outline' });
48505
- const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = false, width = 12, newRow, className, style, children }) => {
48505
+ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = false, brandcolor, width = 12, newRow, className, style, children }) => {
48506
48506
  const containerRef = useRef(null);
48507
48507
  const [neuVars, setNeuVars] = useState({});
48508
48508
  useEffect(() => {
@@ -48520,9 +48520,9 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48520
48520
  children
48521
48521
  };
48522
48522
  const accordionRoot = allowMultiple ? (React__default.createElement(Root2$4, Object.assign({ type: "multiple", defaultValue: defaultOpenId ? [defaultOpenId] : undefined }, sharedProps))) : (React__default.createElement(Root2$4, Object.assign({ type: "single", defaultValue: defaultOpenId || undefined, collapsible: true }, sharedProps)));
48523
- return (React__default.createElement(AccordionContext.Provider, { value: { design } },
48523
+ return (React__default.createElement(AccordionContext.Provider, { value: { design, brandcolor } },
48524
48524
  React__default.createElement(Column, { span: width, newLine: newRow },
48525
- React__default.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
48525
+ React__default.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign(Object.assign({ width: '100%' }, style), neuVars), (brandcolor ? { '--accordion-header-bg': brandcolor } : {})) },
48526
48526
  React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
48527
48527
  @keyframes slideDown {
48528
48528
  from { height: 0; opacity: 0; }
@@ -48552,6 +48552,7 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48552
48552
  border: 1px solid var(--gray-6);
48553
48553
  border-radius: var(--radius-3);
48554
48554
  background-color: transparent;
48555
+ overflow: hidden; /* Clips the background color to the rounded corners */
48555
48556
  }
48556
48557
  .v-accordion-item-outline {
48557
48558
  border-bottom: 1px solid var(--gray-6);
@@ -48564,6 +48565,7 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48564
48565
  border-radius: var(--radius-3);
48565
48566
  background-color: var(--color-surface);
48566
48567
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
48568
+ overflow: hidden; /* Clips the background color to the rounded corners */
48567
48569
  }
48568
48570
  .v-accordion-item-material {
48569
48571
  border-bottom: 1px solid var(--gray-4);
@@ -48578,16 +48580,16 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48578
48580
  .v-accordion-root-neumorphic {
48579
48581
  display: flex;
48580
48582
  flex-direction: column;
48581
- gap: 16px; /* Neumorphic items look best separated */
48583
+ gap: 16px;
48582
48584
  }
48583
48585
  .v-accordion-item-neumorphic {
48584
48586
  background-color: var(--neu-bg);
48585
48587
  border-radius: 12px;
48586
48588
  box-shadow: 6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light);
48587
48589
  transition: all 0.3s ease;
48590
+ overflow: hidden; /* Clips the background color to the rounded corners */
48588
48591
  }
48589
48592
  .v-accordion-item-neumorphic[data-state='open'] {
48590
- /* Pressed-in effect when open */
48591
48593
  box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
48592
48594
  }
48593
48595
 
@@ -48601,6 +48603,7 @@ const Accordion = ({ design = 'outline', defaultOpenId = "", allowMultiple = fal
48601
48603
  cursor: pointer;
48602
48604
  font-family: var(--default-font-family);
48603
48605
  box-sizing: border-box;
48606
+ background-color: var(--accordion-header-bg, transparent); /* Applies the custom color */
48604
48607
  }
48605
48608
  .v-accordion-trigger:disabled {
48606
48609
  cursor: not-allowed;
@@ -48629,7 +48632,7 @@ const CodexContext = createContext({
48629
48632
  design: 'outline'
48630
48633
  });
48631
48634
  const useStepper = () => useContext(CodexContext);
48632
- const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, className, style, children }) => {
48635
+ const Codex = ({ design = 'outline', defaultStepId, brandColor, width = 12, newRow, className, style, children }) => {
48633
48636
  const containerRef = useRef(null);
48634
48637
  const [neuVars, setNeuVars] = useState({});
48635
48638
  const steps = React__default.Children.toArray(children)
@@ -48660,9 +48663,9 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48660
48663
  }
48661
48664
  }, [design]);
48662
48665
  const activeIndex = steps.findIndex(s => s.id === activeStepId);
48663
- return (React__default.createElement(CodexContext.Provider, { value: { activeStepId, setActiveStepId, design } },
48666
+ return (React__default.createElement(CodexContext.Provider, { value: { activeStepId, setActiveStepId, design, brandColor } },
48664
48667
  React__default.createElement(Column, { span: width, newLine: newRow },
48665
- React__default.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign({ width: '100%' }, style), neuVars) },
48668
+ React__default.createElement("div", { ref: containerRef, className: className, style: Object.assign(Object.assign(Object.assign({ width: '100%' }, style), neuVars), { '--codex-brand': brandColor || 'var(--accent-9)' }) },
48666
48669
  React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
48667
48670
  .v-step-circle {
48668
48671
  width: 40px;
@@ -48690,42 +48693,45 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48690
48693
  to { opacity: 1; transform: translateY(0); }
48691
48694
  }
48692
48695
 
48696
+ /* --- OUTLINE --- */
48693
48697
  .v-stepper-outline .v-step-circle.pending {
48694
48698
  border: 2px solid var(--gray-6);
48695
48699
  background: transparent;
48696
48700
  color: var(--gray-10);
48697
48701
  }
48698
48702
  .v-stepper-outline .v-step-circle.active {
48699
- border: 2px solid var(--accent-9);
48703
+ border: 2px solid var(--codex-brand);
48700
48704
  background: var(--accent-2);
48701
- color: var(--accent-9);
48705
+ color: var(--codex-brand);
48702
48706
  }
48703
48707
  .v-stepper-outline .v-step-circle.completed {
48704
- border: 2px solid var(--accent-9);
48705
- background: var(--accent-9);
48708
+ border: 2px solid var(--codex-brand);
48709
+ background: var(--codex-brand);
48706
48710
  color: white;
48707
48711
  }
48708
48712
  .v-stepper-outline .v-step-line.pending { background-color: var(--gray-5); }
48709
- .v-stepper-outline .v-step-line.completed { background-color: var(--accent-9); }
48713
+ .v-stepper-outline .v-step-line.completed { background-color: var(--codex-brand); }
48710
48714
 
48715
+ /* --- MATERIAL --- */
48711
48716
  .v-stepper-material .v-step-circle.pending {
48712
48717
  background: var(--color-surface);
48713
48718
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
48714
48719
  color: var(--gray-10);
48715
48720
  }
48716
48721
  .v-stepper-material .v-step-circle.active {
48717
- background: var(--accent-9);
48722
+ background: var(--codex-brand);
48718
48723
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
48719
48724
  color: white;
48720
48725
  transform: scale(1.1);
48721
48726
  }
48722
48727
  .v-stepper-material .v-step-circle.completed {
48723
- background: var(--accent-9);
48728
+ background: var(--codex-brand);
48724
48729
  color: white;
48725
48730
  }
48726
48731
  .v-stepper-material .v-step-line.pending { background-color: var(--gray-5); }
48727
- .v-stepper-material .v-step-line.completed { background-color: var(--accent-9); }
48732
+ .v-stepper-material .v-step-line.completed { background-color: var(--codex-brand); }
48728
48733
 
48734
+ /* --- NEUMORPHIC --- */
48729
48735
  .v-stepper-neumorphic .v-step-circle {
48730
48736
  background: var(--neu-bg);
48731
48737
  border: none;
@@ -48736,19 +48742,19 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48736
48742
  }
48737
48743
  .v-stepper-neumorphic .v-step-circle.active {
48738
48744
  box-shadow: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
48739
- color: var(--accent-9);
48745
+ color: var(--codex-brand);
48740
48746
  }
48741
48747
  .v-stepper-neumorphic .v-step-circle.completed {
48742
48748
  box-shadow: inset 2px 2px 4px var(--neu-shadow-dark), inset -2px -2px 4px var(--neu-shadow-light);
48743
- color: var(--accent-9);
48749
+ color: var(--codex-brand);
48744
48750
  }
48745
48751
  .v-stepper-neumorphic .v-step-line.pending {
48746
48752
  background-color: transparent;
48747
48753
  box-shadow: inset 1px 1px 2px var(--neu-shadow-dark), inset -1px -1px 2px var(--neu-shadow-light);
48748
48754
  }
48749
48755
  .v-stepper-neumorphic .v-step-line.completed {
48750
- background-color: var(--accent-9);
48751
- box-shadow: 0 0 4px var(--accent-9);
48756
+ background-color: var(--codex-brand);
48757
+ box-shadow: 0 0 4px var(--codex-brand);
48752
48758
  }
48753
48759
  ` } }),
48754
48760
  React__default.createElement(p$8, { className: `v-stepper-${design}`, style: { paddingBottom: '60px', paddingTop: '10px' } },
@@ -48756,6 +48762,8 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48756
48762
  const isCompleted = index < activeIndex;
48757
48763
  const isActive = index === activeIndex;
48758
48764
  const statusClass = isActive ? 'active' : isCompleted ? 'completed' : 'pending';
48765
+ const isFirst = index === 0;
48766
+ const isLast = index === steps.length - 1;
48759
48767
  return (React__default.createElement(React__default.Fragment, { key: step.id },
48760
48768
  React__default.createElement(p$8, { style: { position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center' } },
48761
48769
  React__default.createElement("div", { className: `v-step-circle ${statusClass}`, onClick: () => setActiveStepId(step.id) }, isCompleted ? (React__default.createElement(Icon, { name: "check", width: "20", height: "20" })) : (step.icon ? step.icon : React__default.createElement("span", null, index + 1))),
@@ -48764,8 +48772,11 @@ const Codex = ({ design = 'outline', defaultStepId, width = 12, newRow, classNam
48764
48772
  top: '100%',
48765
48773
  marginTop: '12px',
48766
48774
  width: '120px',
48767
- textAlign: 'center',
48768
- cursor: 'pointer'
48775
+ cursor: 'pointer',
48776
+ left: isFirst ? '0' : isLast ? 'auto' : '50%',
48777
+ right: isLast ? '0' : 'auto',
48778
+ transform: (!isFirst && !isLast) ? 'translateX(-50%)' : 'none',
48779
+ textAlign: isFirst ? 'left' : isLast ? 'right' : 'center',
48769
48780
  }, onClick: () => setActiveStepId(step.id) },
48770
48781
  React__default.createElement(p$d, { size: "2", weight: isActive ? "bold" : "regular", style: { color: isActive ? 'var(--gray-12)' : 'var(--gray-10)', display: 'block', lineHeight: 1.2 } }, step.title),
48771
48782
  step.description && (React__default.createElement(p$d, { size: "1", color: "gray", style: { display: 'block', marginTop: '4px' } }, step.description)))),
@@ -48781,7 +48792,7 @@ const CodexItem = ({ stepId, children, }) => {
48781
48792
  };
48782
48793
 
48783
48794
  const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLabel = "Back", finishLabel = "Submit", prevIcon = "doublearrowleft", nextIcon = "doublearrowright", finishIcon = "paperplane", onNext, onPrev, onFinish }) => {
48784
- const { setActiveStepId } = useStepper();
48795
+ const { setActiveStepId, brandColor } = useStepper();
48785
48796
  const handlePrev = () => {
48786
48797
  if (onPrev)
48787
48798
  onPrev();
@@ -48801,17 +48812,19 @@ const CodexControls = ({ nextStepId, prevStepId, nextLabel = "Continue", prevLab
48801
48812
  };
48802
48813
  return (React__default.createElement(p$5, { gap: "3", mt: "6", justify: "between", align: "center", style: { borderTop: '1px solid var(--gray-5)', paddingTop: '20px', width: '100%' } },
48803
48814
  prevStepId ? (React__default.createElement(o$a, { variant: "soft", color: "gray", onClick: handlePrev, style: { cursor: 'pointer' } },
48804
- prevIcon ? React__default.createElement(React__default.Fragment, null,
48815
+ prevIcon && (React__default.createElement(React__default.Fragment, null,
48805
48816
  React__default.createElement(Icon, { name: prevIcon }),
48806
- "\u00A0") : null,
48817
+ "\u00A0")),
48807
48818
  prevLabel)) : (React__default.createElement("div", null)),
48808
- React__default.createElement(o$a, { variant: "solid", color: nextStepId ? "blue" : "green", onClick: handleNext, style: { cursor: 'pointer' } },
48809
- nextStepId && nextIcon ? React__default.createElement(React__default.Fragment, null,
48819
+ React__default.createElement(o$a, { variant: "solid", color: brandColor ? undefined : (nextStepId ? "blue" : "green"), onClick: handleNext, style: Object.assign({ cursor: 'pointer' }, (brandColor ? { backgroundColor: 'var(--codex-brand)', color: '#fff' } : {})) }, nextStepId ? (React__default.createElement(React__default.Fragment, null,
48820
+ nextIcon && React__default.createElement(React__default.Fragment, null,
48810
48821
  React__default.createElement(Icon, { name: nextIcon }),
48811
- "\u00A0") : React__default.createElement(React__default.Fragment, null,
48822
+ "\u00A0"),
48823
+ nextLabel)) : (React__default.createElement(React__default.Fragment, null,
48824
+ finishIcon && React__default.createElement(React__default.Fragment, null,
48812
48825
  React__default.createElement(Icon, { name: finishIcon }),
48813
48826
  "\u00A0"),
48814
- nextStepId ? nextLabel : finishLabel)));
48827
+ finishLabel)))));
48815
48828
  };
48816
48829
 
48817
48830
  /** A special constant with type `never` */
@@ -24,6 +24,13 @@ export interface AccordionProps {
24
24
  * allowMultiple={true}
25
25
  */
26
26
  allowMultiple?: boolean;
27
+ /**
28
+ * * Option to pass a custom hex, rgb, or css variable to color the background
29
+ * of the AccordionItem headers.
30
+ * * @example
31
+ * brandcolor="var(--accent-3)"
32
+ */
33
+ brandcolor?: string;
27
34
  /**
28
35
  * * The required viewport column width for the Accordion component.
29
36
  * i.e. 1 - 12
@@ -84,5 +91,5 @@ export interface AccordionItemProps {
84
91
  */
85
92
  icon?: ReactNode;
86
93
  }
87
- export declare const Accordion: ({ design, defaultOpenId, allowMultiple, width, newRow, className, style, children }: AccordionProps) => React.JSX.Element;
94
+ export declare const Accordion: ({ design, defaultOpenId, allowMultiple, brandcolor, width, newRow, className, style, children }: AccordionProps) => React.JSX.Element;
88
95
  export declare const AccordionItem: ({ sectionId, title, children, disabled, icon }: AccordionItemProps) => React.JSX.Element;
@@ -5,6 +5,7 @@ interface CodexContextProps {
5
5
  activeStepId: string;
6
6
  setActiveStepId: (id: string) => void;
7
7
  design: CodexDesign;
8
+ brandColor?: string;
8
9
  }
9
10
  export declare const useStepper: () => CodexContextProps;
10
11
  export interface CodexProps {
@@ -12,40 +13,34 @@ export interface CodexProps {
12
13
  * * The design variation of the Codex component.
13
14
  * Default: 'outline'
14
15
  * Variants: 'outline', 'material', 'neumorphic'.
15
- * * @example
16
- * design="neumorphic"
17
16
  */
18
17
  design?: CodexDesign;
19
18
  /**
20
19
  * * The sectionId of the step that should be active on render.
21
20
  * Defaults to the first child step when undefined.
22
- * * @example
23
- * defaultStepId="billing-info"
24
21
  */
25
22
  defaultStepId?: string;
26
23
  /**
27
- * * The required viewport column width for the Codex component.
28
- * i.e. 1 - 12
24
+ * * Option to pass a custom hex, rgb, or css variable to color the active
25
+ * step lines, icons, circles, and navigation buttons.
29
26
  * * @example
30
- * width={12}
27
+ * brandColor="#800020"
28
+ */
29
+ brandColor?: string;
30
+ /**
31
+ * * The required viewport column width for the Codex component.
31
32
  */
32
33
  width?: number;
33
34
  /**
34
35
  * * Option to render Codex component on a new row.
35
- * * @example
36
- * newRow
37
36
  */
38
37
  newRow?: boolean;
39
38
  /**
40
39
  * * Option to specify the .scss class selector for the Codex component.
41
- * * @example
42
- * className="teletraan-1-codex"
43
40
  */
44
41
  className?: string;
45
42
  /**
46
- * * Option to inject custom CSS to the Stepper wrapper.
47
- * * @example
48
- * style={{ margin: "20px 0" }}
43
+ * * Option to inject custom CSS to the Codex wrapper.
49
44
  */
50
45
  style?: React.CSSProperties;
51
46
  /**
@@ -54,35 +49,12 @@ export interface CodexProps {
54
49
  children: ReactNode;
55
50
  }
56
51
  export interface CodexItemProps {
57
- /**
58
- * * The unique identifier for the step item.
59
- * * @example
60
- * stepId="step-1"
61
- */
62
52
  stepId: string;
63
- /**
64
- * * The display title for the step header.
65
- * * @example
66
- * title="Account Setup"
67
- */
68
53
  title: string;
69
- /**
70
- * * An optional subtitle description displayed below the title.
71
- * * @example
72
- * description="Enter your details"
73
- */
74
54
  subtitleDescription?: string;
75
- /**
76
- * * The content revealed when this step is active.
77
- */
78
55
  children: ReactNode;
79
- /**
80
- * * Option to provide a custom icon for the step circle.
81
- * * @example
82
- * icon={<Icon name="user" />}
83
- */
84
56
  icon?: ReactNode;
85
57
  }
86
- export declare const Codex: ({ design, defaultStepId, width, newRow, className, style, children }: CodexProps) => React.JSX.Element;
58
+ export declare const Codex: ({ design, defaultStepId, brandColor, width, newRow, className, style, children }: CodexProps) => React.JSX.Element;
87
59
  export declare const CodexItem: ({ stepId, children, }: CodexItemProps) => React.JSX.Element | null;
88
60
  export {};
@@ -22,7 +22,7 @@ export interface CodexControlsProps {
22
22
  nextLabel?: string;
23
23
  /**
24
24
  * * Custom icon for the Next button.
25
- * Default: "Continue"
25
+ * Default: "doublearrowright"
26
26
  */
27
27
  nextIcon?: string;
28
28
  /**
@@ -32,17 +32,17 @@ export interface CodexControlsProps {
32
32
  prevLabel?: string;
33
33
  /**
34
34
  * * Custom icon name for the Previous button.
35
- * Default: "Back"
35
+ * Default: "doublearrowleft"
36
36
  */
37
37
  prevIcon?: string;
38
38
  /**
39
39
  * * Custom text for the Finish button (rendered when nextStepId undefined).
40
- * Default: "Complete Setup"
40
+ * Default: "Submit"
41
41
  */
42
42
  finishLabel?: string;
43
43
  /**
44
44
  * * Custom icon name for the Finish button (rendered when no nextStepId undefined).
45
- * Default: "flag"
45
+ * Default: "paperplane"
46
46
  */
47
47
  finishIcon?: string;
48
48
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeraldemperaur/vector-sigma",
3
- "version": "1.4.22",
3
+ "version": "1.4.24",
4
4
  "description": "Dynamic Form Orchestrator: NPM Package",
5
5
  "repository": {
6
6
  "type": "git",