@oruga-ui/theme-oruga 0.0.1

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 (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +115 -0
  3. package/dist/oruga-full.css +3778 -0
  4. package/dist/oruga-full.min.css +1 -0
  5. package/dist/oruga.css +2209 -0
  6. package/dist/oruga.min.css +1 -0
  7. package/dist/scss/components/_autocomplete.scss +130 -0
  8. package/dist/scss/components/_button.scss +242 -0
  9. package/dist/scss/components/_carousel.scss +256 -0
  10. package/dist/scss/components/_checkbox.scss +183 -0
  11. package/dist/scss/components/_collapse.scss +12 -0
  12. package/dist/scss/components/_datepicker.scss +592 -0
  13. package/dist/scss/components/_datetimepicker.scss +10 -0
  14. package/dist/scss/components/_dropdown.scss +241 -0
  15. package/dist/scss/components/_field.scss +154 -0
  16. package/dist/scss/components/_icon.scss +53 -0
  17. package/dist/scss/components/_input.scss +153 -0
  18. package/dist/scss/components/_inputitems.scss +175 -0
  19. package/dist/scss/components/_loading.scss +45 -0
  20. package/dist/scss/components/_menu.scss +124 -0
  21. package/dist/scss/components/_modal.scss +103 -0
  22. package/dist/scss/components/_notification.scss +212 -0
  23. package/dist/scss/components/_pagination.scss +256 -0
  24. package/dist/scss/components/_radio.scss +121 -0
  25. package/dist/scss/components/_select.scss +168 -0
  26. package/dist/scss/components/_sidebar.scss +112 -0
  27. package/dist/scss/components/_skeleton.scss +93 -0
  28. package/dist/scss/components/_slider.scss +241 -0
  29. package/dist/scss/components/_steps.scss +599 -0
  30. package/dist/scss/components/_switch.scss +171 -0
  31. package/dist/scss/components/_table.scss +481 -0
  32. package/dist/scss/components/_tabs.scss +385 -0
  33. package/dist/scss/components/_timepicker.scss +116 -0
  34. package/dist/scss/components/_tooltip.scss +345 -0
  35. package/dist/scss/components/_upload.scss +74 -0
  36. package/dist/scss/oruga-common.scss +37 -0
  37. package/dist/scss/oruga-full.scss +9 -0
  38. package/dist/scss/oruga.scss +197 -0
  39. package/dist/scss/utils/_animations.scss +231 -0
  40. package/dist/scss/utils/_base.scss +31 -0
  41. package/dist/scss/utils/_helpers.scss +211 -0
  42. package/dist/scss/utils/_root.scss +28 -0
  43. package/dist/scss/utils/_variables.scss +105 -0
  44. package/dist/theme.js +8 -0
  45. package/package.json +72 -0
  46. package/src/App.vue +104 -0
  47. package/src/assets/scss/components/_autocomplete.scss +130 -0
  48. package/src/assets/scss/components/_button.scss +242 -0
  49. package/src/assets/scss/components/_carousel.scss +256 -0
  50. package/src/assets/scss/components/_checkbox.scss +183 -0
  51. package/src/assets/scss/components/_collapse.scss +12 -0
  52. package/src/assets/scss/components/_datepicker.scss +592 -0
  53. package/src/assets/scss/components/_datetimepicker.scss +10 -0
  54. package/src/assets/scss/components/_dropdown.scss +241 -0
  55. package/src/assets/scss/components/_field.scss +154 -0
  56. package/src/assets/scss/components/_icon.scss +53 -0
  57. package/src/assets/scss/components/_input.scss +153 -0
  58. package/src/assets/scss/components/_inputitems.scss +175 -0
  59. package/src/assets/scss/components/_loading.scss +45 -0
  60. package/src/assets/scss/components/_menu.scss +124 -0
  61. package/src/assets/scss/components/_modal.scss +103 -0
  62. package/src/assets/scss/components/_notification.scss +212 -0
  63. package/src/assets/scss/components/_pagination.scss +256 -0
  64. package/src/assets/scss/components/_radio.scss +121 -0
  65. package/src/assets/scss/components/_select.scss +168 -0
  66. package/src/assets/scss/components/_sidebar.scss +112 -0
  67. package/src/assets/scss/components/_skeleton.scss +93 -0
  68. package/src/assets/scss/components/_slider.scss +241 -0
  69. package/src/assets/scss/components/_steps.scss +599 -0
  70. package/src/assets/scss/components/_switch.scss +171 -0
  71. package/src/assets/scss/components/_table.scss +481 -0
  72. package/src/assets/scss/components/_tabs.scss +385 -0
  73. package/src/assets/scss/components/_timepicker.scss +116 -0
  74. package/src/assets/scss/components/_tooltip.scss +345 -0
  75. package/src/assets/scss/components/_upload.scss +74 -0
  76. package/src/assets/scss/oruga-common.scss +37 -0
  77. package/src/assets/scss/oruga-full.scss +9 -0
  78. package/src/assets/scss/oruga.scss +197 -0
  79. package/src/assets/scss/utils/_animations.scss +231 -0
  80. package/src/assets/scss/utils/_base.scss +31 -0
  81. package/src/assets/scss/utils/_helpers.scss +211 -0
  82. package/src/assets/scss/utils/_root.scss +28 -0
  83. package/src/assets/scss/utils/_variables.scss +105 -0
  84. package/src/components/Autocomplete.vue +606 -0
  85. package/src/components/Button.vue +80 -0
  86. package/src/components/Carousel.vue +296 -0
  87. package/src/components/Checkbox.vue +134 -0
  88. package/src/components/Collapse.vue +132 -0
  89. package/src/components/Datepicker.vue +285 -0
  90. package/src/components/Datetimepicker.vue +127 -0
  91. package/src/components/Dropdown.vue +284 -0
  92. package/src/components/Field.vue +243 -0
  93. package/src/components/Icon.vue +66 -0
  94. package/src/components/Input.vue +121 -0
  95. package/src/components/Loading.vue +71 -0
  96. package/src/components/Modal.vue +171 -0
  97. package/src/components/Notification.vue +136 -0
  98. package/src/components/Pagination.vue +97 -0
  99. package/src/components/Radio.vue +95 -0
  100. package/src/components/Select.vue +155 -0
  101. package/src/components/Sidebar.vue +56 -0
  102. package/src/components/Skeleton.vue +57 -0
  103. package/src/components/Slider.vue +226 -0
  104. package/src/components/Steps.vue +234 -0
  105. package/src/components/Switch.vue +134 -0
  106. package/src/components/Table.vue +285 -0
  107. package/src/components/Tabs.vue +208 -0
  108. package/src/components/Taginput.vue +507 -0
  109. package/src/components/Timepicker.vue +124 -0
  110. package/src/components/Tooltip.vue +149 -0
  111. package/src/components/Upload.vue +66 -0
  112. package/src/main.ts +29 -0
  113. package/src/plugins/theme.ts +1 -0
  114. package/src/router/index.ts +39 -0
  115. package/src/views/Home.vue +24 -0
  116. package/types/index.d.ts +1 -0
@@ -0,0 +1,226 @@
1
+ <script setup lang="ts">
2
+ import { computed, reactive, ref } from "vue";
3
+
4
+ const value = ref(5);
5
+ const sliderValue = ref(4);
6
+ const numbers = ref([2, 5]);
7
+ const numbers2 = ref([2, 6]);
8
+
9
+ const settings = reactive({
10
+ rounded: false,
11
+ tooltip: true,
12
+ variant: "warning",
13
+ size: "medium",
14
+ });
15
+
16
+ const sliderType = computed(() => {
17
+ if (sliderValue.value > 25 && sliderValue.value < 75) return "warning";
18
+ else if (sliderValue.value >= 75) return "success";
19
+ return "danger";
20
+ });
21
+ </script>
22
+
23
+ <template>
24
+ <section>
25
+ <h2>Slider Demo</h2>
26
+ <hr />
27
+ </section>
28
+
29
+ <section>
30
+ <h3>Base</h3>
31
+
32
+ <o-field label="Simple">
33
+ <o-slider :model-value="8" />
34
+ </o-field>
35
+
36
+ <o-field label="Disabled">
37
+ <o-slider :model-value="30" disabled />
38
+ </o-field>
39
+
40
+ <o-field label="Rounded thumb & No Tooltip">
41
+ <o-slider :model-value="8" rounded :tooltip="false" />
42
+ </o-field>
43
+
44
+ <o-field label="Custom tooltip label">
45
+ <o-slider :rounded="true" :custom-formatter="(val: any) => val + '%'" />
46
+ </o-field>
47
+
48
+ <o-field label="Tooltip type">
49
+ <o-slider v-model="sliderValue" :tooltip-variant="sliderType" />
50
+ </o-field>
51
+ </section>
52
+
53
+ <section>
54
+ <h3>Sizes</h3>
55
+
56
+ <o-field label="Small">
57
+ <o-slider v-model="value" size="small" />
58
+ </o-field>
59
+
60
+ <o-field label="Default">
61
+ <o-slider v-model="value" />
62
+ </o-field>
63
+
64
+ <o-field label="Medium">
65
+ <o-slider v-model="value" size="medium" />
66
+ </o-field>
67
+
68
+ <o-field label="Large">
69
+ <o-slider v-model="value" size="large" />
70
+ </o-field>
71
+ </section>
72
+
73
+ <section>
74
+ <h3>Variant</h3>
75
+
76
+ <o-field label="Default">
77
+ <o-slider v-model="value" :rounded="true" :tooltip="true" />
78
+ </o-field>
79
+
80
+ <o-field label="Primary">
81
+ <o-slider
82
+ v-model="value"
83
+ :rounded="true"
84
+ :tooltip="true"
85
+ variant="primary"
86
+ tooltip-variant="primary" />
87
+ </o-field>
88
+ <o-field label="Secondary">
89
+ <o-slider
90
+ v-model="value"
91
+ :rounded="true"
92
+ :tooltip="true"
93
+ variant="secondary"
94
+ tooltip-variant="secondary" />
95
+ </o-field>
96
+ <o-field label="Success">
97
+ <o-slider
98
+ v-model="value"
99
+ :rounded="true"
100
+ :tooltip="true"
101
+ variant="success"
102
+ tooltip-variant="success" />
103
+ </o-field>
104
+ <o-field label="Info">
105
+ <o-slider
106
+ v-model="value"
107
+ :rounded="true"
108
+ :tooltip="true"
109
+ variant="info"
110
+ tooltip-variant="info" />
111
+ </o-field>
112
+ <o-field label="Warning">
113
+ <o-slider
114
+ v-model="value"
115
+ :rounded="true"
116
+ :tooltip="true"
117
+ variant="warning"
118
+ tooltip-variant="warning" />
119
+ </o-field>
120
+ <o-field label="Danger">
121
+ <o-slider
122
+ v-model="value"
123
+ :rounded="true"
124
+ :tooltip="true"
125
+ variant="danger"
126
+ tooltip-variant="danger" />
127
+ </o-field>
128
+ </section>
129
+
130
+ <section>
131
+ <h3>Customize</h3>
132
+ <o-field>
133
+ <o-field>
134
+ <o-switch v-model="settings.rounded">Rounded</o-switch>
135
+ </o-field>
136
+ <o-field>
137
+ <o-switch v-model="settings.tooltip">With Tooltip</o-switch>
138
+ </o-field>
139
+ <o-field label="Size">
140
+ <o-select v-model="settings.size">
141
+ <option value="small">small</option>
142
+ <option value="default">default</option>
143
+ <option value="medium">medium</option>
144
+ <option value="large">large</option>
145
+ </o-select>
146
+ </o-field>
147
+ <o-field label="Variant">
148
+ <o-select v-model="settings.variant">
149
+ <option value="default">default</option>
150
+ <option value="primary">primary</option>
151
+ <option value="secondary">secondary</option>
152
+ <option value="success">success</option>
153
+ <option value="info">info</option>
154
+ <option value="warning">warning</option>
155
+ <option value="danger">danger</option>
156
+ </o-select>
157
+ </o-field>
158
+ </o-field>
159
+
160
+ <o-field label="Tooltip type & Default Variant">
161
+ <o-slider
162
+ :rounded="settings.rounded"
163
+ :tooltip="settings.tooltip"
164
+ :variant="settings.variant"
165
+ :size="settings.size" />
166
+ </o-field>
167
+ </section>
168
+
169
+ <section>
170
+ <h3>Tick and label</h3>
171
+
172
+ <o-field label="Show ticks">
173
+ <o-slider :rounded="true" size="small" :min="1" :max="10" ticks />
174
+ </o-field>
175
+
176
+ <o-field label="Custom tick and label">
177
+ <o-slider :rounded="true" size="medium" :min="0" :max="10">
178
+ <template v-for="val in [3, 5, 8]" :key="val">
179
+ <o-slider-tick :value="val">{{ val }}</o-slider-tick>
180
+ </template>
181
+ </o-slider>
182
+ </o-field>
183
+
184
+ <o-field label="Fan">
185
+ <o-slider
186
+ :rounded="true"
187
+ :min="0"
188
+ :max="3"
189
+ aria-label="Fan"
190
+ :tooltip="false">
191
+ <o-slider-tick :value="0">Off</o-slider-tick>
192
+ <o-slider-tick :value="1">Low</o-slider-tick>
193
+ <o-slider-tick :value="2">High</o-slider-tick>
194
+ <o-slider-tick :value="3">Auto</o-slider-tick>
195
+ </o-slider>
196
+ </o-field>
197
+ </section>
198
+
199
+ <section>
200
+ <h3>Range</h3>
201
+
202
+ <o-field label="Range">
203
+ <o-slider
204
+ v-model="numbers"
205
+ :rounded="true"
206
+ :min="1"
207
+ :max="15"
208
+ :step="0.5"
209
+ ticks>
210
+ </o-slider>
211
+ </o-field>
212
+ <p>{{ numbers }}</p>
213
+
214
+ <o-field>
215
+ <o-slider
216
+ v-model="numbers2"
217
+ :rounded="true"
218
+ variant="danger"
219
+ :min="-2"
220
+ :max="8"
221
+ :step="2">
222
+ </o-slider>
223
+ </o-field>
224
+ <p>{{ numbers2 }}</p>
225
+ </section>
226
+ </template>
@@ -0,0 +1,234 @@
1
+ <script setup lang="ts">
2
+ import { ref } from "vue";
3
+
4
+ const activeStep = ref("0");
5
+
6
+ const showSocial = ref(false);
7
+ const isAnimated = ref(true);
8
+ const isVertical = ref(false);
9
+ const isRounded = ref(true);
10
+ const isStepsClickable = ref(false);
11
+
12
+ const hasNavigation = ref(true);
13
+ const customNavigation = ref(false);
14
+ const isProfileSuccess = ref(false);
15
+
16
+ const prevIcon = ref("chevron-left");
17
+ const nextIcon = ref("chevron-right");
18
+ const labelPosition = ref("bottom");
19
+ const stepsPosition = ref("left");
20
+ const position = ref(null);
21
+ const size = ref(null);
22
+ </script>
23
+
24
+ <template>
25
+ <section>
26
+ <h2>Steps Demo</h2>
27
+ <hr />
28
+ </section>
29
+
30
+ <section>
31
+ <h3>Base</h3>
32
+
33
+ <o-field grouped group-multiline>
34
+ <o-field>
35
+ <o-switch v-model="showSocial"> Show Social step </o-switch>
36
+ </o-field>
37
+ <o-field>
38
+ <o-switch v-model="isAnimated"> Animated </o-switch>
39
+ </o-field>
40
+ <o-field>
41
+ <o-switch v-model="isRounded"> Rounded </o-switch>
42
+ </o-field>
43
+ <o-field>
44
+ <o-switch v-model="isVertical"> Vertical </o-switch>
45
+ </o-field>
46
+ <o-field>
47
+ <o-switch v-model="isStepsClickable"> Clickable Marker </o-switch>
48
+ </o-field>
49
+ </o-field>
50
+ <o-field grouped group-multiline>
51
+ <o-field>
52
+ <o-switch v-model="hasNavigation"> Navigation Buttons </o-switch>
53
+ </o-field>
54
+ <o-field>
55
+ <o-switch v-model="customNavigation"> Custom Navigation </o-switch>
56
+ </o-field>
57
+ <o-field>
58
+ <o-switch v-model="isProfileSuccess">
59
+ Set <code>success</code> for profile
60
+ </o-switch>
61
+ </o-field>
62
+ </o-field>
63
+ <o-field v-if="hasNavigation" grouped group-multiline>
64
+ <o-field label="Prev icon">
65
+ <o-select v-model="prevIcon">
66
+ <option value="chevron-left">Chevron</option>
67
+ <option value="arrow-left">Arrow</option>
68
+ </o-select>
69
+ </o-field>
70
+ <o-field label="Next icon">
71
+ <o-select v-model="nextIcon">
72
+ <option value="chevron-right">Chevron</option>
73
+ <option value="arrow-right">Arrow</option>
74
+ </o-select>
75
+ </o-field>
76
+ <o-field label="Label position">
77
+ <o-select v-model="labelPosition">
78
+ <option value="bottom">Bottom</option>
79
+ <option value="right">Right</option>
80
+ <option value="left">Left</option>
81
+ </o-select>
82
+ </o-field>
83
+ <o-field label="steps position">
84
+ <o-select v-model="stepsPosition">
85
+ <option value="right">Right</option>
86
+ <option value="left">Left</option>
87
+ </o-select>
88
+ </o-field>
89
+ </o-field>
90
+
91
+ <o-steps
92
+ v-model="activeStep"
93
+ :vertical="isVertical"
94
+ :position="stepsPosition"
95
+ :animated="isAnimated"
96
+ :rounded="isRounded"
97
+ :has-navigation="hasNavigation"
98
+ :icon-prev="prevIcon"
99
+ :icon-next="nextIcon"
100
+ :label-position="labelPosition">
101
+ <o-step-item step="1" label="Account" :clickable="isStepsClickable">
102
+ <h1 class="title text-center">Account</h1>
103
+ Lorem ipsum dolor sit amet.
104
+ </o-step-item>
105
+
106
+ <o-step-item
107
+ step="2"
108
+ label="Profile"
109
+ :clickable="isStepsClickable"
110
+ :variant="isProfileSuccess ? 'success' : ''">
111
+ <h1 class="title text-center">Profile</h1>
112
+ Lorem ipsum dolor sit amet.
113
+ </o-step-item>
114
+
115
+ <o-step-item
116
+ step="3"
117
+ :visible="showSocial"
118
+ label="Social"
119
+ :clickable="isStepsClickable">
120
+ <h1 class="title text-center">Social</h1>
121
+ Lorem ipsum dolor sit amet.
122
+ </o-step-item>
123
+
124
+ <o-step-item
125
+ :step="showSocial ? '4' : '3'"
126
+ label="Finish"
127
+ :clickable="isStepsClickable"
128
+ disabled>
129
+ <h1 class="title text-center">Finish</h1>
130
+ Lorem ipsum dolor sit amet.
131
+ </o-step-item>
132
+
133
+ <template v-if="customNavigation" #navigation="{ previous, next }">
134
+ <o-button
135
+ outlined
136
+ variant="danger"
137
+ icon-pack="fas"
138
+ icon-left="backward"
139
+ :disabled="previous.disabled"
140
+ @click.prevent="previous.action">
141
+ Previous
142
+ </o-button>
143
+ <o-button
144
+ outlined
145
+ variant="success"
146
+ icon-pack="fas"
147
+ icon-right="forward"
148
+ :disabled="next.disabled"
149
+ @click.prevent="next.action">
150
+ Next
151
+ </o-button>
152
+ </template>
153
+ </o-steps>
154
+ </section>
155
+
156
+ <section>
157
+ <h3>Variants</h3>
158
+
159
+ Warning
160
+ <o-steps variant="warning">
161
+ <o-step-item label="Account" icon="user-lock">empty</o-step-item>
162
+ <o-step-item label="Profile" icon="user">empty</o-step-item>
163
+ <o-step-item label="Social" icon="user-plus">empty</o-step-item>
164
+ </o-steps>
165
+
166
+ Info
167
+ <o-steps variant="info">
168
+ <o-step-item label="Account" icon="user-lock">empty</o-step-item>
169
+ <o-step-item label="Profile" icon="user">empty</o-step-item>
170
+ <o-step-item label="Social" icon="user-plus">empty</o-step-item>
171
+ </o-steps>
172
+
173
+ Success
174
+ <o-steps variant="success">
175
+ <o-step-item label="Account" icon="user-lock">empty</o-step-item>
176
+ <o-step-item label="Profile" icon="user">empty</o-step-item>
177
+ <o-step-item label="Social" icon="user-plus">empty</o-step-item>
178
+ </o-steps>
179
+ </section>
180
+
181
+ <section>
182
+ <h3>Vertical</h3>
183
+
184
+ <o-field grouped group-multiline>
185
+ <o-field>
186
+ <o-switch v-model="position" true-value="right">
187
+ Right position</o-switch
188
+ >
189
+ </o-field>
190
+ <o-field label="Size">
191
+ <o-select v-model="size" placeholder="Size">
192
+ <option :value="null">Default</option>
193
+ <option value="small">Small</option>
194
+ <option value="medium">Medium</option>
195
+ <option value="large">Large</option>
196
+ </o-select>
197
+ </o-field>
198
+ <o-field label="Label position" label-position="on-border">
199
+ <o-select v-model="labelPosition">
200
+ <option value="bottom">Bottom</option>
201
+ <option value="right">Right</option>
202
+ <option value="left">Left</option>
203
+ </o-select>
204
+ </o-field>
205
+ </o-field>
206
+
207
+ <o-steps
208
+ :position="position"
209
+ :label-position="labelPosition"
210
+ :size="size"
211
+ vertical>
212
+ <o-step-item label="Account" icon="user-lock">
213
+ Account: Lorem ipsum dolor sit amet. <br />
214
+ Account: Lorem ipsum dolor sit amet. <br />
215
+ Account: Lorem ipsum dolor sit amet.
216
+ </o-step-item>
217
+
218
+ <o-step-item label="Profile" icon="user">
219
+ Profile: Lorem ipsum dolor sit amet. <br />
220
+ Profile: Lorem ipsum dolor sit amet.? <br />
221
+ Profile: Lorem ipsum dolor sit amet. <br />
222
+ Profile: Lorem ipsum dolor sit amet.
223
+ </o-step-item>
224
+
225
+ <o-step-item label="Social" icon="user-plus" disabled>
226
+ Social: Lorem ipsum dolor sit amet. <br />
227
+ Social: Lorem ipsum dolor sit amet. <br />
228
+ Social: Lorem ipsum dolor sit amet. <br />
229
+ Social: Lorem ipsum dolor sit amet. <br />
230
+ Social: Lorem ipsum dolor sit amet.
231
+ </o-step-item>
232
+ </o-steps>
233
+ </section>
234
+ </template>
@@ -0,0 +1,134 @@
1
+ <script setup lang="ts">
2
+ import { ref } from "vue";
3
+
4
+ const isSwitched = ref(false);
5
+ const isSwitchedCustom = ref("Yes");
6
+ const isRounded = ref(false);
7
+ const position = ref("right");
8
+ const size = ref("");
9
+ const variant = ref(null);
10
+ const passive = ref(null);
11
+ </script>
12
+
13
+ <template>
14
+ <section>
15
+ <h2>Switch Demo</h2>
16
+ <hr />
17
+ </section>
18
+
19
+ <section>
20
+ <h3>Base</h3>
21
+
22
+ <o-field>
23
+ <o-switch>Default </o-switch>
24
+ </o-field>
25
+ <o-field>
26
+ <o-switch v-model="isSwitched">
27
+ {{ isSwitched }}
28
+ </o-switch>
29
+ </o-field>
30
+ <o-field>
31
+ <o-switch v-model="isSwitchedCustom" true-value="Yes" false-value="No">
32
+ {{ isSwitchedCustom }}
33
+ </o-switch>
34
+ </o-field>
35
+ <o-field>
36
+ <o-switch disabled>Disabled</o-switch>
37
+ </o-field>
38
+ </section>
39
+
40
+ <section>
41
+ <h3>Variant</h3>
42
+
43
+ <o-field>
44
+ <o-switch :value="true"> Default </o-switch>
45
+ </o-field>
46
+ <o-field>
47
+ <o-switch :value="true" variant="primary"> Primary </o-switch>
48
+ </o-field>
49
+ <o-field>
50
+ <o-switch :value="true" variant="secondary"> Secondary </o-switch>
51
+ </o-field>
52
+ <o-field>
53
+ <o-switch :value="true" variant="info"> Info </o-switch>
54
+ </o-field>
55
+ <o-field>
56
+ <o-switch :value="true" variant="success"> Success </o-switch>
57
+ </o-field>
58
+ <o-field>
59
+ <o-switch :value="true" variant="danger"> Danger </o-switch>
60
+ </o-field>
61
+ <o-field>
62
+ <o-switch :value="true" variant="warning"> Warning </o-switch>
63
+ </o-field>
64
+ </section>
65
+
66
+ <section>
67
+ <h3>Size</h3>
68
+
69
+ <o-field>
70
+ <o-switch size="small">Small</o-switch>
71
+ </o-field>
72
+ <o-field>
73
+ <o-switch>Default</o-switch>
74
+ </o-field>
75
+ <o-field>
76
+ <o-switch size="medium">Medium</o-switch>
77
+ </o-field>
78
+ <o-field>
79
+ <o-switch size="large">Large</o-switch>
80
+ </o-field>
81
+ </section>
82
+
83
+ <section>
84
+ <h3>Style variants</h3>
85
+
86
+ <o-field grouped>
87
+ <o-switch v-model="isRounded">Rounded</o-switch>
88
+ <o-switch v-model="position" true-value="left" false-value="right">
89
+ Label on left
90
+ </o-switch>
91
+ </o-field>
92
+ <o-field grouped>
93
+ <o-field label="Variant">
94
+ <o-select v-model="variant" expanded placeholder="Variant">
95
+ <option value="null">Default</option>
96
+ <option value="primary">Primary</option>
97
+ <option value="secondary">Secondary</option>
98
+ <option value="success">Success</option>
99
+ <option value="info">Info</option>
100
+ <option value="warning">Warning</option>
101
+ <option value="danger">Danger</option>
102
+ </o-select>
103
+ </o-field>
104
+ <o-field label="Passive Variant">
105
+ <o-select v-model="passive" expanded placeholder="Passive Variant">
106
+ <option value="null">Default</option>
107
+ <option value="primary">Primary</option>
108
+ <option value="secondary">Secondary</option>
109
+ <option value="success">Success</option>
110
+ <option value="info">Info</option>
111
+ <option value="warning">Warning</option>
112
+ <option value="danger">Danger</option>
113
+ </o-select>
114
+ </o-field>
115
+ <o-field label="Size">
116
+ <o-select v-model="size" expanded>
117
+ <option value="">Default</option>
118
+ <option value="small">small</option>
119
+ <option value="medium">medium</option>
120
+ <option value="large">large</option>
121
+ </o-select>
122
+ </o-field>
123
+ </o-field>
124
+
125
+ <o-switch
126
+ :rounded="isRounded"
127
+ :position="position"
128
+ :size="size"
129
+ :variant="variant"
130
+ :passive-variant="passive">
131
+ Sample
132
+ </o-switch>
133
+ </section>
134
+ </template>