@ardium-ui/ui 3.2.7 → 3.3.0-alpha.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 (111) hide show
  1. package/esm2022/lib/_internal/boolean-component.mjs +1 -1
  2. package/esm2022/lib/_internal/focusable-component.mjs +8 -6
  3. package/esm2022/lib/_internal/form-field-component.mjs +57 -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/_internal/selectable-list-component.mjs +6 -6
  8. package/esm2022/lib/checkbox/checkbox.component.mjs +1 -1
  9. package/esm2022/lib/file-inputs/file-input/file-input.component.mjs +3 -3
  10. package/esm2022/lib/form-field/error/error.component.mjs +17 -0
  11. package/esm2022/lib/form-field/error/error.directive.mjs +17 -0
  12. package/esm2022/lib/form-field/form-field.component.mjs +34 -0
  13. package/esm2022/lib/form-field/form-field.defaults.mjs +15 -0
  14. package/esm2022/lib/form-field/form-field.module.mjs +44 -0
  15. package/esm2022/lib/form-field/hint/hint.component.mjs +17 -0
  16. package/esm2022/lib/form-field/hint/hint.directive.mjs +30 -0
  17. package/esm2022/lib/form-field/horizontal-form-field.component.mjs +34 -0
  18. package/esm2022/lib/form-field/index.mjs +9 -0
  19. package/esm2022/lib/form-field/label/label.component.mjs +21 -0
  20. package/esm2022/lib/form-field-frame/form-field-frame.component.mjs +14 -7
  21. package/esm2022/lib/inputs/_simple-input-base.mjs +4 -4
  22. package/esm2022/lib/inputs/digit-input/digit-input.component.mjs +28 -11
  23. package/esm2022/lib/inputs/digit-input/digit-input.defaults.mjs +3 -3
  24. package/esm2022/lib/inputs/digit-input/digit-input.model.mjs +5 -3
  25. package/esm2022/lib/inputs/digit-input/digit-input.types.mjs +1 -1
  26. package/esm2022/lib/inputs/digit-input/digit-input.utils.mjs +1 -1
  27. package/esm2022/lib/inputs/hex-input/hex-input.component.mjs +13 -5
  28. package/esm2022/lib/inputs/hex-input/hex-input.defaults.mjs +3 -3
  29. package/esm2022/lib/inputs/input/input.component.mjs +12 -3
  30. package/esm2022/lib/inputs/number-input/number-input.component.mjs +15 -7
  31. package/esm2022/lib/inputs/number-input/number-input.defaults.mjs +3 -3
  32. package/esm2022/lib/inputs/password-input/password-input.component.mjs +15 -5
  33. package/esm2022/lib/inputs/password-input/password-input.defaults.mjs +3 -3
  34. package/esm2022/lib/inputs/simple-input/simple-input.component.mjs +12 -3
  35. package/esm2022/lib/inputs/simple-input/simple-input.defaults.mjs +3 -3
  36. package/esm2022/lib/segment/segment.component.mjs +3 -3
  37. package/esm2022/lib/select/select.component.mjs +16 -8
  38. package/esm2022/lib/select/select.defaults.mjs +3 -3
  39. package/esm2022/lib/slide-toggle/slide-toggle.component.mjs +1 -1
  40. package/esm2022/lib/table-pagination/table-pagination.component.mjs +1 -1
  41. package/esm2022/public-api.mjs +3 -1
  42. package/fesm2022/ardium-ui-ui.mjs +383 -65
  43. package/fesm2022/ardium-ui-ui.mjs.map +1 -1
  44. package/lib/_internal/focusable-component.d.ts +4 -3
  45. package/lib/_internal/form-field-component.d.ts +30 -0
  46. package/lib/_internal/ngmodel-component.d.ts +1 -0
  47. package/lib/_internal/public-api.d.ts +3 -0
  48. package/lib/form-field/error/error.component.d.ts +6 -0
  49. package/lib/form-field/error/error.directive.d.ts +5 -0
  50. package/lib/form-field/form-field.component.d.ts +20 -0
  51. package/lib/form-field/form-field.defaults.d.ts +8 -0
  52. package/lib/form-field/form-field.module.d.ts +14 -0
  53. package/lib/form-field/hint/hint.component.d.ts +6 -0
  54. package/lib/form-field/hint/hint.directive.d.ts +8 -0
  55. package/lib/form-field/horizontal-form-field.component.d.ts +20 -0
  56. package/lib/form-field/index.d.ts +8 -0
  57. package/lib/form-field/label/label.component.d.ts +8 -0
  58. package/lib/form-field-frame/form-field-frame.component.d.ts +4 -2
  59. package/lib/inputs/_simple-input-base.d.ts +3 -3
  60. package/lib/inputs/digit-input/digit-input.component.d.ts +6 -4
  61. package/lib/inputs/digit-input/digit-input.defaults.d.ts +2 -2
  62. package/lib/inputs/digit-input/digit-input.model.d.ts +4 -1
  63. package/lib/inputs/digit-input/digit-input.types.d.ts +1 -0
  64. package/lib/inputs/digit-input/digit-input.utils.d.ts +1 -0
  65. package/lib/inputs/hex-input/hex-input.component.d.ts +2 -2
  66. package/lib/inputs/hex-input/hex-input.defaults.d.ts +2 -2
  67. package/lib/inputs/number-input/number-input.component.d.ts +2 -2
  68. package/lib/inputs/number-input/number-input.defaults.d.ts +2 -2
  69. package/lib/inputs/password-input/password-input.component.d.ts +2 -2
  70. package/lib/inputs/password-input/password-input.defaults.d.ts +2 -2
  71. package/lib/select/select.component.d.ts +3 -4
  72. package/lib/select/select.defaults.d.ts +2 -2
  73. package/package.json +1 -1
  74. package/prebuilt-themes/default/chips.css.map +1 -1
  75. package/prebuilt-themes/default/core.css +3 -1
  76. package/prebuilt-themes/default/core.css.map +1 -1
  77. package/prebuilt-themes/default/form-field-frame.css +23 -6
  78. package/prebuilt-themes/default/form-field-frame.css.map +1 -1
  79. package/prebuilt-themes/default/form-field.css +90 -0
  80. package/prebuilt-themes/default/form-field.css.map +1 -0
  81. package/prebuilt-themes/default/inputs/color-input.css +0 -1
  82. package/prebuilt-themes/default/inputs/color-input.css.map +1 -1
  83. package/prebuilt-themes/default/inputs/digit-input.css +67 -5
  84. package/prebuilt-themes/default/inputs/digit-input.css.map +1 -1
  85. package/prebuilt-themes/default/inputs/file-input.css +0 -6
  86. package/prebuilt-themes/default/inputs/file-input.css.map +1 -1
  87. package/prebuilt-themes/default/inputs/hex-input.css +0 -1
  88. package/prebuilt-themes/default/inputs/hex-input.css.map +1 -1
  89. package/prebuilt-themes/default/inputs/input.css +0 -6
  90. package/prebuilt-themes/default/inputs/input.css.map +1 -1
  91. package/prebuilt-themes/default/inputs/number-input.css +33 -18
  92. package/prebuilt-themes/default/inputs/number-input.css.map +1 -1
  93. package/prebuilt-themes/default/inputs/password-input.css +0 -1
  94. package/prebuilt-themes/default/inputs/password-input.css.map +1 -1
  95. package/prebuilt-themes/default/inputs/search-bar.css +0 -1
  96. package/prebuilt-themes/default/inputs/search-bar.css.map +1 -1
  97. package/prebuilt-themes/default/inputs/simple-input.css +0 -6
  98. package/prebuilt-themes/default/inputs/simple-input.css.map +1 -1
  99. package/prebuilt-themes/default/segment.css +18 -1
  100. package/prebuilt-themes/default/segment.css.map +1 -1
  101. package/public-api.d.ts +2 -0
  102. package/themes/default/_mixins.scss +83 -64
  103. package/themes/default/core.scss +102 -99
  104. package/themes/default/form-field-frame.scss +79 -78
  105. package/themes/default/form-field.scss +92 -0
  106. package/themes/default/inputs/_shared.scss +50 -51
  107. package/themes/default/inputs/digit-input.scss +95 -56
  108. package/themes/default/inputs/file-input.scss +0 -6
  109. package/themes/default/inputs/input.scss +1 -7
  110. package/themes/default/inputs/number-input.scss +131 -121
  111. package/themes/default/inputs/simple-input.scss +1 -8
@@ -1,51 +1,50 @@
1
- @use '../../variables' as ARD;
2
-
3
- /**
4
- * Should be applied to the first element in the component's template.
5
- */
6
- @mixin genericInput() {
7
- position: relative;
8
- font-family: 'Roboto', sans-serif;
9
- display: flex;
10
- align-items: center;
11
- justify-content: stretch;
12
- gap: 0.625em;
13
- cursor: text;
14
- box-sizing: border-box;
15
- height: 2.0625em;
16
- font-size: 1rem;
17
- line-height: 1.25em;
18
-
19
- .ard-input-container {
20
- flex-grow: 1;
21
- text-size-adjust: 100%;
22
- display: flex;
23
- align-items: center;
24
-
25
- .ard-placeholder {
26
- font: inherit;
27
- opacity: 60%;
28
- white-space: nowrap;
29
- overflow: hidden;
30
- text-overflow: ellipsis;
31
- max-width: 100%;
32
- pointer-events: none;
33
- }
34
-
35
- input {
36
- border: none;
37
- background: transparent;
38
- outline: none;
39
- font: inherit;
40
- padding: 0;
41
- display: block;
42
- width: 100%;
43
- }
44
- }
45
- //! compact
46
- &.ard-compact {
47
- height: 1.5625em;
48
- font-size: 0.85em;
49
- line-height: 1;
50
- }
51
- }
1
+ @use '../../variables' as ARD;
2
+
3
+ /**
4
+ * Should be applied to the first element in the component's template.
5
+ */
6
+ @mixin genericInput() {
7
+ position: relative;
8
+ font-family: 'Roboto', sans-serif;
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: stretch;
12
+ gap: 0.625em;
13
+ cursor: text;
14
+ box-sizing: border-box;
15
+ font-size: 1rem;
16
+ line-height: 1.25em;
17
+
18
+ .ard-input-container {
19
+ flex-grow: 1;
20
+ text-size-adjust: 100%;
21
+ display: flex;
22
+ align-items: center;
23
+
24
+ .ard-placeholder {
25
+ font: inherit;
26
+ opacity: 60%;
27
+ white-space: nowrap;
28
+ overflow: hidden;
29
+ text-overflow: ellipsis;
30
+ max-width: 100%;
31
+ pointer-events: none;
32
+ }
33
+
34
+ input {
35
+ border: none;
36
+ background: transparent;
37
+ outline: none;
38
+ font: inherit;
39
+ padding: 0;
40
+ display: block;
41
+ width: 100%;
42
+ }
43
+ }
44
+ //! compact
45
+ &.ard-compact {
46
+ height: 1.5625em;
47
+ font-size: 0.85em;
48
+ line-height: 1;
49
+ }
50
+ }
@@ -1,56 +1,95 @@
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-is-success {
75
+ .ard-digit-input__item .ard-digit-input__input {
76
+ border-color: ARD.$success500;
77
+ }
78
+ }
79
+ &.ard-has-error {
80
+ .ard-digit-input__item .ard-digit-input__input {
81
+ background-color: ARD.$danger50;
82
+ border-color: ARD.$danger500;
83
+ }
84
+ }
85
+
86
+ &.ard-variant-rounded {
87
+ --ard-variant-border-radius: 0.25em;
88
+ }
89
+ &.ard-variant-pill {
90
+ --ard-variant-border-radius: 9999px;
91
+ }
92
+ &.ard-variant-sharp {
93
+ --ard-variant-border-radius: 0;
94
+ }
95
+ }
@@ -77,9 +77,3 @@
77
77
 
78
78
  @include CB.clearButton();
79
79
  }
80
- .ard-disabled {
81
- .ard-input {
82
- pointer-events: none;
83
- opacity: 50%;
84
- }
85
- }
@@ -43,10 +43,4 @@
43
43
  font-size: 0.9rem;
44
44
  }
45
45
  }
46
- }
47
- .ard-disabled {
48
- .ard-input {
49
- pointer-events: none;
50
- opacity: 50%;
51
- }
52
- }
46
+ }
@@ -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
+ }
@@ -9,11 +9,4 @@
9
9
  max-width: 100%;
10
10
 
11
11
  @include CB.clearButton();
12
- }
13
- //! disabled state
14
- .ard-disabled {
15
- .ard-simple-input {
16
- pointer-events: none;
17
- opacity: 50%;
18
- }
19
- }
12
+ }