inertia-bootstrap-forms 2.1.21 → 3.0.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.
Files changed (59) hide show
  1. package/README.fa.md +468 -0
  2. package/README.md +322 -714
  3. package/dist/inertia-bootstrap-forms.cjs.js +1 -0
  4. package/dist/inertia-bootstrap-forms.es.js +3524 -30
  5. package/index.d.ts +143 -507
  6. package/package.json +89 -70
  7. package/src/AmountInput.vue +81 -76
  8. package/src/CaptchaInput.vue +87 -88
  9. package/src/CheckboxButtonInput.vue +56 -69
  10. package/src/CheckboxInput.vue +60 -79
  11. package/src/CheckboxToggle.vue +53 -136
  12. package/src/ChipsInput.vue +157 -0
  13. package/src/ComboboxInput.vue +556 -0
  14. package/src/DropzoneInput.vue +125 -103
  15. package/src/EditorInput.vue +47 -106
  16. package/src/EmailInput.vue +16 -15
  17. package/src/FileInput.vue +189 -179
  18. package/src/FormAdornInput.vue +75 -0
  19. package/src/FormContainer.vue +288 -251
  20. package/src/FormField.vue +59 -0
  21. package/src/FormLabel.vue +27 -27
  22. package/src/GroupControl.vue +55 -53
  23. package/src/LocationInput.vue +79 -72
  24. package/src/MobileInput.vue +21 -13
  25. package/src/MultiQuantityInput.vue +109 -181
  26. package/src/OTPInput.vue +144 -76
  27. package/src/PasswordInput.vue +151 -17
  28. package/src/PersianDatePickerInput.vue +63 -166
  29. package/src/QuantityInput.vue +100 -119
  30. package/src/RangeInput.vue +96 -0
  31. package/src/SimpleUploader.vue +8 -143
  32. package/src/StarRatingInput.vue +114 -138
  33. package/src/SubmitButton.vue +39 -24
  34. package/src/SwitchInput.vue +58 -83
  35. package/src/TelInput.vue +86 -120
  36. package/src/TextAreaInput.vue +29 -33
  37. package/src/TextInput.vue +42 -51
  38. package/src/UppyInput.vue +237 -324
  39. package/src/composables/useBsInstance.js +66 -0
  40. package/src/composables/useChoice.js +34 -0
  41. package/src/composables/useDisposables.js +59 -0
  42. package/src/composables/useField.js +121 -0
  43. package/src/composables/useFormApi.js +12 -0
  44. package/src/i18n.js +120 -0
  45. package/src/index.js +123 -42
  46. package/src/utils/bootstrap.js +48 -0
  47. package/src/utils/digits.js +21 -0
  48. package/src/utils/http.js +15 -0
  49. package/dist/choices-KiM-I_0P.js +0 -2955
  50. package/dist/dropdown-yh2aQrbw-XuCU1v1F.js +0 -1543
  51. package/dist/index-BRtKc2RA.js +0 -604
  52. package/dist/index-_x4UqcXz.js +0 -4938
  53. package/dist/inertia-bootstrap-forms.umd.js +0 -19
  54. package/dist/range-slider-pips-DTDOg3Q9.js +0 -3506
  55. package/dist/style.css +0 -1
  56. package/src/css/from-select.scss +0 -384
  57. package/src/css/loader.gif +0 -0
  58. package/src/css/location.scss +0 -44
  59. package/src/css/simple-upload.scss +0 -54
@@ -1,384 +0,0 @@
1
- /* purgecss start ignore */
2
- .choices {
3
- color: var(--bs-body-color);
4
- position: relative;
5
- overflow: hidden;
6
- margin-bottom: 24px;
7
- font-size: var(--bs-body-font-size)
8
- }
9
-
10
- .choices:focus {
11
- outline: 0
12
- }
13
-
14
- .choices:last-child {
15
- margin-bottom: 0
16
- }
17
-
18
- .choices.is-open {
19
- overflow: visible
20
- }
21
-
22
- .choices.is-disabled .choices__inner, .choices.is-disabled .choices__input {
23
- background-color: var(--bs-body-bg, #ffffff);
24
- cursor: not-allowed;
25
- -webkit-user-select: none;
26
- user-select: none
27
- }
28
-
29
- .choices.is-disabled .choices__item {
30
- cursor: not-allowed
31
- }
32
-
33
- .choices [hidden] {
34
- display: none !important
35
- }
36
-
37
- .choices[data-type*=select-one] {
38
- cursor: pointer
39
- }
40
-
41
- /**
42
- //.choices[data-type*=select-one] .choices__inner {
43
- // padding-bottom: 7.5px
44
- //}*/
45
-
46
- .choices[data-type*=select-one] .choices__input {
47
- display: block;
48
- width: 100%;
49
- padding: 10px;
50
- border-bottom: 2px solid var(--bs-body-bg, #fff);
51
- background-color: var(--bs-tertiary-bg, #fefefe);
52
- border-radius: var(--bs-border-radius);
53
- margin: 0
54
- }
55
-
56
- .choices[data-type*=select-one] .choices__button {
57
- background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
58
- padding: 0;
59
- background-size: 8px;
60
- position: absolute;
61
- top: 50%;
62
- right: 0;
63
- margin-top: -10px;
64
- margin-right: 25px;
65
- height: 20px;
66
- width: 20px;
67
- border-radius: 10em;
68
- opacity: .25
69
- }
70
-
71
- .choices[data-type*=select-one] .choices__button:focus, .choices[data-type*=select-one] .choices__button:hover {
72
- opacity: 1
73
- }
74
-
75
- .choices[data-type*=select-one] .choices__button:focus {
76
- box-shadow: 0 0 0 2px #005f75
77
- }
78
-
79
- .choices[data-type*=select-one] .choices__item[data-placeholder] .choices__button {
80
- display: none
81
- }
82
-
83
- .choices[data-type*=select-one]::after {
84
- content: "";
85
- height: 0;
86
- width: 0;
87
- border-style: solid;
88
- border-color: var(--bs-secondary-color, #333) transparent transparent;
89
- border-width: 5px;
90
- position: absolute;
91
- right: 11.5px;
92
- top: 50%;
93
- margin-top: -2.5px;
94
- pointer-events: none
95
- }
96
-
97
- .choices[data-type*=select-one].is-open::after {
98
- border-color: transparent transparent var(--bs-secondary-color, #333);
99
- margin-top: -7.5px
100
- }
101
-
102
- .choices[data-type*=select-one][dir=rtl]::after {
103
- left: 11.5px;
104
- right: auto
105
- }
106
-
107
- .choices[data-type*=select-one][dir=rtl] .choices__button {
108
- right: auto;
109
- left: 0;
110
- margin-left: 25px;
111
- margin-right: 0
112
- }
113
-
114
- .choices[data-type*=select-multiple] .choices__inner, .choices[data-type*=text] .choices__inner {
115
- cursor: text
116
- }
117
-
118
- .choices[data-type*=select-multiple] .choices__button, .choices[data-type*=text] .choices__button {
119
- position: relative;
120
- display: inline-block;
121
- margin: 0-4px 0 8px;
122
- padding-left: .8rem;
123
- background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);
124
- background-size: 8px;
125
- width: 8px;
126
- line-height: 1;
127
- opacity: .75;
128
- border-radius: 0
129
- }
130
-
131
- .choices[data-type*=select-multiple] .choices__button:focus, .choices[data-type*=select-multiple] .choices__button:hover, .choices[data-type*=text] .choices__button:focus, .choices[data-type*=text] .choices__button:hover {
132
- opacity: 1
133
- }
134
-
135
- .choices__inner {
136
- display: inline-block;
137
- vertical-align: top;
138
- width: 100%;
139
- background-color: var(--bs-body-bg, #ffffff);
140
- padding: calc(.5rem - 4px) .75rem calc(.5rem - 4px) .75rem;
141
- border: 1px solid var(--bs-border-color, #ddd);
142
- border-radius: var(--bs-border-radius);
143
- font-size: var(--bs-body-font-size);
144
- min-height: 44px;
145
- overflow: hidden
146
- }
147
-
148
- .is-invalid .choices__inner {
149
- border-color: var(--bs-danger, #de0021);
150
- }
151
-
152
- .is-focused .choices__inner,
153
- .is-open .choices__inner {
154
- border-color: #b7b7b7
155
- }
156
-
157
- .select2-controller:not(.select2-dropdown-hidden) .is-open .choices__inner {
158
- border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0
159
- }
160
-
161
- .select2-controller:not(.select2-dropdown-hidden) .is-flipped.is-open .choices__inner {
162
- border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius)
163
- }
164
-
165
- .choices__list {
166
- margin: 0;
167
- padding-left: 0;
168
- list-style: none
169
- }
170
-
171
- .choices__list--single {
172
- display: inline-block;
173
- padding: 4px 16px 4px 4px;
174
- width: 100%
175
- }
176
-
177
- [dir=rtl] .choices__list--single {
178
- padding-right: 4px;
179
- padding-left: 16px
180
- }
181
-
182
- .choices__list--single .choices__item {
183
- width: 100%
184
- }
185
-
186
- .choices__list--multiple {
187
- display: inline
188
- }
189
-
190
- .choices__list--multiple .choices__item {
191
- display: inline-block;
192
- vertical-align: middle;
193
- border-radius: var(--bs-border-radius);
194
- padding: 2px 10px;
195
- line-height: 2;
196
- font-size: .8rem;
197
- font-weight: 500;
198
- margin-right: 3.75px;
199
- margin-bottom: 3.75px;
200
- background-color: var(--bs-secondary-bg, #999999);
201
- border: 1px solid var(--bs-secondary-bg, #999999);
202
- color: var(--bs-body-color, #ffffff);
203
- word-break: break-all;
204
- box-sizing: border-box
205
- }
206
-
207
- .choices__list--multiple .choices__item[data-deletable] {
208
- padding-right: 5px
209
- }
210
-
211
- [dir=rtl] .choices__list--multiple .choices__item {
212
- margin-right: 0;
213
- margin-left: 3.75px
214
- }
215
-
216
- .choices__list--multiple .choices__item.is-highlighted {
217
- background-color: var(--bs-secondary, #003642);
218
- border: 1px solid var(--bs-secondary, #003642)
219
- }
220
-
221
- .is-disabled .choices__list--multiple .choices__item {
222
- background-color: var(--bs-secondary, #003642);
223
- border: 1px solid var(--bs-secondary, #003642)
224
- }
225
-
226
- .select2-dropdown-hidden .choices__list--dropdown {
227
- display: none !important;
228
- }
229
-
230
- .choices__list--dropdown, .choices__list[aria-expanded] {
231
- display: none;
232
- z-index: 99999;
233
- position: absolute;
234
- width: 100%;
235
- background-color: var(--bs-body-bg, #ddd);
236
- border: 1px solid var(--bs-body-bg, #ddd);
237
- top: 100%;
238
- margin-top: -1px;
239
- border-bottom-left-radius: var(--bs-border-radius);
240
- border-bottom-right-radius: var(--bs-border-radius);
241
- overflow: hidden;
242
- word-break: break-all
243
- }
244
-
245
- .is-active.choices__list--dropdown, .is-active.choices__list[aria-expanded] {
246
- display: block
247
- }
248
-
249
- .is-open .choices__list--dropdown, .is-open .choices__list[aria-expanded] {
250
- border-color: var(--bs-secondary-bg, #b7b7b7)
251
- }
252
-
253
- .is-flipped .choices__list--dropdown, .is-flipped .choices__list[aria-expanded] {
254
- top: auto;
255
- bottom: 100%;
256
- margin-top: 0;
257
- margin-bottom: -1px;
258
- border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0
259
- }
260
-
261
- .choices__list--dropdown .choices__list, .choices__list[aria-expanded] .choices__list {
262
- position: relative;
263
- max-height: 300px;
264
- overflow: auto;
265
- -webkit-overflow-scrolling: touch;
266
- will-change: scroll-position
267
- }
268
-
269
- .choices__list--dropdown .choices__item, .choices__list[aria-expanded] .choices__item {
270
- position: relative;
271
- padding: 10px;
272
- font-size: 14px
273
- }
274
-
275
- [dir=rtl] .choices__list--dropdown .choices__item, [dir=rtl] .choices__list[aria-expanded] .choices__item {
276
- text-align: right
277
- }
278
-
279
- @media (min-width: 640px) {
280
- .choices__list--dropdown .choices__item--selectable[data-select-text], .choices__list[aria-expanded] .choices__item--selectable[data-select-text] {
281
- padding-right: 100px
282
- }
283
- .choices__list--dropdown .choices__item--selectable[data-select-text]::after, .choices__list[aria-expanded] .choices__item--selectable[data-select-text]::after {
284
- content: attr(data-select-text);
285
- font-size: 12px;
286
- opacity: 0;
287
- position: absolute;
288
- right: 10px;
289
- top: 50%;
290
- transform: translateY(-50%)
291
- }
292
- [dir=rtl] .choices__list--dropdown .choices__item--selectable[data-select-text], [dir=rtl] .choices__list[aria-expanded] .choices__item--selectable[data-select-text] {
293
- text-align: right;
294
- padding-left: 100px;
295
- padding-right: 10px
296
- }
297
- [dir=rtl] .choices__list--dropdown .choices__item--selectable[data-select-text]::after, [dir=rtl] .choices__list[aria-expanded] .choices__item--selectable[data-select-text]::after {
298
- right: auto;
299
- left: 10px
300
- }
301
- }
302
-
303
- .choices__list--dropdown .choices__item--selectable.is-highlighted, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
304
- background-color: var(--bs-tertiary-bg, #ddd)
305
- }
306
-
307
- .choices__list--dropdown .choices__item--selectable.is-highlighted::after, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after {
308
- opacity: .5
309
- }
310
-
311
- .choices__item {
312
- cursor: default
313
- }
314
-
315
- .choices__item.has-no-choices {
316
- font-style: italic;
317
- background-color: var(--bs-tertiary-bg, #f7f7f7);
318
- color: var(--bs-secondary-color, #666666);
319
- }
320
-
321
- .choices__item--selectable {
322
- cursor: pointer
323
- }
324
-
325
- .choices__item--disabled {
326
- cursor: not-allowed;
327
- -webkit-user-select: none;
328
- user-select: none;
329
- opacity: .5
330
- }
331
-
332
- .choices__heading {
333
- font-weight: 600;
334
- font-size: 12px;
335
- padding: 10px;
336
- border-bottom: 1px solid #f7f7f7;
337
- color: gray
338
- }
339
-
340
- .choices__button {
341
- text-indent: -9999px;
342
- appearance: none;
343
- border: 0;
344
- background-color: transparent;
345
- background-repeat: no-repeat;
346
- background-position: center;
347
- cursor: pointer
348
- }
349
-
350
- .choices__button:focus, .choices__input:focus {
351
- outline: 0
352
- }
353
-
354
- .choices__input {
355
- display: inline-block;
356
- vertical-align: baseline;
357
- background-color: var(--bs-body-bg, #f7f7f7);
358
- font-size: var(--bs-body-font-size);
359
- border: 0;
360
- border-radius: 0;
361
- max-width: 100%;
362
- padding: 4px 0 4px 2px
363
- }
364
-
365
- .choices__input::-webkit-search-cancel-button, .choices__input::-webkit-search-decoration, .choices__input::-webkit-search-results-button, .choices__input::-webkit-search-results-decoration {
366
- display: none
367
- }
368
-
369
- .choices__input::-ms-clear, .choices__input::-ms-reveal {
370
- display: none;
371
- width: 0;
372
- height: 0
373
- }
374
-
375
- [dir=rtl] .choices__input {
376
- padding-right: 2px;
377
- padding-left: 0
378
- }
379
-
380
- .choices__placeholder {
381
- opacity: .5
382
- }
383
-
384
- /* purgecss end ignore */
Binary file
@@ -1,44 +0,0 @@
1
- .location-map-container {
2
- position: relative;
3
- width: 100%;
4
- height: 300px;
5
- overflow: hidden;
6
- border-radius: var(--bs-border-radius);
7
- }
8
-
9
- .location-map-container.is-invalid {
10
- border: 1px solid var(--bs-form-invalid-border-color);
11
- }
12
-
13
- .location-map-container[disabled],
14
- .location-map-container.disabled:before {
15
- content: "";
16
- background-color: rgba(var(--bs-light-rgb), 0.4);
17
- display: block;
18
- position: absolute;
19
- top: 0;
20
- right: 0;
21
- left: 0;
22
- bottom: 0;
23
- z-index: 9999;
24
- }
25
-
26
- .location-map-container {
27
- .leaflet-pane,
28
- .leaflet-tile,
29
- .leaflet-marker-icon,
30
- .leaflet-marker-shadow,
31
- .leaflet-tile-container,
32
- .leaflet-pane > svg,
33
- .leaflet-pane > canvas,
34
- .leaflet-zoom-box,
35
- .leaflet-image-layer,
36
- .leaflet-layer {
37
- left: auto;
38
- right: 0;
39
- }
40
-
41
- .leaflet-control-attribution.leaflet-control {
42
- display: none;
43
- }
44
- }
@@ -1,54 +0,0 @@
1
- .file-input-uploader .file-input-uploader--list .file-input-uploader--list-item {
2
- background-color: var(--bs-secondary-bg);
3
- border-radius: var(--bs-border-radius);
4
- position: relative;
5
- display: flex;
6
- align-items: center;
7
- margin: 5px 0;
8
- padding: 5px 10px;
9
- }
10
-
11
- .file-input-uploader .file-input-uploader--list .file-input-uploader--list-item--size {
12
- margin-left: auto;
13
- font-size: 90%;
14
- padding: 0 5px;
15
- color: var(--bs-secondary-color);
16
- }
17
-
18
- .file-input-uploader .file-input-uploader--list-item--btn {
19
- display: inline-block;
20
- outline: none;
21
- border: 0;
22
- padding: 7px 2px;
23
- }
24
-
25
- .file-input-uploader .file-input-uploader--list-item--btn:not(:last-child){
26
- margin-right: 5px;
27
- }
28
-
29
- .file-input-uploader .file-input-uploader--list-item--btn > svg {
30
- height: 20px;
31
- width: 20px;
32
- vertical-align: middle;
33
- }
34
-
35
- .file-input-uploader .file-input-uploader--progress {
36
- position: absolute;
37
- top: 2px;
38
- left: 5px;
39
- right: 5px;
40
- }
41
-
42
- .file-input-uploader .file-input-uploader--progress > div {
43
- background-color: #de0021;
44
- height: 7px;
45
- width: 0;
46
- min-width: 1%;
47
- border-radius: var(--bs-border-radius)
48
- }
49
-
50
- .file-input-uploader .file-input-uploader--list-error {
51
- font-size: 90%;
52
- margin: 0 5px;
53
- color: var(--bs-danger, #de0021);
54
- }