@corva/ui 0.99.0-6 → 0.99.0-8
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.
- package/cjs-bundle/componentsV2/Button/Button.scss.js +1 -1
- package/cjs-bundle/componentsV2/Checkbox/Checkbox.js +1 -0
- package/cjs-bundle/componentsV2/CheckboxGroup/CheckboxGroup.js +1 -0
- package/cjs-bundle/componentsV2/Chip/Chip.js +1 -0
- package/cjs-bundle/componentsV2/Chip/Chip.scss.js +1 -0
- package/cjs-bundle/componentsV2/LoaderCircular/LoaderCircular.js +1 -0
- package/cjs-bundle/componentsV2/Popover/Popover.js +1 -1
- package/cjs-bundle/componentsV2/Radio/Radio.js +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.js +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.js +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.scss.js +1 -0
- package/cjs-bundle/componentsV2/RadioGroup/RadioGroup.js +1 -0
- package/cjs-bundle/componentsV2/TextInput/TextInput.js +1 -0
- package/cjs-bundle/componentsV2/TextInput/TextInput.scss.js +1 -0
- package/cjs-bundle/componentsV2/TextInput/useShrink.js +1 -0
- package/cjs-bundle/componentsV2/TextLink/TextLink.js +1 -0
- package/cjs-bundle/componentsV2/TextLink/TextLink.scss.js +1 -0
- package/cjs-bundle/componentsV2/TextMiddleTruncated/TextMiddleTruncated.js +1 -0
- package/cjs-bundle/componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js +1 -0
- package/cjs-bundle/componentsV2/TextTruncated/TextTruncated.js +1 -0
- package/cjs-bundle/componentsV2/TextTruncated/TextTruncated.scss.js +1 -0
- package/cjs-bundle/componentsV2/Tooltip/Tooltip.js +1 -1
- package/cjs-bundle/componentsV2/index.js +1 -1
- package/cjs-bundle/icons/customIcons/icons/Checkbox.js +1 -1
- package/cjs-bundle/icons/customIcons/icons/CheckboxChecked.js +1 -1
- package/cjs-bundle/icons/customIcons/icons/CheckboxIndeterminate.js +1 -1
- package/cjs-bundle/icons/customIcons/icons/RadioChecked.js +1 -1
- package/componentsV2/Button/Button.d.ts.map +1 -1
- package/componentsV2/Button/Button.scss.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/componentsV2/Checkbox/Checkbox.d.ts +27 -0
- package/componentsV2/Checkbox/Checkbox.d.ts.map +1 -0
- package/componentsV2/Checkbox/Checkbox.js +1 -0
- package/componentsV2/Checkbox/Checkbox.stories.d.ts +12 -0
- package/componentsV2/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/componentsV2/Checkbox/index.d.ts +2 -0
- package/componentsV2/Checkbox/index.d.ts.map +1 -0
- package/componentsV2/CheckboxGroup/CheckboxGroup.d.ts +11 -0
- package/componentsV2/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/componentsV2/CheckboxGroup/CheckboxGroup.js +1 -0
- package/componentsV2/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
- package/componentsV2/CheckboxGroup/CheckboxGroup.stories.d.ts.map +1 -0
- package/componentsV2/CheckboxGroup/index.d.ts +2 -0
- package/componentsV2/CheckboxGroup/index.d.ts.map +1 -0
- package/componentsV2/Chip/Chip.d.ts +19 -0
- package/componentsV2/Chip/Chip.d.ts.map +1 -0
- package/componentsV2/Chip/Chip.js +1 -0
- package/componentsV2/Chip/Chip.scss.js +1 -0
- package/componentsV2/Chip/Chip.stories.d.ts +13 -0
- package/componentsV2/Chip/Chip.stories.d.ts.map +1 -0
- package/componentsV2/Chip/index.d.ts +2 -0
- package/componentsV2/Chip/index.d.ts.map +1 -0
- package/componentsV2/LoaderCircular/LoaderCircular.d.ts +11 -0
- package/componentsV2/LoaderCircular/LoaderCircular.d.ts.map +1 -0
- package/componentsV2/LoaderCircular/LoaderCircular.js +1 -0
- package/componentsV2/LoaderCircular/LoaderCircular.stories.d.ts +10 -0
- package/componentsV2/LoaderCircular/LoaderCircular.stories.d.ts.map +1 -0
- package/componentsV2/LoaderCircular/index.d.ts +2 -0
- package/componentsV2/LoaderCircular/index.d.ts.map +1 -0
- package/componentsV2/Popover/Popover.d.ts +1 -1
- package/componentsV2/Popover/Popover.d.ts.map +1 -1
- package/componentsV2/Popover/Popover.js +1 -1
- package/componentsV2/Radio/Radio.d.ts +19 -0
- package/componentsV2/Radio/Radio.d.ts.map +1 -0
- package/componentsV2/Radio/Radio.js +1 -0
- package/componentsV2/Radio/Radio.stories.d.ts +11 -0
- package/componentsV2/Radio/Radio.stories.d.ts.map +1 -0
- package/componentsV2/Radio/index.d.ts +2 -0
- package/componentsV2/Radio/index.d.ts.map +1 -0
- package/componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.d.ts +37 -0
- package/componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.d.ts.map +1 -0
- package/componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.js +1 -0
- package/componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js +1 -0
- package/componentsV2/RadioAndCheckboxGroup/index.d.ts +2 -0
- package/componentsV2/RadioAndCheckboxGroup/index.d.ts.map +1 -0
- package/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.d.ts +30 -0
- package/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.d.ts.map +1 -0
- package/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.js +1 -0
- package/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.scss.js +1 -0
- package/componentsV2/RadioAndCheckboxLabel/index.d.ts +3 -0
- package/componentsV2/RadioAndCheckboxLabel/index.d.ts.map +1 -0
- package/componentsV2/RadioGroup/RadioGroup.d.ts +11 -0
- package/componentsV2/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/componentsV2/RadioGroup/RadioGroup.js +1 -0
- package/componentsV2/RadioGroup/RadioGroup.stories.d.ts +12 -0
- package/componentsV2/RadioGroup/RadioGroup.stories.d.ts.map +1 -0
- package/componentsV2/RadioGroup/index.d.ts +2 -0
- package/componentsV2/RadioGroup/index.d.ts.map +1 -0
- package/componentsV2/TextInput/TextInput.d.ts +30 -0
- package/componentsV2/TextInput/TextInput.d.ts.map +1 -0
- package/componentsV2/TextInput/TextInput.js +1 -0
- package/componentsV2/TextInput/TextInput.scss.js +1 -0
- package/componentsV2/TextInput/TextInput.stories.d.ts +15 -0
- package/componentsV2/TextInput/TextInput.stories.d.ts.map +1 -0
- package/componentsV2/TextInput/index.d.ts +2 -0
- package/componentsV2/TextInput/index.d.ts.map +1 -0
- package/componentsV2/TextInput/useShrink.d.ts +24 -0
- package/componentsV2/TextInput/useShrink.d.ts.map +1 -0
- package/componentsV2/TextInput/useShrink.js +1 -0
- package/componentsV2/TextLink/TextLink.d.ts +28 -0
- package/componentsV2/TextLink/TextLink.d.ts.map +1 -0
- package/componentsV2/TextLink/TextLink.js +1 -0
- package/componentsV2/TextLink/TextLink.scss.js +1 -0
- package/componentsV2/TextLink/TextLink.stories.d.ts +10 -0
- package/componentsV2/TextLink/TextLink.stories.d.ts.map +1 -0
- package/componentsV2/TextLink/index.d.ts +2 -0
- package/componentsV2/TextLink/index.d.ts.map +1 -0
- package/componentsV2/TextMiddleTruncated/TextMiddleTruncated.d.ts +11 -0
- package/componentsV2/TextMiddleTruncated/TextMiddleTruncated.d.ts.map +1 -0
- package/componentsV2/TextMiddleTruncated/TextMiddleTruncated.js +1 -0
- package/componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js +1 -0
- package/componentsV2/TextMiddleTruncated/TextMiddleTruncated.stories.d.ts +9 -0
- package/componentsV2/TextMiddleTruncated/TextMiddleTruncated.stories.d.ts.map +1 -0
- package/componentsV2/TextMiddleTruncated/index.d.ts +2 -0
- package/componentsV2/TextMiddleTruncated/index.d.ts.map +1 -0
- package/componentsV2/TextTruncated/TextTruncated.d.ts +15 -0
- package/componentsV2/TextTruncated/TextTruncated.d.ts.map +1 -0
- package/componentsV2/TextTruncated/TextTruncated.js +1 -0
- package/componentsV2/TextTruncated/TextTruncated.scss.js +1 -0
- package/componentsV2/TextTruncated/TextTruncated.stories.d.ts +11 -0
- package/componentsV2/TextTruncated/TextTruncated.stories.d.ts.map +1 -0
- package/componentsV2/TextTruncated/index.d.ts +2 -0
- package/componentsV2/TextTruncated/index.d.ts.map +1 -0
- package/componentsV2/Tooltip/Tooltip.js +1 -1
- package/componentsV2/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/componentsV2/index.d.ts +10 -0
- package/componentsV2/index.d.ts.map +1 -1
- package/componentsV2/index.js +1 -1
- package/icons/customIcons/icons/Checkbox.d.ts.map +1 -1
- package/icons/customIcons/icons/Checkbox.js +1 -1
- package/icons/customIcons/icons/CheckboxChecked.d.ts.map +1 -1
- package/icons/customIcons/icons/CheckboxChecked.js +1 -1
- package/icons/customIcons/icons/CheckboxIndeterminate.d.ts.map +1 -1
- package/icons/customIcons/icons/CheckboxIndeterminate.js +1 -1
- package/icons/customIcons/icons/RadioChecked.d.ts.map +1 -1
- package/icons/customIcons/icons/RadioChecked.js +1 -1
- package/package.json +1 -1
- package/storyBookHelpers/components.d.ts +1 -0
- package/storyBookHelpers/components.d.ts.map +1 -1
- package/styles/common.scss +15 -1
- package/styles/utils.scss +13 -0
- package/styles/vars.base.scss +2 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ChangeEvent, ComponentType, ReactNode } from 'react';
|
|
2
|
+
type InputComponentProps = {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onChange?: (checked: boolean, event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
size?: 'small' | 'medium';
|
|
7
|
+
};
|
|
8
|
+
export type RadioAndCheckboxGroupProps<T, V> = {
|
|
9
|
+
component: ComponentType<InputComponentProps>;
|
|
10
|
+
getOnChangeHandler: (optionValue: T, value?: V) => InputComponentProps['onChange'];
|
|
11
|
+
getOptionChecked: (optionValue: T, value?: V) => boolean;
|
|
12
|
+
value?: V;
|
|
13
|
+
/**
|
|
14
|
+
* Array of values and their labels
|
|
15
|
+
*/
|
|
16
|
+
options?: {
|
|
17
|
+
value: T;
|
|
18
|
+
label: ReactNode;
|
|
19
|
+
}[];
|
|
20
|
+
/**
|
|
21
|
+
* Group label
|
|
22
|
+
*/
|
|
23
|
+
label?: ReactNode;
|
|
24
|
+
message?: ReactNode;
|
|
25
|
+
status?: 'error';
|
|
26
|
+
size?: 'small' | 'medium';
|
|
27
|
+
direction?: 'horizontal' | 'vertical';
|
|
28
|
+
/**
|
|
29
|
+
* controls spacing between options
|
|
30
|
+
*/
|
|
31
|
+
spacing?: 'dense' | 'normal';
|
|
32
|
+
className?: string;
|
|
33
|
+
testId?: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const RadioAndCheckboxGroup: <T, V>({ component: Component, getOnChangeHandler, getOptionChecked, value, testId, className, label, status, message, options, size, spacing, direction, }: RadioAndCheckboxGroupProps<T, V>) => JSX.Element;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=RadioAndCheckboxGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioAndCheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAQvE,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5E,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,CAAC,EAAE,CAAC,IAAI;IAC7C,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC9C,kBAAkB,EAAE,CAAC,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,mBAAmB,CAAC,UAAU,CAAC,CAAC;IACnF,gBAAgB,EAAE,CAAC,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC;IACzD,KAAK,CAAC,EAAE,CAAC,CAAC;IAEV;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,CAAC,CAAC;QACT,KAAK,EAAE,SAAS,CAAC;KAClB,EAAE,CAAC;IACJ;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAkBF,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,CAAC,wJAcvC,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,gBAqClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useMemo as o}from"react";import n from"classnames";import{FormControl as a,FormLabel as i,FormGroup as t,FormHelperText as l}from"@material-ui/core";import c from"./RadioAndCheckboxGroup.scss.js";var s={normal:c.spacing_normal,dense:c.spacing_dense},m={horizontal:c.horizontal,vertical:c.vertical},d=function(d){var p=d.component,u=d.getOnChangeHandler,v=d.getOptionChecked,h=d.value,f=d.testId,g=d.className,b=d.label,z=d.status,C=d.message,N=d.options,k=void 0===N?[]:N,x=d.size,j=void 0===x?"medium":x,O=d.spacing,_=void 0===O?"normal":O,A=d.direction,G=void 0===A?"vertical":A,H=o((function(){return null==k?void 0:k.map((function(e){var r=e.value;return u(r,h)}))}),[k,u,h]);return e("div",{className:n(c.root,s[_],m[G],g),"data-testid":f,children:r(a,{component:"fieldset",error:"error"===z,className:c.group,children:[b&&e(i,{component:"legend",className:c.label,children:b}),e(t,{children:k.map((function(r,o){return e(p,{label:r.label,checked:v(r.value,h),size:j,onChange:H[o]},o)}))}),C&&e(l,{children:C})]})})};export{d as RadioAndCheckboxGroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from'./../../ext-esm/style-inject/dist/style-inject.es.js';var _={spacing:"8",root:"RadioAndCheckboxGroup_root__tLctB",group:"RadioAndCheckboxGroup_group__oZa4f",label:"RadioAndCheckboxGroup_label__3qzmz",spacing_normal:"RadioAndCheckboxGroup_spacing_normal__yoZrA",spacing_dense:"RadioAndCheckboxGroup_spacing_dense__oXUQb",horizontal:"RadioAndCheckboxGroup_horizontal__eSUbx",vertical:"RadioAndCheckboxGroup_vertical__mwXJH"};o(".RadioAndCheckboxGroup_root__tLctB .RadioAndCheckboxGroup_group__oZa4f{display:flex}.RadioAndCheckboxGroup_root__tLctB .RadioAndCheckboxGroup_label__3qzmz{margin-bottom:16px}.RadioAndCheckboxGroup_root__tLctB.RadioAndCheckboxGroup_spacing_normal__yoZrA .MuiFormGroup-root{gap:16px 24px}.RadioAndCheckboxGroup_root__tLctB.RadioAndCheckboxGroup_spacing_dense__oXUQb .MuiFormGroup-root{gap:8px 16px}.RadioAndCheckboxGroup_root__tLctB.RadioAndCheckboxGroup_horizontal__eSUbx .MuiFormGroup-root{flex-flow:row wrap}.RadioAndCheckboxGroup_root__tLctB.RadioAndCheckboxGroup_vertical__mwXJH .MuiFormGroup-root{flex-flow:column nowrap}");export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/RadioAndCheckboxGroup/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChangeEvent, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
export type RadioAndCheckboxLabelProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Control to show
|
|
5
|
+
*/
|
|
6
|
+
control: ReactElement;
|
|
7
|
+
/**
|
|
8
|
+
* Label
|
|
9
|
+
*/
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Checked state
|
|
13
|
+
*/
|
|
14
|
+
checked?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Ref to underlying input
|
|
18
|
+
*/
|
|
19
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
20
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
+
size?: 'small' | 'medium';
|
|
22
|
+
/**
|
|
23
|
+
* Controls whee the label will be placed
|
|
24
|
+
*/
|
|
25
|
+
labelPlacement?: 'top' | 'bottom' | 'start' | 'end';
|
|
26
|
+
className?: string;
|
|
27
|
+
testId?: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const RadioAndCheckboxLabel: import("react").ForwardRefExoticComponent<RadioAndCheckboxLabelProps & import("react").RefAttributes<HTMLElement>>;
|
|
30
|
+
//# sourceMappingURL=RadioAndCheckboxLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioAndCheckboxLabel.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAQ9E,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1D,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;IAEpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAiBF,eAAO,MAAM,qBAAqB,oHA2CjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest as e,__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as a}from"react/jsx-runtime";import{forwardRef as l}from"react";import{FormControlLabel as o}from"@material-ui/core";import m from"classnames";import s from"./RadioAndCheckboxLabel.scss.js";var i={medium:s.medium,small:s.small},n={end:s.placementEnd,start:s.placementStart,top:s.placementTop,bottom:s.placementBottom},r=l((function(l,r){var c=l.control,d=l.testId,p=l.className,b=l.inputRef,f=l.checked,u=void 0!==f&&f,h=l.label,v=l.onChange,k=l.disabled,C=l.labelPlacement,N=void 0===C?"end":C,R=l.size,g=void 0===R?"medium":R,j=e(l,["control","testId","className","inputRef","checked","label","onChange","disabled","labelPlacement","size"]);return a("div",{className:m(s.root,n[N],i[g],p),children:a(o,t({ref:r,control:c,className:s.label,"data-testid":d,inputRef:b,checked:u,onChange:v,disabled:k,label:h,labelPlacement:N},j))})}));export{r as RadioAndCheckboxLabel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from'./../../ext-esm/style-inject/dist/style-inject.es.js';var a={spacing:"8",root:"RadioAndCheckboxLabel_root__ECgvv",label:"RadioAndCheckboxLabel_label__-TTiM",control:"RadioAndCheckboxLabel_control__0GFJg",placementStart:"RadioAndCheckboxLabel_placementStart__-4zRr",placementEnd:"RadioAndCheckboxLabel_placementEnd__Cb9wv",placementTop:"RadioAndCheckboxLabel_placementTop__1YoWH",placementBottom:"RadioAndCheckboxLabel_placementBottom__QKBJ5",medium:"RadioAndCheckboxLabel_medium__FFtpb",small:"RadioAndCheckboxLabel_small__gmtA-"};o(".RadioAndCheckboxLabel_root__ECgvv{display:block;vertical-align:middle}.RadioAndCheckboxLabel_root__ECgvv .RadioAndCheckboxLabel_label__-TTiM{gap:0 4px;margin:0;width:100%}.RadioAndCheckboxLabel_root__ECgvv .RadioAndCheckboxLabel_label__-TTiM .RadioAndCheckboxLabel_control__0GFJg{margin:var(--corvaui-radioandcheckboxlabel-shift)}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_placementStart__-4zRr .RadioAndCheckboxLabel_control__0GFJg{margin-left:0}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_placementEnd__Cb9wv .RadioAndCheckboxLabel_control__0GFJg{margin-right:0}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_placementTop__1YoWH .RadioAndCheckboxLabel_control__0GFJg{margin-top:0}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_placementBottom__QKBJ5 .RadioAndCheckboxLabel_control__0GFJg{margin-bottom:0}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_medium__FFtpb{--corvaui-radioandcheckboxlabel-shift:-8px}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_small__gmtA-{--corvaui-radioandcheckboxlabel-shift:-4px}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_small__gmtA- .MuiFormControlLabel-label{font-size:14px}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_small__gmtA- .RadioAndCheckboxLabel_control__0GFJg{padding:4px}.RadioAndCheckboxLabel_root__ECgvv.RadioAndCheckboxLabel_small__gmtA- .RadioAndCheckboxLabel_control__0GFJg svg{height:16px;width:16px}");export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/RadioAndCheckboxLabel/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { RadioAndCheckboxGroupProps } from '../RadioAndCheckboxGroup';
|
|
3
|
+
export type RadioGroupProps<T> = {
|
|
4
|
+
/**
|
|
5
|
+
* Selected value
|
|
6
|
+
*/
|
|
7
|
+
value?: T;
|
|
8
|
+
onChange?: (value: T, event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
} & Omit<RadioAndCheckboxGroupProps<T, T>, 'component' | 'getOnChangeHandler' | 'getOptionChecked' | 'value'>;
|
|
10
|
+
export declare const RadioGroup: <T>({ onChange, size, spacing, direction, ...rest }: RadioGroupProps<T>) => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAyB,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAI7F,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACrE,GAAG,IAAI,CACN,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,EAChC,WAAW,GAAG,oBAAoB,GAAG,kBAAkB,GAAG,OAAO,CAClE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,mDAMzB,eAAe,CAAC,CAAC,CAAC,gBAmBpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest as o,__spreadArray as i,__assign as n}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{useCallback as e}from"react";import{Radio as t}from"../Radio/Radio.js";import{RadioAndCheckboxGroup as a}from"../RadioAndCheckboxGroup/RadioAndCheckboxGroup.js";var d=function(o,i){return i===o},c=function(c){var m=c.onChange,p=c.size,s=void 0===p?"medium":p,u=c.spacing,f=void 0===u?"normal":u,l=c.direction,g=void 0===l?"vertical":l,v=o(c,["onChange","size","spacing","direction"]),h=e((function(o){return function(n){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];return null==m?void 0:m.apply(void 0,i([o],r,!1))}}),[m]);return r(a,n({},v,{size:s,spacing:f,direction:g,component:t,getOnChangeHandler:h,getOptionChecked:d}))};export{c as RadioGroup};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { RadioGroup } from './RadioGroup';
|
|
4
|
+
type Props = ComponentProps<typeof RadioGroup>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const Sizes: () => JSX.Element;
|
|
9
|
+
export declare const Spacing: () => JSX.Element;
|
|
10
|
+
export declare const Horisontal: () => JSX.Element;
|
|
11
|
+
export declare const NonScalarValues: () => JSX.Element;
|
|
12
|
+
//# sourceMappingURL=RadioGroup.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/RadioGroup/RadioGroup.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAqB,MAAM,OAAO,CAAC;AAI1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAmBF,eAAe,IAAI,CAAC;AAyBpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAanC,CAAC;AAEF,eAAO,MAAM,KAAK,mBAKjB,CAAC;AAQF,eAAO,MAAM,OAAO,mBAUnB,CAAC;AAQF,eAAO,MAAM,UAAU,mBAiBtB,CAAC;AAQF,eAAO,MAAM,eAAe,mBAsB3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChangeEvent, FocusEventHandler, ReactNode } from 'react';
|
|
2
|
+
export type TextInputProps = {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
value?: string | number;
|
|
5
|
+
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Underlying `input`'s element `type` attribute
|
|
9
|
+
*/
|
|
10
|
+
type?: 'text' | 'email' | 'password' | 'number' | 'phone' | 'url' | 'search';
|
|
11
|
+
status?: 'error' | 'loading';
|
|
12
|
+
spacing?: 'normal' | 'dense';
|
|
13
|
+
message?: ReactNode;
|
|
14
|
+
onFocus?: FocusEventHandler;
|
|
15
|
+
onBlur?: FocusEventHandler;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
prefix?: ReactNode;
|
|
18
|
+
suffix?: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
testId?: string;
|
|
21
|
+
};
|
|
22
|
+
declare const TextInput: {
|
|
23
|
+
({ type, className, testId, prefix, suffix, onFocus: propOnFocus, onBlur: propOnBlur, value, message, spacing, onChange, status, placeholder, disabled, label, }: TextInputProps): JSX.Element;
|
|
24
|
+
Affix({ children, className }: {
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
}): JSX.Element;
|
|
28
|
+
};
|
|
29
|
+
export { TextInput };
|
|
30
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextInput/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EAEX,iBAAiB,EAEjB,SAAS,EAGV,MAAM,OAAO,CAAC;AAyBf,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC7E,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAYF,QAAA,MAAM,SAAS;sKAgBZ,cAAc;mCAsD2B;QAAE,QAAQ,CAAC,EAAE,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;CAFvF,CAAC;AAMF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as r}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as o}from"react/jsx-runtime";import{InputAdornment as a,TextField as n}from"@material-ui/core";import{useCallback as t,useMemo as s,isValidElement as l,cloneElement as i}from"react";import d from"classnames";import{TextTruncated as m}from"../TextTruncated/TextTruncated.js";import{LoaderCircular as u}from"../LoaderCircular/LoaderCircular.js";import{useShrink as c}from"./useShrink.js";import p from"./TextInput.scss.js";var f=function(r){return l(r)?i(r,{size:16}):r?e("p",{children:r}):null},h={error:p.error,loading:""},x={normal:p.normal,dense:p.dense},g=function(l){var i=l.type,g=l.className,v=l.testId,b=l.prefix,T=l.suffix,N=l.onFocus,j=l.onBlur,y=l.value,C=void 0===y?"":y,A=l.message,I=l.spacing,z=void 0===I?"normal":I,B=l.onChange,F=l.status,L=l.placeholder,O=l.disabled,k=l.label,P=t((function(r){return null==B?void 0:B(r.target.value,r)}),[B]),S=s((function(){return{startAdornment:b&&e(a,{position:"start",className:p.adornment,disableTypography:!0,children:f(b)}),endAdornment:(T||"loading"===F)&&o(a,{position:"end",className:p.adornment,disableTypography:!0,children:["loading"===F&&e(u,{size:"xs",className:p.loader}),f(T)]})}}),[b,T,F]),W=c({propOnFocus:N,propOnBlur:j,value:C,prefix:b,suffix:T,status:F});return e("label",{className:d(p.root,F&&h[F],x[z],g),"data-testid":v,children:e(n,r({value:C,onChange:P,label:e(m,{children:k}),InputProps:S,type:i,fullWidth:!0,margin:z,helperText:A,error:"error"===F,disabled:O,placeholder:L},W))})};g.Affix=function(r){var o=r.children,a=r.className;return e("p",{className:a,children:o})};export{g as TextInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var n={spacing:"8",root:"TextInput_root__IyNqX",normal:"TextInput_normal__TNYU4",dense:"TextInput_dense__UsYfl",adornment:"TextInput_adornment__c2JxK",error:"TextInput_error__aSA-t",loader:"TextInput_loader__RKKMk"};t(".TextInput_root__IyNqX{display:block}.TextInput_root__IyNqX .MuiInputBase-input::-webkit-search-cancel-button{appearance:none;display:none}.TextInput_root__IyNqX .MuiInputLabel-root+.MuiInput-root{margin-top:16px}.TextInput_root__IyNqX.TextInput_normal__TNYU4 .MuiInput-root .MuiInput-input{padding:6px 0 5px}.TextInput_root__IyNqX.TextInput_dense__UsYfl .MuiInput-root .MuiInput-input.MuiInputBase-inputMarginDense{padding:4px 0}.TextInput_root__IyNqX .MuiFormControl-root{margin:0}.TextInput_root__IyNqX .MuiInputLabel-root{line-height:19px;transition:all .15s cubic-bezier(.4,0,.2,1);width:100%;z-index:1}.TextInput_root__IyNqX .MuiInputLabel-shrink{width:133%}.TextInput_root__IyNqX .TextInput_adornment__c2JxK{color:inherit;transition:all .15s cubic-bezier(.4,0,.2,1)}.TextInput_root__IyNqX .Mui-focused .TextInput_adornment__c2JxK{color:var(--palette-primary-main)}.TextInput_root__IyNqX.TextInput_error__aSA-t .TextInput_adornment__c2JxK{color:var(--palette-error-main)}.TextInput_loader__RKKMk:not(:last-child){margin-right:8px}");export{n as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { TextInput } from './TextInput';
|
|
4
|
+
type Props = ComponentProps<typeof TextInput>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const Spacing: () => JSX.Element;
|
|
9
|
+
export declare const LabelAndPlaceholder: () => JSX.Element;
|
|
10
|
+
export declare const ErrorState: () => JSX.Element;
|
|
11
|
+
export declare const PrefixAndSuffix: () => JSX.Element;
|
|
12
|
+
export declare const LoadingState: () => JSX.Element;
|
|
13
|
+
export declare const InputSearch: () => JSX.Element;
|
|
14
|
+
export declare const LabelTooltip: () => JSX.Element;
|
|
15
|
+
//# sourceMappingURL=TextInput.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextInput/TextInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAqBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAA6B,CAAC;AAElE,eAAO,MAAM,OAAO,mBASnB,CAAC;AAQF,eAAO,MAAM,mBAAmB,mBAA8D,CAAC;AAM/F,eAAO,MAAM,UAAU,mBAMtB,CAAC;AAMF,eAAO,MAAM,eAAe,mBAkB3B,CAAC;AASF,eAAO,MAAM,YAAY,mBAcxB,CAAC;AAMF,eAAO,MAAM,WAAW,mBAKvB,CAAC;AAOF,eAAO,MAAM,YAAY,mBAiBxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextInput/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FocusEventHandler, ReactNode } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
value: string | number;
|
|
4
|
+
propOnFocus?: FocusEventHandler;
|
|
5
|
+
propOnBlur?: FocusEventHandler;
|
|
6
|
+
prefix?: ReactNode;
|
|
7
|
+
suffix?: ReactNode;
|
|
8
|
+
status?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const useShrink: ({ propOnFocus, propOnBlur, value, suffix, prefix, status }: Props) => {
|
|
11
|
+
ref: import("react").MutableRefObject<HTMLDivElement>;
|
|
12
|
+
inputRef: import("react").MutableRefObject<HTMLInputElement>;
|
|
13
|
+
InputLabelProps: {
|
|
14
|
+
component: string;
|
|
15
|
+
shrink: boolean;
|
|
16
|
+
style: {
|
|
17
|
+
padding: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
onFocus: FocusEventHandler;
|
|
21
|
+
onBlur: FocusEventHandler;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=useShrink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShrink.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextInput/useShrink.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EAMV,MAAM,OAAO,CAAC;AAoBf,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,SAAS,+DAAgE,KAAK;;;;;;;;;;;;CAmD1F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as t,useRef as n,useCallback as r,useLayoutEffect as o,useMemo as f}from"react";var e=function(e){var u=e.propOnFocus,i=e.propOnBlur,l=e.value,p=e.suffix,c=e.prefix,a=e.status,v=String(l).length>0,s=t(!1),d=s[0],h=s[1],g=t({left:0,right:0}),x=g[0],m=g[1],L=n(null),y=n(null),B=function(){var t,n,r,o=(null===(t=function(t,n){if(t&&n&&t!==n){for(var r=0,o=0,f=t;f&&f!==n;)r+=f.offsetLeft,o+=f.offsetTop,f=f.parentElement;return{offsetLeft:r,offsetTop:o}}}(y.current,L.current))||void 0===t?void 0:t.offsetLeft)||0;m({left:o,right:((null===(n=L.current)||void 0===n?void 0:n.offsetWidth)||0)-o-((null===(r=y.current)||void 0===r?void 0:r.offsetWidth)||0)})},F=r((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null==u||u.apply(void 0,t),h(!0)}),[u]),O=r((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];null==i||i.apply(void 0,t),h(!1),B()}),[i]);return o(B,[c,p,a]),f((function(){var t=v||d;return{ref:L,inputRef:y,InputLabelProps:{component:"div",shrink:t,style:{padding:t?"0px":"0 ".concat(x.right,"px 0 ").concat(x.left,"px")}},onFocus:F,onBlur:O}}),[v,d,F,O,x])};export{e as useShrink};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentType, HTMLAttributeAnchorTarget, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
export type TextLinkProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Component content
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* URI to navigate to
|
|
9
|
+
*/
|
|
10
|
+
to?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Target frame to open a link in. You'll most likely need `_self` for same tab or `_blank` for new tab
|
|
13
|
+
*/
|
|
14
|
+
target?: HTMLAttributeAnchorTarget;
|
|
15
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
disableTooltip?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Component that will be rendered in place of an `<a/>` tag
|
|
20
|
+
*/
|
|
21
|
+
component?: ComponentType<Omit<TextLinkProps, 'component' | `disabled` | 'testId'> & {
|
|
22
|
+
'data-testid'?: string;
|
|
23
|
+
}>;
|
|
24
|
+
className?: string;
|
|
25
|
+
testId?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const TextLink: import("react").ForwardRefExoticComponent<TextLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
28
|
+
//# sourceMappingURL=TextLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,yBAAyB,EACzB,iBAAiB,EACjB,SAAS,EAEV,MAAM,OAAO,CAAC;AAQf,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CACvB,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC,GAAG;QACzD,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CACF,CAAC;IAEF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAUF,eAAO,MAAM,QAAQ,6GAoDpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest as e,__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as o,jsxs as i}from"react/jsx-runtime";import{forwardRef as l}from"react";import a from"classnames";import r from"@material-ui/icons/Language";import{Tooltip as s}from"../Tooltip/Tooltip.js";import n from"./TextLink.scss.js";var c=l((function(i,l){var a=i.to,r=i.children,s=e(i,["to","children"]);return o("a",t({},s,{href:a,ref:l,children:r}))})),d=l((function(l,d){var m=l.children,p=l.className,f=l.testId,b=l.disableTooltip,h=l.disabled,u=l.component,v=void 0===u?c:u,N=l.to,g=l.onClick,k=l.target,T=void 0===k?"_blank":k,j=e(l,["children","className","testId","disableTooltip","disabled","component","to","onClick","target"]),x=a(n.root,h?n.disabled:n.enabled),C=null==N?void 0:N.replaceAll("/","/");return o(s,{title:i("div",{className:n.tooltip,children:[o(r,{fontSize:"small",className:n.icon}),C]}),disabled:b,placement:"bottom-start",children:o("span",{ref:d,className:p,children:h?o("span",{className:x,children:m}):o(v,t({onClick:g,className:x,"data-testid":f,to:N,target:T},j,{children:m}))})})}));export{d as TextLink};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={spacing:"8",root:"TextLink_root__QwRLL",enabled:"TextLink_enabled__xRVMs",disabled:"TextLink_disabled__zz9Bk",tooltip:"TextLink_tooltip__nVhOn",icon:"TextLink_icon__-wrDV"};e(".TextLink_root__QwRLL{cursor:pointer;font-size:inherit;letter-spacing:inherit;line-height:inherit;outline:none;text-decoration:none;transition:all .15s cubic-bezier(.4,0,.2,1)}.TextLink_root__QwRLL.TextLink_enabled__xRVMs{color:var(--palette-primary-main)}.TextLink_root__QwRLL.TextLink_enabled__xRVMs:active,.TextLink_root__QwRLL.TextLink_enabled__xRVMs:focus,.TextLink_root__QwRLL.TextLink_enabled__xRVMs:hover,.TextLink_root__QwRLL.TextLink_enabled__xRVMs:visited{text-decoration:underline}.TextLink_root__QwRLL.TextLink_disabled__zz9Bk{color:var(--palette-primary-dark);pointer-events:none}.TextLink_tooltip__nVhOn{align-items:center;display:flex;max-width:300px;overflow:hidden;text-overflow:ellipsis}.TextLink_icon__-wrDV{margin-right:8px}");export{t as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { TextLink } from './TextLink';
|
|
4
|
+
type Props = ComponentProps<typeof TextLink>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const FontInheritance: () => JSX.Element;
|
|
9
|
+
export declare const Component: () => JSX.Element;
|
|
10
|
+
//# sourceMappingURL=TextLink.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextLink.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextLink/TextLink.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAErD,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAmBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAA4B,CAAC;AAEjE,eAAO,MAAM,eAAe,mBAI3B,CAAC;AAEF,eAAO,MAAM,SAAS,mBA+BrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextLink/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type TextMiddleTruncatedProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Content
|
|
4
|
+
*/
|
|
5
|
+
children: string | number;
|
|
6
|
+
disableTooltip?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const TextMiddleTruncated: ({ children, testId, className, disableTooltip, }: TextMiddleTruncatedProps) => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=TextMiddleTruncated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextMiddleTruncated.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextMiddleTruncated/TextMiddleTruncated.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,mBAAmB,qDAK7B,wBAAwB,gBAyD1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import t from"classnames";import{useRef as n,useState as i,useLayoutEffect as o}from"react";import{debounce as c}from"lodash";import{Tooltip as s}from"../Tooltip/Tooltip.js";import a from"./TextMiddleTruncated.scss.js";import{truncateInTheMiddle as l}from"../../utils/formatting.js";var d=function(d){var m=d.children,u=d.testId,f=d.className,p=d.disableTooltip,v=String(m),h=n(null),b=n(null),T=i(v),j=T[0],x=T[1];return o((function(){var r=c((function(){if(h.current&&b.current){var r=h.current.clientWidth,e=b.current,t=e.clientWidth,n=e.textContent;x(l(n,r,t))}}),200,{leading:!0}),e=new ResizeObserver(r),t=new MutationObserver(r);return h.current&&b.current&&(e.observe(h.current),e.observe(b.current),t.observe(b.current,{characterData:!0})),function(){e.disconnect(),t.disconnect()}}),[]),r(s,{title:v,disabled:p||j===v,children:e("div",{className:t(a.root,f),ref:h,"data-testid":u,children:[j,r("div",{className:a.hiddenElement,ref:b,children:v})]})})};export{d as TextMiddleTruncated};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={root:"TextMiddleTruncated_root__sMHwy",hiddenElement:"TextMiddleTruncated_hiddenElement__JW0Og"};e(".TextMiddleTruncated_root__sMHwy{overflow:hidden;white-space:nowrap}.TextMiddleTruncated_hiddenElement__JW0Og{pointer-events:none;position:absolute;visibility:hidden}");export{t as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { TextMiddleTruncated } from './TextMiddleTruncated';
|
|
4
|
+
type Props = ComponentProps<typeof TextMiddleTruncated>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const DynamicTooltips: () => JSX.Element;
|
|
9
|
+
//# sourceMappingURL=TextMiddleTruncated.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextMiddleTruncated.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextMiddleTruncated/TextMiddleTruncated.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAMjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAExD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAgBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAMnC,CAAC;AAEF,eAAO,MAAM,eAAe,mBAoB3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextMiddleTruncated/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type TextTruncatedProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Content
|
|
4
|
+
*/
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Forces the component not to show its tooltip
|
|
8
|
+
*/
|
|
9
|
+
disableTooltip?: boolean;
|
|
10
|
+
maxLines?: number;
|
|
11
|
+
className?: string;
|
|
12
|
+
testId?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const TextTruncated: ({ children, disableTooltip, maxLines, testId, className, }: TextTruncatedProps) => JSX.Element;
|
|
15
|
+
//# sourceMappingURL=TextTruncated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextTruncated.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextTruncated/TextTruncated.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,+DAMvB,kBAAkB,gBAyDpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import t from"classnames";import{useRef as r,useState as i,useLayoutEffect as n}from"react";import{debounce as o}from"lodash";import{Tooltip as s}from"../Tooltip/Tooltip.js";import c from"./TextTruncated.scss.js";var l=function(l){var a=l.children,d=l.disableTooltip,m=l.maxLines,u=void 0===m?1:m,f=l.testId,p=l.className,v=u>1,h=r(null),b=r(v),x=i(null),L=x[0],T=x[1],g=i(!0),j=g[0],W=g[1];return b.current=v,n((function(){var e=o((function(){var e=h.current;e&&(T(e.textContent),W(e.scrollWidth<=e.clientWidth&&(e.scrollHeight<=e.clientHeight||!b.current)))}),200),t=new ResizeObserver(e),r=new MutationObserver(e);return h.current&&(t.observe(h.current),r.observe(h.current,{childList:!0,subtree:!0,characterData:!0})),function(){t.disconnect(),r.disconnect()}}),[]),e(s,{title:L,disabled:j||d,children:e("div",{className:t(c.root,v?c.multiLine:c.singleLine,p),style:v?{WebkitLineClamp:u}:void 0,ref:h,"data-testid":f,children:a})})};export{l as TextTruncated};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={root:"TextTruncated_root__vjWX7",singleLine:"TextTruncated_singleLine__2AIYs",multiLine:"TextTruncated_multiLine__Wtv-b"};e(".TextTruncated_root__vjWX7{line-height:inherit;max-width:100%;overflow:hidden}.TextTruncated_singleLine__2AIYs{text-overflow:ellipsis;white-space:nowrap}.TextTruncated_multiLine__Wtv-b{-webkit-box-orient:vertical;display:-webkit-box}");export{t as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { TextTruncated } from './TextTruncated';
|
|
4
|
+
type Props = ComponentProps<typeof TextTruncated>;
|
|
5
|
+
declare const meta: Meta<Props>;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Default: (props: Props) => JSX.Element;
|
|
8
|
+
export declare const DynamicTooltips: () => JSX.Element;
|
|
9
|
+
export declare const ComplexChildren: () => JSX.Element;
|
|
10
|
+
export declare const MultilineText: () => JSX.Element;
|
|
11
|
+
//# sourceMappingURL=TextTruncated.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextTruncated.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextTruncated/TextTruncated.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAKjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;AAElD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAqBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAAiC,CAAC;AAEtE,eAAO,MAAM,eAAe,mBAkB3B,CAAC;AAMF,eAAO,MAAM,eAAe,mBAK3B,CAAC;AAMF,eAAO,MAAM,aAAa,mBAgBzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TextTruncated/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e,__assign as r}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as o}from"react/jsx-runtime";import{Tooltip as i}from"@material-ui/core";import{useMemo as t}from"react";import l from"classnames";import{useIsInsideDcApp as a}from"../../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import{useIsInsideDcFullscreenElem as n}from"../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import{DcTooltip as s}from"./DcTooltip.js";import c from"./Tooltip.scss.js";var m={medium:c.medium,large:c.large},d=function(d){var p=d.children,v=d.disabled,D=d.title,u=d.interactive,y=void 0
|
|
1
|
+
import{__rest as e,__assign as r}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as o}from"react/jsx-runtime";import{Tooltip as i}from"@material-ui/core";import{useMemo as t}from"react";import l from"classnames";import{useIsInsideDcApp as a}from"../../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import{useIsInsideDcFullscreenElem as n}from"../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import{DcTooltip as s}from"./DcTooltip.js";import c from"./Tooltip.scss.js";var m={medium:c.medium,large:c.large},d=function(d){var p=d.children,v=d.disabled,D=d.title,u=d.interactive,y=void 0!==u&&u,f=d.className,h=d.size,T=void 0===h?"medium":h,b=d.enterDelay,C=void 0===b?100:b,j=d.leaveDelay,I=void 0===j?0:j,N=d.enterTouchDelay,x=void 0===N?700:N,A=d.leaveTouchDelay,P=void 0===A?1500:A,F=d.enterNextDelay,L=void 0===F?0:F,g=e(d,["children","disabled","title","interactive","className","size","enterDelay","leaveDelay","enterTouchDelay","leaveTouchDelay","enterNextDelay"]),z=a(),E=n(),H=z&&!E?s:i,_=v||!D?"":o("div",{className:c.title,children:D}),k={disableFocusListener:v,disableHoverListener:v,disableTouchListener:v},q=t((function(){return{popper:l(c.root,m[T],f)}}),[f,T]);return o(H,r({title:_,interactive:y,classes:q,enterDelay:C,leaveDelay:I,enterTouchDelay:x,leaveTouchDelay:P,enterNextDelay:L},k,g,{children:p}))};export{d as Tooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAmBjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC;AAE5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAiBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBAInC,CAAC;AAEF,eAAO,MAAM,KAAK,mBASjB,CAAC;AAQF,eAAO,MAAM,UAAU,mBAItB,CAAC;AAKF,eAAO,MAAM,iBAAiB,mBAY7B,CAAC;AAKF,eAAO,MAAM,aAAa,mBAwCzB,CAAC"}
|
package/componentsV2/index.d.ts
CHANGED
|
@@ -5,4 +5,14 @@ export * from './Button';
|
|
|
5
5
|
export * from './ButtonIcon';
|
|
6
6
|
export * from './Tooltip';
|
|
7
7
|
export * from './Popover';
|
|
8
|
+
export * from './Radio';
|
|
9
|
+
export * from './RadioGroup';
|
|
10
|
+
export * from './Checkbox';
|
|
11
|
+
export * from './CheckboxGroup';
|
|
12
|
+
export * from './TextInput';
|
|
13
|
+
export * from './TextTruncated';
|
|
14
|
+
export * from './TextMiddleTruncated';
|
|
15
|
+
export * from './TextLink';
|
|
16
|
+
export * from './LoaderCircular';
|
|
17
|
+
export * from './Chip';
|
|
8
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/componentsV2/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/componentsV2/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC"}
|
package/componentsV2/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Text}from"./Text/Text.js";export{Grid}from"./Grid/Grid.js";export{Cell}from"./Grid/Cell.js";export{Header}from"./Header/Header.js";export{Button}from"./Button/Button.js";export{ButtonIcon}from"./ButtonIcon/ButtonIcon.js";export{Tooltip}from"./Tooltip/Tooltip.js";export{Popover}from"./Popover/Popover.js";export{DcPopover}from"./Popover/DcPopover.js";
|
|
1
|
+
export{Text}from"./Text/Text.js";export{Grid}from"./Grid/Grid.js";export{Cell}from"./Grid/Cell.js";export{Header}from"./Header/Header.js";export{Button}from"./Button/Button.js";export{ButtonIcon}from"./ButtonIcon/ButtonIcon.js";export{Tooltip}from"./Tooltip/Tooltip.js";export{Popover}from"./Popover/Popover.js";export{DcPopover}from"./Popover/DcPopover.js";export{Radio}from"./Radio/Radio.js";export{RadioGroup}from"./RadioGroup/RadioGroup.js";export{Checkbox}from"./Checkbox/Checkbox.js";export{CheckboxGroup}from"./CheckboxGroup/CheckboxGroup.js";export{TextInput}from"./TextInput/TextInput.js";export{TextTruncated}from"./TextTruncated/TextTruncated.js";export{TextMiddleTruncated}from"./TextMiddleTruncated/TextMiddleTruncated.js";export{TextLink}from"./TextLink/TextLink.js";export{LoaderCircular}from"./LoaderCircular/LoaderCircular.js";export{Chip}from"./Chip/Chip.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/Checkbox.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/Checkbox.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,qFAyBmO,IAAK,OAAO,AAD7Q,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import{withCustomIconSize as t}from"../../WithCustomSize.js";var l=t((function(t){var l=t.width,o=void 0===l?24:l,s=t.height,
|
|
1
|
+
import{__rest as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import{withCustomIconSize as t}from"../../WithCustomSize.js";var l=t((function(t){var l=t.width,o=void 0===l?24:l,s=t.height,m=void 0===s?24:s,r=t.fontSize,d=t.className;return e(t,["width","height","fontSize","className"]),i("svg",{className:d,width:"small"===r?16:o,height:"small"===r?16:m,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 6.75C2 4.12665 4.12665 2 6.75 2H17.25C19.8734 2 22 4.12665 22 6.75V17.25C22 19.8734 19.8734 22 17.25 22H6.75C4.12665 22 2 19.8734 2 17.25V6.75ZM6.75 3.5C4.95507 3.5 3.5 4.95507 3.5 6.75V17.25C3.5 19.0449 4.95507 20.5 6.75 20.5H17.25C19.0449 20.5 20.5 19.0449 20.5 17.25V6.75C20.5 4.95507 19.0449 3.5 17.25 3.5H6.75Z",fill:"#BDBDBD"})})}));export{l as CheckboxCustomIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxChecked.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/CheckboxChecked.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"CheckboxChecked.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/CheckboxChecked.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,qFAmBqI,IAAK,OAAO,AADtL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{withCustomIconSize as i}from"../../WithCustomSize.js";var l=i((function(i){var l=i.width,t=void 0===l?24:l,o=i.height,r=void 0===o?24:o,s=i.fontSize,m=i.className;return e("svg",{className:m,width:"small"===s?16:t,height:"small"===s?16:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{withCustomIconSize as i}from"../../WithCustomSize.js";var l=i((function(i){var l=i.width,t=void 0===l?24:l,o=i.height,r=void 0===o?24:o,s=i.fontSize,m=i.className;return e("svg",{className:m,width:"small"===s?16:t,height:"small"===s?16:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2C3.79086 2 2 3.79086 2 6V18C2 20.2091 3.79086 22 6 22H18C20.2091 22 22 20.2091 22 18V6C22 3.79086 20.2091 2 18 2H6ZM20.5303 7.53033C20.8232 7.23744 20.8232 6.76256 20.5303 6.46967C20.2374 6.17678 19.7626 6.17678 19.4697 6.46967L10 15.9393L5.53033 11.4697C5.23744 11.1768 4.76256 11.1768 4.46967 11.4697C4.17678 11.7626 4.17678 12.2374 4.46967 12.5303L9.46967 17.5303C9.76256 17.8232 10.2374 17.8232 10.5303 17.5303L20.5303 7.53033Z",fill:"#03BCD4"})})}));export{l as CheckboxCheckedCustomIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxIndeterminate.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/CheckboxIndeterminate.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"CheckboxIndeterminate.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/CheckboxIndeterminate.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,+BAA+B,qFAyB8N,IAAK,OAAO,AADrR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import{withCustomIconSize as t}from"../../WithCustomSize.js";var l=t((function(t){var l=t.width,o=void 0===l?24:l,s=t.height,
|
|
1
|
+
import{__rest as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as i}from"react/jsx-runtime";import{withCustomIconSize as t}from"../../WithCustomSize.js";var l=t((function(t){var l=t.width,o=void 0===l?24:l,s=t.height,m=void 0===s?24:s,r=t.fontSize,d=t.className;return e(t,["width","height","fontSize","className"]),i("svg",{className:d,width:"small"===r?16:o,height:"small"===r?16:m,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2C3.79086 2 2 3.79086 2 6V18C2 20.2091 3.79086 22 6 22H18C20.2091 22 22 20.2091 22 18V6C22 3.79086 20.2091 2 18 2H6ZM5.22581 11.25C4.82495 11.25 4.5 11.5858 4.5 12C4.5 12.4142 4.82495 12.75 5.22581 12.75H18.7742C19.175 12.75 19.5 12.4142 19.5 12C19.5 11.5858 19.175 11.25 18.7742 11.25H5.22581Z",fill:"#03BCD4"})})}));export{l as CheckboxIndeterminateCustomIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioChecked.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/RadioChecked.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"RadioChecked.d.ts","sourceRoot":"","sources":["../../../../src/icons/customIcons/icons/RadioChecked.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,qFAsB6T,IAAK,OAAO,AAD3W,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as i}from"react/jsx-runtime";import{withCustomIconSize as e}from"../../WithCustomSize.js";var o=e((function(e){var o=e.width,r=void 0===o?24:o,s=e.height,h=void 0===s?24:s,l=e.className,a=e.fontSize;return t("svg",{className:l,xmlns:"http://www.w3.org/2000/svg",width:"small"===a?16:r,height:"small"===a?16:h,viewBox:"0 0 24 24",fill:"none",children:[i("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#03BCD4",
|
|
1
|
+
import{jsxs as t,jsx as i}from"react/jsx-runtime";import{withCustomIconSize as e}from"../../WithCustomSize.js";var o=e((function(e){var o=e.width,r=void 0===o?24:o,s=e.height,h=void 0===s?24:s,l=e.className,a=e.fontSize;return t("svg",{className:l,xmlns:"http://www.w3.org/2000/svg",width:"small"===a?16:r,height:"small"===a?16:h,viewBox:"0 0 24 24",fill:"none",children:[i("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#03BCD4",strokeWidth:"1.5"}),i("path",{d:"M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z",fill:"#03BCD4"})]})}));export{o as RadioCheckedCustomIcon};
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ type SbPlaceholderProps = {
|
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
className?: string;
|
|
13
13
|
onClick?: () => void;
|
|
14
|
+
style?: CSSProperties;
|
|
14
15
|
};
|
|
15
16
|
export declare const SbPlaceholder: import("react").ForwardRefExoticComponent<SbPlaceholderProps & import("react").RefAttributes<any>>;
|
|
16
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/storyBookHelpers/components.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,aAAa,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5F,eAAO,MAAM,QAAQ,8BAGlB;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CAC1C,gBAIA,CAAC;AAEF,eAAO,MAAM,KAAK,8BAGf;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CAC1C,gBAIA,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/storyBookHelpers/components.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,aAAa,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAO5F,eAAO,MAAM,QAAQ,8BAGlB;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CAC1C,gBAIA,CAAC;AAEF,eAAO,MAAM,KAAK,8BAGf;IACD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CAC1C,gBAIA,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,oGAkBzB,CAAC"}
|