srcdev-nuxt-forms 3.0.0 → 4.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 (86) hide show
  1. package/assets/styles/ally/_utils.css +20 -0
  2. package/assets/styles/ally/_variables.css +8 -0
  3. package/assets/styles/ally/index.css +2 -0
  4. package/assets/styles/forms/index.css +2 -0
  5. package/assets/styles/forms/themes/_error.css +85 -0
  6. package/assets/styles/forms/themes/_ghost.css +85 -0
  7. package/assets/styles/forms/themes/_input-action-underlined.css +20 -0
  8. package/assets/styles/forms/themes/_input-action.css +20 -0
  9. package/assets/styles/forms/themes/_primary.css +92 -0
  10. package/assets/styles/forms/themes/_secondary.css +85 -0
  11. package/assets/styles/forms/themes/_success.css +85 -0
  12. package/assets/styles/forms/themes/_tertiary.css +85 -0
  13. package/assets/styles/forms/themes/_warning.css +85 -0
  14. package/assets/styles/forms/themes/index.css +9 -0
  15. package/assets/styles/forms/variables/_sizes.css +71 -0
  16. package/assets/styles/forms/variables/_theme.css +11 -0
  17. package/assets/styles/forms/variables/index.css +2 -0
  18. package/assets/styles/main.css +5 -0
  19. package/assets/styles/typography/index.css +2 -0
  20. package/assets/styles/typography/utils/_font-classes.css +190 -0
  21. package/assets/styles/typography/utils/_weights.css +69 -0
  22. package/assets/styles/typography/utils/index.css +2 -0
  23. package/assets/styles/typography/variables/_colors.css +14 -0
  24. package/assets/styles/typography/variables/_reponsive-font-size.css +10 -0
  25. package/assets/styles/typography/variables/index.css +2 -0
  26. package/assets/styles/utils/_margin-helpers.css +334 -0
  27. package/assets/styles/utils/_padding-helpers.css +308 -0
  28. package/assets/styles/utils/_page.css +49 -0
  29. package/assets/styles/utils/index.css +3 -0
  30. package/assets/styles/variables/colors/_blue.css +15 -0
  31. package/assets/styles/variables/colors/_gray.css +16 -0
  32. package/assets/styles/variables/colors/_green.css +15 -0
  33. package/assets/styles/variables/colors/_orange.css +15 -0
  34. package/assets/styles/variables/colors/_red.css +15 -0
  35. package/assets/styles/variables/colors/_yellow.css +15 -0
  36. package/assets/styles/variables/colors/colors.css +6 -0
  37. package/assets/styles/variables/index.css +1 -0
  38. package/components/forms/c12/prop-validators/index.ts +38 -0
  39. package/components/forms/c12/utils.ts +14 -0
  40. package/components/forms/form-errors/InputError.vue +172 -0
  41. package/components/forms/form-errors/tests/InputError.spec.ts +67 -0
  42. package/components/forms/input-button/InputButtonCore.vue +191 -0
  43. package/components/forms/input-button/variants/InputButtonConfirm.vue +66 -0
  44. package/components/forms/input-button/variants/InputButtonSubmit.vue +62 -0
  45. package/components/forms/input-checkbox/MultipleCheckboxes.vue +203 -0
  46. package/components/forms/input-checkbox/SingleCheckbox.vue +169 -0
  47. package/components/forms/input-checkbox/tests/MultipleCheckboxes.spec.ts +98 -0
  48. package/components/forms/input-checkbox/tests/data/tags.json +67 -0
  49. package/components/forms/input-checkbox-radio/InputCheckboxRadioButton.vue +214 -0
  50. package/components/forms/input-checkbox-radio/InputCheckboxRadioCore.vue +191 -0
  51. package/components/forms/input-checkbox-radio/InputCheckboxRadioWithLabel.vue +111 -0
  52. package/components/forms/input-number/InputNumberCore.vue +203 -0
  53. package/components/forms/input-number/variants/InputNumberDefault.vue +154 -0
  54. package/components/forms/input-radio/MultipleRadiobuttons.vue +201 -0
  55. package/components/forms/input-radio/tests/MultipleRadioButtons.spec.ts +89 -0
  56. package/components/forms/input-radio/tests/data/tags.json +67 -0
  57. package/components/forms/input-range/InputRangeCore.vue +274 -0
  58. package/components/forms/input-range/variants/InputRangeDefault.vue +156 -0
  59. package/components/forms/input-range-fancy/InputRangeFancyCore.vue +450 -0
  60. package/components/forms/input-range-fancy/InputRangeFancyWithLabel.vue +124 -0
  61. package/components/forms/input-text/InputTextCore.vue +331 -0
  62. package/components/forms/input-text/variants/InputPasswordWithLabel.vue +130 -0
  63. package/components/forms/input-text/variants/InputTextAsNumberWithLabel.vue +187 -0
  64. package/components/forms/input-text/variants/InputTextWithLabel.vue +298 -0
  65. package/components/forms/input-textarea/InputTextareaCore.vue +234 -0
  66. package/components/forms/input-textarea/variants/InputTextareaWithLabel.vue +267 -0
  67. package/components/forms/toggle-switch/ToggleSwitchCore.vue +198 -0
  68. package/components/forms/toggle-switch/ToggleSwitchCoreOld.vue +216 -0
  69. package/components/forms/toggle-switch/variants/ToggleSwitchWithLabel.vue +105 -0
  70. package/components/forms/toggle-switch/variants/ToggleSwitchWithLabelInline.vue +102 -0
  71. package/components/forms/ui/FormField.vue +78 -0
  72. package/components/forms/ui/FormWrapper.vue +35 -0
  73. package/components/utils/colour-scheme-select/ColourSchemeSelect.vue +270 -0
  74. package/components/utils/colour-scheme-select/ColourSchemeSelectOld.vue +225 -0
  75. package/components/utils/dark-mode-switcher/DarkModeSwitcher.vue +47 -0
  76. package/composables/useApiRequest.ts +25 -0
  77. package/composables/useColourScheme.ts +25 -0
  78. package/composables/useErrorMessages.ts +59 -0
  79. package/composables/useFormControl.ts +248 -0
  80. package/composables/useSleep.ts +5 -0
  81. package/composables/useStyleClassPassthrough.ts +30 -0
  82. package/composables/useZodValidation.ts +148 -0
  83. package/nuxt.config.ts +0 -3
  84. package/package.json +1 -1
  85. package/types/types.forms.ts +216 -0
  86. package/types/types.zodFormControl.ts +21 -0
@@ -0,0 +1,20 @@
1
+ .sr-only {
2
+ border-width: 0;
3
+ clip: rect(1px, 0.1rem, 0.1rem, 0.1rem);
4
+ clip-path: inset(50%);
5
+ height: 0.1rem;
6
+ overflow: hidden;
7
+ position: absolute;
8
+ white-space: nowrap;
9
+ width: 0.1rem;
10
+ }
11
+ /* .sr-only {
12
+ position: absolute;
13
+ width: 0.1rem;
14
+ height: 0.1rem;
15
+ padding: 0;
16
+ margin: -0.1rem;
17
+ overflow: hidden;
18
+ clip: rect(0, 0, 0, 0);
19
+ white-space: nowrap;
20
+ } */
@@ -0,0 +1,8 @@
1
+ :root {
2
+ --focus-box-shadow-colour-off: transparent;
3
+ --focus-box-shadow-colour-on: light-dark(var(--blue-12), var(--gray-0));
4
+ --form-focus-box-shadow: 0 0 0 0.3rem;
5
+
6
+ --box-shadow-off: 0 0 0 0.3rem transparent;
7
+ --box-shadow-on: 0 0 0 0.3rem light-dark(var(--blue-12), var(--gray-0));
8
+ }
@@ -0,0 +1,2 @@
1
+ @import './_variables.css';
2
+ @import './_utils.css';
@@ -0,0 +1,2 @@
1
+ @import './variables/index.css';
2
+ @import './themes/index.css';
@@ -0,0 +1,85 @@
1
+ :root {
2
+ [data-form-theme='error'] {
3
+ --theme-form-input-bg-normal: light-dark(var(--gray-1), var(--gray-4));
4
+ --theme-form-input-bg-outlined: light-dark(var(--gray-1), var(--gray-4));
5
+ --theme-form-input-bg-underlined: light-dark(var(--gray-1), var(--gray-4));
6
+ --theme-form-input-border: var(--red-8);
7
+ --theme-form-input-border-active: var(--red-2);
8
+ --theme-form-input-border-focus: var(--red-2);
9
+ --theme-form-input-outline: white;
10
+ --theme-form-input-outline-active: var(--red-6);
11
+ --theme-form-input-outline-focus: var(--red-6);
12
+ --theme-form-input-text-color-normal: light-dark(var(--gray-10), var(--gray-11));
13
+ --theme-form-input-text-color-outlined: light-dark(var(--gray-10), var(--gray-1));
14
+ --theme-form-input-text-color-underlined: light-dark(var(--gray-11), var(--gray-1));
15
+
16
+ --theme-form-input-text-label-color-normal: light-dark(var(--gray-11), var(--gray-1));
17
+ --theme-form-input-text-label-color-outlined: light-dark(var(--gray-10), var(--gray-11));
18
+ --theme-form-input-text-label-color-underlined: light-dark(var(--gray-11), var(--gray-1));
19
+
20
+ --theme-form-focus-box-shadow: light-dark(var(--red-12), var(--red-2));
21
+
22
+ --theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
23
+ --theme-form-checkbox-border: light-dark(var(--red-12), var(--red-12));
24
+ --theme-form-checkbox-outline: light-dark(var(--red-1), var(--red-1));
25
+ --theme-form-checkbox-shadow: transparent;
26
+ --theme-form-checkbox-shadow-focus: var(--red-6);
27
+ --theme-form-checkbox-symbol: var(--red-12);
28
+
29
+ --theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
30
+ --theme-form-radio-border: light-dark(var(--red-12), var(--red-12));
31
+ --theme-form-radio-outline: light-dark(var(--red-1), var(--red-1));
32
+ --theme-form-radio-shadow: transparent;
33
+ --theme-form-radio-shadow-focus: var(--red-6);
34
+ --theme-form-radio-symbol: var(--red-12);
35
+
36
+ --theme-form-range-accent-color: light-dark(var(--red-12), var(--red-3));
37
+
38
+ /*
39
+ * ToggleSwitch
40
+ **/
41
+ --theme-form-toggle-bg-off: light-dark(var(--gray-1), var(--gray-4));
42
+ --theme-form-toggle-bg-on: light-dark(var(--gray-1), var(--gray-6));
43
+
44
+ --theme-form-toggle-border: var(--form-element-border-width) solid light-dark(var(--red-12), var(--red-1));
45
+
46
+ --theme-form-toggle-outline: var(--form-element-outline-width) solid light-dark(var(--red-12), var(--red-12));
47
+ --theme-form-toggle-symbol-off: var(--orange-12);
48
+ --theme-form-toggle-symbol-on: var(--gray-12);
49
+ --theme-form-toggle-icon-stroke-colour-off: var(--gray-1);
50
+ --theme-form-toggle-icon-stroke-colour-on: var(--gray-1);
51
+
52
+ /*
53
+ * Checkbox as button
54
+ **/
55
+
56
+ --theme-checkbox-radio-button-bg-default: light-dark(var(--red-1), var(--red-1));
57
+
58
+ --theme-checkbox-radio-button-border-default: light-dark(var(--red-12), var(--red-12));
59
+ --theme-checkbox-radio-button-border-width: 0.1rem;
60
+
61
+ --theme-checkbox-radio-button-outline-default: light-dark(var(--red-5), var(--red-5));
62
+ --theme-checkbox-radio-button-outline-width: 0.1rem;
63
+
64
+ --theme-checkbox-radio-button-label-default: light-dark(var(--red-12), var(--red-12));
65
+ }
66
+
67
+ [data-btn-theme='error'] {
68
+ --theme-btn-bg: var(--red-12);
69
+ --theme-btn-border: var(--red-0);
70
+ --theme-btn-outline: var(--red-12);
71
+ --theme-btn-text: var(--red-0);
72
+
73
+ --theme-btn-bg-hover: var(--red-0);
74
+ --theme-btn-border-hover: var(--red-12);
75
+ --theme-btn-outline-hover: var(--red-0);
76
+ --theme-btn-text-hover: var(--red-12);
77
+
78
+ --theme-btn-bg-focus: var(--red-0);
79
+ --theme-btn-border-focus: var(--red-12);
80
+ --theme-btn-outline-focus: var(--red-0);
81
+ --theme-btn-text-focus: var(--red-12);
82
+
83
+ --theme-form-focus-box-shadow: light-dark(var(--red-12), var(--red-2));
84
+ }
85
+ }
@@ -0,0 +1,85 @@
1
+ :root {
2
+ [data-form-theme='ghost'] {
3
+ --theme-form-input-bg-normal: light-dark(var(--gray-1), var(--gray-4));
4
+ --theme-form-input-bg-outlined: light-dark(var(--gray-1), var(--gray-4));
5
+ --theme-form-input-bg-underlined: light-dark(var(--gray-1), var(--gray-4));
6
+ --theme-form-input-border: var(--gray-8);
7
+ --theme-form-input-border-active: var(--gray-2);
8
+ --theme-form-input-border-focus: var(--gray-2);
9
+ --theme-form-input-outline: white;
10
+ --theme-form-input-outline-active: var(--gray-6);
11
+ --theme-form-input-outline-focus: var(--gray-6);
12
+ --theme-form-input-text-color-normal: light-dark(var(--gray-10), var(--gray-11));
13
+ --theme-form-input-text-color-outlined: light-dark(var(--gray-10), var(--gray-1));
14
+ --theme-form-input-text-color-underlined: light-dark(var(--gray-11), var(--gray-1));
15
+
16
+ --theme-form-input-text-label-color-normal: light-dark(var(--gray-11), var(--gray-1));
17
+ --theme-form-input-text-label-color-outlined: light-dark(var(--gray-10), var(--gray-11));
18
+ --theme-form-input-text-label-color-underlined: light-dark(var(--gray-11), var(--gray-1));
19
+
20
+ --theme-form-focus-box-shadow: light-dark(var(--gray-12), var(--gray-2));
21
+
22
+ --theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
23
+ --theme-form-checkbox-border: light-dark(var(--gray-12), var(--gray-12));
24
+ --theme-form-checkbox-outline: light-dark(var(--gray-1), var(--gray-1));
25
+ --theme-form-checkbox-shadow: transparent;
26
+ --theme-form-checkbox-shadow-focus: var(--gray-6);
27
+ --theme-form-checkbox-symbol: var(--gray-12);
28
+
29
+ --theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
30
+ --theme-form-radio-border: light-dark(var(--gray-12), var(--gray-12));
31
+ --theme-form-radio-outline: light-dark(var(--gray-1), var(--gray-1));
32
+ --theme-form-radio-shadow: transparent;
33
+ --theme-form-radio-shadow-focus: var(--gray-6);
34
+ --theme-form-radio-symbol: var(--gray-12);
35
+
36
+ --theme-form-range-accent-color: light-dark(var(--gray-12), var(--gray-3));
37
+
38
+ /*
39
+ * ToggleSwitch
40
+ **/
41
+ --theme-form-toggle-bg-off: light-dark(var(--gray-1), var(--gray-4));
42
+ --theme-form-toggle-bg-on: light-dark(var(--gray-1), var(--gray-6));
43
+ --form-element-border-width: 0.1rem;
44
+ --theme-form-toggle-border: var(--form-element-border-width) solid light-dark(var(--gray-12), var(--gray-1));
45
+ --form-element-border-width: 0.1rem;
46
+ --theme-form-toggle-outline: var(--form-element-outline-width) solid light-dark(var(--gray-12), var(--gray-12));
47
+ --theme-form-toggle-symbol-off: var(--gray-4);
48
+ --theme-form-toggle-symbol-on: var(--gray-12);
49
+ --theme-form-toggle-icon-stroke-colour-off: var(--gray-1);
50
+ --theme-form-toggle-icon-stroke-colour-on: var(--gray-1);
51
+
52
+ /*
53
+ * Checkbox as button
54
+ **/
55
+
56
+ --theme-checkbox-radio-button-bg-default: light-dark(var(--gray-1), var(--gray-4));
57
+
58
+ --theme-checkbox-radio-button-border-default: light-dark(var(--gray-12), var(--gray-12));
59
+ --theme-checkbox-radio-button-border-width: 0.1rem;
60
+
61
+ --theme-checkbox-radio-button-outline-default: light-dark(var(--gray-5), var(--gray-5));
62
+ --theme-checkbox-radio-button-outline-width: 0.1rem;
63
+
64
+ --theme-checkbox-radio-button-label-default: light-dark(var(--gray-12), var(--gray-12));
65
+ }
66
+
67
+ [data-btn-theme='ghost'] {
68
+ --theme-btn-bg: transparent;
69
+ --theme-btn-border: var(--gray-0);
70
+ --theme-btn-outline: var(--gray-12);
71
+ --theme-btn-text: light-dark(var(--gray-12), var(--gray-0));
72
+
73
+ --theme-btn-bg-hover: light-dark(var(--gray-2), var(--gray-8));
74
+ --theme-btn-border-hover: light-dark(var(--gray-12), var(--gray-0));
75
+ --theme-btn-outline-hover: light-dark(var(--gray-12), var(--gray-0));
76
+ --theme-btn-text-hover: light-dark(var(--gray-12), var(--gray-0));
77
+
78
+ --theme-btn-bg-focus: light-dark(var(--gray-2), var(--gray-8));
79
+ --theme-btn-border-focus: light-dark(var(--gray-12), var(--gray-0));
80
+ --theme-btn-outline-focus: light-dark(var(--gray-12), var(--gray-0));
81
+ --theme-btn-text-focus: light-dark(var(--gray-12), var(--gray-0));
82
+
83
+ --theme-form-focus-box-shadow: light-dark(var(--gray-12), var(--gray-2));
84
+ }
85
+ }
@@ -0,0 +1,20 @@
1
+ :root {
2
+ [data-btn-theme='input-action-underlined'] {
3
+ --theme-btn-bg: transparent;
4
+ --theme-btn-border: transparent;
5
+ --theme-btn-outline: transparent;
6
+ --theme-btn-text: var(--_input-text-core-color);
7
+
8
+ --theme-btn-bg-hover: var(--blue-8);
9
+ --theme-btn-border-hover: var(--blue-8);
10
+ --theme-btn-outline-hover: var(--blue-8);
11
+ --theme-btn-text-hover: var(--gray-00);
12
+
13
+ --theme-btn-bg-focus: var(--blue-8);
14
+ --theme-btn-border-focus: var(--blue-8);
15
+ --theme-btn-outline-focus: var(--blue-8);
16
+ --theme-btn-text-focus: var(--gray-00);
17
+
18
+ --theme-form-focus-box-shadow: transparent;
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ :root {
2
+ [data-btn-theme='input-action'] {
3
+ --theme-btn-bg: transparent;
4
+ --theme-btn-border: transparent;
5
+ --theme-btn-outline: transparent;
6
+ --theme-btn-text: var(--theme-form-input-text-color-normal);
7
+
8
+ --theme-btn-bg-hover: var(--blue-8);
9
+ --theme-btn-border-hover: var(--blue-8);
10
+ --theme-btn-outline-hover: var(--blue-8);
11
+ --theme-btn-text-hover: var(--gray-00);
12
+
13
+ --theme-btn-bg-focus: var(--blue-8);
14
+ --theme-btn-border-focus: var(--blue-8);
15
+ --theme-btn-outline-focus: var(--blue-8);
16
+ --theme-btn-text-focus: var(--gray-00);
17
+
18
+ --theme-form-focus-box-shadow: transparent;
19
+ }
20
+ }
@@ -0,0 +1,92 @@
1
+ :root {
2
+ [data-form-theme='primary'] {
3
+ --theme-form-input-bg-normal: light-dark(var(--gray-1), var(--gray-4));
4
+ --theme-form-input-bg-outlined: light-dark(var(--gray-1), var(--gray-4));
5
+ --theme-form-input-bg-underlined: light-dark(var(--gray-0), var(--gray-9));
6
+ --theme-form-input-border: var(--blue-8);
7
+ --theme-form-input-border-active: var(--blue-2);
8
+ --theme-form-input-border-focus: var(--blue-2);
9
+ --theme-form-input-outline: white;
10
+ --theme-form-input-outline-active: var(--blue-6);
11
+ --theme-form-input-outline-focus: var(--blue-6);
12
+ --theme-form-input-text-color-normal: light-dark(var(--gray-11), var(--gray-11));
13
+ --theme-form-input-text-color-outlined: light-dark(var(--gray-10), var(--gray-11));
14
+ --theme-form-input-text-color-underlined: light-dark(var(--gray-11), var(--gray-1));
15
+
16
+ --theme-form-input-text-label-color-normal: light-dark(var(--gray-11), var(--gray-1));
17
+ --theme-form-input-text-label-color-outlined: light-dark(var(--gray-10), var(--gray-11));
18
+ --theme-form-input-text-label-color-underlined: light-dark(var(--gray-11), var(--gray-1));
19
+
20
+ /* --theme-form-focus-box-shadow: light-dark(var(--blue-12), var(--blue-2)); */
21
+ --theme-form-focus-box-shadow: light-dark(red, yellowgreen);
22
+
23
+ --theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
24
+ --theme-form-checkbox-border: light-dark(var(--blue-12), var(--blue-12));
25
+ --theme-form-checkbox-outline: light-dark(var(--blue-1), var(--blue-1));
26
+ --theme-form-checkbox-shadow: transparent;
27
+ --theme-form-checkbox-shadow-focus: var(--blue-6);
28
+ --theme-form-checkbox-symbol: var(--blue-12);
29
+
30
+ --theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
31
+ --theme-form-radio-border: light-dark(var(--blue-12), var(--blue-12));
32
+ --theme-form-radio-outline: light-dark(var(--blue-1), var(--blue-1));
33
+ --theme-form-radio-shadow: transparent;
34
+ --theme-form-radio-shadow-focus: var(--blue-6);
35
+ --theme-form-radio-symbol: var(--blue-12);
36
+
37
+ --theme-form-range-accent-color: light-dark(var(--blue-12), var(--blue-1));
38
+
39
+ /*
40
+ * ToggleSwitch
41
+ **/
42
+ --theme-form-toggle-bg-off: light-dark(var(--gray-1), var(--gray-4));
43
+ --theme-form-toggle-bg-on: light-dark(var(--gray-1), var(--gray-6));
44
+
45
+ --theme-form-toggle-border-color: light-dark(var(--blue-12), var(--blue-1));
46
+ --theme-form-toggle-border-width: 0.2rem;
47
+ --theme-form-toggle-border: var(--form-element-border-width) solid light-dark(var(--blue-12), var(--blue-1));
48
+
49
+ --theme-form-toggle-outline: var(--form-element-outline-width) solid light-dark(var(--blue-1), var(--blue-1));
50
+ --theme-form-toggle-symbol-off: var(--blue-7);
51
+ --theme-form-toggle-symbol-on: var(--gray-12);
52
+ --theme-form-toggle-icon-stroke-colour-off: var(--gray-1);
53
+ --theme-form-toggle-icon-stroke-colour-on: var(--gray-1);
54
+
55
+ /*
56
+ * Checkbox as button
57
+ **/
58
+
59
+ --theme-checkbox-radio-button-bg-default: light-dark(var(--gray-1), var(--gray-4));
60
+
61
+ --theme-checkbox-radio-button-border-default: light-dark(var(--blue-12), var(--blue-12));
62
+ --theme-checkbox-radio-button-border-width: 0.1rem;
63
+
64
+ --theme-checkbox-radio-button-outline-default: light-dark(var(--blue-5), var(--blue-5));
65
+ --theme-checkbox-radio-button-outline-focus: light-dark(var(--blue-12), var(--blue-12));
66
+ --theme-checkbox-radio-button-outline-width: 0.1rem;
67
+
68
+ --theme-checkbox-radio-button-shadow: transparent;
69
+ --theme-checkbox-radio-button-shadow-focus: light-dark(var(--blue-6), var(--blue-1));
70
+
71
+ --theme-checkbox-radio-button-label-default: light-dark(var(--blue-12), var(--blue-12));
72
+ }
73
+
74
+ [data-btn-theme='primary'] {
75
+ --theme-btn-bg: var(--blue-12);
76
+ --theme-btn-border: var(--blue-0);
77
+ --theme-btn-outline: var(--blue-12);
78
+ --theme-btn-text: var(--blue-0);
79
+
80
+ --theme-btn-bg-hover: var(--blue-0);
81
+ --theme-btn-border-hover: var(--blue-12);
82
+ --theme-btn-outline-hover: var(--blue-0);
83
+ --theme-btn-text-hover: var(--blue-12);
84
+
85
+ --theme-btn-bg-focus: var(--blue-0);
86
+ --theme-btn-border-focus: var(--blue-12);
87
+ --theme-btn-outline-focus: var(--blue-0);
88
+ --theme-btn-text-focus: var(--blue-12);
89
+
90
+ --theme-form-focus-box-shadow: light-dark(var(--blue-12), var(--blue-2));
91
+ }
92
+ }
@@ -0,0 +1,85 @@
1
+ :root {
2
+ [data-form-theme='secondary'] {
3
+ --theme-form-input-bg-normal: light-dark(var(--gray-1), var(--gray-4));
4
+ --theme-form-input-bg-outlined: light-dark(var(--gray-1), var(--gray-4));
5
+ --theme-form-input-bg-underlined: light-dark(var(--gray-1), var(--gray-4));
6
+ --theme-form-input-border: var(--gray-8);
7
+ --theme-form-input-border-active: var(--gray-2);
8
+ --theme-form-input-border-focus: var(--gray-2);
9
+ --theme-form-input-outline: white;
10
+ --theme-form-input-outline-active: var(--gray-6);
11
+ --theme-form-input-outline-focus: var(--gray-6);
12
+ --theme-form-input-text-color-normal: light-dark(var(--gray-10), var(--gray-11));
13
+ --theme-form-input-text-color-outlined: light-dark(var(--gray-10), var(--gray-1));
14
+ --theme-form-input-text-color-underlined: light-dark(var(--gray-11), var(--gray-1));
15
+
16
+ --theme-form-input-text-label-color-normal: light-dark(var(--gray-11), var(--gray-1));
17
+ --theme-form-input-text-label-color-outlined: light-dark(var(--gray-10), var(--gray-11));
18
+ --theme-form-input-text-label-color-underlined: light-dark(var(--gray-11), var(--gray-1));
19
+
20
+ --theme-form-focus-box-shadow: light-dark(var(--gray-12), var(--gray-2));
21
+
22
+ --theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
23
+ --theme-form-checkbox-border: light-dark(var(--gray-12), var(--gray-12));
24
+ --theme-form-checkbox-outline: light-dark(var(--gray-1), var(--gray-1));
25
+ --theme-form-checkbox-shadow: transparent;
26
+ --theme-form-checkbox-shadow-focus: var(--gray-6);
27
+ --theme-form-checkbox-symbol: var(--gray-12);
28
+
29
+ --theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
30
+ --theme-form-radio-border: light-dark(var(--gray-12), var(--gray-12));
31
+ --theme-form-radio-outline: light-dark(var(--gray-1), var(--gray-1));
32
+ --theme-form-radio-shadow: transparent;
33
+ --theme-form-radio-shadow-focus: var(--gray-6);
34
+ --theme-form-radio-symbol: var(--gray-12);
35
+
36
+ --theme-form-range-accent-color: light-dark(var(--gray-12), var(--gray-3));
37
+
38
+ /*
39
+ * ToggleSwitch
40
+ **/
41
+ --theme-form-toggle-bg-off: light-dark(var(--gray-1), var(--gray-4));
42
+ --theme-form-toggle-bg-on: light-dark(var(--gray-1), var(--gray-6));
43
+
44
+ --theme-form-toggle-border: var(--form-element-border-width) solid light-dark(var(--gray-12), var(--gray-1));
45
+
46
+ --theme-form-toggle-outline: var(--form-element-outline-width) solid light-dark(var(--gray-12), var(--gray-12));
47
+ --theme-form-toggle-symbol-off: var(--gray-4);
48
+ --theme-form-toggle-symbol-on: var(--gray-12);
49
+ --theme-form-toggle-icon-stroke-colour-off: var(--gray-1);
50
+ --theme-form-toggle-icon-stroke-colour-on: var(--gray-1);
51
+
52
+ /*
53
+ * Checkbox as button
54
+ **/
55
+
56
+ --theme-checkbox-radio-button-bg-default: light-dark(var(--gray-1), var(--gray-4));
57
+
58
+ --theme-checkbox-radio-button-border-default: light-dark(var(--gray-12), var(--gray-12));
59
+ --theme-checkbox-radio-button-border-width: 0.1rem;
60
+
61
+ --theme-checkbox-radio-button-outline-default: light-dark(var(--gray-5), var(--gray-5));
62
+ --theme-checkbox-radio-button-outline-width: 0.1rem;
63
+
64
+ --theme-checkbox-radio-button-label-default: light-dark(var(--gray-12), var(--gray-12));
65
+ }
66
+
67
+ [data-btn-theme='secondary'] {
68
+ --theme-btn-bg: var(--gray-12);
69
+ --theme-btn-border: var(--gray-0);
70
+ --theme-btn-outline: var(--gray-12);
71
+ --theme-btn-text: var(--gray-0);
72
+
73
+ --theme-btn-bg-hover: var(--gray-0);
74
+ --theme-btn-border-hover: var(--gray-12);
75
+ --theme-btn-outline-hover: var(--gray-0);
76
+ --theme-btn-text-hover: var(--gray-12);
77
+
78
+ --theme-btn-bg-focus: var(--gray-0);
79
+ --theme-btn-border-focus: var(--gray-12);
80
+ --theme-btn-outline-focus: var(--gray-0);
81
+ --theme-btn-text-focus: var(--gray-12);
82
+
83
+ --theme-form-focus-box-shadow: light-dark(var(--gray-12), var(--gray-2));
84
+ }
85
+ }
@@ -0,0 +1,85 @@
1
+ :root {
2
+ [data-form-theme='success'] {
3
+ --theme-form-input-bg-normal: light-dark(var(--gray-1), var(--gray-4));
4
+ --theme-form-input-bg-outlined: light-dark(var(--gray-1), var(--gray-4));
5
+ --theme-form-input-bg-underlined: light-dark(var(--gray-1), var(--gray-4));
6
+ --theme-form-input-border: var(--green-8);
7
+ --theme-form-input-border-active: var(--green-2);
8
+ --theme-form-input-border-focus: var(--green-2);
9
+ --theme-form-input-outline: white;
10
+ --theme-form-input-outline-active: var(--green-6);
11
+ --theme-form-input-outline-focus: var(--green-6);
12
+ --theme-form-input-text-color-normal: light-dark(var(--gray-10), var(--gray-11));
13
+ --theme-form-input-text-color-outlined: light-dark(var(--gray-10), var(--gray-1));
14
+ --theme-form-input-text-color-underlined: light-dark(var(--gray-11), var(--gray-1));
15
+
16
+ --theme-form-input-text-label-color-normal: light-dark(var(--gray-11), var(--gray-1));
17
+ --theme-form-input-text-label-color-outlined: light-dark(var(--gray-10), var(--gray-11));
18
+ --theme-form-input-text-label-color-underlined: light-dark(var(--gray-11), var(--gray-1));
19
+
20
+ --theme-form-focus-box-shadow: light-dark(var(--green-12), var(--green-2));
21
+
22
+ --theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
23
+ --theme-form-checkbox-border: light-dark(var(--green-12), var(--green-12));
24
+ --theme-form-checkbox-outline: light-dark(var(--green-1), var(--green-1));
25
+ --theme-form-checkbox-shadow: transparent;
26
+ --theme-form-checkbox-shadow-focus: var(--green-6);
27
+ --theme-form-checkbox-symbol: var(--green-12);
28
+
29
+ --theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
30
+ --theme-form-radio-border: light-dark(var(--green-12), var(--green-12));
31
+ --theme-form-radio-outline: light-dark(var(--green-1), var(--green-1));
32
+ --theme-form-radio-shadow: transparent;
33
+ --theme-form-radio-shadow-focus: var(--green-6);
34
+ --theme-form-radio-symbol: var(--green-12);
35
+
36
+ --theme-form-range-accent-color: light-dark(var(--green-12), var(--green-3));
37
+
38
+ /*
39
+ * ToggleSwitch
40
+ **/
41
+ --theme-form-toggle-bg-off: light-dark(var(--gray-1), var(--gray-4));
42
+ --theme-form-toggle-bg-on: light-dark(var(--gray-1), var(--gray-6));
43
+
44
+ --theme-form-toggle-border: var(--form-element-border-width) solid light-dark(var(--green-12), var(--green-1));
45
+
46
+ --theme-form-toggle-outline: var(--form-element-outline-width) solid light-dark(var(--green-12), var(--green-12));
47
+ --theme-form-toggle-symbol-off: var(--green-4);
48
+ --theme-form-toggle-symbol-on: var(--green-12);
49
+ --theme-form-toggle-icon-stroke-colour-off: var(--gray-1);
50
+ --theme-form-toggle-icon-stroke-colour-on: var(--gray-1);
51
+
52
+ /*
53
+ * Checkbox as button
54
+ **/
55
+
56
+ --theme-checkbox-radio-button-bg-default: light-dark(var(--gray-1), var(--gray-4));
57
+
58
+ --theme-checkbox-radio-button-border-default: light-dark(var(--green-12), var(--green-12));
59
+ --theme-checkbox-radio-button-border-width: 0.1rem;
60
+
61
+ --theme-checkbox-radio-button-outline-default: light-dark(var(--green-5), var(--green-5));
62
+ --theme-checkbox-radio-button-outline-width: 0.1rem;
63
+
64
+ --theme-checkbox-radio-button-label-default: light-dark(var(--green-12), var(--green-12));
65
+ }
66
+
67
+ [data-btn-theme='success'] {
68
+ --theme-btn-bg: var(--green-12);
69
+ --theme-btn-border: var(--green-0);
70
+ --theme-btn-outline: var(--green-12);
71
+ --theme-btn-text: var(--green-0);
72
+
73
+ --theme-btn-bg-hover: var(--green-0);
74
+ --theme-btn-border-hover: var(--green-12);
75
+ --theme-btn-outline-hover: var(--green-0);
76
+ --theme-btn-text-hover: var(--green-12);
77
+
78
+ --theme-btn-bg-focus: var(--green-0);
79
+ --theme-btn-border-focus: var(--green-12);
80
+ --theme-btn-outline-focus: var(--green-0);
81
+ --theme-btn-text-focus: var(--green-12);
82
+
83
+ --theme-form-focus-box-shadow: light-dark(var(--green-12), var(--green-2));
84
+ }
85
+ }
@@ -0,0 +1,85 @@
1
+ :root {
2
+ [data-form-theme='tertiary'] {
3
+ --theme-form-input-bg-normal: light-dark(var(--gray-1), var(--gray-4));
4
+ --theme-form-input-bg-outlined: light-dark(var(--gray-1), var(--gray-4));
5
+ --theme-form-input-bg-underlined: light-dark(var(--gray-1), var(--gray-4));
6
+ --theme-form-input-border: var(--gray-8);
7
+ --theme-form-input-border-active: var(--gray-2);
8
+ --theme-form-input-border-focus: var(--gray-2);
9
+ --theme-form-input-outline: white;
10
+ --theme-form-input-outline-active: var(--gray-6);
11
+ --theme-form-input-outline-focus: var(--gray-6);
12
+ --theme-form-input-text-color-normal: light-dark(var(--gray-10), var(--gray-11));
13
+ --theme-form-input-text-color-outlined: light-dark(var(--gray-10), var(--gray-1));
14
+ --theme-form-input-text-color-underlined: light-dark(var(--gray-11), var(--gray-1));
15
+
16
+ --theme-form-input-text-label-color-normal: light-dark(var(--gray-11), var(--gray-1));
17
+ --theme-form-input-text-label-color-outlined: light-dark(var(--gray-10), var(--gray-11));
18
+ --theme-form-input-text-label-color-underlined: light-dark(var(--gray-11), var(--gray-1));
19
+
20
+ --theme-form-focus-box-shadow: light-dark(var(--gray-12), var(--gray-2));
21
+
22
+ --theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
23
+ --theme-form-checkbox-border: light-dark(var(--gray-12), var(--gray-12));
24
+ --theme-form-checkbox-outline: light-dark(var(--gray-1), var(--gray-1));
25
+ --theme-form-checkbox-shadow: transparent;
26
+ --theme-form-checkbox-shadow-focus: var(--gray-6);
27
+ --theme-form-checkbox-symbol: var(--gray-12);
28
+
29
+ --theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
30
+ --theme-form-radio-border: light-dark(var(--gray-12), var(--gray-12));
31
+ --theme-form-radio-outline: light-dark(var(--gray-1), var(--gray-1));
32
+ --theme-form-radio-shadow: transparent;
33
+ --theme-form-radio-shadow-focus: var(--gray-6);
34
+ --theme-form-radio-symbol: var(--gray-12);
35
+
36
+ --theme-form-range-accent-color: light-dark(var(--gray-12), var(--gray-3));
37
+
38
+ /*
39
+ * ToggleSwitch
40
+ **/
41
+ --theme-form-toggle-bg-off: light-dark(var(--gray-1), var(--gray-4));
42
+ --theme-form-toggle-bg-on: light-dark(var(--gray-1), var(--gray-6));
43
+
44
+ --theme-form-toggle-border: var(--form-element-border-width) solid light-dark(var(--gray-12), var(--gray-1));
45
+
46
+ --theme-form-toggle-outline: var(--form-element-outline-width) solid light-dark(var(--gray-12), var(--gray-12));
47
+ --theme-form-toggle-symbol-off: var(--gray-4);
48
+ --theme-form-toggle-symbol-on: var(--gray-12);
49
+ --theme-form-toggle-icon-stroke-colour-off: var(--gray-1);
50
+ --theme-form-toggle-icon-stroke-colour-on: var(--gray-1);
51
+
52
+ /*
53
+ * Checkbox as button
54
+ **/
55
+
56
+ --theme-checkbox-radio-button-bg-default: light-dark(var(--gray-1), var(--gray-4));
57
+
58
+ --theme-checkbox-radio-button-border-default: light-dark(var(--green-12), var(--green-12));
59
+ --theme-checkbox-radio-button-border-width: 0.1rem;
60
+
61
+ --theme-checkbox-radio-button-outline-default: light-dark(var(--green-5), var(--green-5));
62
+ --theme-checkbox-radio-button-outline-width: 0.1rem;
63
+
64
+ --theme-checkbox-radio-button-label-default: light-dark(var(--green-12), var(--green-12));
65
+ }
66
+
67
+ [data-btn-theme='tertiary'] {
68
+ --theme-btn-bg: var(--gray-0);
69
+ --theme-btn-border: var(--gray-0);
70
+ --theme-btn-outline: var(--gray-12);
71
+ --theme-btn-text: var(--gray-12);
72
+
73
+ --theme-btn-bg-hover: var(--gray-12);
74
+ --theme-btn-border-hover: var(--gray-0);
75
+ --theme-btn-outline-hover: var(--gray-12);
76
+ --theme-btn-text-hover: var(--gray-0);
77
+
78
+ --theme-btn-bg-focus: var(--gray-12);
79
+ --theme-btn-border-focus: var(--gray-0);
80
+ --theme-btn-outline-focus: var(--gray-12);
81
+ --theme-btn-text-focus: var(--gray-0);
82
+
83
+ --theme-form-focus-box-shadow: 0.1rem 0.1rem 0.8rem 0.1rem var(--gray-12);
84
+ }
85
+ }