srcdev-nuxt-forms 6.1.1 → 6.1.3

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 (81) hide show
  1. package/app/components/forms/input-checkbox/MultipleCheckboxes.vue +21 -32
  2. package/app/components/forms/input-description/InputDescription.vue +71 -0
  3. package/app/components/forms/input-label/InputLabel.vue +4 -0
  4. package/app/components/forms/input-select/variants/InputSelectWithLabel.vue +36 -12
  5. package/app/components/forms/input-text/variants/InputTextWithLabel.vue +35 -11
  6. package/app/components/forms/input-textarea/InputTextareaCore.vue +5 -1
  7. package/app/components/forms/input-textarea/variants/InputTextareaWithLabel.vue +75 -35
  8. package/nuxt.config.ts +0 -1
  9. package/package.json +1 -1
  10. package/app/assets/styles/extends-layer/srcdev-forms/components/_form-fieldset.css +0 -38
  11. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-button.css +0 -66
  12. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-checkbox-radio-core.css +0 -66
  13. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-checkbox-radio-options-button.css +0 -76
  14. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-error.css +0 -54
  15. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-label.css +0 -21
  16. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-select.css +0 -140
  17. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-text.css +0 -190
  18. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-textarea.css +0 -96
  19. package/app/assets/styles/extends-layer/srcdev-forms/components/index.css +0 -9
  20. package/app/assets/styles/extends-layer/srcdev-forms/index.css +0 -2
  21. package/app/assets/styles/extends-layer/srcdev-forms/setup/_generic.css +0 -21
  22. package/app/assets/styles/extends-layer/srcdev-forms/setup/index.css +0 -4
  23. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_error.css +0 -85
  24. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_ghost.css +0 -85
  25. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_input-action-underlined.css +0 -20
  26. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_input-action.css +0 -20
  27. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_primary.css +0 -92
  28. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_secondary.css +0 -85
  29. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_success.css +0 -85
  30. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_tertiary.css +0 -85
  31. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/_warning.css +0 -85
  32. package/app/assets/styles/extends-layer/srcdev-forms/setup/themes/index.css +0 -9
  33. package/app/assets/styles/extends-layer/srcdev-forms/setup/variables/_a11y.css +0 -7
  34. package/app/assets/styles/extends-layer/srcdev-forms/setup/variables/index.css +0 -1
  35. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/_normal.css +0 -48
  36. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/_underlined.css +0 -48
  37. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/index.css +0 -3
  38. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/sizes/_default.css +0 -13
  39. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/sizes/_large.css +0 -12
  40. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/sizes/_medium.css +0 -12
  41. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/sizes/_small.css +0 -12
  42. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/sizes/_x-small.css +0 -11
  43. package/app/assets/styles/extends-layer/srcdev-forms/setup/variants/sizes/index.css +0 -23
  44. package/app/assets/styles/main.css +0 -2
  45. package/app/assets/styles/setup/_head.css +0 -36
  46. package/app/assets/styles/setup/a11y/_utils.css +0 -20
  47. package/app/assets/styles/setup/a11y/_variables.css +0 -8
  48. package/app/assets/styles/setup/a11y/index.css +0 -2
  49. package/app/assets/styles/setup/index.css +0 -5
  50. package/app/assets/styles/setup/theming/colors/_blue.css +0 -15
  51. package/app/assets/styles/setup/theming/colors/_gray.css +0 -16
  52. package/app/assets/styles/setup/theming/colors/_green.css +0 -15
  53. package/app/assets/styles/setup/theming/colors/_orange.css +0 -15
  54. package/app/assets/styles/setup/theming/colors/_red.css +0 -15
  55. package/app/assets/styles/setup/theming/colors/_yellow.css +0 -15
  56. package/app/assets/styles/setup/theming/colors/index.css +0 -6
  57. package/app/assets/styles/setup/theming/index.css +0 -2
  58. package/app/assets/styles/setup/theming/themes/_default.css +0 -66
  59. package/app/assets/styles/setup/theming/themes/_error.css +0 -66
  60. package/app/assets/styles/setup/theming/themes/_ghost.css +0 -31
  61. package/app/assets/styles/setup/theming/themes/_info.css +0 -31
  62. package/app/assets/styles/setup/theming/themes/_primary.css +0 -41
  63. package/app/assets/styles/setup/theming/themes/_secondary.css +0 -66
  64. package/app/assets/styles/setup/theming/themes/_success.css +0 -66
  65. package/app/assets/styles/setup/theming/themes/_tertiary.css +0 -31
  66. package/app/assets/styles/setup/theming/themes/_warning.css +0 -68
  67. package/app/assets/styles/setup/theming/themes/index.css +0 -9
  68. package/app/assets/styles/setup/typography/index.css +0 -2
  69. package/app/assets/styles/setup/typography/utility-classes/_generic-font-classes.css +0 -217
  70. package/app/assets/styles/setup/typography/utility-classes/_generic-font-variation-settings.css +0 -29
  71. package/app/assets/styles/setup/typography/utility-classes/_generic-font-weights.css +0 -39
  72. package/app/assets/styles/setup/typography/utility-classes/index.css +0 -3
  73. package/app/assets/styles/setup/typography/vars/_reponsive-font-sizes.css +0 -12
  74. package/app/assets/styles/setup/typography/vars/index.css +0 -1
  75. package/app/assets/styles/setup/utility-classes/_fluid-spacing.css +0 -13
  76. package/app/assets/styles/setup/utility-classes/animations/_auto-rotate.css +0 -13
  77. package/app/assets/styles/setup/utility-classes/animations/_entry-exit-blur.css +0 -16
  78. package/app/assets/styles/setup/utility-classes/animations/_entry-slide-in.css +0 -15
  79. package/app/assets/styles/setup/utility-classes/animations/_entry-zoom-reveal.css +0 -15
  80. package/app/assets/styles/setup/utility-classes/animations/index.css +0 -4
  81. package/app/assets/styles/setup/utility-classes/index.css +0 -2
@@ -8,9 +8,14 @@
8
8
  :data-testid
9
9
  :styleClassPassthrough="['multiple-checkboxes-fieldset']"
10
10
  >
11
- <template #description>
12
- <slot name="description"></slot>
13
- </template>
11
+ <InputDescription :id :name :field-has-error="fieldHasError" :style-class-passthrough="['input-text-description']">
12
+ <template v-if="slots.descriptionHtml" #descriptionHtml>
13
+ <slot name="descriptionHtml"></slot>
14
+ </template>
15
+ <template v-if="slots.descriptionText" #descriptionText>
16
+ <slot name="descriptionText"></slot>
17
+ </template>
18
+ </InputDescription>
14
19
 
15
20
  <template #content>
16
21
  <div class="multiple-checkboxes-items" :class="[optionsLayout]">
@@ -22,15 +27,15 @@
22
27
  :name
23
28
  :required
24
29
  :label="item.label"
25
- :fieldHasError
30
+ :field-has-error
26
31
  v-model="modelValue"
27
32
  :true-value="item.value"
28
33
  :size
29
- :optionsLayout
34
+ :options-layout
30
35
  :theme
31
36
  :direction
32
- :ariaDescribedby
33
- :displayAsDisc
37
+ :aria-describedby
38
+ :display-as-disc
34
39
  >
35
40
  <template #checkedIcon>
36
41
  <slot name="checkedIcon"></slot>
@@ -48,14 +53,14 @@
48
53
  :name
49
54
  :required
50
55
  :label="item.label"
51
- :fieldHasError
56
+ :field-has-error
52
57
  v-model="modelValue"
53
58
  :true-value="item.value"
54
59
  :size
55
- :optionsLayout
60
+ :options-layout
56
61
  :theme
57
- :ariaDescribedby
58
- :displayAsDisc
62
+ :aria-describedby
63
+ :display-as-disc
59
64
  >
60
65
  <template #checkedIcon>
61
66
  <slot name="checkedIcon"></slot>
@@ -72,23 +77,7 @@
72
77
  import propValidators from "../c12/prop-validators"
73
78
  import type { IOptionsConfig, IFormMultipleOptions } from "../../../../shared/types/types.forms"
74
79
 
75
- const {
76
- dataTestid,
77
- name,
78
- legend,
79
- label,
80
- required,
81
- fieldHasError,
82
- placeholder,
83
- isButton,
84
- errorMessage,
85
- size,
86
- optionsLayout,
87
- equalCols,
88
- styleClassPassthrough,
89
- theme,
90
- direction,
91
- } = defineProps({
80
+ const props = defineProps({
92
81
  dataTestid: {
93
82
  type: String,
94
83
  default: "multiple-checkboxes",
@@ -176,11 +165,11 @@ const slots = useSlots()
176
165
  const modelValue = defineModel()
177
166
  const fieldData = defineModel("fieldData") as Ref<IFormMultipleOptions>
178
167
 
179
- const id = `${name}-input-${useId()}`
180
- const errorId = `${name}-error-message`
168
+ const id = `${props.name}-${useId()}`
169
+ const errorId = `${id}-error-message`
181
170
  const ariaDescribedby = computed(() => {
182
- const ariaDescribedbyId = slots.description ? `${name}-description` : undefined
183
- return fieldHasError ? errorId : ariaDescribedbyId
171
+ const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
172
+ return props.fieldHasError ? errorId : ariaDescribedbyId
184
173
  })
185
174
  </script>
186
175
 
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <div
3
+ v-if="slots.descriptionText || slots.descriptionHtml"
4
+ class="input-description"
5
+ :class="[elementClasses]"
6
+ :id="descriptionId"
7
+ >
8
+ <div v-if="slots.descriptionHtml" class="input-description-html">
9
+ <slot name="descriptionHtml"></slot>
10
+ </div>
11
+ <p v-if="slots.descriptionText" class="input-description-text">
12
+ <slot name="descriptionText"></slot>
13
+ </p>
14
+ </div>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ import propValidators from "../c12/prop-validators"
19
+
20
+ const props = defineProps({
21
+ id: {
22
+ type: String,
23
+ required: true,
24
+ },
25
+ name: {
26
+ type: String,
27
+ required: true,
28
+ },
29
+ fieldHasError: {
30
+ type: Boolean,
31
+ default: false,
32
+ },
33
+ styleClassPassthrough: {
34
+ type: Array as PropType<string[]>,
35
+ default: () => [],
36
+ },
37
+ theme: {
38
+ type: String as PropType<string>,
39
+ default: "primary",
40
+ validator(value: string) {
41
+ return propValidators.theme.includes(value)
42
+ },
43
+ },
44
+ inputVariant: {
45
+ type: String as PropType<string>,
46
+ default: "default",
47
+ validator(value: string) {
48
+ return propValidators.inputVariant.includes(value)
49
+ },
50
+ },
51
+ })
52
+
53
+ const slots = useSlots()
54
+
55
+ const descriptionId = `${props.id}-description`
56
+
57
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
58
+ </script>
59
+ <style lang="css">
60
+ .input-description {
61
+ .input-description-html {
62
+ margin-block: 0.4rem 0.8rem;
63
+ }
64
+ .input-description-text {
65
+ color: var(--form-description-color);
66
+ font-size: var(--step-4);
67
+ margin-block: 0.4rem 0.8rem;
68
+ line-height: var(--step-4);
69
+ }
70
+ }
71
+ </style>
@@ -73,5 +73,9 @@ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
73
73
  line-height: 1.5;
74
74
  display: block;
75
75
  }
76
+
77
+ & + .input-description {
78
+ margin-block-end: 0.2rem;
79
+ }
76
80
  }
77
81
  </style>
@@ -19,9 +19,21 @@
19
19
  <template #textLabel>{{ label }}</template>
20
20
  </InputLabel>
21
21
 
22
- <div v-if="inputVariant === 'normal' && slots.description" :id="`${id}-description`">
23
- <slot name="description"></slot>
24
- </div>
22
+ <InputDescription
23
+ v-if="inputVariant !== 'outlined'"
24
+ :id
25
+ :name
26
+ :input-variant
27
+ :field-has-error="fieldHasError"
28
+ :style-class-passthrough="['input-text-description']"
29
+ >
30
+ <template v-if="slots.descriptionHtml" #descriptionHtml>
31
+ <slot name="descriptionHtml"></slot>
32
+ </template>
33
+ <template v-if="slots.descriptionText" #descriptionText>
34
+ <slot name="descriptionText"></slot>
35
+ </template>
36
+ </InputDescription>
25
37
 
26
38
  <InputSelectCore
27
39
  v-model="modelValue"
@@ -31,13 +43,13 @@
31
43
  :id
32
44
  :name
33
45
  :placeholder
34
- :fieldHasError
46
+ :field-has-error
35
47
  :required
36
- :styleClassPassthrough
48
+ :style-class-passthrough
37
49
  :theme="formTheme"
38
- :ariaDescribedby="ariaDescribedby"
50
+ :aria-describedby
39
51
  :size
40
- :inputVariant
52
+ :input-variant
41
53
  />
42
54
 
43
55
  <InputError
@@ -48,9 +60,21 @@
48
60
  :inputVariant
49
61
  />
50
62
  </div>
51
- <div v-if="inputVariant !== 'normal' && slots.description" :id="`${id}-description`">
52
- <slot name="description"></slot>
53
- </div>
63
+ <InputDescription
64
+ v-if="inputVariant === 'outlined'"
65
+ :id
66
+ :name
67
+ :input-variant
68
+ :field-has-error="fieldHasError"
69
+ :style-class-passthrough="['input-text-description']"
70
+ >
71
+ <template v-if="slots.descriptionHtml" #descriptionHtml>
72
+ <slot name="descriptionHtml"></slot>
73
+ </template>
74
+ <template v-if="slots.descriptionText" #descriptionText>
75
+ <slot name="descriptionText"></slot>
76
+ </template>
77
+ </InputDescription>
54
78
  </div>
55
79
  </template>
56
80
 
@@ -121,9 +145,9 @@ const formTheme = computed(() => {
121
145
  })
122
146
 
123
147
  const id = `${props.name}-${useId()}`
124
- const errorId = `${name}-error-message`
148
+ const errorId = `${id}-error-message`
125
149
  const ariaDescribedby = computed(() => {
126
- const ariaDescribedbyId = slots.description ? `${id}-description` : undefined
150
+ const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
127
151
  return props.fieldHasError ? errorId : ariaDescribedbyId
128
152
  })
129
153
 
@@ -17,9 +17,21 @@
17
17
  <template #textLabel>{{ label }}</template>
18
18
  </InputLabel>
19
19
 
20
- <div v-if="inputVariant === 'normal' && slots.description" :id="`${id}-description`">
21
- <slot name="description"></slot>
22
- </div>
20
+ <InputDescription
21
+ v-if="inputVariant !== 'outlined'"
22
+ :id
23
+ :name
24
+ :input-variant
25
+ :field-has-error="fieldHasError"
26
+ :style-class-passthrough="['input-text-description']"
27
+ >
28
+ <template v-if="slots.descriptionHtml" #descriptionHtml>
29
+ <slot name="descriptionHtml"></slot>
30
+ </template>
31
+ <template v-if="slots.descriptionText" #descriptionText>
32
+ <slot name="descriptionText"></slot>
33
+ </template>
34
+ </InputDescription>
23
35
 
24
36
  <InputTextCore
25
37
  v-model="modelValue"
@@ -33,13 +45,13 @@
33
45
  :placeholder
34
46
  :label
35
47
  :errorMessage
36
- :fieldHasError
48
+ :field-has-error
37
49
  :required
38
- :styleClassPassthrough
50
+ :style-class-passthrough
39
51
  :theme
40
- :ariaDescribedby
52
+ :aria-describedby
41
53
  :size
42
- :inputVariant
54
+ :input-variant
43
55
  >
44
56
  <template v-if="slots.left" #left>
45
57
  <slot name="left"></slot>
@@ -52,9 +64,21 @@
52
64
  <InputError :errorMessage :showError="fieldHasError" :id="errorId" :isDetached="false" :inputVariant />
53
65
  </div>
54
66
 
55
- <div v-if="inputVariant !== 'normal' && slots.description" :id="`${id}-description`">
56
- <slot name="description"></slot>
57
- </div>
67
+ <InputDescription
68
+ v-if="inputVariant === 'outlined'"
69
+ :id
70
+ :name
71
+ :input-variant
72
+ :field-has-error="fieldHasError"
73
+ :style-class-passthrough="['input-text-description']"
74
+ >
75
+ <template v-if="slots.descriptionHtml" #descriptionHtml>
76
+ <slot name="descriptionHtml"></slot>
77
+ </template>
78
+ <template v-if="slots.descriptionText" #descriptionText>
79
+ <slot name="descriptionText"></slot>
80
+ </template>
81
+ </InputDescription>
58
82
  </div>
59
83
  </template>
60
84
 
@@ -136,7 +160,7 @@ const formTheme = computed(() => {
136
160
  const id = `${props.name}-${useId()}`
137
161
  const errorId = `${id}-error-message`
138
162
  const ariaDescribedby = computed(() => {
139
- const ariaDescribedbyId = slots.description ? `${id}-description` : undefined
163
+ const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
140
164
  return props.fieldHasError ? errorId : ariaDescribedbyId
141
165
  })
142
166
 
@@ -26,7 +26,7 @@
26
26
  v-model="modelValue"
27
27
  ref="inputField"
28
28
  :aria-invalid="fieldHasError"
29
- :aria-describedby="`${id}-error-message`"
29
+ :aria-describedby
30
30
  @focusin="updateFocus(true)"
31
31
  @focusout="updateFocus(false)"
32
32
  ></textarea>
@@ -56,6 +56,10 @@ const props = defineProps({
56
56
  type: String,
57
57
  default: "",
58
58
  },
59
+ ariaDescribedby: {
60
+ type: String,
61
+ default: "",
62
+ },
59
63
  fieldHasError: {
60
64
  type: Boolean,
61
65
  default: false,
@@ -1,45 +1,79 @@
1
1
  <template>
2
- <div
3
- class="input-textarea-with-label"
4
- :data-theme="formTheme"
5
- :class="[elementClasses, inputVariant, { dirty: isDirty }, { active: isActive }]"
6
- >
7
- <InputLabel
8
- :for="id"
9
- :id
10
- :theme
11
- :name
12
- :input-variant
13
- :field-has-error
14
- :style-class-passthrough="['input-textarea-label']"
2
+ <div>
3
+ <div
4
+ class="input-textarea-with-label"
5
+ :data-theme="formTheme"
6
+ :class="[elementClasses, inputVariant, { dirty: isDirty }, { active: isActive }]"
15
7
  >
16
- <template #textLabel>{{ label }}</template>
17
- </InputLabel>
8
+ <InputLabel
9
+ :for="id"
10
+ :id
11
+ :theme
12
+ :name
13
+ :input-variant
14
+ :field-has-error
15
+ :style-class-passthrough="['input-textarea-label']"
16
+ >
17
+ <template #textLabel>{{ label }}</template>
18
+ </InputLabel>
19
+
20
+ <InputDescription
21
+ v-if="inputVariant !== 'outlined'"
22
+ :id
23
+ :name
24
+ :input-variant
25
+ :field-has-error="fieldHasError"
26
+ :style-class-passthrough="['input-text-description']"
27
+ >
28
+ <template v-if="slots.descriptionHtml" #descriptionHtml>
29
+ <slot name="descriptionHtml"></slot>
30
+ </template>
31
+ <template v-if="slots.descriptionText" #descriptionText>
32
+ <slot name="descriptionText"></slot>
33
+ </template>
34
+ </InputDescription>
18
35
 
19
- <InputTextareaCore
20
- v-model="modelValue"
21
- v-model:isDirty="isDirty"
22
- v-model:isActive="isActive"
23
- :maxlength
36
+ <InputTextareaCore
37
+ v-model="modelValue"
38
+ v-model:isDirty="isDirty"
39
+ v-model:isActive="isActive"
40
+ :maxlength
41
+ :id
42
+ :name
43
+ :placeholder
44
+ :label
45
+ :field-has-error
46
+ :required
47
+ :style-class-passthrough
48
+ :theme
49
+ :size
50
+ :input-variant
51
+ >
52
+ <template v-if="slots.left" #left>
53
+ <slot name="left"></slot>
54
+ </template>
55
+ <template v-if="slots.right" #right>
56
+ <slot name="right"></slot>
57
+ </template>
58
+ </InputTextareaCore>
59
+ <InputError :errorMessage :showError="fieldHasError" :id :isDetached="false" :inputVariant />
60
+ </div>
61
+
62
+ <InputDescription
63
+ v-if="inputVariant === 'outlined'"
24
64
  :id
25
65
  :name
26
- :placeholder
27
- :label
28
- :fieldHasError
29
- :required
30
- :styleClassPassthrough
31
- :theme
32
- :size
33
- :inputVariant
66
+ :input-variant
67
+ :field-has-error="fieldHasError"
68
+ :style-class-passthrough="['input-text-description']"
34
69
  >
35
- <template v-if="slots.left" #left>
36
- <slot name="left"></slot>
70
+ <template v-if="slots.descriptionHtml" #descriptionHtml>
71
+ <slot name="descriptionHtml"></slot>
37
72
  </template>
38
- <template v-if="slots.right" #right>
39
- <slot name="right"></slot>
73
+ <template v-if="slots.descriptionText" #descriptionText>
74
+ <slot name="descriptionText"></slot>
40
75
  </template>
41
- </InputTextareaCore>
42
- <InputError :errorMessage :showError="fieldHasError" :id :isDetached="false" :inputVariant />
76
+ </InputDescription>
43
77
  </div>
44
78
  </template>
45
79
 
@@ -103,11 +137,17 @@ const props = defineProps({
103
137
 
104
138
  const slots = useSlots()
105
139
 
106
- const id = useId()
107
140
  const formTheme = computed(() => {
108
141
  return props.fieldHasError ? "error" : props.theme
109
142
  })
110
143
 
144
+ const id = `${props.name}-${useId()}`
145
+ const errorId = `${id}-error-message`
146
+ const ariaDescribedby = computed(() => {
147
+ const ariaDescribedbyId = slots.descriptionText || slots.descriptionHtml ? `${id}-description` : undefined
148
+ return props.fieldHasError ? errorId : ariaDescribedbyId
149
+ })
150
+
111
151
  const modelValue = defineModel<string | number | readonly string[] | null | undefined>()
112
152
  const isActive = ref<boolean>(false)
113
153
  const isDirty = ref<boolean>(false)
package/nuxt.config.ts CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  export default defineNuxtConfig({
4
4
  devtools: { enabled: true },
5
- css: ["modern-normalize", "./app/assets/styles/main.css"],
6
5
  modules: ["@nuxt/eslint", "@nuxt/icon", "@nuxt/test-utils/module"],
7
6
  alias: {
8
7
  "#shared": "./shared",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-forms",
3
3
  "type": "module",
4
- "version": "6.1.1",
4
+ "version": "6.1.3",
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",
@@ -1,38 +0,0 @@
1
- .srcdev-forms-extended {
2
- .form-fieldset {
3
- margin: 0;
4
- padding: 0;
5
- border: 0;
6
-
7
- &.single-checkbox-fieldset {
8
- }
9
-
10
- &.multiple-checkboxes-fieldset {
11
- }
12
-
13
- &.multiple-radiobuttons-fieldset {
14
- }
15
-
16
- .form-fieldset-legend {
17
- color: var(--form-fieldset-legend-color);
18
- margin-block: 0.8rem;
19
- font-size: var(--step-5);
20
- font-weight: normal;
21
- line-height: 1.5;
22
-
23
- &.has-description {
24
- margin-bottom: 0;
25
- }
26
- }
27
-
28
- .form-fieldset-description {
29
- font-size: 1.6rem;
30
- margin-top: 1.2rem;
31
- }
32
-
33
- .form-fieldset-content {
34
- margin-block-start: 0;
35
- margin-block-end: 0;
36
- }
37
- }
38
- }
@@ -1,66 +0,0 @@
1
- .srcdev-forms-extended {
2
- .input-button-core {
3
- gap: var(--form-button-icon-gap);
4
- border-radius: var(--form-input-border-radius);
5
-
6
- padding-inline: var(--form-button-padding-inline);
7
- padding-block-start: var(--form-element-padding-block-start);
8
- padding-block-end: var(--form-element-padding-block-end);
9
-
10
- box-shadow: var(--box-shadow-off);
11
- background-color: var(--theme-button-surface);
12
- border: var(--form-element-border-width) solid var(--theme-button-border);
13
- color: var(--theme-button-text);
14
- outline: var(--form-element-outline-width) solid var(--theme-button-outline);
15
- outline-offset: var(--form-element-outline-offset-focus);
16
-
17
- &:hover {
18
- background-color: var(--theme-button-surface-hover);
19
- border-color: var(--theme-input-border-hover);
20
- color: var(--theme-button-text-hover);
21
- outline-color: var(--theme-button-outline-hover);
22
- outline-offset: var(--form-element-outline-offset-focus);
23
- }
24
-
25
- &:focus-visible {
26
- background-color: var(--theme-button-surface-hover);
27
- border-color: var(--theme-button-border-focus);
28
- color: var(--theme-button-text-focus);
29
- outline-color: var(--theme-button-outline-focus);
30
- outline-offset: var(--form-element-outline-offset-focus);
31
- }
32
-
33
- &[readonly] {
34
- opacity: 0.5;
35
- &:hover,
36
- &:focus-visible {
37
- cursor: not-allowed;
38
- }
39
- }
40
-
41
- &.icon-only {
42
- aspect-ratio: 1;
43
- height: var(--form-icon-only-button-size);
44
- width: var(--form-icon-only-button-size);
45
- margin: 0;
46
- padding: 0;
47
- }
48
-
49
- .btn-text {
50
- display: inline-block;
51
- white-space: nowrap;
52
- font-size: var(--form-element-font-size);
53
- line-height: var(--form-element-line-height);
54
- }
55
-
56
- .btn-icon {
57
- display: flex;
58
- .icon {
59
- aspect-ratio: 1;
60
- display: inline-block;
61
- height: var(--form-icon-size);
62
- width: var(--form-icon-size);
63
- }
64
- }
65
- }
66
- }
@@ -1,66 +0,0 @@
1
- .srcdev-forms-extended {
2
- .input-checkbox-radio-wrapper {
3
- background-color: var(--theme-checkbox-symbol-surface);
4
- border: var(--form-element-border-width) solid var(--theme-input-border);
5
- outline: var(--form-element-outline-width) solid var(--theme-input-outline);
6
- box-shadow: var(--_box-shadow);
7
-
8
- &.x-small {
9
- --input-symbol-size: var(--step-3);
10
- }
11
-
12
- &.small {
13
- --input-symbol-size: var(--step-4);
14
- }
15
-
16
- &.default {
17
- --input-symbol-size: var(--step-7);
18
- }
19
-
20
- &.medium {
21
- --input-symbol-size: var(--step-6);
22
- }
23
-
24
- &.large {
25
- --input-symbol-size: var(--step-6);
26
- }
27
-
28
- &.checkbox {
29
- border-radius: var(--form-input-border-radius);
30
- &.button {
31
- &.display-as-disc {
32
- border-radius: 50%;
33
- }
34
- }
35
- }
36
-
37
- &.radio {
38
- border-radius: 50%;
39
- }
40
-
41
- /* focus-visible */
42
- &:not(.button):focus-within {
43
- background-color: var(--theme-input-surface-focus);
44
- outline-color: var(--theme-input-outline-focus);
45
- outline-offset: var(--form-element-outline-offset-focus);
46
- }
47
-
48
- .input-checked-icon {
49
- color: var(--theme-checkbox-symbol-color);
50
- box-shadow: var(--_box-shadow);
51
- }
52
-
53
- .input-checkbox-radio-core {
54
- margin: 0;
55
- opacity: 0;
56
-
57
- &:not(.is-button) {
58
- &:focus-visible {
59
- /* background-color: var(--theme-input-surface-focus);
60
- outline-color: var(--theme-input-outline-focus);
61
- outline-offset: var(--form-element-outline-offset-focus); */
62
- }
63
- }
64
- }
65
- }
66
- }