srcdev-nuxt-forms 6.1.19 → 6.1.20

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.
@@ -36,6 +36,7 @@
36
36
  :direction
37
37
  :aria-describedby
38
38
  :display-as-disc
39
+ :display-as-lozenge
39
40
  >
40
41
  <template #checkedIcon>
41
42
  <slot name="checkedIcon"></slot>
@@ -158,6 +159,10 @@ const props = defineProps({
158
159
  type: Boolean,
159
160
  default: false,
160
161
  },
162
+ displayAsLozenge: {
163
+ type: Boolean,
164
+ default: false,
165
+ },
161
166
  })
162
167
 
163
168
  const slots = useSlots()
@@ -4,7 +4,7 @@
4
4
  class="input-checkbox-radio-options-button"
5
5
  :data-theme="formTheme"
6
6
  :data-size="size"
7
- :class="[size, elementClasses, optionsLayout, { error: fieldHasError }]"
7
+ :class="[size, elementClasses, optionsLayout, { error: fieldHasError }, { lozenge: displayAsLozenge }]"
8
8
  >
9
9
  <InputCheckboxRadioCore
10
10
  :isButton="true"
@@ -113,6 +113,10 @@ const props = defineProps({
113
113
  type: Boolean,
114
114
  default: false,
115
115
  },
116
+ displayAsLozenge: {
117
+ type: Boolean,
118
+ default: false,
119
+ },
116
120
  })
117
121
 
118
122
  const slots = useSlots()
@@ -136,9 +140,13 @@ const flexDirection = ref(props.direction)
136
140
  align-items: center;
137
141
  justify-content: space-between;
138
142
  gap: 1rem;
139
- border-radius: 1lh;
143
+ border-radius: 0.4rem;
140
144
  transition: all 0.2s ease-in-out;
141
145
 
146
+ &.lozenge {
147
+ border-radius: 100vw;
148
+ }
149
+
142
150
  &.inline {
143
151
  --_white-space: nowrap;
144
152
  }
@@ -147,8 +155,6 @@ const flexDirection = ref(props.direction)
147
155
  outline: var(--form-element-outline-width) solid var(--theme-input-outline);
148
156
 
149
157
  box-shadow: 0.1rem 0.1rem 0.8rem 0.1rem transparent;
150
- padding-block: var(--input-checkbox-radio-options-padding-block);
151
- padding-inline: var(--input-checkbox-radio-options-padding-inline);
152
158
 
153
159
  &:hover {
154
160
  background-color: var(--theme-input-surface-hover);
@@ -140,8 +140,8 @@ const isChecked = computed(() => {
140
140
  outline: var(--form-element-outline-width) solid var(--theme-input-outline);
141
141
  box-shadow: var(--_box-shadow);
142
142
 
143
- height: var(--input-symbol-size);
144
- width: var(--input-symbol-size);
143
+ height: var(--input-checked-element-size);
144
+ width: var(--input-checked-element-size);
145
145
 
146
146
  transition: all var(--theme-form-transition-duration) ease-in-out;
147
147
 
@@ -162,7 +162,8 @@ const isChecked = computed(() => {
162
162
  .input-checked-icon-slot {
163
163
  opacity: 1;
164
164
 
165
- .input-checked-icon-checked {
165
+ .input-checked-icon-checked,
166
+ .icon {
166
167
  color: var(--theme-checkbox-symbol-color);
167
168
  }
168
169
  }
@@ -180,10 +181,11 @@ const isChecked = computed(() => {
180
181
  opacity: 0;
181
182
  transition: opacity 0.2s ease-in-out;
182
183
 
183
- .input-checked-icon-checked {
184
+ .input-checked-icon-checked,
185
+ .icon {
184
186
  color: var(--theme-checkbox-symbol-color);
185
- height: var(--input-symbol-size);
186
- width: var(--input-symbol-size);
187
+ height: var(--input-checked-icon-size);
188
+ width: var(--input-checked-icon-size);
187
189
  box-shadow: var(--_box-shadow);
188
190
  }
189
191
  }
@@ -196,8 +198,8 @@ const isChecked = computed(() => {
196
198
  overflow: hidden;
197
199
  opacity: 0;
198
200
 
199
- height: var(--input-symbol-size);
200
- width: var(--input-symbol-size);
201
+ height: var(--input-checked-element-size);
202
+ width: var(--input-checked-element-size);
201
203
 
202
204
  &:hover {
203
205
  cursor: pointer;
@@ -30,6 +30,7 @@
30
30
  :theme
31
31
  :direction
32
32
  :ariaDescribedby
33
+ :display-as-lozenge
33
34
  >
34
35
  <template #checkedIcon>
35
36
  <slot name="checkedIcon"></slot>
@@ -147,6 +148,10 @@ const props = defineProps({
147
148
  return ["row", "row-reverse"].includes(value)
148
149
  },
149
150
  },
151
+ displayAsLozenge: {
152
+ type: Boolean,
153
+ default: false,
154
+ },
150
155
  })
151
156
 
152
157
  const slots = useSlots()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-forms",
3
3
  "type": "module",
4
- "version": "6.1.19",
4
+ "version": "6.1.20",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",