@bagelink/vue 0.0.805 → 0.0.809

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 (109) hide show
  1. package/dist/components/BglVideo.vue.d.ts.map +1 -1
  2. package/dist/components/DataPreview.vue.d.ts +9 -3
  3. package/dist/components/DataPreview.vue.d.ts.map +1 -1
  4. package/dist/components/MapEmbed.vue.d.ts.map +1 -1
  5. package/dist/components/ModalForm.vue.d.ts +9 -3
  6. package/dist/components/ModalForm.vue.d.ts.map +1 -1
  7. package/dist/components/NavBar.vue.d.ts.map +1 -1
  8. package/dist/components/TableSchema.vue.d.ts +3 -1
  9. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  10. package/dist/components/Zoomer.vue.d.ts.map +1 -1
  11. package/dist/components/form/BglField.vue.d.ts +3 -1
  12. package/dist/components/form/BglField.vue.d.ts.map +1 -1
  13. package/dist/components/form/BglForm.vue.d.ts +9 -3
  14. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  15. package/dist/components/form/BglMultiStepForm.vue.d.ts +3 -1
  16. package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -1
  17. package/dist/components/form/inputs/ColorPicker.vue.d.ts +6 -2
  18. package/dist/components/form/inputs/ColorPicker.vue.d.ts.map +1 -1
  19. package/dist/components/form/inputs/DatePicker.vue.d.ts +6 -2
  20. package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
  21. package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
  22. package/dist/components/form/inputs/PasswordInput.vue.d.ts +3 -1
  23. package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
  24. package/dist/components/form/inputs/RichText2/formatting.d.ts.map +1 -1
  25. package/dist/components/form/inputs/SelectInput.vue.d.ts +6 -2
  26. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  27. package/dist/components/form/inputs/TableField.vue.d.ts +6 -2
  28. package/dist/components/form/inputs/TableField.vue.d.ts.map +1 -1
  29. package/dist/components/form/inputs/TextInput.vue.d.ts +6 -2
  30. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  31. package/dist/components/layout/BottomMenu.vue.d.ts.map +1 -1
  32. package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
  33. package/dist/components/lightbox/index.d.ts.map +1 -1
  34. package/dist/composables/index.d.ts +3 -1
  35. package/dist/composables/index.d.ts.map +1 -1
  36. package/dist/index.cjs +153 -144
  37. package/dist/index.mjs +153 -144
  38. package/dist/plugins/modal.d.ts +12 -4
  39. package/dist/plugins/modal.d.ts.map +1 -1
  40. package/dist/style.css +3077 -398
  41. package/dist/types/BagelForm.d.ts +27 -9
  42. package/dist/types/BagelForm.d.ts.map +1 -1
  43. package/dist/types/index.d.ts +3 -1
  44. package/dist/types/index.d.ts.map +1 -1
  45. package/dist/utils/BagelFormUtils.d.ts +45 -15
  46. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  47. package/dist/utils/allCountries.d.ts +1 -1
  48. package/dist/utils/allCountries.d.ts.map +1 -1
  49. package/dist/utils/index.d.ts +6 -2
  50. package/dist/utils/index.d.ts.map +1 -1
  51. package/dist/utils/lang.d.ts +3 -1
  52. package/dist/utils/lang.d.ts.map +1 -1
  53. package/dist/utils/strings.d.ts.map +1 -1
  54. package/package.json +6 -6
  55. package/src/components/Accordion.vue +1 -1
  56. package/src/components/AccordionItem.vue +4 -4
  57. package/src/components/AddressSearch.vue +1 -1
  58. package/src/components/BglVideo.vue +1 -2
  59. package/src/components/DataPreview.vue +1 -1
  60. package/src/components/MapEmbed.vue +4 -6
  61. package/src/components/ModalForm.vue +3 -3
  62. package/src/components/NavBar.vue +6 -3
  63. package/src/components/TableSchema.vue +6 -6
  64. package/src/components/Zoomer.vue +7 -8
  65. package/src/components/dashboard/Lineart.vue +3 -3
  66. package/src/components/form/BglField.vue +2 -2
  67. package/src/components/form/BglFieldSet.vue +1 -1
  68. package/src/components/form/BglForm.vue +2 -2
  69. package/src/components/form/inputs/CheckInput.vue +1 -1
  70. package/src/components/form/inputs/ColorPicker.vue +1 -1
  71. package/src/components/form/inputs/DatePicker.vue +1 -1
  72. package/src/components/form/inputs/FileUpload.vue +10 -10
  73. package/src/components/form/inputs/OTP.vue +6 -6
  74. package/src/components/form/inputs/PasswordInput.vue +1 -1
  75. package/src/components/form/inputs/RadioPillsInput.vue +1 -1
  76. package/src/components/form/inputs/RichText.vue +1 -1
  77. package/src/components/form/inputs/RichText2/Toolbar.vue +2 -2
  78. package/src/components/form/inputs/RichText2/formatting.ts +5 -3
  79. package/src/components/form/inputs/RichText2/index.vue +1 -1
  80. package/src/components/form/inputs/SelectInput.vue +50 -39
  81. package/src/components/form/inputs/SignaturePad.vue +2 -2
  82. package/src/components/form/inputs/TableField.vue +5 -5
  83. package/src/components/form/inputs/TelInput.vue +4 -4
  84. package/src/components/form/inputs/TextInput.vue +1 -1
  85. package/src/components/form/inputs/ToggleInput.vue +1 -1
  86. package/src/components/formkit/FileUploader.vue +1 -1
  87. package/src/components/formkit/MiscFields.vue +1 -1
  88. package/src/components/layout/BottomMenu.vue +2 -2
  89. package/src/components/layout/Layout.vue +2 -2
  90. package/src/components/layout/Tabs.vue +2 -2
  91. package/src/components/layout/TabsNav.vue +1 -1
  92. package/src/components/layout/tabsManager.ts +1 -1
  93. package/src/components/lightbox/Lightbox.vue +2 -2
  94. package/src/components/lightbox/index.ts +13 -7
  95. package/src/composables/index.ts +2 -2
  96. package/src/plugins/modal.ts +7 -7
  97. package/src/styles/appearance.css +36 -0
  98. package/src/styles/layout.css +1563 -60
  99. package/src/styles/mobilLayout.css +1519 -30
  100. package/src/styles/theme.css +1 -1
  101. package/src/styles/transitions.css +5 -2
  102. package/src/types/BagelForm.ts +9 -9
  103. package/src/types/index.ts +1 -1
  104. package/src/utils/BagelFormUtils.ts +1 -1
  105. package/src/utils/allCountries.ts +1 -1
  106. package/src/utils/index.ts +7 -7
  107. package/src/utils/lang.ts +1 -1
  108. package/src/utils/strings.ts +1 -2
  109. package/vite.config.ts +1 -1
@@ -16,7 +16,7 @@
16
16
  --bgl-gray-40: rgba(183, 183, 183, 0.4);
17
17
  --bgl-accent-color: var(--bgl-primary);
18
18
  --bgl-bg: #f4f6fa;
19
- --bgl-shadow: #4c577d26;
19
+ --bgl-shadow: #00000031;
20
20
  --border-color: #00000020;
21
21
  --placeholder-color: #00000040;
22
22
  --label-color: #00000080;
@@ -56,16 +56,19 @@
56
56
  position: absolute;
57
57
  }
58
58
 
59
+ body:has([class*="slide-fade"])::-webkit-scrollbar {
60
+ width: 0em !important;
61
+ height: 0em !important;
62
+ }
63
+
59
64
  .slide-fade-enter-active {
60
65
  transition: all 0.15s ease-out;
61
66
  overflow: hidden;
62
-
63
67
  }
64
68
 
65
69
  .slide-fade-leave-active {
66
70
  transition: all 0.15s ease-in;
67
71
  overflow: hidden;
68
-
69
72
  }
70
73
 
71
74
  .slide-fade-enter-from {
@@ -1,14 +1,14 @@
1
1
  import type { SelectInput, TextInput } from '@bagelink/vue'
2
2
 
3
- export type AttributeValue = string | number | boolean | null | undefined | Record<string, any>
3
+ export type AttributeValue = string | number | boolean | undefined | undefined | { [key: string]: any }
4
4
 
5
- export type AttributeFn<T = Record<string, any>> = (field: any, row: T) => AttributeValue
5
+ export type AttributeFn<T = { [key: string]: any }> = (field: any, row: T) => AttributeValue
6
6
 
7
7
  export interface Attributes<T = any> {
8
8
  [key: string]: AttributeValue | AttributeFn<T>
9
9
  }
10
10
 
11
- export type BagelFieldOptions<T = Record<string, any>> = (
11
+ export type BagelFieldOptions<T = { [key: string]: any }> = (
12
12
  string
13
13
  | (
14
14
  {
@@ -17,14 +17,14 @@ export type BagelFieldOptions<T = Record<string, any>> = (
17
17
  }
18
18
  | string
19
19
  | number
20
- | Record<string, any>
20
+ | { [key: string]: any }
21
21
  )[]
22
22
  | ((val: any, rowData?: T) => void)
23
23
  )
24
24
 
25
25
  type GenericAssertFn<T> = (val: any, row: T) => boolean
26
26
 
27
- export interface BaseBagelField<T = Record<string, any>> {
27
+ export interface BaseBagelField<T = { [key: string]: any }> {
28
28
  '$el'?: any
29
29
  'id'?: string
30
30
  'label'?: string
@@ -54,9 +54,9 @@ export interface SelectBagelField<T> extends BaseBagelField<T> {
54
54
  id: string
55
55
  }
56
56
 
57
- export type Field<T = Record<string, any>> = BaseBagelField<T> | InputBagelField<T> | SelectBagelField<T>
58
- export type BglFieldT<T = Record<string, any>> = Field<T>
57
+ export type Field<T = { [key: string]: any }> = BaseBagelField<T> | InputBagelField<T> | SelectBagelField<T>
58
+ export type BglFieldT<T = { [key: string]: any }> = Field<T>
59
59
 
60
- export type BglFormSchemaT<T = Record<string, any>> = Field<T>[]
60
+ export type BglFormSchemaT<T = { [key: string]: any }> = Field<T>[]
61
61
 
62
- export type BglFormSchemaFnT<T = Record<string, any>> = (() => BglFormSchemaT<T>) | BglFormSchemaT<T>
62
+ export type BglFormSchemaFnT<T = { [key: string]: any }> = (() => BglFormSchemaT<T>) | BglFormSchemaT<T>
@@ -37,7 +37,7 @@ export type ThemeType = |
37
37
  export type Option =
38
38
  | string
39
39
  | number
40
- | Record<string, any>
40
+ | { [key: string]: any }
41
41
  | { label: string, value: string | number }
42
42
 
43
43
  export type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N
@@ -183,7 +183,7 @@ export function bglForm(idOrField?: string | Field, ...schema: Field[]) {
183
183
  }
184
184
  }
185
185
 
186
- export function telField(id: string, label?: string, options?: Record<string, any>): Field {
186
+ export function telField(id: string, label?: string, options?: { [key: string]: any }): Field {
187
187
  return {
188
188
  $el: markRaw(TelInput),
189
189
  id,
@@ -321,7 +321,7 @@ export interface Country {
321
321
  iso2: CountryCode
322
322
  dialCode: string
323
323
  priority: number
324
- areaCodes?: string[] | null
324
+ areaCodes?: string[] | undefined
325
325
  }
326
326
 
327
327
  export const allCountries: Country[] = countryArray.map(
@@ -27,7 +27,7 @@ export async function copyText(text: string, cb?: (msg: string) => void) {
27
27
  }
28
28
 
29
29
  export function initials(...strArr: string[]) {
30
- strArr = strArr.map(str => str.split(/\s/)).flat()
30
+ strArr = strArr.flatMap(str => str.split(/\s/))
31
31
  return strArr.map(str => str.charAt(0)).join('')
32
32
  }
33
33
 
@@ -44,7 +44,7 @@ export function classify(fieldVal?: any, row?: any, ...classes: any[]) {
44
44
  }).join(' ')
45
45
  }
46
46
 
47
- export function bindAttrs<T = Record<string, any>>(attrs?: Attributes, fieldVal?: any, row?: T) {
47
+ export function bindAttrs<T = { [key: string]: any }>(attrs?: Attributes, fieldVal?: any, row?: T) {
48
48
  if (!attrs) return {}
49
49
  const exclude = ['class']
50
50
  const arr = Object.entries(attrs).filter(([key]) => !exclude.includes(key)).map(([key, value]) => [
@@ -64,9 +64,9 @@ export function iffer(field: any, itemData: any) {
64
64
  return true
65
65
  }
66
66
 
67
- export function denullify(itemData?: Record<string, any>, fieldID?: string) {
68
- if (!fieldID) return null
69
- return itemData ? itemData[fieldID] : null
67
+ export function denullify(itemData?: { [key: string]: any }, fieldID?: string) {
68
+ if (!fieldID) return
69
+ return itemData ? itemData[fieldID] : undefined
70
70
  }
71
71
 
72
72
  export const isDate = (dateToTest: any) => !Number.isNaN(Date.parse(dateToTest))
@@ -78,7 +78,7 @@ export { useLang } from './lang'
78
78
  export { formatString } from './strings'
79
79
 
80
80
  export function getFallbackSchema<T>(data?: any[], showFields?: string[]): BglFormSchemaT<T> {
81
- const keys = Array.from(new Set((data ?? []).map(Object.keys).flat()))
81
+ const keys = Array.from(new Set((data ?? []).flatMap(Object.keys)))
82
82
 
83
83
  const schema: BglFormSchemaT<T> = keys.map(
84
84
  id => ({
@@ -104,6 +104,6 @@ export function appendScript(src: string): Promise<void> {
104
104
  script.src = src
105
105
  script.onload = () => { resolve() }
106
106
  script.onerror = reject
107
- document.head.appendChild(script)
107
+ document.head.append(script)
108
108
  })
109
109
  }
package/src/utils/lang.ts CHANGED
@@ -12,7 +12,7 @@ const state: State = reactive({
12
12
  lang: 'en',
13
13
  })
14
14
 
15
- function $tdb<T extends Record<string, string>>(langEl?: T): string {
15
+ function $tdb<T extends { [key: string]: string }>(langEl?: T): string {
16
16
  if (!langEl) {
17
17
  console.warn('No language element provided for $tdb function')
18
18
  return ''
@@ -22,8 +22,7 @@ export function formatString(
22
22
  .join('')
23
23
  }
24
24
  if (format === 'snake') {
25
- return str
26
- .split('')
25
+ return [...str]
27
26
  .map((letter) => {
28
27
  if (letter === letter.toUpperCase()) {
29
28
  return `_${letter.toLowerCase()}`
package/vite.config.ts CHANGED
@@ -5,7 +5,7 @@ import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
5
5
  import { defineConfig } from 'vite'
6
6
  import dts from 'vite-plugin-dts'
7
7
 
8
- const indexDir = resolve(__dirname, 'src')
8
+ const indexDir = resolve(import.meta.dirname, 'src')
9
9
 
10
10
  export default defineConfig(() => ({
11
11
  plugins: [ReactivityTransform(), vue(), dts({