@factorialco/fcode-react-forms 3.0.0 → 3.2.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.d.ts CHANGED
@@ -3,4 +3,5 @@ import { default as FcodeJsonSchemaForm } from './components/json-schema-form/fc
3
3
  import { processFormSpecs } from './utils/process-form-specs';
4
4
  import { buildId } from './utils';
5
5
  export { FcodeForm, FcodeJsonSchemaForm, processFormSpecs, buildId };
6
+ export type { FcodeRjsfTheme, MultistepThemeComponents, StepBackButtonProps, StepsNavigationItem, StepsNavigationProps, } from './components/json-schema-form/multistep';
6
7
  export default FcodeForm;
package/dist/styles.css CHANGED
@@ -38,6 +38,7 @@
38
38
  - card
39
39
  - alert
40
40
  - error list
41
+ - steps (multistep navigation)
41
42
  */
42
43
 
43
44
  /* reset inherited parent styles */
@@ -1637,4 +1638,143 @@ input[type='number'] {
1637
1638
  .fcode-modal-xl {
1638
1639
  max-width: 1140px;
1639
1640
  }
1640
- }
1641
+ }
1642
+ /* steps (multistep navigation) */
1643
+
1644
+ .fcode-steps-nav {
1645
+ display: flex;
1646
+ gap: 0.25rem;
1647
+ list-style: none;
1648
+ margin: 0 0 1.5rem;
1649
+ padding: 0;
1650
+ }
1651
+
1652
+ .fcode-steps-nav-item {
1653
+ display: flex;
1654
+ }
1655
+
1656
+ .fcode-steps-item {
1657
+ display: inline-flex;
1658
+ align-items: center;
1659
+ gap: 0.5rem;
1660
+ background: none;
1661
+ border: none;
1662
+ border-radius: var(--ycf-button-border-radius);
1663
+ padding: 0.5rem 0.75rem;
1664
+ font-family: inherit;
1665
+ font-size: 0.9375rem;
1666
+ line-height: 1.5;
1667
+ text-align: left;
1668
+ color: var(--ycf-light-text-color);
1669
+ }
1670
+
1671
+ .fcode-steps-item:not(:disabled) {
1672
+ cursor: pointer;
1673
+ }
1674
+
1675
+ .fcode-steps-item:not(:disabled):hover {
1676
+ background-color: var(--ycf-button-light-background-color);
1677
+ }
1678
+
1679
+ .fcode-steps-item:focus-visible {
1680
+ outline: 2px solid var(--ycf-selected-color);
1681
+ outline-offset: 2px;
1682
+ }
1683
+
1684
+ .fcode-steps-item-counter {
1685
+ display: inline-flex;
1686
+ align-items: center;
1687
+ justify-content: center;
1688
+ flex: none;
1689
+ width: 1.5rem;
1690
+ height: 1.5rem;
1691
+ border-radius: 50%;
1692
+ border: 1px solid var(--ycf-base-border-color);
1693
+ font-size: 0.8125rem;
1694
+ line-height: 1;
1695
+ }
1696
+
1697
+ .fcode-steps-item.is-completed {
1698
+ color: var(--ycf-base-text-color);
1699
+ }
1700
+
1701
+ .fcode-steps-item.is-current {
1702
+ color: var(--ycf-base-text-color);
1703
+ font-weight: 500;
1704
+ }
1705
+
1706
+ .fcode-steps-item.is-current .fcode-steps-item-counter {
1707
+ background-color: var(--ycf-accent-color);
1708
+ border-color: var(--ycf-accent-color);
1709
+ color: var(--ycf-button-primary-text-color);
1710
+ }
1711
+
1712
+ .fcode-steps-item.has-errors .fcode-steps-item-counter {
1713
+ border-color: var(--ycf-danger-color);
1714
+ color: var(--ycf-danger-color);
1715
+ }
1716
+
1717
+ .fcode-steps-item.is-current.has-errors .fcode-steps-item-counter {
1718
+ background-color: var(--ycf-danger-color);
1719
+ border-color: var(--ycf-danger-color);
1720
+ color: var(--ycf-button-danger-text-color);
1721
+ }
1722
+
1723
+ .fcode-steps-layout-tabs .fcode-steps-nav {
1724
+ flex-direction: row;
1725
+ flex-wrap: wrap;
1726
+ border-bottom: 1px solid var(--ycf-base-border-color);
1727
+ padding-bottom: 0.5rem;
1728
+ }
1729
+
1730
+ .fcode-steps-layout-sidebar {
1731
+ display: flex;
1732
+ gap: 2rem;
1733
+ align-items: flex-start;
1734
+ }
1735
+
1736
+ .fcode-steps-layout-sidebar .fcode-steps-nav {
1737
+ flex-direction: column;
1738
+ flex: none;
1739
+ min-width: 11rem;
1740
+ margin: 0;
1741
+ }
1742
+
1743
+ .fcode-steps-layout-sidebar .fcode-steps-main {
1744
+ flex: 1 1 auto;
1745
+ min-width: 0;
1746
+ }
1747
+
1748
+ @media (max-width: 767px) {
1749
+ .fcode-steps-layout-sidebar {
1750
+ flex-direction: column;
1751
+ gap: 1rem;
1752
+ }
1753
+
1754
+ .fcode-steps-layout-sidebar .fcode-steps-nav {
1755
+ flex-direction: row;
1756
+ flex-wrap: wrap;
1757
+ min-width: 0;
1758
+ }
1759
+ }
1760
+
1761
+ .fcode-steps-header {
1762
+ margin-bottom: 1rem;
1763
+ }
1764
+
1765
+ .fcode-steps-title {
1766
+ margin: 0 0 0.25rem;
1767
+ font-size: var(--ycf-form-group-title-size);
1768
+ color: var(--ycf-base-text-color);
1769
+ }
1770
+
1771
+ .fcode-steps-description {
1772
+ margin: 0;
1773
+ color: var(--ycf-light-text-color);
1774
+ }
1775
+
1776
+ .fcode-form .fcode-steps-actions {
1777
+ display: flex;
1778
+ align-items: center;
1779
+ gap: 0.75rem;
1780
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/fcode-react-forms",
3
- "version": "3.0.0",
3
+ "version": "3.2.0",
4
4
  "description": "Factorial Code allows start process executions from any webpage embedding process input parameters forms. This allows each form submission to start one execution with the information filled in the form, and also allows to manage the execution result into that webpage.",
5
5
  "type": "module",
6
6
  "homepage": "https://code.factorialhr.com/docs/forms/",