@kvdbil/components 8.8.0 → 9.0.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.
@@ -12,10 +12,10 @@
12
12
  flex-wrap: wrap;
13
13
  border-bottom: 3px solid ${({theme:y})=>y.colors.gray.light6};
14
14
 
15
- ${l.mq("mobileL")} {
15
+ ${l.mq("mobileM")} {
16
16
  flex-direction: row;
17
17
  justify-content: ${({justify:y})=>y};
18
18
  }
19
19
  `,u=s.default.div`
20
20
  padding: 0.5rem 0;
21
- `,p=s.default.div``,c=({activeColor:y="secondary",justify:R="end",initalActive:D,children:T=[],kbNavAutoOpen:q=!0,onTabClick:O=()=>{}})=>{var E,A;const v=e.Children.map(T,f=>f),[x,g]=e.useState(()=>D!=null?D:v.findIndex(f=>!f.props.isDisabled)),$=e.useRef([]),I=Boolean((A=(E=v[x])==null?void 0:E.props)==null?void 0:A.children),L=(f,m)=>{if(f.preventDefault(),f.key!=="Enter"||q||g(m),f.key==="ArrowLeft"||f.key==="ArrowRight"){const b=q?x:m,h=f.key==="ArrowRight",k=h?b+1:0,w=h?v.length:b,B=v.slice(k,w);h||B.reverse();const C=B.findIndex(j=>!j.props.isDisabled);if(C!==-1){const j=h?b+(C+1):b-(C+1);q&&g(j),$.current[j].focus()}}};return a.default.createElement(o,null,a.default.createElement(i.UnmountClosed,{isOpened:!0},a.default.createElement(d,{justify:R,role:"tablist"},v.map((f,m)=>f?a.default.createElement(t.default,{key:m,label:f.props.label,isDisabled:f.props.isDisabled,index:m,id:m,isActive:x===m,activeColor:y,onClick:(b,h)=>{f.props.isDisabled||(O(b,h),((k,w)=>{k.preventDefault(),g(w)})(b,h))},onKeyUp:L,ref:b=>$.current[m]=b}):null)),I&&a.default.createElement(u,null,v.map((f,m)=>{const b=f.props.children&&x===m;return a.default.createElement(p,{key:m,id:`tabpanel-${m}`,role:"tabpanel","aria-labelledby":`tab-${m}`,"aria-hidden":b?"false":"true"},b&&f.props.children)}))))};exports.Tabs=c,exports.default=c;
21
+ `,p=s.default.div``,c=({activeColor:y="secondary",justify:R="end",initalActive:D,children:T=[],kbNavAutoOpen:q=!0,onTabClick:O=()=>{}})=>{var E,A;const v=e.Children.map(T,f=>f),[x,g]=e.useState(()=>D!=null?D:v.findIndex(f=>!f.props.isDisabled)),$=e.useRef([]),I=Boolean((A=(E=v[x])==null?void 0:E.props)==null?void 0:A.children),M=(f,m)=>{if(f.preventDefault(),f.key!=="Enter"||q||g(m),f.key==="ArrowLeft"||f.key==="ArrowRight"){const b=q?x:m,h=f.key==="ArrowRight",k=h?b+1:0,w=h?v.length:b,B=v.slice(k,w);h||B.reverse();const C=B.findIndex(j=>!j.props.isDisabled);if(C!==-1){const j=h?b+(C+1):b-(C+1);q&&g(j),$.current[j].focus()}}};return a.default.createElement(o,null,a.default.createElement(i.UnmountClosed,{isOpened:!0},a.default.createElement(d,{justify:R,role:"tablist"},v.map((f,m)=>f?a.default.createElement(t.default,{key:m,label:f.props.label,isDisabled:f.props.isDisabled,index:m,id:m,isActive:x===m,activeColor:y,onClick:(b,h)=>{f.props.isDisabled||(O(b,h),((k,w)=>{k.preventDefault(),g(w)})(b,h))},onKeyUp:M,ref:b=>$.current[m]=b}):null)),I&&a.default.createElement(u,null,v.map((f,m)=>{const b=f.props.children&&x===m;return a.default.createElement(p,{key:m,id:`tabpanel-${m}`,role:"tabpanel","aria-labelledby":`tab-${m}`,"aria-hidden":b?"false":"true"},b&&f.props.children)}))))};exports.Tabs=c,exports.default=c;
@@ -1 +1 @@
1
- "use strict";function e(r){if(r&&r.__esModule)return r;var n=Object.create(null);return r&&Object.keys(r).forEach(function(o){if(o!=="default"){var i=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return r[o]}})}}),n.default=r,Object.freeze(n)}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));exports.default=function({title:r="CommentIcon",titleId:n,...o}){return t.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":n,...o},r?t.createElement("title",{id:n},r):null,t.createElement("path",{d:"M12 23.25c6.213 0 11.25-5.037 11.25-11.25S18.213.75 12 .75.75 5.787.75 12 5.787 23.25 12 23.25ZM6 12h12M6 7.5h12M6 16.5h6",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))};
1
+ "use strict";function e(r){if(r&&r.__esModule)return r;var n=Object.create(null);return r&&Object.keys(r).forEach(function(o){if(o!=="default"){var l=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(n,o,l.get?l:{enumerable:!0,get:function(){return r[o]}})}}),n.default=r,Object.freeze(n)}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));exports.default=function({title:r="CommentIcon",titleId:n,...o}){return t.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":n,...o},r?t.createElement("title",{id:n},r):null,t.createElement("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))};
@@ -12,7 +12,7 @@ import i,{Children as R,useState as k,useRef as I}from"react";import $ from"./Ta
12
12
  flex-wrap: wrap;
13
13
  border-bottom: 3px solid ${({theme:o})=>o.colors.gray.light6};
14
14
 
15
- ${B("mobileL")} {
15
+ ${B("mobileM")} {
16
16
  flex-direction: row;
17
17
  justify-content: ${({justify:o})=>o};
18
18
  }
@@ -1 +1 @@
1
- import*as e from"react";function r({title:t="CommentIcon",titleId:n,...o}){return e.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":n,...o},t?e.createElement("title",{id:n},t):null,e.createElement("path",{d:"M12 23.25c6.213 0 11.25-5.037 11.25-11.25S18.213.75 12 .75.75 5.787.75 12 5.787 23.25 12 23.25ZM6 12h12M6 7.5h12M6 16.5h6",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))}export{r as default};
1
+ import*as e from"react";function r({title:t="CommentIcon",titleId:n,...o}){return e.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":n,...o},t?e.createElement("title",{id:n},t):null,e.createElement("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))}export{r as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvdbil/components",
3
- "version": "8.8.0",
3
+ "version": "9.0.1",
4
4
  "sideEffects": false,
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import ReactSelect, { IndicatorProps, NamedProps, OptionTypeBase } from 'react-select';
2
+ import ReactSelect, { ActionMeta, IndicatorProps, NamedProps, OptionTypeBase, ValueType } from 'react-select';
3
3
  import { Color } from '../../Types';
4
4
  export interface DropdownIndicatorProps extends IndicatorProps<OptionTypeBase, false> {
5
5
  selectProps: {
@@ -27,7 +27,7 @@ export interface SelectProps extends NamedProps<OptionType> {
27
27
  helperText?: string;
28
28
  isDisabled?: boolean;
29
29
  label?: string;
30
- onChange(...args: any): void;
30
+ onChange(value: ValueType<OptionType, false>, actionMeta: ActionMeta<OptionType>): void;
31
31
  placeholder?: string;
32
32
  prefix?: ReactNode;
33
33
  name: string;