ag-common 0.0.555 → 0.0.557

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.
@@ -30,7 +30,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.RadioGroup = void 0;
31
31
  const styled_1 = __importDefault(require("@emotion/styled"));
32
32
  const react_1 = __importStar(require("react"));
33
- const common_1 = require("../../styles/common");
34
33
  const Base = styled_1.default.div `
35
34
  display: flex;
36
35
  flex-flow: row;
@@ -57,7 +56,7 @@ const RadioGroup = (p) => {
57
56
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
57
  const { renderLabel = (x) => x.toString() } = p;
59
58
  const [index, setIndex] = (0, react_1.useState)((_a = p.defaultIndex) !== null && _a !== void 0 ? _a : 0);
60
- return (react_1.default.createElement(Base, Object.assign({}, common_1.noDrag, { className: p.className, style: p.style, "data-mode": (_b = p.mode) !== null && _b !== void 0 ? _b : 'horiz' }), p.values.map((v, i) => (react_1.default.createElement(Label
59
+ return (react_1.default.createElement(Base, { className: p.className, style: p.style, "data-mode": (_b = p.mode) !== null && _b !== void 0 ? _b : 'horiz' }, p.values.map((v, i) => (react_1.default.createElement(Label
61
60
  // eslint-disable-next-line react/no-array-index-key
62
61
  , {
63
62
  // eslint-disable-next-line react/no-array-index-key
@@ -1,14 +1,7 @@
1
+ import type { ReactNode } from 'react';
1
2
  import React from 'react';
2
3
  export interface ISidebar {
3
- children: any;
4
+ children: ReactNode;
4
5
  className?: string;
5
- /**
6
- * used for localstorage. default 'sidebar'
7
- */
8
- key?: string;
9
- /**
10
- * optionally pass in SSR cookiedocument
11
- */
12
- cookieDocument?: string;
13
6
  }
14
- export declare const Sidebar: ({ children, className, key, cookieDocument, }: ISidebar) => React.JSX.Element;
7
+ export declare const Sidebar: ({ children, className }: ISidebar) => React.JSX.Element;
@@ -31,7 +31,6 @@ exports.Sidebar = void 0;
31
31
  const styled_1 = __importDefault(require("@emotion/styled"));
32
32
  const react_1 = __importStar(require("react"));
33
33
  const helpers_1 = require("../../helpers");
34
- const use_1 = require("../../helpers/cookie/use");
35
34
  const Hamburger_1 = require("../../icons/Hamburger");
36
35
  const common_1 = require("../../styles/common");
37
36
  const media_1 = require("../../styles/media");
@@ -128,13 +127,9 @@ const ChevronStyled = (0, styled_1.default)(Chevron_1.Chevron) `
128
127
  fill: #555;
129
128
  }
130
129
  `;
131
- const Sidebar = ({ children, className, key = 'sidebar', cookieDocument, }) => {
130
+ const Sidebar = ({ children, className }) => {
132
131
  const ref = (0, react_1.useRef)(null);
133
- const [open, setOpen] = (0, use_1.useCookieBoolean)({
134
- name: key,
135
- defaultValue: false,
136
- cookieDocument: cookieDocument,
137
- });
132
+ const [open, setOpen] = (0, react_1.useState)(false);
138
133
  (0, helpers_1.useOnClickOutside)({ ref }, () => {
139
134
  if (!open || window.innerWidth > media_1.smallScreenPx) {
140
135
  return;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.555",
2
+ "version": "0.0.557",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",