@bagelink/vue 0.0.511 → 0.0.522

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 (33) hide show
  1. package/dist/components/Btn.vue.d.ts +2 -0
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/Carousel.vue.d.ts +29 -2
  4. package/dist/components/Carousel.vue.d.ts.map +1 -1
  5. package/dist/components/MapEmbed.vue.d.ts.map +1 -1
  6. package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
  7. package/dist/components/form/inputs/DateInput.vue.d.ts +8 -0
  8. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  9. package/dist/components/layout/TabsNav.vue.d.ts +3 -1
  10. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  11. package/dist/index.cjs +262 -357
  12. package/dist/index.mjs +262 -357
  13. package/dist/style.css +247 -187
  14. package/dist/utils/BagelFormUtils.d.ts +2 -0
  15. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  16. package/package.json +1 -1
  17. package/src/components/Btn.vue +8 -1
  18. package/src/components/Card.vue +0 -1
  19. package/src/components/Carousel.vue +134 -117
  20. package/src/components/ListItem.vue +2 -2
  21. package/src/components/ListView.vue +1 -1
  22. package/src/components/MapEmbed.vue +6 -4
  23. package/src/components/Modal.vue +1 -2
  24. package/src/components/TableSchema.vue +4 -4
  25. package/src/components/form/inputs/CheckInput.vue +46 -70
  26. package/src/components/form/inputs/DateInput.vue +9 -0
  27. package/src/components/layout/TabsNav.vue +2 -2
  28. package/src/styles/appearance.css +66 -0
  29. package/src/styles/bagel.css +1 -1
  30. package/src/styles/layout.css +14 -0
  31. package/src/styles/mobilLayout.css +14 -0
  32. package/src/styles/scrollbar.css +2 -4
  33. package/src/utils/BagelFormUtils.ts +23 -0
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- defineProps<{
2
+ const props = defineProps<{
3
3
  label?: string
4
4
  id?: string
5
5
  title?: string
@@ -7,18 +7,25 @@ defineProps<{
7
7
  required?: boolean
8
8
  }>()
9
9
 
10
+ const inputId = $ref(props.id || Math.random().toString(36).substring(7))
11
+
10
12
  const checked = defineModel<boolean>('modelValue', { default: false })
11
13
  </script>
12
14
 
13
15
  <template>
14
- <div class="bagel-input bgl-checkbox" :title="title" :class="{ small }">
15
- <div class="check-square" :class="{ checked }" @click="checked = !checked">
16
- <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">
17
- <path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" />
18
- </svg>
19
- </div>
20
- <label>
21
- <input :id="id" v-model="checked" :required="required" type="checkbox">
16
+ <div
17
+ class="bagel-input bgl-checkbox align-items-center ps-025"
18
+ :title="title"
19
+ :class="{ small }"
20
+ >
21
+ <input
22
+ :id="inputId"
23
+ v-model="checked"
24
+ :required="required"
25
+ type="checkbox"
26
+ class="me-05"
27
+ >
28
+ <label :for="inputId">
22
29
  <slot name="label">
23
30
  {{ label }}
24
31
  </slot>
@@ -26,75 +33,44 @@ const checked = defineModel<boolean>('modelValue', { default: false })
26
33
  </div>
27
34
  </template>
28
35
 
29
- <style>
30
- :root {
31
- --bgl-white: #fff;
32
- --input-height: 40px;
33
- --input-border-radius: 7px;
34
- --bgl-transition: all 200ms ease;
35
- --bgl-primary: #19b8ea;
36
-
37
- }
38
- </style>
39
-
40
36
  <style scoped>
41
37
  .bgl-checkbox {
42
- position: relative;
43
- display: flex;
44
- flex-direction: row;
45
- align-items: center;
46
- }
47
-
48
- .bgl-checkbox input[type=checkbox] {
49
- position: absolute;
50
- opacity: 0;
51
- z-index: -1;
38
+ flex-direction: row;
39
+ cursor: pointer;
52
40
  }
53
-
54
- .bgl-checkbox label {
55
- padding-inline-start: 0.5rem;
56
- transition: var(--bgl-transition);
57
- cursor: pointer;
58
- user-select: none;
59
- font-size: var(--input-font-size);
41
+ .bgl-checkbox input[type='checkbox'] {
42
+ accent-color: var(--bgl-primary);
43
+ height: calc(var(--input-height) / 2.75);
44
+ width: calc(var(--input-height) / 2.75);
45
+ min-width: 0;
60
46
  }
61
-
62
- .bgl-checkbox:hover {
63
- filter: brightness(95%);
47
+ .bgl-checkbox input[type='checkbox']::before {
48
+ content: '';
49
+ height: calc(var(--input-height) / 2.75);
50
+ width: calc(var(--input-height) / 2.75);
51
+ background: var(--bgl-primary);
52
+ border-radius: 100%;
53
+ opacity: 0;
54
+ transition: all 200ms ease;
55
+ position: absolute;
64
56
  }
65
-
66
- .bgl-checkbox:active {
67
- filter: var(--bgl-active-filter);
57
+ .bgl-checkbox input[type='checkbox']:hover::before {
58
+ opacity: 0.2;
59
+ transform: scale(2);
68
60
  }
69
-
70
- .bgl-checkbox .check-square {
71
- width: calc(var(--input-height) / 2.5);
72
- height: calc(var(--input-height) / 2.5);
73
- background: var(--bgl-white);
74
- border-radius: calc(var(--input-border-radius) / 2);
75
- border: var(--bgl-primary) 1px solid;
76
- position: relative;
77
- display: flex;
78
- align-items: center;
79
- justify-content: center;
61
+ .bgl-checkbox label {
62
+ cursor: pointer;
63
+ user-select: none;
64
+ font-size: var(--input-font-size);
65
+ transition: var(--bgl-transition-400);
80
66
  }
81
-
82
- .check-square.checked {
83
- background: var(--bgl-primary);
67
+ .bgl-checkbox:hover label {
68
+ color: var(--bgl-primary) !important;
84
69
  }
85
-
86
- .bgl-checkbox svg {
87
- width: calc(var(--input-height) / 2.5);
88
- height: calc(var(--input-height) / 2.5);
89
- position: absolute;
90
- z-index: 2;
91
- fill: var(--bgl-white);
92
- pointer-events: none;
93
- transform: scale(0);
94
- transition: var(--bgl-transition);
70
+ .bgl-checkbox input:checked + label{
71
+ color: var(--bgl-primary) !important;
95
72
  }
96
-
97
- .check-square.checked svg {
98
- transform: scale(1);
73
+ .bagel-input:focus-within.bgl-checkbox:not(:checked) label {
74
+ color: var(--label-color) !important;
99
75
  }
100
76
  </style>
@@ -12,6 +12,10 @@ const props = withDefaults(
12
12
  modelValue?: string | Date
13
13
  defaultValue?: string | Date
14
14
  extraProps?: VueDatePickerProps
15
+ allowedDates?: string[] | Date[]
16
+ timePickerInline?: boolean
17
+ minutesIncrement?: string | number
18
+ minutesGridIncrement?: string | number
15
19
  }>(),
16
20
  {
17
21
  enableTime: false,
@@ -59,7 +63,12 @@ onMounted(() => {
59
63
  v-model="date"
60
64
  :auto-apply="true"
61
65
  :enable-time-picker="enableTime"
66
+ :allowed-dates="allowedDates"
62
67
  v-bind="extraProps"
68
+ :time-picker-inline="timePickerInline"
69
+ :minutes-increment="minutesIncrement"
70
+ :minutes-grid-increment="minutesGridIncrement"
71
+ :start-time="{ hours: 8, minutes: 0 }"
63
72
  />
64
73
  </div>
65
74
  </template>
@@ -1,12 +1,12 @@
1
1
  <script setup lang="ts">
2
- import { Icon } from '@bagelink/vue'
2
+ import { Icon, type MaterialIcons } from '@bagelink/vue'
3
3
  import { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
4
4
  import { useTabs } from './tabsManager'
5
5
 
6
6
  interface TabType {
7
7
  id?: string
8
8
  label?: string
9
- icon?: string
9
+ icon?: MaterialIcons
10
10
  }
11
11
 
12
12
  const props = defineProps<{
@@ -431,6 +431,39 @@
431
431
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1) !important;
432
432
  }
433
433
 
434
+ .border-bottom {
435
+ border-bottom: 1px solid var(--border-color)
436
+ }
437
+
438
+ .border-top {
439
+ border-top: 1px solid var(--border-color)
440
+ }
441
+
442
+ .border-start {
443
+ border-inline-start: 1px solid var(--border-color)
444
+ }
445
+
446
+ .border-end {
447
+ border-inline-end: 1px solid var(--border-color)
448
+ }
449
+
450
+ .border-inner-bottom>* {
451
+ border-bottom: 1px solid var(--border-color)
452
+ }
453
+
454
+ .border-inner-top>* {
455
+ border-top: 1px solid var(--border-color)
456
+ }
457
+
458
+ .border-inner-start>* {
459
+ border-inline-start: 1px solid var(--border-color)
460
+ }
461
+
462
+ .border-inner-end>* {
463
+ border-inline-end: 1px solid var(--border-color)
464
+ }
465
+
466
+
434
467
 
435
468
  @media screen and (max-width: 910px) {
436
469
  .m_opacity-0 {
@@ -862,4 +895,37 @@
862
895
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1) !important;
863
896
  }
864
897
 
898
+ .m_border-bottom {
899
+ border-bottom: 1px solid var(--border-color)
900
+ }
901
+
902
+ .m_border-top {
903
+ border-top: 1px solid var(--border-color)
904
+ }
905
+
906
+ .m_border-start {
907
+ border-inline-start: 1px solid var(--border-color)
908
+ }
909
+
910
+ .m_border-end {
911
+ border-inline-end: 1px solid var(--border-color)
912
+ }
913
+
914
+ .m_border-inner-bottom>* {
915
+ border-bottom: 1px solid var(--border-color)
916
+ }
917
+
918
+ .m_border-inner-top>* {
919
+ border-top: 1px solid var(--border-color)
920
+ }
921
+
922
+ .m_border-inner-start>* {
923
+ border-inline-start: 1px solid var(--border-color)
924
+ }
925
+
926
+ .m_border-inner-end>* {
927
+ border-inline-end: 1px solid var(--border-color)
928
+ }
929
+
930
+
865
931
  }
@@ -37,7 +37,7 @@ body {
37
37
  min-height: 100%;
38
38
  background-color: var(--bgl-bg);
39
39
  font-family: var(--bgl-font);
40
- font-size: 18px;
40
+ font-size: 16px;
41
41
  font-weight: 400;
42
42
  line-height: 1.65;
43
43
  width: auto;
@@ -127,6 +127,20 @@
127
127
  inset-inline-end: 0px;
128
128
  }
129
129
 
130
+ .position-bottom-center {
131
+ position: absolute;
132
+ bottom: 0px;
133
+ inset-inline-start: 0px;
134
+ inset-inline-end: 0px;
135
+ }
136
+
137
+ .position-center {
138
+ position: absolute;
139
+ top: 0px;
140
+ inset-inline-start: 0px;
141
+ inset-inline-end: 0px;
142
+ }
143
+
130
144
  .positioned-full,
131
145
  .p-all {
132
146
  top: 0;
@@ -146,6 +146,20 @@
146
146
  inset-inline-end: 0px;
147
147
  }
148
148
 
149
+ .m_position-bottom-center {
150
+ position: absolute;
151
+ bottom: 0px;
152
+ inset-inline-start: 0px;
153
+ inset-inline-end: 0px;
154
+ }
155
+
156
+ .m_position-center {
157
+ position: absolute;
158
+ top: 0px;
159
+ inset-inline-start: 0px;
160
+ inset-inline-end: 0px;
161
+ }
162
+
149
163
  .m_positioned-full {
150
164
  top: 0;
151
165
  bottom: 0;
@@ -3,13 +3,11 @@
3
3
  height: 0.5rem;
4
4
  }
5
5
 
6
- ::-webkit-scrollbar-track {
7
- /* -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); */
8
- }
6
+ ::-webkit-scrollbar-track {}
9
7
 
10
8
  ::-webkit-scrollbar-thumb {
11
9
  background-color: var(--bgl-gray);
12
- border-radius: 5px;
10
+ border-radius: 1rem;
13
11
  }
14
12
 
15
13
  ::-webkit-scrollbar-corner {
@@ -15,6 +15,8 @@ interface InputOptions {
15
15
  helptext?: string
16
16
  }
17
17
 
18
+ type DateOptions = InputOptions
19
+
18
20
  interface TextInputOptions extends InputOptions {
19
21
  type?: 'text' | 'tel' | 'email'
20
22
  pattern?: string
@@ -61,6 +63,7 @@ export function txtField(
61
63
  required: options?.required,
62
64
  id,
63
65
  label,
66
+ disabled: options?.disabled,
64
67
  placeholder: options?.placeholder,
65
68
  defaultValue: options?.defaultValue,
66
69
  attrs: {
@@ -108,6 +111,25 @@ export function checkField(
108
111
  }
109
112
  }
110
113
 
114
+ export function dateField(
115
+ id: string,
116
+ label?: string,
117
+ options?: DateOptions,
118
+ ): Field {
119
+ return {
120
+ $el: 'date',
121
+ class: options?.class,
122
+ required: options?.required,
123
+ id,
124
+ disabled: options?.disabled,
125
+ label,
126
+ defaultValue: options?.defaultValue,
127
+ attrs: {
128
+ disabled: options?.disabled,
129
+ },
130
+ }
131
+ }
132
+
111
133
  export function numField(
112
134
  id: string,
113
135
  label?: string,
@@ -120,6 +142,7 @@ export function numField(
120
142
  defaultValue: options?.defaultValue,
121
143
  id,
122
144
  label,
145
+ disabled: options?.disabled,
123
146
  placeholder: options?.placeholder,
124
147
  helptext: options?.helptext,
125
148
  attrs: {