@bagelink/vue 0.0.696 → 0.0.702

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 (43) hide show
  1. package/dist/components/Btn.vue.d.ts +1 -1
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/ListItem.vue.d.ts +7 -0
  4. package/dist/components/ListItem.vue.d.ts.map +1 -1
  5. package/dist/components/ListView.vue.d.ts.map +1 -1
  6. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  7. package/dist/components/form/BglForm.vue.d.ts +6 -5
  8. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  9. package/dist/components/form/BglMultiStepForm.vue.d.ts +82 -0
  10. package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -0
  11. package/dist/components/form/index.d.ts +1 -0
  12. package/dist/components/form/index.d.ts.map +1 -1
  13. package/dist/components/form/inputs/TelInput.vue.d.ts +3 -3
  14. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  15. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  16. package/dist/components/layout/TabsNav.vue.d.ts +4 -0
  17. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  18. package/dist/index.cjs +281 -137
  19. package/dist/index.mjs +282 -138
  20. package/dist/style.css +589 -426
  21. package/dist/types/BagelForm.d.ts +1 -0
  22. package/dist/types/BagelForm.d.ts.map +1 -1
  23. package/dist/utils/BagelFormUtils.d.ts +346 -0
  24. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  25. package/package.json +13 -13
  26. package/src/components/Btn.vue +4 -1
  27. package/src/components/ListItem.vue +54 -2
  28. package/src/components/ListView.vue +0 -38
  29. package/src/components/TableSchema.vue +1 -2
  30. package/src/components/form/BglForm.vue +13 -15
  31. package/src/components/form/BglMultiStepForm.vue +121 -0
  32. package/src/components/form/index.ts +1 -0
  33. package/src/components/form/inputs/FileUploadURL.vue +2 -0
  34. package/src/components/form/inputs/SelectInput.vue +2 -2
  35. package/src/components/form/inputs/TelInput.vue +0 -1
  36. package/src/components/form/inputs/TextInput.vue +0 -1
  37. package/src/components/layout/TabsNav.vue +64 -1
  38. package/src/styles/appearance.css +121 -40
  39. package/src/styles/inputs.css +21 -13
  40. package/src/styles/layout.css +97 -84
  41. package/src/styles/mobilLayout.css +181 -168
  42. package/src/types/BagelForm.ts +1 -0
  43. package/src/utils/BagelFormUtils.ts +29 -1
@@ -35,23 +35,23 @@
35
35
  }
36
36
 
37
37
  .m_round {
38
- border-radius: var(--btn-border-radius);
38
+ border-radius: var(--btn-border-radius) !important;
39
39
  }
40
40
 
41
41
  .m_rounded {
42
- border-radius: calc(var(--btn-border-radius) / 2);
42
+ border-radius: calc(var(--btn-border-radius) / 2) !important;
43
43
  }
44
44
 
45
45
  .m_round-extra {
46
- border-radius: calc(var(--btn-border-radius) * 2);
46
+ border-radius: calc(var(--btn-border-radius) * 2) !important;
47
47
  }
48
48
 
49
49
  .m_round-none {
50
50
  border-radius: 0 !important;
51
51
  }
52
-
53
- .m_oval{
54
- border-radius: 100% ;
52
+
53
+ .m_oval {
54
+ border-radius: 100%;
55
55
  }
56
56
 
57
57
  .m_flex-center {
@@ -83,7 +83,7 @@
83
83
  .m_align-items-center {
84
84
  align-items: center !important;
85
85
  }
86
-
86
+
87
87
  .m_align-items-baseline {
88
88
  align-items: baseline !important;
89
89
  }
@@ -544,39 +544,41 @@
544
544
  .m_flex-shrink {
545
545
  flex-shrink: 1;
546
546
  }
547
-
548
- .m_flex-no-grow, .m_flex-grow-0 {
547
+
548
+ .m_flex-no-grow,
549
+ .m_flex-grow-0 {
549
550
  flex-grow: 0;
550
551
  }
551
-
552
- .m_flex-no-shrink, .m_flex-shrink-0 {
552
+
553
+ .m_flex-no-shrink,
554
+ .m_flex-shrink-0 {
553
555
  flex-shrink: 0;
554
556
  }
555
-
557
+
556
558
  .m_flex-grow-2 {
557
559
  flex-grow: 2;
558
560
  }
559
-
561
+
560
562
  .m_flex-shrink-2 {
561
563
  flex-shrink: 2;
562
564
  }
563
-
565
+
564
566
  .m_flex-grow-3 {
565
567
  flex-grow: 3;
566
568
  }
567
-
569
+
568
570
  .m_flex-shrink-3 {
569
571
  flex-shrink: 3;
570
572
  }
571
-
573
+
572
574
  .m_flex-grow-4 {
573
575
  flex-grow: 4;
574
576
  }
575
-
577
+
576
578
  .m_flex-shrink-4 {
577
579
  flex-shrink: 4;
578
580
  }
579
-
581
+
580
582
  .m_flex-2-col {
581
583
  max-width: 50%;
582
584
  flex: 1 1 calc(50% - 2rem);
@@ -1770,26 +1772,27 @@
1770
1772
  .m_grid-span-6 {
1771
1773
  grid-column: span 6;
1772
1774
  }
1775
+
1773
1776
  .m_grid-span-row-1 {
1774
1777
  grid-row: span 1;
1775
1778
  }
1776
-
1779
+
1777
1780
  .m_grid-span-row-2 {
1778
1781
  grid-row: span 2;
1779
1782
  }
1780
-
1783
+
1781
1784
  .m_grid-span-row-3 {
1782
1785
  grid-row: span 3;
1783
1786
  }
1784
-
1787
+
1785
1788
  .m_grid-span-row-4 {
1786
1789
  grid-row: span 4;
1787
1790
  }
1788
-
1791
+
1789
1792
  .m_grid-span-row-5 {
1790
1793
  grid-row: span 5;
1791
1794
  }
1792
-
1795
+
1793
1796
  .m_grid-span-row-6 {
1794
1797
  grid-row: span 6;
1795
1798
  }
@@ -1851,299 +1854,309 @@
1851
1854
  inset-inline-start: 0;
1852
1855
  inset-inline-end: 0;
1853
1856
  }
1854
- .m_inset-inline-start, .m_start{
1857
+
1858
+ .m_inset-inline-start,
1859
+ .m_start {
1855
1860
  inset-inline-start: 0 !important;
1856
1861
  }
1857
-
1858
- .m_start-1{
1862
+
1863
+ .m_start-1 {
1859
1864
  inset-inline-start: 1rem !important;
1860
1865
  }
1861
-
1862
- .m_start-2{
1866
+
1867
+ .m_start-2 {
1863
1868
  inset-inline-start: 2rem !important;
1864
1869
  }
1865
-
1866
- .m_start-3{
1870
+
1871
+ .m_start-3 {
1867
1872
  inset-inline-start: 3rem !important;
1868
1873
  }
1869
-
1870
- .m_start-4{
1874
+
1875
+ .m_start-4 {
1871
1876
  inset-inline-start: 4rem !important;
1872
1877
  }
1873
-
1874
- .m_start-5{
1878
+
1879
+ .m_start-5 {
1875
1880
  inset-inline-start: 5rem !important;
1876
1881
  }
1877
-
1878
- .m_start-6{
1882
+
1883
+ .m_start-6 {
1879
1884
  inset-inline-start: 6rem !important;
1880
1885
  }
1881
-
1882
- .m_start-7{
1886
+
1887
+ .m_start-7 {
1883
1888
  inset-inline-start: 7rem !important;
1884
1889
  }
1885
-
1886
- .m_start-8{
1890
+
1891
+ .m_start-8 {
1887
1892
  inset-inline-start: 8rem !important;
1888
1893
  }
1889
-
1890
- .m_-start-1{
1894
+
1895
+ .m_-start-1 {
1891
1896
  inset-inline-start: -1rem !important;
1892
1897
  }
1893
-
1894
- .m_-start-2{
1898
+
1899
+ .m_-start-2 {
1895
1900
  inset-inline-start: -2rem !important;
1896
1901
  }
1897
-
1898
- .m_-start-3{
1902
+
1903
+ .m_-start-3 {
1899
1904
  inset-inline-start: -3rem !important;
1900
1905
  }
1901
-
1902
- .m_-start-4{
1906
+
1907
+ .m_-start-4 {
1903
1908
  inset-inline-start: -4rem !important;
1904
1909
  }
1905
-
1906
- .m_-start-5{
1910
+
1911
+ .m_-start-5 {
1907
1912
  inset-inline-start: -5rem !important;
1908
1913
  }
1909
-
1910
- .m_-start-6{
1914
+
1915
+ .m_-start-6 {
1911
1916
  inset-inline-start: -6rem !important;
1912
1917
  }
1913
-
1914
- .m_-start-7{
1918
+
1919
+ .m_-start-7 {
1915
1920
  inset-inline-start: -7rem !important;
1916
1921
  }
1917
-
1918
- .m_-start-8{
1922
+
1923
+ .m_-start-8 {
1919
1924
  inset-inline-start: -8rem !important;
1920
1925
  }
1921
-
1922
- .m_inset-inline-end, .m_end{
1926
+
1927
+ .m_inset-inline-end,
1928
+ .m_end {
1923
1929
  inset-inline-end: 0 !important;
1924
1930
  }
1925
-
1926
- .m_end-1{
1931
+
1932
+ .m_end-1 {
1927
1933
  inset-inline-end: 1rem !important;
1928
1934
  }
1929
-
1930
- .m_end-2{
1935
+
1936
+ .m_end-2 {
1931
1937
  inset-inline-end: 2rem !important;
1932
1938
  }
1933
-
1934
- .m_end-3{
1939
+
1940
+ .m_end-3 {
1935
1941
  inset-inline-end: 3rem !important;
1936
1942
  }
1937
-
1938
- .m_end-4{
1943
+
1944
+ .m_end-4 {
1939
1945
  inset-inline-end: 4rem !important;
1940
1946
  }
1941
-
1942
- .m_end-5{
1947
+
1948
+ .m_end-5 {
1943
1949
  inset-inline-end: 5rem !important;
1944
1950
  }
1945
-
1946
- .m_end-6{
1951
+
1952
+ .m_end-6 {
1947
1953
  inset-inline-end: 6rem !important;
1948
1954
  }
1949
-
1950
- .m_end-7{
1955
+
1956
+ .m_end-7 {
1951
1957
  inset-inline-end: 7rem !important;
1952
1958
  }
1953
-
1954
- .m_end-8{
1959
+
1960
+ .m_end-8 {
1955
1961
  inset-inline-end: 8rem !important;
1956
1962
  }
1957
-
1958
- .m_-end-1{
1963
+
1964
+ .m_-end-1 {
1959
1965
  inset-inline-end: -1rem !important;
1960
1966
  }
1961
-
1962
- .m_-end-2{
1967
+
1968
+ .m_-end-2 {
1963
1969
  inset-inline-end: -2rem !important;
1964
1970
  }
1965
-
1966
- .m_-end-3{
1971
+
1972
+ .m_-end-3 {
1967
1973
  inset-inline-end: -3rem !important;
1968
1974
  }
1969
-
1970
- .m_-end-4{
1975
+
1976
+ .m_-end-4 {
1971
1977
  inset-inline-end: -4rem !important;
1972
1978
  }
1973
-
1974
- .m_-end-5{
1979
+
1980
+ .m_-end-5 {
1975
1981
  inset-inline-end: -5rem !important;
1976
1982
  }
1977
-
1978
- .m_-end-6{
1983
+
1984
+ .m_-end-6 {
1979
1985
  inset-inline-end: -6rem !important;
1980
1986
  }
1981
-
1982
- .m_-end-7{
1987
+
1988
+ .m_-end-7 {
1983
1989
  inset-inline-end: -7rem !important;
1984
1990
  }
1985
-
1986
- .m_-end-8{
1991
+
1992
+ .m_-end-8 {
1987
1993
  inset-inline-end: -8rem !important;
1988
1994
  }
1989
-
1990
- .m_top, .m_top-0{
1995
+
1996
+ .m_top,
1997
+ .m_top-0 {
1991
1998
  top: 0 !important;
1992
1999
  }
1993
-
1994
- .m_top-1{
2000
+
2001
+ .m_top-1 {
1995
2002
  top: 1rem !important;
1996
2003
  }
1997
-
1998
- .m_top-2{
2004
+
2005
+ .m_top-2 {
1999
2006
  top: 2rem !important;
2000
2007
  }
2001
-
2002
- .m_top-3{
2008
+
2009
+ .m_top-3 {
2003
2010
  top: 3rem !important;
2004
2011
  }
2005
-
2006
- .m_top-4{
2012
+
2013
+ .m_top-4 {
2007
2014
  top: 4rem !important;
2008
2015
  }
2009
-
2010
- .m_top-5{
2016
+
2017
+ .m_top-5 {
2011
2018
  top: 5rem !important;
2012
2019
  }
2013
-
2014
- .m_top-6{
2020
+
2021
+ .m_top-6 {
2015
2022
  top: 6rem !important;
2016
2023
  }
2017
-
2018
- .m_top-7{
2024
+
2025
+ .m_top-7 {
2019
2026
  top: 7rem !important;
2020
2027
  }
2021
-
2022
- .m_top-8{
2028
+
2029
+ .m_top-8 {
2023
2030
  top: 8rem !important;
2024
2031
  }
2025
-
2026
- .m_-top-1{
2032
+
2033
+ .m_-top-1 {
2027
2034
  top: -1rem !important;
2028
2035
  }
2029
-
2030
- .m_-top-2{
2036
+
2037
+ .m_-top-2 {
2031
2038
  top: -2rem !important;
2032
2039
  }
2033
-
2034
- .m_-top-3{
2040
+
2041
+ .m_-top-3 {
2035
2042
  top: -3rem !important;
2036
2043
  }
2037
-
2038
- .m_-top-4{
2044
+
2045
+ .m_-top-4 {
2039
2046
  top: -4rem !important;
2040
2047
  }
2041
-
2042
- .m_-top-5{
2048
+
2049
+ .m_-top-5 {
2043
2050
  top: -5rem !important;
2044
2051
  }
2045
-
2046
- .m_-top-6{
2052
+
2053
+ .m_-top-6 {
2047
2054
  top: -6rem !important;
2048
2055
  }
2049
-
2050
- .m_-top-7{
2056
+
2057
+ .m_-top-7 {
2051
2058
  top: -7rem !important;
2052
2059
  }
2053
-
2054
- .m_-top-8{
2060
+
2061
+ .m_-top-8 {
2055
2062
  top: -8rem !important;
2056
2063
  }
2057
-
2058
- .m_bottom, .m_bottom-0{
2064
+
2065
+ .m_bottom,
2066
+ .m_bottom-0 {
2059
2067
  bottom: 0 !important;
2060
2068
  }
2061
-
2062
- .m_bottom-1{
2069
+
2070
+ .m_bottom-1 {
2063
2071
  bottom: 1rem !important;
2064
2072
  }
2065
-
2066
- .m_bottom-2{
2073
+
2074
+ .m_bottom-2 {
2067
2075
  bottom: 2rem !important;
2068
2076
  }
2069
-
2070
- .m_bottom-3{
2077
+
2078
+ .m_bottom-3 {
2071
2079
  bottom: 3rem !important;
2072
2080
  }
2073
-
2074
- .m_bottom-4{
2081
+
2082
+ .m_bottom-4 {
2075
2083
  bottom: 4rem !important;
2076
2084
  }
2077
-
2078
- .m_bottom-5{
2085
+
2086
+ .m_bottom-5 {
2079
2087
  bottom: 5rem !important;
2080
2088
  }
2081
-
2082
- .m_bottom-6{
2089
+
2090
+ .m_bottom-6 {
2083
2091
  bottom: 6rem !important;
2084
2092
  }
2085
-
2086
- .m_bottom-7{
2093
+
2094
+ .m_bottom-7 {
2087
2095
  bottom: 7rem !important;
2088
2096
  }
2089
-
2090
- .m_bottom-8{
2097
+
2098
+ .m_bottom-8 {
2091
2099
  bottom: 8rem !important;
2092
2100
  }
2093
-
2094
- .m_-bottom-1{
2101
+
2102
+ .m_-bottom-1 {
2095
2103
  bottom: -1rem !important;
2096
2104
  }
2097
-
2098
- .m_-bottom-2{
2105
+
2106
+ .m_-bottom-2 {
2099
2107
  bottom: -2rem !important;
2100
2108
  }
2101
-
2102
- .m_-bottom-3{
2109
+
2110
+ .m_-bottom-3 {
2103
2111
  bottom: -3rem !important;
2104
2112
  }
2105
-
2106
- .m_-bottom-4{
2113
+
2114
+ .m_-bottom-4 {
2107
2115
  bottom: -4rem !important;
2108
2116
  }
2109
-
2110
- .m_-bottom-5{
2117
+
2118
+ .m_-bottom-5 {
2111
2119
  bottom: -5rem !important;
2112
2120
  }
2113
-
2114
- .m_-bottom-6{
2121
+
2122
+ .m_-bottom-6 {
2115
2123
  bottom: -6rem !important;
2116
2124
  }
2117
-
2118
- .m_-bottom-7{
2125
+
2126
+ .m_-bottom-7 {
2119
2127
  bottom: -7rem !important;
2120
2128
  }
2121
-
2122
- .m_-bottom-8{
2129
+
2130
+ .m_-bottom-8 {
2123
2131
  bottom: -8rem !important;
2124
2132
  }
2125
- .m_inset-0, .m_inset{
2133
+
2134
+ .m_inset-0,
2135
+ .m_inset {
2126
2136
  inset: 0;
2127
2137
  }
2128
- .m_inset-1{
2138
+
2139
+ .m_inset-1 {
2129
2140
  inset: 1rem;
2130
2141
  }
2131
- .m_inset-2{
2142
+
2143
+ .m_inset-2 {
2132
2144
  inset: 2rem;
2133
2145
  }
2134
-
2135
- .m_inset-3{
2146
+
2147
+ .m_inset-3 {
2136
2148
  inset: 3rem;
2137
2149
  }
2138
-
2139
- .m_inset-4{
2150
+
2151
+ .m_inset-4 {
2140
2152
  inset: 4rem;
2141
2153
  }
2142
-
2143
- .m_inset-5{
2154
+
2155
+ .m_inset-5 {
2144
2156
  inset: 5rem;
2145
2157
  }
2146
- .m_inset-6{
2158
+
2159
+ .m_inset-6 {
2147
2160
  inset: 6rem;
2148
2161
  }
2149
2162
  }
@@ -55,6 +55,7 @@ export interface SelectBagelField<T> extends BaseBagelField<T> {
55
55
  }
56
56
 
57
57
  export type Field<T = Record<string, any>> = BaseBagelField<T> | InputBagelField<T> | SelectBagelField<T>
58
+ export type BglFieldT<T = Record<string, any>> = Field<T>
58
59
 
59
60
  export type BglFormSchemaT<T = Record<string, any>> = Field<T>[]
60
61
 
@@ -1,4 +1,5 @@
1
- import type { BglFormSchemaT, Field, Option } from '@bagelink/vue'
1
+ import { BagelForm, type BglFormSchemaT, type Field, type Option, TelInput } from '@bagelink/vue'
2
+ import { markRaw } from 'vue'
2
3
 
3
4
  interface InputOptions {
4
5
  required?: boolean
@@ -164,6 +165,33 @@ export function frmRow(...children: Field[]) {
164
165
  }
165
166
  }
166
167
 
168
+ export function bglForm(idOrField?: string | Field, ...schema: Field[]) {
169
+ if (typeof idOrField === 'string') {
170
+ return {
171
+ $el: markRaw(BagelForm),
172
+ id: idOrField,
173
+ attrs: {
174
+ schema: [idOrField, ...schema],
175
+ },
176
+ }
177
+ }
178
+ return {
179
+ $el: markRaw(BagelForm),
180
+ attrs: {
181
+ schema: [idOrField, ...schema]
182
+ },
183
+ }
184
+ }
185
+
186
+ export function telField(id: string, label?: string, options?: Record<string, any>): Field {
187
+ return {
188
+ $el: markRaw(TelInput),
189
+ id,
190
+ label,
191
+ attrs: options,
192
+ }
193
+ }
194
+
167
195
  export function findBglFieldById(id: string, _schema: BglFormSchemaT): Field | undefined {
168
196
  for (const field of _schema) {
169
197
  if (field.id === id) return field