@broxus/react-uikit 0.4.8 → 0.5.1

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/dist/cjs/components/Article/Article.d.ts +4 -1
  2. package/dist/cjs/components/Article/Article.js +11 -5
  3. package/dist/cjs/components/Article/Meta.d.ts +6 -1
  4. package/dist/cjs/components/Article/Meta.js +7 -6
  5. package/dist/cjs/components/Article/Title.d.ts +6 -1
  6. package/dist/cjs/components/Article/Title.js +7 -6
  7. package/dist/cjs/components/Article/context.d.ts +5 -0
  8. package/dist/cjs/components/Article/context.js +32 -0
  9. package/dist/cjs/components/Article/index.d.ts +1 -1
  10. package/dist/cjs/components/Card/Badge.d.ts +6 -1
  11. package/dist/cjs/components/Card/Badge.js +6 -5
  12. package/dist/cjs/components/Card/Body.d.ts +6 -1
  13. package/dist/cjs/components/Card/Body.js +7 -6
  14. package/dist/cjs/components/Card/Card.js +7 -2
  15. package/dist/cjs/components/Card/Footer.d.ts +6 -1
  16. package/dist/cjs/components/Card/Footer.js +7 -6
  17. package/dist/cjs/components/Card/Header.d.ts +6 -1
  18. package/dist/cjs/components/Card/Header.js +7 -6
  19. package/dist/cjs/components/Card/Media.d.ts +6 -1
  20. package/dist/cjs/components/Card/Media.js +6 -5
  21. package/dist/cjs/components/Card/Title.d.ts +6 -1
  22. package/dist/cjs/components/Card/Title.js +7 -6
  23. package/dist/cjs/components/Card/context.d.ts +5 -0
  24. package/dist/cjs/components/Card/context.js +32 -0
  25. package/dist/cjs/components/Flex/Flex.js +7 -2
  26. package/dist/cjs/components/Flex/Item.js +2 -2
  27. package/dist/cjs/components/Flex/context.d.ts +5 -0
  28. package/dist/cjs/components/Flex/context.js +32 -0
  29. package/dist/cjs/components/Form/Controls.js +2 -2
  30. package/dist/cjs/components/Form/ControlsText.js +2 -2
  31. package/dist/cjs/components/Form/Form.d.ts +3 -1
  32. package/dist/cjs/components/Form/Form.js +10 -4
  33. package/dist/cjs/components/Form/context.d.ts +5 -0
  34. package/dist/cjs/components/Form/context.js +32 -0
  35. package/dist/cjs/components/Form/index.d.ts +1 -1
  36. package/dist/cjs/components/List/List.d.ts +1 -1
  37. package/dist/cjs/components/List/List.js +3 -2
  38. package/dist/cjs/components/List/index.d.ts +1 -1
  39. package/dist/cjs/components/Subnav/Item.d.ts +7 -0
  40. package/dist/cjs/components/Subnav/Item.js +34 -0
  41. package/dist/cjs/components/Subnav/Subnav.d.ts +6 -0
  42. package/dist/cjs/components/{ComponentProvider/index.js → Subnav/Subnav.js} +12 -20
  43. package/dist/cjs/components/Subnav/index.d.ts +9 -0
  44. package/dist/cjs/components/Subnav/index.js +8 -0
  45. package/dist/cjs/components/Subnav/index.scss +278 -0
  46. package/dist/cjs/components/Text/index.d.ts +1 -1
  47. package/dist/cjs/components/Text/index.js +1 -1
  48. package/dist/cjs/index.d.ts +1 -1
  49. package/dist/cjs/index.js +1 -1
  50. package/dist/cjs/styles/_import.components.scss +1 -1
  51. package/dist/cjs/styles/_import.scss +1 -1
  52. package/dist/cjs/styles/subnav.scss +1 -258
  53. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  54. package/dist/esm/components/Article/Article.d.ts +4 -1
  55. package/dist/esm/components/Article/Article.js +9 -4
  56. package/dist/esm/components/Article/Meta.d.ts +6 -1
  57. package/dist/esm/components/Article/Meta.js +5 -5
  58. package/dist/esm/components/Article/Title.d.ts +6 -1
  59. package/dist/esm/components/Article/Title.js +5 -5
  60. package/dist/esm/components/Article/context.d.ts +5 -0
  61. package/dist/esm/components/Article/context.js +6 -0
  62. package/dist/esm/components/Article/index.d.ts +1 -1
  63. package/dist/esm/components/Card/Badge.d.ts +6 -1
  64. package/dist/esm/components/Card/Badge.js +4 -4
  65. package/dist/esm/components/Card/Body.d.ts +6 -1
  66. package/dist/esm/components/Card/Body.js +5 -5
  67. package/dist/esm/components/Card/Card.js +7 -2
  68. package/dist/esm/components/Card/Footer.d.ts +6 -1
  69. package/dist/esm/components/Card/Footer.js +5 -5
  70. package/dist/esm/components/Card/Header.d.ts +6 -1
  71. package/dist/esm/components/Card/Header.js +5 -5
  72. package/dist/esm/components/Card/Media.d.ts +6 -1
  73. package/dist/esm/components/Card/Media.js +4 -4
  74. package/dist/esm/components/Card/Title.d.ts +6 -1
  75. package/dist/esm/components/Card/Title.js +5 -5
  76. package/dist/esm/components/Card/context.d.ts +5 -0
  77. package/dist/esm/components/Card/context.js +6 -0
  78. package/dist/esm/components/Flex/Flex.js +7 -2
  79. package/dist/esm/components/Flex/Item.js +2 -2
  80. package/dist/esm/components/Flex/context.d.ts +5 -0
  81. package/dist/esm/components/Flex/context.js +6 -0
  82. package/dist/esm/components/Form/Controls.js +2 -2
  83. package/dist/esm/components/Form/ControlsText.js +2 -2
  84. package/dist/esm/components/Form/Form.d.ts +3 -1
  85. package/dist/esm/components/Form/Form.js +9 -4
  86. package/dist/esm/components/Form/context.d.ts +5 -0
  87. package/dist/esm/components/Form/context.js +6 -0
  88. package/dist/esm/components/Form/index.d.ts +1 -1
  89. package/dist/esm/components/List/List.d.ts +1 -1
  90. package/dist/esm/components/List/List.js +2 -2
  91. package/dist/esm/components/List/index.d.ts +1 -1
  92. package/dist/esm/components/Subnav/Item.d.ts +7 -0
  93. package/dist/esm/components/Subnav/Item.js +7 -0
  94. package/dist/esm/components/Subnav/Subnav.d.ts +6 -0
  95. package/dist/esm/components/Subnav/Subnav.js +11 -0
  96. package/dist/esm/components/Subnav/index.d.ts +9 -0
  97. package/dist/esm/components/Subnav/index.js +5 -0
  98. package/dist/esm/components/Subnav/index.scss +278 -0
  99. package/dist/esm/components/Text/index.d.ts +1 -1
  100. package/dist/esm/components/Text/index.js +1 -1
  101. package/dist/esm/index.d.ts +1 -1
  102. package/dist/esm/index.js +1 -1
  103. package/dist/esm/styles/_import.components.scss +1 -1
  104. package/dist/esm/styles/_import.scss +1 -1
  105. package/dist/esm/styles/subnav.scss +1 -258
  106. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  107. package/package.json +7 -7
  108. package/dist/cjs/components/ComponentProvider/index.d.ts +0 -11
  109. package/dist/esm/components/ComponentProvider/index.d.ts +0 -11
  110. package/dist/esm/components/ComponentProvider/index.js +0 -21
@@ -1,258 +1 @@
1
- // Name: Subnav
2
- // Description: Component to create a sub navigation
3
- //
4
- // Component: `uk-subnav`
5
- //
6
- // Modifiers: `uk-subnav-divider`
7
- // `uk-subnav-pill`
8
- //
9
- // States: `uk-active`
10
- // `uk-first-column`
11
- //
12
- // ========================================================================
13
-
14
-
15
- // Variables
16
- // ========================================================================
17
-
18
- @import 'variables.scss';
19
-
20
-
21
- /* ========================================================================
22
- Component: Subnav
23
- ========================================================================== */
24
-
25
- /*
26
- * 1. Allow items to wrap into the next line
27
- * 2. Center items vertically if they have a different height
28
- * 3. Gutter
29
- * 4. Reset list
30
- */
31
-
32
- .uk-subnav {
33
- /* 2 */
34
- align-items: center;
35
- display: flex;
36
-
37
- /* 1 */
38
- flex-wrap: wrap;
39
- list-style: none;
40
-
41
- /* 3 */
42
- margin-left: calc(var(--subnav-margin-horizontal) * -1);
43
-
44
- /* 4 */
45
- padding: 0;
46
- @if mixin-exists(hook-subnav) {
47
- @include hook-subnav;
48
- }
49
- }
50
-
51
- /*
52
- * 1. Space is allocated solely based on content dimensions: 0 0 auto
53
- * 2. Gutter
54
- * 3. Create position context for dropdowns
55
- */
56
-
57
- .uk-subnav > * {
58
- /* 1 */
59
- flex: none;
60
-
61
- /* 2 */
62
- padding-left: var(--subnav-margin-horizontal);
63
-
64
- /* 3 */
65
- position: relative;
66
- }
67
-
68
-
69
- /* Items
70
- ========================================================================== */
71
-
72
- /*
73
- * Items must target `a` elements to exclude other elements (e.g. dropdowns)
74
- * Using `:first-child` instead of `a` to support `span` elements for text
75
- * 1. Center content vertically, e.g. an icon
76
- * 2. Imitate white space gap when using flexbox
77
- * 3. Style
78
- */
79
-
80
- .uk-subnav > * > :first-child {
81
- align-items: center;
82
-
83
- /* 3 */
84
- color: var(--subnav-item-color);
85
-
86
- /* 2 */
87
- column-gap: 0.25em;
88
-
89
- /* 1 */
90
- display: flex;
91
- @if mixin-exists(hook-subnav-item) {
92
- @include hook-subnav-item;
93
- }
94
- }
95
-
96
- /* Hover + Focus */
97
- .uk-subnav > * > a:hover,
98
- .uk-subnav > * > a:focus {
99
- color: var(--subnav-item-hover-color);
100
- outline: none;
101
- text-decoration: var(--subnav-item-hover-text-decoration);
102
- @if mixin-exists(hook-subnav-item-hover) {
103
- @include hook-subnav-item-hover;
104
- }
105
- }
106
-
107
- /* Active */
108
- .uk-subnav > .uk-active > a {
109
- color: var(--subnav-item-active-color);
110
- @if mixin-exists(hook-subnav-item-active) {
111
- @include hook-subnav-item-active;
112
- }
113
- }
114
-
115
-
116
- /* Divider modifier
117
- ========================================================================== */
118
-
119
- /*
120
- * Set gutter
121
- */
122
-
123
- .uk-subnav-divider {
124
- margin-left: calc((var(--subnav-divider-margin-horizontal) * 2 + var(--subnav-divider-border-width)) * -1);
125
- }
126
-
127
- /*
128
- * Align items and divider vertically
129
- */
130
-
131
- .uk-subnav-divider > * {
132
- align-items: center;
133
- display: flex;
134
- }
135
-
136
- /*
137
- * Divider
138
- * 1. `nth-child` makes it also work without JS if it's only one row
139
- */
140
-
141
- .uk-subnav-divider > ::before {
142
- border-left: var(--subnav-divider-border-width) solid transparent;
143
- content: '';
144
- height: var(--subnav-divider-border-height);
145
- margin-left: calc(var(--subnav-divider-margin-horizontal) - var(subnav-margin-horizontal));
146
- margin-right: var(--subnav-divider-margin-horizontal);
147
- }
148
-
149
- /* 1 */
150
- .uk-subnav-divider > :nth-child(n+2):not(.uk-first-column)::before {
151
- border-left-color: var(--subnav-divider-border);
152
- @if mixin-exists(hook-subnav-divider) {
153
- @include hook-subnav-divider;
154
- }
155
- }
156
-
157
-
158
- /* Pill modifier
159
- ========================================================================== */
160
-
161
- .uk-subnav-pill > * > :first-child {
162
- background: var(--subnav-pill-item-background);
163
- color: var(--subnav-pill-item-color);
164
- padding: var(--subnav-pill-item-padding-vertical) var(--subnav-pill-item-padding-horizontal);
165
- @if mixin-exists(hook-subnav-pill-item) {
166
- @include hook-subnav-pill-item;
167
- }
168
- }
169
-
170
- /* Hover + Focus */
171
- .uk-subnav-pill > * > a:hover,
172
- .uk-subnav-pill > * > a:focus {
173
- background-color: var(--subnav-pill-item-hover-background);
174
- color: var(--subnav-pill-item-hover-color);
175
- @if mixin-exists(hook-subnav-pill-item-hover) {
176
- @include hook-subnav-pill-item-hover;
177
- }
178
- }
179
-
180
- /* OnClick */
181
- .uk-subnav-pill > * > a:active {
182
- background-color: var(--subnav-pill-item-onclick-background);
183
- color: var(--subnav-pill-item-onclick-color);
184
- @if mixin-exists(hook-subnav-pill-item-onclick) {
185
- @include hook-subnav-pill-item-onclick;
186
- }
187
- }
188
-
189
- /* Active */
190
- .uk-subnav-pill > .uk-active > a {
191
- background-color: var(--subnav-pill-item-active-background);
192
- color: var(--subnav-pill-item-active-color);
193
- @if mixin-exists(hook-subnav-pill-item-active) {
194
- @include hook-subnav-pill-item-active;
195
- }
196
- }
197
-
198
-
199
- /* Disabled
200
- * The same for all style modifiers
201
- ========================================================================== */
202
-
203
- .uk-subnav > .uk-disabled > a {
204
- color: var(--subnav-item-disabled-color);
205
- @if mixin-exists(hook-subnav-item-disabled) {
206
- @include hook-subnav-item-disabled;
207
- }
208
- }
209
-
210
-
211
- // Hooks
212
- // ========================================================================
213
-
214
- @if mixin-exists(hook-subnav-misc) {
215
- @include hook-subnav-misc;
216
- }
217
-
218
-
219
- // Vars
220
- // ========================================================================
221
-
222
- :root {
223
- --subnav-margin-horizontal: #{$subnav-margin-horizontal};
224
- --subnav-item-color: var(--global-muted-color);
225
- --subnav-item-hover-color: var(--global-color);
226
- --subnav-item-hover-text-decoration: #{$subnav-item-hover-text-decoration};
227
- --subnav-item-active-color: var(--global-emphasis-color);
228
- --subnav-divider-margin-horizontal: #{$subnav-margin-horizontal};
229
- --subnav-divider-border-height: #{$subnav-divider-border-height};
230
- --subnav-divider-border-width: var(--global-border-width);
231
- --subnav-divider-border: var(--global-border);
232
- --subnav-pill-item-padding-vertical: #{$subnav-pill-item-padding-vertical};
233
- --subnav-pill-item-padding-horizontal: #{$subnav-pill-item-padding-horizontal};
234
- --subnav-pill-item-background: #{$subnav-pill-item-background};
235
- --subnav-pill-item-color: #{$subnav-item-color};
236
- --subnav-pill-item-hover-background: var(--global-muted-background);
237
- --subnav-pill-item-hover-color: var(--global-color);
238
- --subnav-pill-item-onclick-background: #{$subnav-pill-item-hover-background};
239
- --subnav-pill-item-onclick-color: #{$subnav-pill-item-hover-color};
240
- --subnav-pill-item-active-background: var(--global-primary-background);
241
- --subnav-pill-item-active-color: var(--global-inverse-color);
242
- --subnav-item-disabled-color: var(--global-muted-color);
243
-
244
- // Inverse
245
- --inverse-subnav-item-color: var(--inverse-global-muted-color);
246
- --inverse-subnav-item-hover-color: var(--inverse-global-color);
247
- --inverse-subnav-item-active-color: var(--inverse-global-emphasis-color);
248
- --inverse-subnav-divider-border: var(--inverse-global-border);
249
- --inverse-subnav-pill-item-background: #{$inverse-subnav-pill-item-background};
250
- --inverse-subnav-pill-item-color: var(--inverse-global-muted-color);
251
- --inverse-subnav-pill-item-hover-background: var(--inverse-global-muted-background);
252
- --inverse-subnav-pill-item-hover-color: var(--inverse-global-color);
253
- --inverse-subnav-pill-item-onclick-background: #{$inverse-subnav-pill-item-hover-background};
254
- --inverse-subnav-pill-item-onclick-color: #{$inverse-subnav-pill-item-hover-color};
255
- --inverse-subnav-pill-item-active-background: var(--inverse-global-primary-background);
256
- --inverse-subnav-pill-item-active-color: var(--inverse-global-inverse-color);
257
- --inverse-subnav-item-disabled-color: var(--inverse-global-muted-color);
258
- }
1
+ @import '../components/Subnav/index.scss';