@sima-land/ui-nucleons 45.0.0-alpha.40 → 45.0.0-alpha.42

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.
@@ -8,8 +8,8 @@ export declare function dropdownFloatingConfig(): {
8
8
  whileElementsMounted: typeof autoUpdate;
9
9
  placement: "bottom-start";
10
10
  middleware: {
11
- name: string;
12
11
  options?: any;
12
+ name: string;
13
13
  fn: (state: import("@floating-ui/dom").MiddlewareState) => import("@floating-ui/core").MiddlewareReturn | Promise<import("@floating-ui/core").MiddlewareReturn>;
14
14
  }[];
15
15
  };
@@ -5,7 +5,7 @@ exports.useBreakpoint = useBreakpoint;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const react_1 = require("react");
7
7
  const __1 = require("..");
8
- const is_browser_1 = require("../../helpers/is-browser");
8
+ const helpers_1 = require("../../helpers");
9
9
  const utils_1 = require("./utils");
10
10
  const context_1 = require("../../context");
11
11
  const Context = (0, react_1.createContext)(null);
@@ -19,7 +19,7 @@ function BreakpointProvider({ children }) {
19
19
  const [contextValue, setRegistry] = (0, react_1.useState)(null);
20
20
  const { matchMedia } = (0, react_1.useContext)(context_1.MatchMediaContext);
21
21
  (0, __1.useIsomorphicLayoutEffect)(() => {
22
- (0, is_browser_1.isBrowser)() && setRegistry((0, utils_1.createRegistry)({ matchMedia }));
22
+ (0, helpers_1.isBrowser)() && setRegistry((0, utils_1.createRegistry)({ matchMedia }));
23
23
  }, []);
24
24
  return (0, jsx_runtime_1.jsx)(Context.Provider, { value: contextValue, children: children });
25
25
  }
@@ -32,10 +32,10 @@ function useBreakpoint(query) {
32
32
  if (!utils_1.BreakpointQuery.isValid(query)) {
33
33
  throw Error(`useBreakpoint: Invalid query, "${query}"`);
34
34
  }
35
+ const { matchMedia } = (0, react_1.useContext)(context_1.MatchMediaContext);
35
36
  const [, setRegistry] = (0, react_1.useState)(null);
36
37
  const registryFromContext = (0, react_1.useContext)(Context);
37
- const [matches, setMatches] = (0, react_1.useState)(false);
38
- const { matchMedia } = (0, react_1.useContext)(context_1.MatchMediaContext);
38
+ const [matches, setMatches] = (0, react_1.useState)(matchMedia(utils_1.BreakpointQuery.toMediaQuery(query)).matches);
39
39
  (0, __1.useIsomorphicLayoutEffect)(() => {
40
40
  let registry;
41
41
  if (registryFromContext) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/use-breakpoint/index.tsx"],"names":[],"mappings":";;AAeA,gDAUC;AAOD,sCAgCC;;AAhED,iCAAuE;AACvE,0BAA+C;AAC/C,yDAAqD;AAErD,mCAA0D;AAC1D,2CAAkD;AAElD,MAAM,OAAO,GAAG,IAAA,qBAAa,EAAkB,IAAI,CAAC,CAAC;AAErD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAA2B;IACtE,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAkB,IAAI,CAAC,CAAC;IAEpE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,kBAAU,EAAC,2BAAiB,CAAC,CAAC;IAErD,IAAA,6BAAyB,EAAC,GAAG,EAAE;QAC7B,IAAA,sBAAS,GAAE,IAAI,WAAW,CAAC,IAAA,sBAAc,EAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,uBAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAAG,QAAQ,GAAoB,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,KAAa;IACzC,IAAI,CAAC,uBAAe,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,MAAM,KAAK,CAAC,kCAAkC,KAAK,GAAG,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAkB,IAAI,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,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE;YACjD,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAEjC,OAAO,YAAY,CAAC,WAAW,CAAC;IAClC,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAE1B,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sima-land/ui-nucleons",
3
3
  "type": "commonjs",
4
- "version": "45.0.0-alpha.40",
4
+ "version": "45.0.0-alpha.42",
5
5
  "repository": "ssh://git@github.com:sima-land/ui-nucleons.git",
6
6
  "author": "www.sima-land.ru team",
7
7
  "license": "Apache-2.0",
@@ -138,7 +138,7 @@
138
138
  "./side-page": "./side-page/index.js",
139
139
  "./side-page/side-page-util.scss": "./side-page/side-page-util.scss",
140
140
  "./skeleton": "./skeleton/index.js",
141
- "./snackbar": "./snackbar/index.js",
141
+ "./snack-bar": "./snack-bar/index.js",
142
142
  "./spinner": "./spinner/index.js",
143
143
  "./stepper": "./stepper/index.js",
144
144
  "./stroked-svg": "./stroked-svg/index.js",
@@ -12,6 +12,7 @@
12
12
  max-width: var(--max-width);
13
13
  position: fixed;
14
14
  bottom: var(--snackbar-bottom-gap);
15
+ box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.12);
15
16
  // частично иммитируем поведение layout
16
17
  margin: 0 auto;
17
18
  @include breakpoints.up('xs') {
@@ -82,6 +83,7 @@
82
83
  display: flex;
83
84
  align-items: center;
84
85
  img {
86
+ border-radius: 4px;
85
87
  height: 40px;
86
88
  }
87
89
  }