@activecollab/components 1.0.327 → 1.0.328

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.
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.Checkbox = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _Checkbox = _interopRequireDefault(require("../Icons/collection/Checkbox"));
11
10
  var _Styles = require("./Styles");
11
+ var _Icons = require("../Icons");
12
12
  var _excluded = ["className", "hover", "id"];
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -30,8 +30,10 @@ var Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
30
30
  "c-checkbox__hover": hover,
31
31
  "c-checkbox__controlled": typeof hover === "boolean"
32
32
  }, className),
33
- hover: hover
33
+ hover: hover,
34
+ tabIndex: -1
34
35
  }, /*#__PURE__*/_react.default.createElement(_Styles.StyledInput, _extends({
36
+ role: "checkbox",
35
37
  id: id,
36
38
  className: "c-checkbox--input",
37
39
  type: "checkbox",
@@ -39,7 +41,7 @@ var Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
39
41
  }, rest)), /*#__PURE__*/_react.default.createElement(_Styles.StyledLabel, {
40
42
  htmlFor: id,
41
43
  className: "c-checkbox--label"
42
- }, /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
44
+ }, /*#__PURE__*/_react.default.createElement(_Icons.CheckboxIcon, {
43
45
  height: 16,
44
46
  width: 16
45
47
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["Checkbox","forwardRef","ref","className","hover","id","rest","classnames","displayName"],"sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n forwardRef,\n BaseHTMLAttributes,\n InputHTMLAttributes,\n Ref,\n} from \"react\";\nimport classnames from \"classnames\";\nimport CheckboxIcon from \"../Icons/collection/Checkbox\";\nimport { StyledCheckbox, StyledInput, StyledLabel } from \"./Styles\";\n\nexport interface ICheckboxProps extends BaseHTMLAttributes<HTMLInputElement> {\n /** CSS classes */\n className?: string;\n /** Set hover style */\n hover?: boolean;\n /** Id of input and for of label */\n id?: string;\n}\n\n/**\n * Checkbox component\n */\nexport const Checkbox = forwardRef(\n (\n {\n className,\n hover,\n id = \"checkbox\",\n ...rest\n }: InputHTMLAttributes<HTMLInputElement> & ICheckboxProps,\n ref: Ref<HTMLInputElement> | null | undefined\n ) => {\n return (\n <StyledCheckbox\n className={classnames(\n \"c-checkbox\",\n {\n \"c-checkbox__hover\": hover,\n \"c-checkbox__controlled\": typeof hover === \"boolean\",\n },\n className\n )}\n hover={hover}\n >\n <StyledInput\n id={id}\n className=\"c-checkbox--input\"\n type=\"checkbox\"\n ref={ref}\n {...rest}\n />\n <StyledLabel htmlFor={id} className=\"c-checkbox--label\">\n <CheckboxIcon height={16} width={16} />\n </StyledLabel>\n </StyledCheckbox>\n );\n }\n);\n\nCheckbox.displayName = \"Checkbox\";\n"],"mappings":";;;;;;;AAAA;AAMA;AACA;AACA;AAAoE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWpE;AACA;AACA;AACO,IAAMA,QAAQ,gBAAG,IAAAC,iBAAU,EAChC,gBAOEC,GAA6C,EAC1C;EAAA,IANDC,SAAS,QAATA,SAAS;IACTC,KAAK,QAALA,KAAK;IAAA,eACLC,EAAE;IAAFA,EAAE,wBAAG,UAAU;IACZC,IAAI;EAIT,oBACE,6BAAC,sBAAc;IACb,SAAS,EAAE,IAAAC,mBAAU,EACnB,YAAY,EACZ;MACE,mBAAmB,EAAEH,KAAK;MAC1B,wBAAwB,EAAE,OAAOA,KAAK,KAAK;IAC7C,CAAC,EACDD,SAAS,CACT;IACF,KAAK,EAAEC;EAAM,gBAEb,6BAAC,mBAAW;IACV,EAAE,EAAEC,EAAG;IACP,SAAS,EAAC,mBAAmB;IAC7B,IAAI,EAAC,UAAU;IACf,GAAG,EAAEH;EAAI,GACLI,IAAI,EACR,eACF,6BAAC,mBAAW;IAAC,OAAO,EAAED,EAAG;IAAC,SAAS,EAAC;EAAmB,gBACrD,6BAAC,iBAAY;IAAC,MAAM,EAAE,EAAG;IAAC,KAAK,EAAE;EAAG,EAAG,CAC3B,CACC;AAErB,CAAC,CACF;AAAC;AAEFL,QAAQ,CAACQ,WAAW,GAAG,UAAU"}
1
+ {"version":3,"file":"Checkbox.js","names":["Checkbox","forwardRef","ref","className","hover","id","rest","classnames","displayName"],"sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, Ref, InputHTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledCheckbox, StyledInput, StyledLabel } from \"./Styles\";\nimport { CheckboxIcon } from \"../Icons\";\n\nexport interface CheckBoxProps extends InputHTMLAttributes<HTMLInputElement> {\n /** CSS classes */\n className?: string;\n /** Set hover style */\n hover?: boolean;\n /** Id of input and for of label */\n id?: string;\n}\n\n/**\n * Checkbox component\n */\nexport const Checkbox = forwardRef(\n (\n { className, hover, id = \"checkbox\", ...rest }: CheckBoxProps,\n ref: Ref<HTMLInputElement> | null | undefined\n ) => {\n return (\n <StyledCheckbox\n className={classnames(\n \"c-checkbox\",\n {\n \"c-checkbox__hover\": hover,\n \"c-checkbox__controlled\": typeof hover === \"boolean\",\n },\n className\n )}\n hover={hover}\n tabIndex={-1}\n >\n <StyledInput\n role=\"checkbox\"\n id={id}\n className=\"c-checkbox--input\"\n type=\"checkbox\"\n ref={ref}\n {...rest}\n />\n <StyledLabel htmlFor={id} className=\"c-checkbox--label\">\n <CheckboxIcon height={16} width={16} />\n </StyledLabel>\n </StyledCheckbox>\n );\n }\n);\n\nCheckbox.displayName = \"Checkbox\";\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AAAwC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWxC;AACA;AACA;AACO,IAAMA,QAAQ,gBAAG,IAAAC,iBAAU,EAChC,gBAEEC,GAA6C,EAC1C;EAAA,IAFDC,SAAS,QAATA,SAAS;IAAEC,KAAK,QAALA,KAAK;IAAA,eAAEC,EAAE;IAAFA,EAAE,wBAAG,UAAU;IAAKC,IAAI;EAG5C,oBACE,6BAAC,sBAAc;IACb,SAAS,EAAE,IAAAC,mBAAU,EACnB,YAAY,EACZ;MACE,mBAAmB,EAAEH,KAAK;MAC1B,wBAAwB,EAAE,OAAOA,KAAK,KAAK;IAC7C,CAAC,EACDD,SAAS,CACT;IACF,KAAK,EAAEC,KAAM;IACb,QAAQ,EAAE,CAAC;EAAE,gBAEb,6BAAC,mBAAW;IACV,IAAI,EAAC,UAAU;IACf,EAAE,EAAEC,EAAG;IACP,SAAS,EAAC,mBAAmB;IAC7B,IAAI,EAAC,UAAU;IACf,GAAG,EAAEH;EAAI,GACLI,IAAI,EACR,eACF,6BAAC,mBAAW;IAAC,OAAO,EAAED,EAAG;IAAC,SAAS,EAAC;EAAmB,gBACrD,6BAAC,mBAAY;IAAC,MAAM,EAAE,EAAG;IAAC,KAAK,EAAE;EAAG,EAAG,CAC3B,CACC;AAErB,CAAC,CACF;AAAC;AAEFL,QAAQ,CAACQ,WAAW,GAAG,UAAU"}
@@ -11,7 +11,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
11
11
  var StyledInput = _styledComponents.default.input.withConfig({
12
12
  displayName: "Styles__StyledInput",
13
13
  componentId: "sc-y7zymm-0"
14
- })(["display:none;"]);
14
+ })(["opacity:0;position:absolute;cursor:pointer;pointer-events:none;"]);
15
15
  exports.StyledInput = StyledInput;
16
16
  StyledInput.displayName = "StyledInput";
17
17
  var StyledLabel = _styledComponents.default.label.withConfig({
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["StyledInput","styled","input","displayName","StyledLabel","label","StyledCheckbox","div","props","hover","css"],"sources":["../../../../src/components/Checkbox/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { ICheckboxProps } from \"./Checkbox\";\n\nexport const StyledInput = styled.input`\n display: none;\n`;\nStyledInput.displayName = \"StyledInput\";\n\nexport const StyledLabel = styled.label``;\nStyledLabel.displayName = \"StyledLabel\";\n\nexport const StyledCheckbox = styled.div<ICheckboxProps>`\n height: 16px;\n width: 16px;\n position: relative;\n transition-duration: 0.2s;\n border-radius: 2px;\n path {\n transition-duration: 0.2s;\n stroke: transparent;\n stroke-dashoffset: 12;\n stroke-dasharray: 12;\n }\n svg {\n cursor: pointer;\n border-radius: 2px;\n fill: transparent;\n }\n rect {\n transition-duration: 0.2s;\n stroke: var(--color-theme-500);\n }\n\n ${StyledInput}:disabled ~ ${StyledLabel} {\n pointer-events: none;\n opacity: 0.5;\n }\n\n ${StyledInput}:focus ~ ${StyledLabel} {\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n &:not(.c-checkbox__controlled)\n ${StyledInput}:hover:not(:checked)\n ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n ${(props) =>\n props.hover &&\n css`\n ${StyledInput}:not(:checked) ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n `}\n\n ${StyledInput}:checked ~ ${StyledLabel} {\n path {\n stroke: var(--page-paper-main);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 19px;\n }\n }\n`;\nStyledCheckbox.displayName = \"StyledCheckbox\";\n"],"mappings":";;;;;;;AAAA;AAAgD;AAAA;AAGzC,IAAMA,WAAW,GAAGC,yBAAM,CAACC,KAAK;EAAA;EAAA;AAAA,qBAEtC;AAAC;AACFF,WAAW,CAACG,WAAW,GAAG,aAAa;AAEhC,IAAMC,WAAW,GAAGH,yBAAM,CAACI,KAAK;EAAA;EAAA;AAAA,QAAE;AAAC;AAC1CD,WAAW,CAACD,WAAW,GAAG,aAAa;AAEhC,IAAMG,cAAc,GAAGL,yBAAM,CAACM,GAAG;EAAA;EAAA;AAAA,quBAsBpCP,WAAW,EAAeI,WAAW,EAKrCJ,WAAW,EAAYI,WAAW,EAQhCJ,WAAW,EACTI,WAAW,EAWf,UAACI,KAAK;EAAA,OACNA,KAAK,CAACC,KAAK,QACXC,qBAAG,qJACCV,WAAW,EAAoBI,WAAW,CAU7C;AAAA,GAEDJ,WAAW,EAAcI,WAAW,CAUvC;AAAC;AACFE,cAAc,CAACH,WAAW,GAAG,gBAAgB"}
1
+ {"version":3,"file":"Styles.js","names":["StyledInput","styled","input","displayName","StyledLabel","label","StyledCheckbox","div","props","hover","css"],"sources":["../../../../src/components/Checkbox/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport type { CheckBoxProps } from \"./Checkbox\";\n\nexport const StyledInput = styled.input`\n opacity: 0;\n position: absolute;\n cursor: pointer;\n pointer-events: none;\n`;\nStyledInput.displayName = \"StyledInput\";\n\nexport const StyledLabel = styled.label``;\nStyledLabel.displayName = \"StyledLabel\";\n\nexport const StyledCheckbox = styled.div<Partial<CheckBoxProps>>`\n height: 16px;\n width: 16px;\n position: relative;\n transition-duration: 0.2s;\n border-radius: 2px;\n path {\n transition-duration: 0.2s;\n stroke: transparent;\n stroke-dashoffset: 12;\n stroke-dasharray: 12;\n }\n svg {\n cursor: pointer;\n border-radius: 2px;\n fill: transparent;\n }\n rect {\n transition-duration: 0.2s;\n stroke: var(--color-theme-500);\n }\n\n ${StyledInput}:disabled ~ ${StyledLabel} {\n pointer-events: none;\n opacity: 0.5;\n }\n\n ${StyledInput}:focus ~ ${StyledLabel} {\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n // prettier-ignore\n &:not(.c-checkbox__controlled) ${StyledInput}:hover:not(:checked) ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n ${(props) =>\n props.hover &&\n css`\n ${StyledInput}:not(:checked) ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n `}\n\n ${StyledInput}:checked ~ ${StyledLabel} {\n path {\n stroke: var(--page-paper-main);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 19px;\n }\n }\n`;\nStyledCheckbox.displayName = \"StyledCheckbox\";\n"],"mappings":";;;;;;;AAAA;AAAgD;AAAA;AAGzC,IAAMA,WAAW,GAAGC,yBAAM,CAACC,KAAK;EAAA;EAAA;AAAA,uEAKtC;AAAC;AACFF,WAAW,CAACG,WAAW,GAAG,aAAa;AAEhC,IAAMC,WAAW,GAAGH,yBAAM,CAACI,KAAK;EAAA;EAAA;AAAA,QAAE;AAAC;AAC1CD,WAAW,CAACD,WAAW,GAAG,aAAa;AAEhC,IAAMG,cAAc,GAAGL,yBAAM,CAACM,GAAG;EAAA;EAAA;AAAA,quBAsBpCP,WAAW,EAAeI,WAAW,EAKrCJ,WAAW,EAAYI,WAAW,EAQHJ,WAAW,EAA0BI,WAAW,EAW/E,UAACI,KAAK;EAAA,OACNA,KAAK,CAACC,KAAK,QACXC,qBAAG,qJACCV,WAAW,EAAoBI,WAAW,CAU7C;AAAA,GAEDJ,WAAW,EAAcI,WAAW,CAUvC;AAAC;AACFE,cAAc,CAACH,WAAW,GAAG,gBAAgB"}
@@ -1,5 +1,5 @@
1
- import React, { BaseHTMLAttributes } from "react";
2
- export interface ICheckboxProps extends BaseHTMLAttributes<HTMLInputElement> {
1
+ import React, { InputHTMLAttributes } from "react";
2
+ export interface CheckBoxProps extends InputHTMLAttributes<HTMLInputElement> {
3
3
  /** CSS classes */
4
4
  className?: string;
5
5
  /** Set hover style */
@@ -10,5 +10,5 @@ export interface ICheckboxProps extends BaseHTMLAttributes<HTMLInputElement> {
10
10
  /**
11
11
  * Checkbox component
12
12
  */
13
- export declare const Checkbox: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & ICheckboxProps & React.RefAttributes<HTMLInputElement>>;
13
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckBoxProps & React.RefAttributes<HTMLInputElement>>;
14
14
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,kBAAkB,EAGnB,MAAM,OAAO,CAAC;AAKf,MAAM,WAAW,cAAe,SAAQ,kBAAkB,CAAC,gBAAgB,CAAC;IAC1E,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mCAAmC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,uIAmCpB,CAAC"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmB,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKpE,MAAM,WAAW,aAAc,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IAC1E,kBAAkB;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mCAAmC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,wFAgCpB,CAAC"}
@@ -3,8 +3,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  var _excluded = ["className", "hover", "id"];
4
4
  import React, { forwardRef } from "react";
5
5
  import classnames from "classnames";
6
- import CheckboxIcon from "../Icons/collection/Checkbox";
7
6
  import { StyledCheckbox, StyledInput, StyledLabel } from "./Styles";
7
+ import { CheckboxIcon } from "../Icons";
8
8
  /**
9
9
  * Checkbox component
10
10
  */
@@ -19,8 +19,10 @@ export var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
19
19
  "c-checkbox__hover": hover,
20
20
  "c-checkbox__controlled": typeof hover === "boolean"
21
21
  }, className),
22
- hover: hover
22
+ hover: hover,
23
+ tabIndex: -1
23
24
  }, /*#__PURE__*/React.createElement(StyledInput, _extends({
25
+ role: "checkbox",
24
26
  id: id,
25
27
  className: "c-checkbox--input",
26
28
  type: "checkbox",
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":["React","forwardRef","classnames","CheckboxIcon","StyledCheckbox","StyledInput","StyledLabel","Checkbox","ref","className","hover","id","rest","displayName"],"sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n forwardRef,\n BaseHTMLAttributes,\n InputHTMLAttributes,\n Ref,\n} from \"react\";\nimport classnames from \"classnames\";\nimport CheckboxIcon from \"../Icons/collection/Checkbox\";\nimport { StyledCheckbox, StyledInput, StyledLabel } from \"./Styles\";\n\nexport interface ICheckboxProps extends BaseHTMLAttributes<HTMLInputElement> {\n /** CSS classes */\n className?: string;\n /** Set hover style */\n hover?: boolean;\n /** Id of input and for of label */\n id?: string;\n}\n\n/**\n * Checkbox component\n */\nexport const Checkbox = forwardRef(\n (\n {\n className,\n hover,\n id = \"checkbox\",\n ...rest\n }: InputHTMLAttributes<HTMLInputElement> & ICheckboxProps,\n ref: Ref<HTMLInputElement> | null | undefined\n ) => {\n return (\n <StyledCheckbox\n className={classnames(\n \"c-checkbox\",\n {\n \"c-checkbox__hover\": hover,\n \"c-checkbox__controlled\": typeof hover === \"boolean\",\n },\n className\n )}\n hover={hover}\n >\n <StyledInput\n id={id}\n className=\"c-checkbox--input\"\n type=\"checkbox\"\n ref={ref}\n {...rest}\n />\n <StyledLabel htmlFor={id} className=\"c-checkbox--label\">\n <CheckboxIcon height={16} width={16} />\n </StyledLabel>\n </StyledCheckbox>\n );\n }\n);\n\nCheckbox.displayName = \"Checkbox\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IACVC,UAAU,QAIL,OAAO;AACd,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SAASC,cAAc,EAAEC,WAAW,EAAEC,WAAW,QAAQ,UAAU;AAWnE;AACA;AACA;AACA,OAAO,IAAMC,QAAQ,gBAAGN,UAAU,CAChC,gBAOEO,GAA6C,EAC1C;EAAA,IANDC,SAAS,QAATA,SAAS;IACTC,KAAK,QAALA,KAAK;IAAA,eACLC,EAAE;IAAFA,EAAE,wBAAG,UAAU;IACZC,IAAI;EAIT,oBACE,oBAAC,cAAc;IACb,SAAS,EAAEV,UAAU,CACnB,YAAY,EACZ;MACE,mBAAmB,EAAEQ,KAAK;MAC1B,wBAAwB,EAAE,OAAOA,KAAK,KAAK;IAC7C,CAAC,EACDD,SAAS,CACT;IACF,KAAK,EAAEC;EAAM,gBAEb,oBAAC,WAAW;IACV,EAAE,EAAEC,EAAG;IACP,SAAS,EAAC,mBAAmB;IAC7B,IAAI,EAAC,UAAU;IACf,GAAG,EAAEH;EAAI,GACLI,IAAI,EACR,eACF,oBAAC,WAAW;IAAC,OAAO,EAAED,EAAG;IAAC,SAAS,EAAC;EAAmB,gBACrD,oBAAC,YAAY;IAAC,MAAM,EAAE,EAAG;IAAC,KAAK,EAAE;EAAG,EAAG,CAC3B,CACC;AAErB,CAAC,CACF;AAEDJ,QAAQ,CAACM,WAAW,GAAG,UAAU"}
1
+ {"version":3,"file":"Checkbox.js","names":["React","forwardRef","classnames","StyledCheckbox","StyledInput","StyledLabel","CheckboxIcon","Checkbox","ref","className","hover","id","rest","displayName"],"sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, Ref, InputHTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledCheckbox, StyledInput, StyledLabel } from \"./Styles\";\nimport { CheckboxIcon } from \"../Icons\";\n\nexport interface CheckBoxProps extends InputHTMLAttributes<HTMLInputElement> {\n /** CSS classes */\n className?: string;\n /** Set hover style */\n hover?: boolean;\n /** Id of input and for of label */\n id?: string;\n}\n\n/**\n * Checkbox component\n */\nexport const Checkbox = forwardRef(\n (\n { className, hover, id = \"checkbox\", ...rest }: CheckBoxProps,\n ref: Ref<HTMLInputElement> | null | undefined\n ) => {\n return (\n <StyledCheckbox\n className={classnames(\n \"c-checkbox\",\n {\n \"c-checkbox__hover\": hover,\n \"c-checkbox__controlled\": typeof hover === \"boolean\",\n },\n className\n )}\n hover={hover}\n tabIndex={-1}\n >\n <StyledInput\n role=\"checkbox\"\n id={id}\n className=\"c-checkbox--input\"\n type=\"checkbox\"\n ref={ref}\n {...rest}\n />\n <StyledLabel htmlFor={id} className=\"c-checkbox--label\">\n <CheckboxIcon height={16} width={16} />\n </StyledLabel>\n </StyledCheckbox>\n );\n }\n);\n\nCheckbox.displayName = \"Checkbox\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAkC,OAAO;AACnE,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,cAAc,EAAEC,WAAW,EAAEC,WAAW,QAAQ,UAAU;AACnE,SAASC,YAAY,QAAQ,UAAU;AAWvC;AACA;AACA;AACA,OAAO,IAAMC,QAAQ,gBAAGN,UAAU,CAChC,gBAEEO,GAA6C,EAC1C;EAAA,IAFDC,SAAS,QAATA,SAAS;IAAEC,KAAK,QAALA,KAAK;IAAA,eAAEC,EAAE;IAAFA,EAAE,wBAAG,UAAU;IAAKC,IAAI;EAG5C,oBACE,oBAAC,cAAc;IACb,SAAS,EAAEV,UAAU,CACnB,YAAY,EACZ;MACE,mBAAmB,EAAEQ,KAAK;MAC1B,wBAAwB,EAAE,OAAOA,KAAK,KAAK;IAC7C,CAAC,EACDD,SAAS,CACT;IACF,KAAK,EAAEC,KAAM;IACb,QAAQ,EAAE,CAAC;EAAE,gBAEb,oBAAC,WAAW;IACV,IAAI,EAAC,UAAU;IACf,EAAE,EAAEC,EAAG;IACP,SAAS,EAAC,mBAAmB;IAC7B,IAAI,EAAC,UAAU;IACf,GAAG,EAAEH;EAAI,GACLI,IAAI,EACR,eACF,oBAAC,WAAW;IAAC,OAAO,EAAED,EAAG;IAAC,SAAS,EAAC;EAAmB,gBACrD,oBAAC,YAAY;IAAC,MAAM,EAAE,EAAG;IAAC,KAAK,EAAE;EAAG,EAAG,CAC3B,CACC;AAErB,CAAC,CACF;AAEDJ,QAAQ,CAACM,WAAW,GAAG,UAAU"}
@@ -1,5 +1,5 @@
1
- import { ICheckboxProps } from "./Checkbox";
1
+ import type { CheckBoxProps } from "./Checkbox";
2
2
  export declare const StyledInput: import("styled-components").StyledComponent<"input", any, {}, never>;
3
3
  export declare const StyledLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
4
- export declare const StyledCheckbox: import("styled-components").StyledComponent<"div", any, ICheckboxProps, never>;
4
+ export declare const StyledCheckbox: import("styled-components").StyledComponent<"div", any, Partial<CheckBoxProps>, never>;
5
5
  //# sourceMappingURL=Styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,WAAW,sEAEvB,CAAC;AAGF,eAAO,MAAM,WAAW,sEAAiB,CAAC;AAG1C,eAAO,MAAM,cAAc,gFAwE1B,CAAC"}
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,WAAW,sEAKvB,CAAC;AAGF,eAAO,MAAM,WAAW,sEAAiB,CAAC;AAG1C,eAAO,MAAM,cAAc,wFAuE1B,CAAC"}
@@ -2,7 +2,7 @@ import styled, { css } from "styled-components";
2
2
  export var StyledInput = styled.input.withConfig({
3
3
  displayName: "Styles__StyledInput",
4
4
  componentId: "sc-y7zymm-0"
5
- })(["display:none;"]);
5
+ })(["opacity:0;position:absolute;cursor:pointer;pointer-events:none;"]);
6
6
  StyledInput.displayName = "StyledInput";
7
7
  export var StyledLabel = styled.label.withConfig({
8
8
  displayName: "Styles__StyledLabel",
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["styled","css","StyledInput","input","displayName","StyledLabel","label","StyledCheckbox","div","props","hover"],"sources":["../../../../src/components/Checkbox/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { ICheckboxProps } from \"./Checkbox\";\n\nexport const StyledInput = styled.input`\n display: none;\n`;\nStyledInput.displayName = \"StyledInput\";\n\nexport const StyledLabel = styled.label``;\nStyledLabel.displayName = \"StyledLabel\";\n\nexport const StyledCheckbox = styled.div<ICheckboxProps>`\n height: 16px;\n width: 16px;\n position: relative;\n transition-duration: 0.2s;\n border-radius: 2px;\n path {\n transition-duration: 0.2s;\n stroke: transparent;\n stroke-dashoffset: 12;\n stroke-dasharray: 12;\n }\n svg {\n cursor: pointer;\n border-radius: 2px;\n fill: transparent;\n }\n rect {\n transition-duration: 0.2s;\n stroke: var(--color-theme-500);\n }\n\n ${StyledInput}:disabled ~ ${StyledLabel} {\n pointer-events: none;\n opacity: 0.5;\n }\n\n ${StyledInput}:focus ~ ${StyledLabel} {\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n &:not(.c-checkbox__controlled)\n ${StyledInput}:hover:not(:checked)\n ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n ${(props) =>\n props.hover &&\n css`\n ${StyledInput}:not(:checked) ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n `}\n\n ${StyledInput}:checked ~ ${StyledLabel} {\n path {\n stroke: var(--page-paper-main);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 19px;\n }\n }\n`;\nStyledCheckbox.displayName = \"StyledCheckbox\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAG/C,OAAO,IAAMC,WAAW,GAAGF,MAAM,CAACG,KAAK;EAAA;EAAA;AAAA,qBAEtC;AACDD,WAAW,CAACE,WAAW,GAAG,aAAa;AAEvC,OAAO,IAAMC,WAAW,GAAGL,MAAM,CAACM,KAAK;EAAA;EAAA;AAAA,QAAE;AACzCD,WAAW,CAACD,WAAW,GAAG,aAAa;AAEvC,OAAO,IAAMG,cAAc,GAAGP,MAAM,CAACQ,GAAG;EAAA;EAAA;AAAA,quBAsBpCN,WAAW,EAAeG,WAAW,EAKrCH,WAAW,EAAYG,WAAW,EAQhCH,WAAW,EACTG,WAAW,EAWf,UAACI,KAAK;EAAA,OACNA,KAAK,CAACC,KAAK,IACXT,GAAG,oJACCC,WAAW,EAAoBG,WAAW,CAU7C;AAAA,GAEDH,WAAW,EAAcG,WAAW,CAUvC;AACDE,cAAc,CAACH,WAAW,GAAG,gBAAgB"}
1
+ {"version":3,"file":"Styles.js","names":["styled","css","StyledInput","input","displayName","StyledLabel","label","StyledCheckbox","div","props","hover"],"sources":["../../../../src/components/Checkbox/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport type { CheckBoxProps } from \"./Checkbox\";\n\nexport const StyledInput = styled.input`\n opacity: 0;\n position: absolute;\n cursor: pointer;\n pointer-events: none;\n`;\nStyledInput.displayName = \"StyledInput\";\n\nexport const StyledLabel = styled.label``;\nStyledLabel.displayName = \"StyledLabel\";\n\nexport const StyledCheckbox = styled.div<Partial<CheckBoxProps>>`\n height: 16px;\n width: 16px;\n position: relative;\n transition-duration: 0.2s;\n border-radius: 2px;\n path {\n transition-duration: 0.2s;\n stroke: transparent;\n stroke-dashoffset: 12;\n stroke-dasharray: 12;\n }\n svg {\n cursor: pointer;\n border-radius: 2px;\n fill: transparent;\n }\n rect {\n transition-duration: 0.2s;\n stroke: var(--color-theme-500);\n }\n\n ${StyledInput}:disabled ~ ${StyledLabel} {\n pointer-events: none;\n opacity: 0.5;\n }\n\n ${StyledInput}:focus ~ ${StyledLabel} {\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n // prettier-ignore\n &:not(.c-checkbox__controlled) ${StyledInput}:hover:not(:checked) ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n\n ${(props) =>\n props.hover &&\n css`\n ${StyledInput}:not(:checked) ~ ${StyledLabel} {\n path {\n stroke: var(--color-secondary-500);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 3px;\n }\n }\n `}\n\n ${StyledInput}:checked ~ ${StyledLabel} {\n path {\n stroke: var(--page-paper-main);\n stroke-dashoffset: 24;\n }\n rect {\n stroke: var(--color-secondary);\n stroke-width: 19px;\n }\n }\n`;\nStyledCheckbox.displayName = \"StyledCheckbox\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAG/C,OAAO,IAAMC,WAAW,GAAGF,MAAM,CAACG,KAAK;EAAA;EAAA;AAAA,uEAKtC;AACDD,WAAW,CAACE,WAAW,GAAG,aAAa;AAEvC,OAAO,IAAMC,WAAW,GAAGL,MAAM,CAACM,KAAK;EAAA;EAAA;AAAA,QAAE;AACzCD,WAAW,CAACD,WAAW,GAAG,aAAa;AAEvC,OAAO,IAAMG,cAAc,GAAGP,MAAM,CAACQ,GAAG;EAAA;EAAA;AAAA,quBAsBpCN,WAAW,EAAeG,WAAW,EAKrCH,WAAW,EAAYG,WAAW,EAQHH,WAAW,EAA0BG,WAAW,EAW/E,UAACI,KAAK;EAAA,OACNA,KAAK,CAACC,KAAK,IACXT,GAAG,oJACCC,WAAW,EAAoBG,WAAW,CAU7C;AAAA,GAEDH,WAAW,EAAcG,WAAW,CAUvC;AACDE,cAAc,CAACH,WAAW,GAAG,gBAAgB"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const StyledSelectInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Input/Input").InputProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "form" | "slot" | "style" | "title" | "pattern" | "key" | "css" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "cs" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tw" | "size" | "list" | "step" | "height" | "max" | "min" | "width" | "crossOrigin" | "alt" | "src" | "autoComplete" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required">, keyof import("../Input/Input").InputProps> & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
3
3
  export declare const StyledSelectForm: import("styled-components").StyledComponent<"form", any, {}, never>;
4
- export declare const StyledCheckbox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("../Checkbox").ICheckboxProps & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
4
+ export declare const StyledCheckbox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Checkbox").CheckBoxProps & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
5
5
  export declare const StyledRadioButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("../RadioButton").IRadioButtonProps & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
6
6
  //# sourceMappingURL=Styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,iBAAiB,kuKAAkB,CAAC;AAIjD,eAAO,MAAM,gBAAgB,qEAY5B,CAAC;AAIF,eAAO,MAAM,cAAc,wPAE1B,CAAC;AAIF,eAAO,MAAM,iBAAiB,8PAE7B,CAAC"}
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,iBAAiB,kuKAAkB,CAAC;AAIjD,eAAO,MAAM,gBAAgB,qEAY5B,CAAC;AAIF,eAAO,MAAM,cAAc,+LAE1B,CAAC;AAIF,eAAO,MAAM,iBAAiB,8PAE7B,CAAC"}
package/dist/index.js CHANGED
@@ -10130,7 +10130,7 @@
10130
10130
  var StyledInput$3 = styled__default["default"].input.withConfig({
10131
10131
  displayName: "Styles__StyledInput",
10132
10132
  componentId: "sc-y7zymm-0"
10133
- })(["display:none;"]);
10133
+ })(["opacity:0;position:absolute;cursor:pointer;pointer-events:none;"]);
10134
10134
  StyledInput$3.displayName = "StyledInput";
10135
10135
  var StyledLabel = styled__default["default"].label.withConfig({
10136
10136
  displayName: "Styles__StyledLabel",
@@ -10160,8 +10160,10 @@
10160
10160
  "c-checkbox__hover": hover,
10161
10161
  "c-checkbox__controlled": typeof hover === "boolean"
10162
10162
  }, className),
10163
- hover: hover
10163
+ hover: hover,
10164
+ tabIndex: -1
10164
10165
  }, /*#__PURE__*/React__default["default"].createElement(StyledInput$3, _extends({
10166
+ role: "checkbox",
10165
10167
  id: id,
10166
10168
  className: "c-checkbox--input",
10167
10169
  type: "checkbox",