@broxus/react-uikit 0.14.0 → 0.15.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 (155) hide show
  1. package/dist/cjs/components/Accordion/Accordion.js +1 -2
  2. package/dist/cjs/components/Accordion/Item.js +1 -2
  3. package/dist/cjs/components/Align/Align.js +1 -2
  4. package/dist/cjs/components/Align/Left.js +1 -2
  5. package/dist/cjs/components/Align/Right.js +1 -2
  6. package/dist/cjs/components/Article/Article.js +1 -2
  7. package/dist/cjs/components/Article/Meta.js +1 -2
  8. package/dist/cjs/components/Article/Title.js +1 -2
  9. package/dist/cjs/components/Badge/index.js +1 -2
  10. package/dist/cjs/components/Breadcrumb/Breadcrumb.js +1 -2
  11. package/dist/cjs/components/Breadcrumb/Item.js +1 -2
  12. package/dist/cjs/components/Button/Group.js +1 -2
  13. package/dist/cjs/components/Button/index.scss +42 -2
  14. package/dist/cjs/components/Card/Badge.js +1 -2
  15. package/dist/cjs/components/Card/Body.js +1 -2
  16. package/dist/cjs/components/Card/Card.d.ts +1 -1
  17. package/dist/cjs/components/Card/Card.js +1 -2
  18. package/dist/cjs/components/Card/Footer.js +1 -2
  19. package/dist/cjs/components/Card/Header.js +1 -2
  20. package/dist/cjs/components/Card/Media.js +1 -2
  21. package/dist/cjs/components/Card/Title.js +1 -2
  22. package/dist/cjs/components/Card/index.scss +29 -0
  23. package/dist/cjs/components/Close/index.js +1 -2
  24. package/dist/cjs/components/ConfigProvider/index.d.ts +1 -1
  25. package/dist/cjs/components/ConfigProvider/index.js +3 -3
  26. package/dist/cjs/components/Container/index.d.ts +1 -1
  27. package/dist/cjs/components/Control/Checkbox/CheckboxGroupContext.js +2 -2
  28. package/dist/cjs/components/Control/Checkbox/index.d.ts +2 -2
  29. package/dist/cjs/components/Control/Input/useInput.js +2 -3
  30. package/dist/cjs/components/Control/Radio/RadioGroupContext.js +2 -2
  31. package/dist/cjs/components/Control/Radio/index.d.ts +2 -2
  32. package/dist/cjs/components/Control/Radio/index.scss +1 -1
  33. package/dist/cjs/components/Control/Select/index.scss +1 -3
  34. package/dist/cjs/components/Cover/index.js +1 -2
  35. package/dist/cjs/components/DescriptionList/Description.js +1 -2
  36. package/dist/cjs/components/DescriptionList/DescriptionList.js +1 -2
  37. package/dist/cjs/components/DescriptionList/Term.js +1 -2
  38. package/dist/cjs/components/Divider/index.js +1 -2
  39. package/dist/cjs/components/Divider/index.scss +1 -1
  40. package/dist/cjs/components/Dotnav/Dotnav.js +1 -2
  41. package/dist/cjs/components/Dotnav/Item.js +1 -2
  42. package/dist/cjs/components/Dropdown/index.scss +1 -0
  43. package/dist/cjs/components/Flex/Flex.js +1 -2
  44. package/dist/cjs/components/Flex/Item.js +1 -2
  45. package/dist/cjs/components/Form/Controls.js +1 -2
  46. package/dist/cjs/components/Form/ControlsText.js +1 -2
  47. package/dist/cjs/components/Form/Fieldset.js +1 -2
  48. package/dist/cjs/components/Form/Form.js +1 -2
  49. package/dist/cjs/components/Form/Label.js +1 -2
  50. package/dist/cjs/components/Form/Legend.js +1 -2
  51. package/dist/cjs/components/Grid/index.js +1 -2
  52. package/dist/cjs/components/Heading/index.js +1 -2
  53. package/dist/cjs/components/Icon/Button.js +1 -2
  54. package/dist/cjs/components/Icon/Icon.js +1 -2
  55. package/dist/cjs/components/Icon/Link.js +1 -2
  56. package/dist/cjs/components/Icon/get-size.js +1 -2
  57. package/dist/cjs/components/Iconnav/Iconnav.js +1 -2
  58. package/dist/cjs/components/Iconnav/Item.js +1 -2
  59. package/dist/cjs/components/Inverse/index.d.ts +21 -0
  60. package/dist/cjs/components/Inverse/index.js +78 -0
  61. package/dist/cjs/components/Label/index.js +1 -2
  62. package/dist/cjs/components/List/Item.js +1 -2
  63. package/dist/cjs/components/List/List.js +1 -2
  64. package/dist/cjs/components/Modal/Modal.js +1 -2
  65. package/dist/cjs/components/Nav/Divider.js +1 -2
  66. package/dist/cjs/components/Nav/Group/InternalNavItemGroup.js +1 -2
  67. package/dist/cjs/components/Nav/Header.js +1 -2
  68. package/dist/cjs/components/Nav/Item/InternalNavItem.js +1 -2
  69. package/dist/cjs/components/Nav/Sub/InlineSubNavList.js +1 -2
  70. package/dist/cjs/components/Nav/Sub/PopupTrigger.js +1 -2
  71. package/dist/cjs/components/Nav/Sub/index.js +1 -2
  72. package/dist/cjs/components/Nav/context/IdContext.js +3 -3
  73. package/dist/cjs/components/Nav/context/NavContext.js +2 -2
  74. package/dist/cjs/components/Nav/context/PathContext.js +3 -3
  75. package/dist/cjs/components/Nav/hooks/useAccessibility.js +1 -2
  76. package/dist/cjs/components/Nav/hooks/useActive.js +1 -2
  77. package/dist/cjs/components/Nav/hooks/useDirectionStyle.js +1 -2
  78. package/dist/cjs/components/Nav/hooks/useKeyRecords.js +2 -2
  79. package/dist/cjs/components/Nav/hooks/useMemoCallback.js +1 -2
  80. package/dist/cjs/components/Nav/hooks/useUUID.js +1 -2
  81. package/dist/cjs/components/Nav/utils/alignUtil.js +2 -3
  82. package/dist/cjs/components/Nav/utils/motionUtil.js +1 -2
  83. package/dist/cjs/components/Nav/utils/nodeUtil.js +2 -3
  84. package/dist/cjs/components/Nav/utils/timeUtil.js +1 -2
  85. package/dist/cjs/components/Nav/utils/warnUtil.js +1 -2
  86. package/dist/cjs/components/Navbar/Center.js +1 -2
  87. package/dist/cjs/components/Navbar/Container.js +1 -2
  88. package/dist/cjs/components/Navbar/Item.js +1 -2
  89. package/dist/cjs/components/Navbar/Left.js +1 -2
  90. package/dist/cjs/components/Navbar/Nav.js +1 -2
  91. package/dist/cjs/components/Navbar/Navbar.js +1 -2
  92. package/dist/cjs/components/Navbar/Right.js +1 -2
  93. package/dist/cjs/components/Navbar/Toggle.js +1 -2
  94. package/dist/cjs/components/Navbar/index.scss +1 -0
  95. package/dist/cjs/components/Overlay/index.d.ts +13 -0
  96. package/dist/cjs/components/Overlay/index.js +58 -0
  97. package/dist/cjs/components/Overlay/index.scss +105 -0
  98. package/dist/cjs/components/Progress/index.js +1 -2
  99. package/dist/cjs/components/Section/index.js +1 -2
  100. package/dist/cjs/components/Section/index.scss +29 -0
  101. package/dist/cjs/components/Spinner/index.js +1 -2
  102. package/dist/cjs/components/Subnav/Item.js +1 -2
  103. package/dist/cjs/components/Subnav/Subnav.js +1 -2
  104. package/dist/cjs/components/Tabs/hooks/useAnimateConfig.js +1 -2
  105. package/dist/cjs/components/Tabs/index.js +1 -2
  106. package/dist/cjs/components/Text/index.d.ts +1 -0
  107. package/dist/cjs/components/Text/index.js +2 -2
  108. package/dist/cjs/components/Tile/index.js +1 -2
  109. package/dist/cjs/components/Tile/index.scss +31 -0
  110. package/dist/cjs/components/Width/Width.js +1 -2
  111. package/dist/cjs/components/Width/utils.js +2 -3
  112. package/dist/cjs/hooks/useContext.js +1 -2
  113. package/dist/cjs/hooks/useForceUpdate.js +1 -2
  114. package/dist/cjs/hooks/useMounted.js +1 -2
  115. package/dist/cjs/index.d.ts +2 -0
  116. package/dist/cjs/index.js +2 -0
  117. package/dist/cjs/styles/_import.scss +1 -1
  118. package/dist/cjs/styles/inverse.scss +8 -0
  119. package/dist/cjs/styles/mixins.scss +17 -6
  120. package/dist/cjs/styles/overlay.scss +1 -105
  121. package/dist/cjs/styles/variables.scss +6 -1
  122. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  123. package/dist/cjs/utils/get-breakpoints-config-classes.js +1 -2
  124. package/dist/cjs/utils/modal.js +2 -3
  125. package/dist/cjs/utils/motion.js +3 -4
  126. package/dist/esm/components/Button/index.scss +42 -2
  127. package/dist/esm/components/Card/Card.d.ts +1 -1
  128. package/dist/esm/components/Card/index.scss +29 -0
  129. package/dist/esm/components/ConfigProvider/index.d.ts +1 -1
  130. package/dist/esm/components/Container/index.d.ts +1 -1
  131. package/dist/esm/components/Control/Checkbox/index.d.ts +2 -2
  132. package/dist/esm/components/Control/Radio/index.d.ts +2 -2
  133. package/dist/esm/components/Control/Radio/index.scss +1 -1
  134. package/dist/esm/components/Control/Select/index.scss +1 -3
  135. package/dist/esm/components/Divider/index.scss +1 -1
  136. package/dist/esm/components/Dropdown/index.scss +1 -0
  137. package/dist/esm/components/Inverse/index.d.ts +21 -0
  138. package/dist/esm/components/Inverse/index.js +51 -0
  139. package/dist/esm/components/Navbar/index.scss +1 -0
  140. package/dist/esm/components/Overlay/index.d.ts +13 -0
  141. package/dist/esm/components/Overlay/index.js +29 -0
  142. package/dist/esm/components/Overlay/index.scss +105 -0
  143. package/dist/esm/components/Section/index.scss +29 -0
  144. package/dist/esm/components/Text/index.d.ts +1 -0
  145. package/dist/esm/components/Text/index.js +1 -0
  146. package/dist/esm/components/Tile/index.scss +31 -0
  147. package/dist/esm/index.d.ts +2 -0
  148. package/dist/esm/index.js +2 -0
  149. package/dist/esm/styles/_import.scss +1 -1
  150. package/dist/esm/styles/inverse.scss +8 -0
  151. package/dist/esm/styles/mixins.scss +17 -6
  152. package/dist/esm/styles/overlay.scss +1 -105
  153. package/dist/esm/styles/variables.scss +6 -1
  154. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  155. package/package.json +4 -4
@@ -124,28 +124,55 @@
124
124
  */
125
125
 
126
126
  .uk-section-default {
127
+ --uk-inverse: #{$section-default-color-mode};
127
128
  background: var(--section-default-background);
128
129
  @if mixin-exists(hook-section-default) {
129
130
  @include hook-section-default;
130
131
  }
131
132
  }
132
133
 
134
+ @if $section-default-color-mode == light {
135
+ .uk-section-default:not(.uk-preserve-color) {
136
+ @extend .uk-light !optional;
137
+ }
138
+ }
139
+
140
+ @if $section-default-color-mode == dark {
141
+ .uk-section-default:not(.uk-preserve-color) {
142
+ @extend .uk-dark !optional;
143
+ }
144
+ }
145
+
133
146
  /*
134
147
  * Muted
135
148
  */
136
149
 
137
150
  .uk-section-muted {
151
+ --uk-inverse: #{$section-muted-color-mode};
138
152
  background: var(--section-muted-background);
139
153
  @if mixin-exists(hook-section-muted) {
140
154
  @include hook-section-muted;
141
155
  }
142
156
  }
143
157
 
158
+ @if $section-muted-color-mode == light {
159
+ .uk-section-muted:not(.uk-preserve-color) {
160
+ @extend .uk-light !optional;
161
+ }
162
+ }
163
+
164
+ @if $section-muted-color-mode == dark {
165
+ .uk-section-muted:not(.uk-preserve-color) {
166
+ @extend .uk-dark !optional;
167
+ }
168
+ }
169
+
144
170
  /*
145
171
  * Primary
146
172
  */
147
173
 
148
174
  .uk-section-primary {
175
+ --uk-inverse: #{$section-primary-color-mode};
149
176
  background: var(--section-primary-background);
150
177
  @if mixin-exists(hook-section-primary) {
151
178
  @include hook-section-primary;
@@ -169,6 +196,7 @@
169
196
  */
170
197
 
171
198
  .uk-section-secondary {
199
+ --uk-inverse: #{$section-secondary-color-mode};
172
200
  background: var(--section-secondary-background);
173
201
  @if mixin-exists(hook-section-secondary) {
174
202
  @include hook-section-secondary;
@@ -192,6 +220,7 @@
192
220
  */
193
221
 
194
222
  .uk-section-tertiary {
223
+ --uk-inverse: #{$section-tertiary-color-mode};
195
224
  background: var(--section-tertiary-background);
196
225
  @if mixin-exists(hook-section-tertiary) {
197
226
  @include hook-section-tertiary;
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Spinner = void 0;
29
+ exports.Spinner = Spinner;
30
30
  const classnames_1 = __importDefault(require("classnames"));
31
31
  const React = __importStar(require("react"));
32
32
  const ConfigProvider_1 = require("../../components/ConfigProvider");
@@ -39,4 +39,3 @@ function Spinner(props) {
39
39
  React.createElement("svg", { ...Icon_1.defaultSvgProps, ...(0, Icon_1.getSize)(20, 20, ratio), viewBox: "0 0 30 30" },
40
40
  React.createElement("circle", { fill: "none", stroke: "currentColor", cx: 15, cy: 15, r: 13, style: { strokeWidth: `${(2 / (ratio ?? 1)).toFixed(6)}px` } }))));
41
41
  }
42
- exports.Spinner = Spinner;
@@ -23,12 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Item = void 0;
26
+ exports.Item = Item;
27
27
  const React = __importStar(require("react"));
28
28
  function Item(props) {
29
29
  return React.createElement("li", { ...props });
30
30
  }
31
- exports.Item = Item;
32
31
  if (process.env.NODE_ENV !== 'production') {
33
32
  Item.displayName = 'Subnav.Item';
34
33
  }
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Subnav = void 0;
29
+ exports.Subnav = Subnav;
30
30
  const classnames_1 = __importDefault(require("classnames"));
31
31
  const React = __importStar(require("react"));
32
32
  const ConfigProvider_1 = require("../../components/ConfigProvider");
@@ -38,4 +38,3 @@ function Subnav(props) {
38
38
  [`${rootCls}-${type}`]: type !== undefined,
39
39
  }, className), ...restProps, "data-uk-margin": "" }));
40
40
  }
41
- exports.Subnav = Subnav;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAnimateConfig = void 0;
3
+ exports.useAnimateConfig = useAnimateConfig;
4
4
  const utils_1 = require("../../../utils");
5
5
  const motion = {
6
6
  motionAppear: false,
@@ -38,4 +38,3 @@ function useAnimateConfig(prefixCls, animated = {
38
38
  }
39
39
  return mergedAnimated;
40
40
  }
41
- exports.useAnimateConfig = useAnimateConfig;
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Tabs = void 0;
29
+ exports.Tabs = Tabs;
30
30
  const classnames_1 = __importDefault(require("classnames"));
31
31
  const rc_tabs_1 = __importDefault(require("rc-tabs"));
32
32
  const React = __importStar(require("react"));
@@ -62,4 +62,3 @@ function Tabs(props) {
62
62
  ...more,
63
63
  }, prefixCls: rootCls }));
64
64
  }
65
- exports.Tabs = Tabs;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { type PolymorphicProps } from '../../components/Component';
3
3
  import { type BreakpointsConfig } from '../../types';
4
+ import './index.scss';
4
5
  export type TextAlign = 'left' | 'right' | 'center' | 'justify';
5
6
  export type TextOwnProps = {
6
7
  align?: TextAlign | BreakpointsConfig<TextAlign>;
@@ -26,12 +26,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Text = void 0;
29
+ exports.Text = Text;
30
30
  const classnames_1 = __importDefault(require("classnames"));
31
31
  const React = __importStar(require("react"));
32
32
  const Component_1 = require("../../components/Component");
33
33
  const ConfigProvider_1 = require("../../components/ConfigProvider");
34
34
  const utils_1 = require("../../utils");
35
+ require("./index.scss");
35
36
  const defaultElement = 'span';
36
37
  function Text(props) {
37
38
  const config = (0, ConfigProvider_1.useConfig)();
@@ -56,4 +57,3 @@ function Text(props) {
56
57
  [`${rootCls}-italic`]: italic,
57
58
  }, className), component: defaultElement, ...restProps }));
58
59
  }
59
- exports.Text = Text;
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Tile = void 0;
29
+ exports.Tile = Tile;
30
30
  const classnames_1 = __importDefault(require("classnames"));
31
31
  const React = __importStar(require("react"));
32
32
  const Component_1 = require("../../components/Component");
@@ -43,4 +43,3 @@ function Tile(props) {
43
43
  [`${prefixCls || config.prefixCls}-preserve-color`]: preserveColor,
44
44
  }, className), component: defaultElement, ...restProps }));
45
45
  }
46
- exports.Tile = Tile;
@@ -124,6 +124,7 @@
124
124
  */
125
125
 
126
126
  .uk-tile-default {
127
+ --uk-inverse: #{$tile-default-color-mode};
127
128
  background: var(--tile-default-background);
128
129
  @if mixin-exists(hook-tile-default) {
129
130
  @include hook-tile-default;
@@ -136,11 +137,25 @@
136
137
  }
137
138
  }
138
139
 
140
+ // Color Mode
141
+ @if $tile-default-color-mode == light {
142
+ .uk-tile-primary:not(.uk-preserve-color) {
143
+ @extend .uk-light !optional;
144
+ }
145
+ }
146
+
147
+ @if $tile-default-color-mode == dark {
148
+ .uk-tile-primary:not(.uk-preserve-color) {
149
+ @extend .uk-dark !optional;
150
+ }
151
+ }
152
+
139
153
  /*
140
154
  * Muted
141
155
  */
142
156
 
143
157
  .uk-tile-muted {
158
+ --uk-inverse: #{$tile-muted-color-mode};
144
159
  background: var(--tile-muted-background);
145
160
  @if mixin-exists(hook-tile-muted) {
146
161
  @include hook-tile-muted;
@@ -153,11 +168,25 @@
153
168
  }
154
169
  }
155
170
 
171
+ // Color Mode
172
+ @if $tile-default-color-mode == light {
173
+ .uk-tile-primary:not(.uk-preserve-color) {
174
+ @extend .uk-light !optional;
175
+ }
176
+ }
177
+
178
+ @if $tile-default-color-mode == dark {
179
+ .uk-tile-primary:not(.uk-preserve-color) {
180
+ @extend .uk-dark !optional;
181
+ }
182
+ }
183
+
156
184
  /*
157
185
  * Primary
158
186
  */
159
187
 
160
188
  .uk-tile-primary {
189
+ --uk-inverse: #{$tile-primary-color-mode};
161
190
  background: var(--tile-primary-background);
162
191
  @if mixin-exists(hook-tile-primary) {
163
192
  @include hook-tile-primary;
@@ -188,6 +217,7 @@
188
217
  */
189
218
 
190
219
  .uk-tile-secondary {
220
+ --uk-inverse: #{$tile-secondary-color-mode};
191
221
  background: var(--tile-secondary-background);
192
222
  @if mixin-exists(hook-tile-secondary) {
193
223
  @include hook-tile-secondary;
@@ -218,6 +248,7 @@
218
248
  */
219
249
 
220
250
  .uk-tile-tertiary {
251
+ --uk-inverse: #{$tile-tertiary-color-mode};
221
252
  background: var(--tile-tertiary-background);
222
253
  @if mixin-exists(hook-tile-tertiary) {
223
254
  @include hook-tile-tertiary;
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Width = void 0;
29
+ exports.Width = Width;
30
30
  const classnames_1 = __importDefault(require("classnames"));
31
31
  const React = __importStar(require("react"));
32
32
  const Component_1 = require("../../components/Component");
@@ -44,4 +44,3 @@ function Width(props) {
44
44
  xl,
45
45
  }, prefixCls || config.prefixCls), className), component: defaultElement, ...restProps }));
46
46
  }
47
- exports.Width = Width;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getChildWidthClassname = exports.getWidthClassname = void 0;
3
+ exports.getWidthClassname = getWidthClassname;
4
+ exports.getChildWidthClassname = getChildWidthClassname;
4
5
  const utils_1 = require("../../utils");
5
6
  function getWidthClassname(valueOrConfig, prefixCls = 'uk') {
6
7
  if (typeof valueOrConfig === 'string') {
@@ -11,7 +12,6 @@ function getWidthClassname(valueOrConfig, prefixCls = 'uk') {
11
12
  }
12
13
  return undefined;
13
14
  }
14
- exports.getWidthClassname = getWidthClassname;
15
15
  function getChildWidthClassname(valueOrConfig, prefixCls = 'uk') {
16
16
  if (typeof valueOrConfig === 'string' || typeof valueOrConfig === 'number') {
17
17
  if (typeof valueOrConfig === 'string' && ['auto', 'expand'].includes(valueOrConfig)) {
@@ -26,4 +26,3 @@ function getChildWidthClassname(valueOrConfig, prefixCls = 'uk') {
26
26
  }
27
27
  return undefined;
28
28
  }
29
- exports.getChildWidthClassname = getChildWidthClassname;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.useContext = void 0;
26
+ exports.useContext = useContext;
27
27
  const React = __importStar(require("react"));
28
28
  function useContext(Context) {
29
29
  const context = React.useContext(Context);
@@ -32,4 +32,3 @@ function useContext(Context) {
32
32
  }
33
33
  return context;
34
34
  }
35
- exports.useContext = useContext;
@@ -23,10 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.useForceUpdate = void 0;
26
+ exports.useForceUpdate = useForceUpdate;
27
27
  const React = __importStar(require("react"));
28
28
  function useForceUpdate() {
29
29
  const [, forceUpdate] = React.useReducer(x => x + 1, 0);
30
30
  return forceUpdate;
31
31
  }
32
- exports.useForceUpdate = useForceUpdate;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.useMounted = void 0;
26
+ exports.useMounted = useMounted;
27
27
  const React = __importStar(require("react"));
28
28
  function useMounted() {
29
29
  const mounted = React.useRef(false);
@@ -35,4 +35,3 @@ function useMounted() {
35
35
  }, []);
36
36
  return mounted.current;
37
37
  }
38
- exports.useMounted = useMounted;
@@ -14,6 +14,7 @@ export * from './components/Spinner';
14
14
  export * from './components/Alert';
15
15
  export * from './components/Badge';
16
16
  export * from './components/Label';
17
+ export * from './components/Overlay';
17
18
  export * from './components/Article';
18
19
  export * from './components/Section';
19
20
  export * from './components/Container';
@@ -34,6 +35,7 @@ export * from './components/Modal';
34
35
  export * from './components/Drawer';
35
36
  export * from './components/Component';
36
37
  export * from './components/ConfigProvider';
38
+ export * from './components/Inverse';
37
39
  export * from './components/Width';
38
40
  export * from './components/Text';
39
41
  export * from './components/Cover';
package/dist/cjs/index.js CHANGED
@@ -30,6 +30,7 @@ __exportStar(require("./components/Spinner"), exports);
30
30
  __exportStar(require("./components/Alert"), exports);
31
31
  __exportStar(require("./components/Badge"), exports);
32
32
  __exportStar(require("./components/Label"), exports);
33
+ __exportStar(require("./components/Overlay"), exports);
33
34
  __exportStar(require("./components/Article"), exports);
34
35
  __exportStar(require("./components/Section"), exports);
35
36
  __exportStar(require("./components/Container"), exports);
@@ -50,6 +51,7 @@ __exportStar(require("./components/Modal"), exports);
50
51
  __exportStar(require("./components/Drawer"), exports);
51
52
  __exportStar(require("./components/Component"), exports);
52
53
  __exportStar(require("./components/ConfigProvider"), exports);
54
+ __exportStar(require("./components/Inverse"), exports);
53
55
  __exportStar(require("./components/Width"), exports);
54
56
  __exportStar(require("./components/Text"), exports);
55
57
  __exportStar(require("./components/Cover"), exports);
@@ -34,7 +34,7 @@
34
34
  @import 'badge.scss';
35
35
  @import 'label.scss';
36
36
 
37
- // @import 'overlay.scss'; // After: Icon
37
+ @import 'overlay.scss'; // After: Icon
38
38
  @import 'article.scss'; // After: Subnav
39
39
  // @import 'comment.scss';
40
40
  // @import 'search.scss'; // After: Icon
@@ -39,6 +39,14 @@
39
39
  }
40
40
  }
41
41
 
42
+ * { --uk-inverse: initial; }
43
+
44
+ .uk-light { --uk-inverse: light; }
45
+ .uk-dark { --uk-inverse: dark; }
46
+
47
+ .uk-inverse-light { --uk-inverse: light !important; }
48
+ .uk-inverse-dark { --uk-inverse: dark !important; }
49
+
42
50
 
43
51
  // Vars
44
52
  // ========================================================================
@@ -357,22 +357,27 @@
357
357
  @mixin hook-button-hover() {}
358
358
  @mixin hook-button-focus() {}
359
359
  @mixin hook-button-active() {}
360
+ @mixin hook-button-disabled() {}
360
361
  @mixin hook-button-default() {}
361
362
  @mixin hook-button-default-hover() {}
362
363
  @mixin hook-button-default-active() {}
364
+ @mixin hook-button-default-disabled() {}
363
365
  @mixin hook-button-primary() {}
364
366
  @mixin hook-button-primary-hover() {}
365
367
  @mixin hook-button-primary-active() {}
368
+ @mixin hook-button-primary-disabled() {}
366
369
  @mixin hook-button-secondary() {}
367
370
  @mixin hook-button-secondary-hover() {}
368
371
  @mixin hook-button-secondary-active() {}
372
+ @mixin hook-button-secondary-disabled() {}
369
373
  @mixin hook-button-tertiary() {}
370
374
  @mixin hook-button-tertiary-hover() {}
371
375
  @mixin hook-button-tertiary-active() {}
376
+ @mixin hook-button-tertiary-disabled() {}
372
377
  @mixin hook-button-danger() {}
373
378
  @mixin hook-button-danger-hover() {}
374
379
  @mixin hook-button-danger-active() {}
375
- @mixin hook-button-disabled() {}
380
+ @mixin hook-button-danger-disabled() {}
376
381
  @mixin hook-button-xsmall() {}
377
382
  @mixin hook-button-small() {}
378
383
  @mixin hook-button-medium() {}
@@ -847,7 +852,7 @@
847
852
  @mixin hook-inverse-component-divider() {
848
853
  .uk-divider-icon {
849
854
  @if mixin-exists(svg-fill) {
850
- @include svg-fill($divider-icon-image-path, '#000', $inverse-divider-icon-color);
855
+ @include svg-fill($internal-divider-icon-image, '#000', $inverse-divider-icon-color);
851
856
  }
852
857
  @if mixin-exists(hook-inverse-divider-icon) {
853
858
  @include hook-inverse-divider-icon;
@@ -2072,9 +2077,12 @@
2072
2077
  @mixin hook-switch-checked-handle() {}
2073
2078
  @mixin hook-switch-disabled() {}
2074
2079
  @mixin hook-switch-misc() {}
2075
-
2076
- @mixin hook-switcher-misc() {}
2077
- @mixin hook-inverse-component-switcher() {}
2080
+ @mixin hook-inverse-switch() {}
2081
+ @mixin hook-inverse-switch-handle() {}
2082
+ @mixin hook-inverse-switch-checked() {}
2083
+ @mixin hook-inverse-switch-checked-handle() {}
2084
+ @mixin hook-inverse-switch-disabled() {}
2085
+ @mixin hook-inverse-component-switch() {}
2078
2086
 
2079
2087
  @mixin hook-tabs() {}
2080
2088
  @mixin hook-tabs-tab() {}
@@ -2359,6 +2367,7 @@
2359
2367
  }
2360
2368
  }
2361
2369
 
2370
+ @mixin hook-inverse-misc() {}
2362
2371
 
2363
2372
  @mixin hook-inverse() {
2364
2373
  @include hook-inverse-component-base;
@@ -2391,7 +2400,7 @@
2391
2400
  @include hook-inverse-component-breadcrumb;
2392
2401
 
2393
2402
  @include hook-inverse-component-pagination;
2394
- @include hook-inverse-component-switcher;
2403
+ @include hook-inverse-component-switch;
2395
2404
  @include hook-inverse-component-tabs;
2396
2405
  @include hook-inverse-component-table;
2397
2406
 
@@ -2402,4 +2411,6 @@
2402
2411
  @include hook-inverse-component-column;
2403
2412
  @include hook-inverse-component-utility;
2404
2413
  @include hook-inverse-component-marker;
2414
+
2415
+ @include hook-inverse-misc;
2405
2416
  }
@@ -1,105 +1 @@
1
- // Name: Overlay
2
- // Description: Component to create content areas overlaying an image
3
- //
4
- // Component: `uk-overlay`
5
- //
6
- // Adopted: `uk-overlay-icon`
7
- //
8
- // Modifier: `uk-overlay-default`
9
- // `uk-overlay-primary`
10
- //
11
- // ========================================================================
12
-
13
-
14
- // Variables
15
- // ========================================================================
16
-
17
- @import 'variables.scss';
18
-
19
-
20
- /* ========================================================================
21
- Component: Overlay
22
- ========================================================================== */
23
-
24
- .uk-overlay {
25
- padding: var(--overlay-padding-vertical) var(--overlay-padding-horizontal);
26
- @if mixin-exists(hook-overlay) {
27
- @include hook-overlay;
28
- }
29
- }
30
-
31
- /*
32
- * Remove margin from the last-child
33
- */
34
-
35
- .uk-overlay > :last-child {
36
- margin-bottom: 0;
37
- }
38
-
39
-
40
- /* Icon
41
- ========================================================================== */
42
-
43
- .uk-overlay-icon {
44
- @if mixin-exists(hook-overlay-icon) {
45
- @include hook-overlay-icon;
46
- }
47
- }
48
-
49
-
50
- /* Style modifiers
51
- ========================================================================== */
52
-
53
- /*
54
- * Default
55
- */
56
-
57
- .uk-overlay-default {
58
- background: var(--overlay-default-background);
59
- @if mixin-exists(hook-overlay-default) {
60
- @include hook-overlay-default;
61
- }
62
- }
63
-
64
- /*
65
- * Primary
66
- */
67
-
68
- .uk-overlay-primary {
69
- background: var(--overlay-primary-background);
70
- @if mixin-exists(hook-overlay-primary) {
71
- @include hook-overlay-primary;
72
- }
73
- }
74
-
75
- // Color Mode
76
- @if $overlay-primary-color-mode == light {
77
- .uk-overlay-primary {
78
- @extend .uk-light !optional;
79
- }
80
- }
81
-
82
- @if $overlay-primary-color-mode == dark {
83
- .uk-overlay-primary {
84
- @extend .uk-dark !optional;
85
- }
86
- }
87
-
88
-
89
- // Hooks
90
- // ========================================================================
91
-
92
- @if mixin-exists(hook-overlay-misc) {
93
- @include hook-overlay-misc;
94
- }
95
-
96
-
97
- // Vars
98
- // ========================================================================
99
-
100
- :root {
101
- --overlay-padding-horizontal: var(--global-gutter);
102
- --overlay-padding-vertical: var(--global-gutter);
103
- --overlay-default-background: #{$overlay-default-background};
104
- --overlay-primary-background: #{$overlay-primary-background};
105
- }
1
+ @import '../components/Overlay/index.scss';
@@ -521,6 +521,7 @@ $card-default-background: $global-muted-ba
521
521
  $card-default-color: $global-color !default;
522
522
  $card-default-title-color: $global-emphasis-color !default;
523
523
  $card-default-hover-background: darken($card-default-background, 5%) !default;
524
+ $card-default-color-mode: dark !default;
524
525
  $card-primary-background: $global-primary-background !default;
525
526
  $card-primary-color: $global-inverse-color !default;
526
527
  $card-primary-title-color: $card-primary-color !default;
@@ -643,13 +644,13 @@ $divider-icon-line-top: 50% !default;
643
644
  $divider-icon-line-width: 100% !default;
644
645
  $divider-icon-line-border-width: $global-border-width !default;
645
646
  $divider-icon-line-border: $global-border !default;
646
- $divider-icon-image-path: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20fill%3D%22none%22%20stroke%3D%22#000%22%20stroke-width%3D%222%22%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%227%22%20%2F%3E%0A%3C%2Fsvg%3E%0A' !default;
647
647
  $divider-small-width: 100px !default;
648
648
  $divider-small-border-width: $global-border-width !default;
649
649
  $divider-small-border: $global-border !default;
650
650
  $divider-vertical-height: 100px !default;
651
651
  $divider-vertical-border-width: $global-border-width !default;
652
652
  $divider-vertical-border: $global-border !default;
653
+ $internal-divider-icon-image: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20fill%3D%22none%22%20stroke%3D%22#000%22%20stroke-width%3D%222%22%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%227%22%20%2F%3E%0A%3C%2Fsvg%3E%0A' !default;
653
654
 
654
655
  // Inverse
655
656
  $inverse-divider-icon-color: $inverse-global-border !default;
@@ -1489,7 +1490,9 @@ $section-large-padding-vertical-m: $global-xlarge-m
1489
1490
  $section-xlarge-padding-vertical: $global-xlarge-margin !default;
1490
1491
  $section-xlarge-padding-vertical-m: ($global-large-margin + $global-xlarge-margin) !default;
1491
1492
  $section-default-background: $global-background !default;
1493
+ $section-default-color-mode: dark !default;
1492
1494
  $section-muted-background: $global-muted-background !default;
1495
+ $section-muted-color-mode: dark !default;
1493
1496
  $section-primary-background: $global-primary-background !default;
1494
1497
  $section-primary-color-mode: light !default;
1495
1498
  $section-secondary-background: $global-secondary-background !default;
@@ -1746,7 +1749,9 @@ $tile-large-padding-vertical-m: $global-xlarge-m
1746
1749
  $tile-xlarge-padding-vertical: $global-xlarge-margin !default;
1747
1750
  $tile-xlarge-padding-vertical-m: ($global-large-margin + $global-xlarge-margin) !default;
1748
1751
  $tile-default-background: $global-background !default;
1752
+ $tile-default-color-mode: dark !default;
1749
1753
  $tile-muted-background: $global-muted-background !default;
1754
+ $tile-muted-color-mode: dark !default;
1750
1755
  $tile-primary-background: $global-primary-background !default;
1751
1756
  $tile-primary-color-mode: light !default;
1752
1757
  $tile-secondary-background: $global-secondary-background !default;