@ardium-ui/ui 3.2.6 → 3.3.0-alpha1

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 (110) hide show
  1. package/esm2022/lib/_internal/boolean-component.mjs +1 -1
  2. package/esm2022/lib/_internal/focusable-component.mjs +2 -2
  3. package/esm2022/lib/_internal/form-field-component.mjs +55 -0
  4. package/esm2022/lib/_internal/item-storages/dropdown-item-storage.mjs +4 -1
  5. package/esm2022/lib/_internal/ngmodel-component.mjs +5 -2
  6. package/esm2022/lib/_internal/public-api.mjs +2 -0
  7. package/esm2022/lib/checkbox/checkbox.component.mjs +1 -1
  8. package/esm2022/lib/file-inputs/file-input/file-input.component.mjs +1 -1
  9. package/esm2022/lib/form-field/error/error.component.mjs +17 -0
  10. package/esm2022/lib/form-field/error/error.directive.mjs +17 -0
  11. package/esm2022/lib/form-field/form-field.component.mjs +36 -0
  12. package/esm2022/lib/form-field/form-field.defaults.mjs +14 -0
  13. package/esm2022/lib/form-field/form-field.module.mjs +23 -0
  14. package/esm2022/lib/form-field/hint/hint.component.mjs +17 -0
  15. package/esm2022/lib/form-field/hint/hint.directive.mjs +30 -0
  16. package/esm2022/lib/form-field/index.mjs +8 -0
  17. package/esm2022/lib/form-field/label/label.component.mjs +21 -0
  18. package/esm2022/lib/form-field-frame/form-field-frame.component.mjs +4 -2
  19. package/esm2022/lib/inputs/_simple-input-base.mjs +4 -4
  20. package/esm2022/lib/inputs/digit-input/digit-input.component.mjs +28 -11
  21. package/esm2022/lib/inputs/digit-input/digit-input.defaults.mjs +3 -3
  22. package/esm2022/lib/inputs/digit-input/digit-input.model.mjs +5 -3
  23. package/esm2022/lib/inputs/digit-input/digit-input.types.mjs +1 -1
  24. package/esm2022/lib/inputs/digit-input/digit-input.utils.mjs +1 -1
  25. package/esm2022/lib/inputs/hex-input/hex-input.component.mjs +13 -5
  26. package/esm2022/lib/inputs/hex-input/hex-input.defaults.mjs +3 -3
  27. package/esm2022/lib/inputs/input/input.component.mjs +12 -3
  28. package/esm2022/lib/inputs/number-input/number-input.component.mjs +15 -7
  29. package/esm2022/lib/inputs/number-input/number-input.defaults.mjs +3 -3
  30. package/esm2022/lib/inputs/password-input/password-input.component.mjs +15 -5
  31. package/esm2022/lib/inputs/password-input/password-input.defaults.mjs +3 -3
  32. package/esm2022/lib/inputs/simple-input/simple-input.component.mjs +12 -3
  33. package/esm2022/lib/inputs/simple-input/simple-input.defaults.mjs +3 -3
  34. package/esm2022/lib/select/select.component.mjs +16 -8
  35. package/esm2022/lib/select/select.defaults.mjs +3 -3
  36. package/esm2022/lib/slide-toggle/slide-toggle.component.mjs +1 -1
  37. package/esm2022/lib/table-pagination/table-pagination.component.mjs +1 -1
  38. package/esm2022/public-api.mjs +3 -1
  39. package/fesm2022/ardium-ui-ui.mjs +315 -49
  40. package/fesm2022/ardium-ui-ui.mjs.map +1 -1
  41. package/lib/_internal/focusable-component.d.ts +2 -2
  42. package/lib/_internal/form-field-component.d.ts +29 -0
  43. package/lib/_internal/ngmodel-component.d.ts +1 -0
  44. package/lib/_internal/public-api.d.ts +3 -0
  45. package/lib/form-field/error/error.component.d.ts +6 -0
  46. package/lib/form-field/error/error.directive.d.ts +5 -0
  47. package/lib/form-field/form-field.component.d.ts +19 -0
  48. package/lib/form-field/form-field.defaults.d.ts +7 -0
  49. package/lib/form-field/form-field.module.d.ts +13 -0
  50. package/lib/form-field/hint/hint.component.d.ts +6 -0
  51. package/lib/form-field/hint/hint.directive.d.ts +8 -0
  52. package/lib/form-field/index.d.ts +7 -0
  53. package/lib/form-field/label/label.component.d.ts +8 -0
  54. package/lib/form-field-frame/form-field-frame.component.d.ts +2 -1
  55. package/lib/inputs/_simple-input-base.d.ts +3 -3
  56. package/lib/inputs/digit-input/digit-input.component.d.ts +6 -4
  57. package/lib/inputs/digit-input/digit-input.defaults.d.ts +2 -2
  58. package/lib/inputs/digit-input/digit-input.model.d.ts +4 -1
  59. package/lib/inputs/digit-input/digit-input.types.d.ts +1 -0
  60. package/lib/inputs/digit-input/digit-input.utils.d.ts +1 -0
  61. package/lib/inputs/hex-input/hex-input.component.d.ts +2 -2
  62. package/lib/inputs/hex-input/hex-input.defaults.d.ts +2 -2
  63. package/lib/inputs/number-input/number-input.component.d.ts +2 -2
  64. package/lib/inputs/number-input/number-input.defaults.d.ts +2 -2
  65. package/lib/inputs/password-input/password-input.component.d.ts +2 -2
  66. package/lib/inputs/password-input/password-input.defaults.d.ts +2 -2
  67. package/lib/select/select.component.d.ts +3 -4
  68. package/lib/select/select.defaults.d.ts +2 -2
  69. package/package.json +1 -1
  70. package/prebuilt-themes/default/buttons/button.css +8 -10
  71. package/prebuilt-themes/default/buttons/button.css.map +1 -1
  72. package/prebuilt-themes/default/buttons/fab.css +8 -10
  73. package/prebuilt-themes/default/buttons/fab.css.map +1 -1
  74. package/prebuilt-themes/default/buttons/icon-button.css +8 -10
  75. package/prebuilt-themes/default/buttons/icon-button.css.map +1 -1
  76. package/prebuilt-themes/default/chips.css.map +1 -1
  77. package/prebuilt-themes/default/core.css +1 -1
  78. package/prebuilt-themes/default/form-field-frame.css +16 -5
  79. package/prebuilt-themes/default/form-field-frame.css.map +1 -1
  80. package/prebuilt-themes/default/form-field.css +33 -0
  81. package/prebuilt-themes/default/form-field.css.map +1 -0
  82. package/prebuilt-themes/default/inputs/color-input.css +0 -1
  83. package/prebuilt-themes/default/inputs/color-input.css.map +1 -1
  84. package/prebuilt-themes/default/inputs/digit-input.css +61 -5
  85. package/prebuilt-themes/default/inputs/digit-input.css.map +1 -1
  86. package/prebuilt-themes/default/inputs/file-input.css +0 -1
  87. package/prebuilt-themes/default/inputs/file-input.css.map +1 -1
  88. package/prebuilt-themes/default/inputs/hex-input.css +0 -1
  89. package/prebuilt-themes/default/inputs/hex-input.css.map +1 -1
  90. package/prebuilt-themes/default/inputs/input.css +0 -1
  91. package/prebuilt-themes/default/inputs/input.css.map +1 -1
  92. package/prebuilt-themes/default/inputs/number-input.css +30 -18
  93. package/prebuilt-themes/default/inputs/number-input.css.map +1 -1
  94. package/prebuilt-themes/default/inputs/password-input.css +0 -1
  95. package/prebuilt-themes/default/inputs/password-input.css.map +1 -1
  96. package/prebuilt-themes/default/inputs/search-bar.css +0 -1
  97. package/prebuilt-themes/default/inputs/search-bar.css.map +1 -1
  98. package/prebuilt-themes/default/inputs/simple-input.css +0 -1
  99. package/prebuilt-themes/default/inputs/simple-input.css.map +1 -1
  100. package/prebuilt-themes/default/segment.css +15 -1
  101. package/prebuilt-themes/default/segment.css.map +1 -1
  102. package/public-api.d.ts +2 -0
  103. package/themes/default/_mixins.scss +81 -64
  104. package/themes/default/buttons/_button-mixins.scss +7 -12
  105. package/themes/default/core.scss +99 -99
  106. package/themes/default/form-field-frame.scss +75 -78
  107. package/themes/default/form-field.scss +39 -0
  108. package/themes/default/inputs/_shared.scss +50 -51
  109. package/themes/default/inputs/digit-input.scss +90 -56
  110. package/themes/default/inputs/number-input.scss +131 -121
@@ -1,56 +1,90 @@
1
- @use '../coloring' as CM;
2
- @use '../../variables' as ARD;
3
-
4
- ard-digit-input {
5
- font-family: 'Roboto', sans-serif;
6
- font-weight: 500;
7
- color: ARD.$text;
8
- }
9
-
10
- .ard-digit-input,
11
- .ard-digit-input__item,
12
- .ard-digit-input__input,
13
- .ard-digit-input__static {
14
- font: inherit;
15
- color: inherit;
16
- }
17
- .ard-digit-input {
18
- display: flex;
19
- gap: 0.5em;
20
-
21
- .ard-digit-input__item {
22
- height: max-content;
23
- display: flex;
24
-
25
- .ard-digit-input__input {
26
- width: 2.0625em;
27
- box-sizing: border-box;
28
- text-align: center;
29
- caret-color: ARD.$text3;
30
-
31
- &:not(.ard-digit-input__input-empty) {
32
- caret-color: transparent;
33
- }
34
- }
35
- .ard-digit-input__static {
36
- width: max-content;
37
- white-space: nowrap;
38
- }
39
- }
40
- &.ard-shape-square {
41
- .ard-digit-input__item {
42
- .ard-digit-input__input {
43
- height: 2.0625em;
44
- }
45
- }
46
- }
47
- &.ard-shape-rectangle {
48
- .ard-digit-input__item {
49
- .ard-digit-input__input {
50
- font-size: 1.2em;
51
- width: calc(2.0625em / 1.2);
52
- height: calc(2.0625em * 1.3 / 1.2);
53
- }
54
- }
55
- }
56
- }
1
+ @use '../coloring' as CM;
2
+ @use '../../variables' as ARD;
3
+ @use '../mixins' as defaultMixins;
4
+
5
+ ard-digit-input {
6
+ font-family: 'Roboto', sans-serif;
7
+ font-weight: 500;
8
+ color: ARD.$text;
9
+ }
10
+
11
+ .ard-digit-input,
12
+ .ard-digit-input__item,
13
+ .ard-digit-input__input,
14
+ .ard-digit-input__static {
15
+ font: inherit;
16
+ color: inherit;
17
+ }
18
+ .ard-digit-input {
19
+ @include defaultMixins.formAppearances();
20
+ display: flex;
21
+ gap: 0.375em;
22
+
23
+ .ard-digit-input__item {
24
+ height: max-content;
25
+ display: flex;
26
+ height: 2.0625em;
27
+ box-sizing: border-box;
28
+
29
+ &.ard-digit-input__item-with-input {
30
+ width: 2.0625em;
31
+ }
32
+ .ard-digit-input__input {
33
+ width: 100%;
34
+ height: 100%;
35
+ box-sizing: border-box;
36
+ text-align: center;
37
+ caret-color: ARD.$text3;
38
+ background: var(--ard-appearance-background);
39
+ border: var(--ard-appearance-border);
40
+ border-radius: var(--ard-variant-border-radius);
41
+ transition: border-color 0.15s ARD.$timing-fn, background-color 0.15s ARD.$timing-fn;
42
+
43
+ &::placeholder {
44
+ color: ARD.$text3;
45
+ opacity: 60%;
46
+ }
47
+
48
+ &:not(.ard-digit-input__input-empty) {
49
+ caret-color: transparent;
50
+ }
51
+ }
52
+ .ard-digit-input__static {
53
+ width: max-content;
54
+ white-space: nowrap;
55
+ display: flex;
56
+ align-items: center;
57
+ }
58
+ }
59
+ &.ard-shape-square {
60
+ .ard-digit-input__item {
61
+ height: 2.0625em;
62
+ }
63
+ }
64
+ &.ard-shape-rectangle {
65
+ .ard-digit-input__item {
66
+ height: 2.0625em * 1.3;
67
+
68
+ .ard-digit-input__input {
69
+ font-size: 1.2em;
70
+ }
71
+ }
72
+ }
73
+
74
+ &.ard-has-error {
75
+ .ard-digit-input__item .ard-digit-input__input {
76
+ background-color: ARD.$danger50;
77
+ border-color: ARD.$danger500;
78
+ }
79
+ }
80
+
81
+ &.ard-variant-rounded {
82
+ --ard-variant-border-radius: 0.25em;
83
+ }
84
+ &.ard-variant-pill {
85
+ --ard-variant-border-radius: 9999px;
86
+ }
87
+ &.ard-variant-sharp {
88
+ --ard-variant-border-radius: 0;
89
+ }
90
+ }
@@ -1,121 +1,131 @@
1
- @use './shared' as inputMixin;
2
- @use '../mixins' as defaultMixins;
3
- @use '../../variables' as ARD;
4
-
5
- .ard-number-input {
6
- @include inputMixin.genericInput();
7
- @include defaultMixins.formAppearances();
8
- gap: 0;
9
- width: 100%;
10
-
11
- .ard-input-container {
12
- height: 100%;
13
- max-width: 100%;
14
-
15
- & > input {
16
- width: 100%;
17
- }
18
- }
19
-
20
- .ard-quick-change-button {
21
- position: relative;
22
-
23
- .ard-button {
24
- height: 100%;
25
- aspect-ratio: 1;
26
- padding: 0;
27
- border-color: ARD.$border;
28
- display: flex;
29
- justify-content: center;
30
- margin: 0;
31
- }
32
- &.ard-disabled .ard-focus-overlay {
33
- opacity: 0;
34
- }
35
-
36
- &.decrement {
37
- left: 1px;
38
-
39
- .ard-button {
40
- border-top-right-radius: 0;
41
- border-bottom-right-radius: 0;
42
- }
43
- }
44
- &.increment {
45
- right: 1px;
46
-
47
- .ard-button {
48
- border-top-left-radius: 0;
49
- border-bottom-left-radius: 0;
50
- }
51
- }
52
- }
53
-
54
- //! variants
55
- &.ard-variant-rounded {
56
- border-radius: 8px;
57
-
58
- &.ard-quick-change-false {
59
- .ard-input-container {
60
- border-radius: 8px;
61
- }
62
- }
63
- }
64
- &.ard-variant-sharp {
65
- border-radius: 0;
66
- }
67
- &.ard-variant-pill {
68
- @include defaultMixins.formAppearances();
69
-
70
- border-radius: 999px;
71
-
72
- .ard-button {
73
- border-radius: 999px !important;
74
- height: 30px;
75
- width: 30px;
76
- margin: 0 2px;
77
- }
78
-
79
- &.ard-quick-change-false {
80
- .ard-input-container {
81
- border-radius: 999px;
82
- }
83
- }
84
- }
85
-
86
- //! variant-specific appearances
87
- &.ard-variant-rounded,
88
- &.ard-variant-sharp {
89
- &:not(.ard-appearance-filled) .ard-input-container {
90
- box-sizing: border-box;
91
- background: var(--ard-appearance-background);
92
- border: var(--ard-appearance-border);
93
- }
94
- &.ard-appearance-filled {
95
- background: var(--ard-appearance-background);
96
- border: var(--ard-appearance-border);
97
- }
98
- }
99
- &.ard-variant-pill {
100
- background: var(--ard-appearance-background);
101
- border: var(--ard-appearance-border);
102
- }
103
-
104
- //! compact
105
- &.ard-compact {
106
- font-size: 0.925rem;
107
- }
108
- }
109
-
110
- .ard-disabled {
111
- > .ard-number-input {
112
- pointer-events: none;
113
- opacity: 50%;
114
-
115
- .ard-button .ard-focus-overlay {
116
- opacity: 0;
117
- }
118
-
119
- background: ARD.$bg-f;
120
- }
121
- }
1
+ @use './shared' as inputMixin;
2
+ @use '../mixins' as defaultMixins;
3
+ @use '../../variables' as ARD;
4
+
5
+ ard-number-input {
6
+ width: 9.5rem;
7
+
8
+ &:not(:has(.ard-quick-change-button)) {
9
+ width: 6rem;
10
+ }
11
+ }
12
+
13
+ .ard-number-input {
14
+ @include inputMixin.genericInput();
15
+ @include defaultMixins.formAppearances();
16
+ min-height: 2.1875rem;
17
+ height: 2.1875rem;
18
+ gap: 0;
19
+ width: 100%;
20
+
21
+ .ard-input-container {
22
+ height: 100%;
23
+ max-width: 100%;
24
+
25
+ & > input {
26
+ width: 100%;
27
+ }
28
+ }
29
+
30
+ .ard-quick-change-button {
31
+ position: relative;
32
+
33
+ .ard-button {
34
+ height: 100%;
35
+ aspect-ratio: 1;
36
+ padding: 0;
37
+ border-color: var(--ard-appearance-border-color);
38
+ display: flex;
39
+ justify-content: center;
40
+ margin: 0;
41
+ }
42
+ &.ard-disabled .ard-focus-overlay {
43
+ opacity: 0;
44
+ }
45
+
46
+ &.decrement {
47
+ left: 1px;
48
+
49
+ .ard-button {
50
+ border-top-right-radius: 0;
51
+ border-bottom-right-radius: 0;
52
+ }
53
+ }
54
+ &.increment {
55
+ right: 1px;
56
+
57
+ .ard-button {
58
+ border-top-left-radius: 0;
59
+ border-bottom-left-radius: 0;
60
+ }
61
+ }
62
+ }
63
+
64
+ //! variants
65
+ &.ard-variant-rounded {
66
+ border-radius: 8px;
67
+
68
+ &.ard-quick-change-false {
69
+ .ard-input-container {
70
+ border-radius: 8px;
71
+ }
72
+ }
73
+ }
74
+ &.ard-variant-sharp {
75
+ border-radius: 0;
76
+ }
77
+ &.ard-variant-pill {
78
+ border-radius: 9999px;
79
+
80
+ .ard-button {
81
+ border-radius: 9999px !important;
82
+ height: 30px;
83
+ width: 30px;
84
+ margin: 0 2px;
85
+ }
86
+
87
+ &.ard-quick-change-false {
88
+ .ard-input-container {
89
+ border-radius: 9999px;
90
+ }
91
+ }
92
+ }
93
+
94
+ //! variant-specific appearances
95
+ &.ard-variant-rounded,
96
+ &.ard-variant-sharp {
97
+ &:not(.ard-appearance-filled) .ard-input-container {
98
+ box-sizing: border-box;
99
+ background: var(--ard-appearance-background);
100
+ border: var(--ard-appearance-border);
101
+ }
102
+ &.ard-appearance-filled {
103
+ background: var(--ard-appearance-background);
104
+ border: var(--ard-appearance-border);
105
+ }
106
+ }
107
+ &.ard-variant-pill {
108
+ background: var(--ard-appearance-background);
109
+ border: var(--ard-appearance-border);
110
+ }
111
+
112
+ //! compact
113
+ &.ard-compact {
114
+ min-height: 1.6875rem;
115
+ height: 1.6875rem;
116
+ font-size: 0.925rem;
117
+ }
118
+ }
119
+
120
+ .ard-disabled {
121
+ > .ard-number-input {
122
+ pointer-events: none;
123
+ opacity: 50%;
124
+
125
+ .ard-button .ard-focus-overlay {
126
+ opacity: 0;
127
+ }
128
+
129
+ background: ARD.$bg-f;
130
+ }
131
+ }