inertia-bootstrap-forms 2.1.17 → 2.1.18

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/index.d.ts CHANGED
@@ -126,7 +126,43 @@ export const CheckboxButtonInput: DefineComponent<{
126
126
  },
127
127
  }, {}, any>;
128
128
  export const CheckboxInput: DefineComponent<{}, {}, any>;
129
- export const CheckboxToggle: DefineComponent<{}, {}, any>;
129
+ export const CheckboxToggle: DefineComponent<{
130
+ name: {
131
+ type: String,
132
+ required: true,
133
+ },
134
+ id: {
135
+ type: String,
136
+ default: '',
137
+ required: false,
138
+ },
139
+ value: {
140
+ type: [String, Number],
141
+ default: 'yes',
142
+ required: false,
143
+ },
144
+ checked: {
145
+ type: [Boolean],
146
+ default: '',
147
+ },
148
+ type: {
149
+ type: String,
150
+ default: 'checkbox',
151
+ required: false,
152
+ },
153
+ disabled: {
154
+ type: Boolean,
155
+ default: false,
156
+ },
157
+ readonly: {
158
+ type: Boolean,
159
+ default: false,
160
+ },
161
+ hideInput: {
162
+ type: Boolean,
163
+ default: false,
164
+ }
165
+ }, {}, any>;
130
166
  export const SwitchInput: DefineComponent<{}, {}, any>;
131
167
  export const countryCodes: any;
132
168
  export const EditorInput: DefineComponent<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inertia-bootstrap-forms",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
4
4
  "description": "Create bootstrap forms with inertia and twitter bootstrap",
5
5
  "main": "dist/inertia-bootstrap-forms.cjs.js",
6
6
  "module": "dist/inertia-bootstrap-forms.es.js",
@@ -17,6 +17,10 @@ export default defineComponent({
17
17
  default: 'yes',
18
18
  required: false,
19
19
  },
20
+ checked: {
21
+ type: [Boolean],
22
+ default: '',
23
+ },
20
24
  type: {
21
25
  type: String,
22
26
  default: 'checkbox',
@@ -27,6 +31,10 @@ export default defineComponent({
27
31
  default: false,
28
32
  required: false,
29
33
  },
34
+ readonly: {
35
+ type: Boolean,
36
+ default: false,
37
+ },
30
38
  hideInput: {
31
39
  type: Boolean,
32
40
  default: false,
@@ -81,6 +89,8 @@ export default defineComponent({
81
89
  :disabled="form?.processing || disabled"
82
90
  :type="type"
83
91
  :value="value"
92
+ :checked="checked"
93
+ :readonly="readonly"
84
94
  @change="e => $emit('change', e)"
85
95
  class="form-check-toggle--input form-check-input">
86
96
  <slot/>