genesys-react-components 0.1.0-alpha.5 → 0.1.0-alpha.6
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/build/dxitemgroup/DxCheckbox.d.ts +15 -0
- package/build/dxitemgroup/DxItemGroup.d.ts +0 -1
- package/build/index.d.ts +2 -1
- package/build/index.js +32 -16
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BooleanChangedCallback } from '..';
|
|
3
|
+
import './DxCheckbox.scss';
|
|
4
|
+
interface IProps {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
initialValue?: boolean;
|
|
9
|
+
name?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
onCheckChanged?: BooleanChangedCallback;
|
|
12
|
+
useRadioType?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export default function DxCheckbox(props: IProps): JSX.Element;
|
|
15
|
+
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -4,12 +4,13 @@ import DxAccordion from './dxaccordion/DxAccordion';
|
|
|
4
4
|
import DxAccordionGroup from './dxaccordion/DxAccordionGroup';
|
|
5
5
|
import DxButton from './dxbutton/DxButton';
|
|
6
6
|
import DxItemGroup from './dxitemgroup/DxItemGroup';
|
|
7
|
+
import DxCheckbox from './dxitemgroup/DxCheckbox';
|
|
7
8
|
import DxLabel from './dxlabel/DxLabel';
|
|
8
9
|
import DxTabbedContent from './dxtabbedcontent/DxTabbedContent';
|
|
9
10
|
import DxTabPanel from './dxtabbedcontent/DxTabPanel';
|
|
10
11
|
import DxTextbox from './dxtextbox/DxTextbox';
|
|
11
12
|
import DxToggle from './dxtoggle/DxToggle';
|
|
12
|
-
export { DxAccordion, DxAccordionGroup, DxButton, DxItemGroup, DxLabel, DxTabbedContent, DxTabPanel, DxTextbox, DxToggle };
|
|
13
|
+
export { DxAccordion, DxAccordionGroup, DxButton, DxItemGroup, DxCheckbox, DxLabel, DxTabbedContent, DxTabPanel, DxTextbox, DxToggle };
|
|
13
14
|
export interface StringChangedCallback {
|
|
14
15
|
(value: string): void;
|
|
15
16
|
}
|
package/build/index.js
CHANGED
|
@@ -29,7 +29,7 @@ function styleInject(css, ref) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var css_248z$c = ".dx-accordion {\n margin: 0;\n}\n.dx-accordion .accordion-heading {\n border-width: 0 0 1px 0;\n border-style: solid;\n border-color: #bfd4e4;\n font-style: normal;\n font-weight: bold;\n font-size: 14px;\n line-height: 14px;\n color: #54565a;\n padding: 13px 20px;\n display: flex;\n flex-flow: row nowrap;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n}\n.dx-accordion .accordion-heading .icon {\n line-height: 0;\n}\n.dx-accordion .accordion-content {\n padding: 13px 20px 20px 20px;\n border-bottom: 1px solid #bfd4e4;\n}\n.dx-accordion .accordion-content *:first-child {\n margin-top: 0;\n}\n.dx-accordion .accordion-content *:last-child {\n margin-bottom: 0;\n}";
|
|
32
|
+
var css_248z$c = ".dx-accordion {\n margin: 0;\n}\n.dx-accordion .accordion-heading {\n border-width: 0 0 1px 0;\n border-style: solid;\n border-color: #bfd4e4;\n font-style: normal;\n font-weight: bold;\n font-size: 14px;\n line-height: 14px;\n color: #54565a;\n padding: 13px 20px;\n display: flex;\n flex-flow: row nowrap;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n}\n.dx-accordion .accordion-heading .icon {\n line-height: 0;\n}\n.dx-accordion .accordion-content {\n padding: 13px 20px 20px 20px;\n border-bottom: 1px solid #bfd4e4;\n}\n.dx-accordion .accordion-content > *:first-child {\n margin-top: 0;\n}\n.dx-accordion .accordion-content > *:last-child {\n margin-bottom: 0;\n}";
|
|
33
33
|
styleInject(css_248z$c);
|
|
34
34
|
|
|
35
35
|
function DxAccordion(props) {
|
|
@@ -70,21 +70,18 @@ function DxButton(props) {
|
|
|
70
70
|
var css_248z$9 = ".dx-item-group {\n display: block;\n border: 0;\n margin: 0;\n padding: 0;\n}\n.dx-item-group label {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n margin: 15px 0;\n}\n.dx-item-group label:first-of-type {\n margin-top: 0;\n}\n.dx-item-group label .label-text {\n font-family: Roboto;\n font-style: normal;\n font-weight: normal;\n font-size: 12px;\n line-height: 18px;\n color: #75757a;\n}";
|
|
71
71
|
styleInject(css_248z$9);
|
|
72
72
|
|
|
73
|
-
var css_248z$8 = "
|
|
73
|
+
var css_248z$8 = "";
|
|
74
74
|
styleInject(css_248z$8);
|
|
75
75
|
|
|
76
|
-
var css_248z$7 = ".dx-
|
|
76
|
+
var css_248z$7 = ".dx-select-group {\n appearance: none;\n position: relative;\n}\n.dx-select-group select {\n border: 1px solid #8a96a3;\n border-radius: 2px;\n background-color: #ffffff;\n font-style: normal;\n font-weight: 300;\n font-size: 12px;\n line-height: 14px;\n color: #75757a;\n padding: 8px 32px 8px 12px;\n width: 100%;\n appearance: none;\n}\n.dx-select-group select:focus-visible {\n outline: 2px solid #aac9ff;\n}\n.dx-select-group select option {\n background: #aac9ff -webkit-linear-gradient(bottom, #aac9ff 0%, #aac9ff 100%);\n}\n.dx-select-group::after {\n position: absolute;\n bottom: 12px;\n right: 12px;\n content: \"\\f104\";\n font-size: 8px;\n font-family: genesys-dev-icons !important;\n font-style: normal;\n font-weight: normal !important;\n font-feature-settings: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n pointer-events: none;\n}";
|
|
77
77
|
styleInject(css_248z$7);
|
|
78
78
|
|
|
79
|
-
var css_248z$6 = ".dx-
|
|
79
|
+
var css_248z$6 = ".dx-multiselect-group {\n appearance: none;\n position: relative;\n}\n.dx-multiselect-group select {\n border: 1px solid #8a96a3;\n border-radius: 2px;\n background-color: #ffffff;\n font-style: normal;\n font-weight: 300;\n font-size: 12px;\n line-height: 14px;\n color: #75757a;\n width: 100%;\n appearance: none;\n scrollbar-color: #b0b2b5 transparent;\n}\n.dx-multiselect-group select:focus-visible {\n outline: 2px solid #aac9ff;\n}\n.dx-multiselect-group select option {\n overflow: hidden;\n white-space: pre;\n text-overflow: ellipsis;\n -webkit-appearance: none;\n font-style: normal;\n font-weight: 300;\n font-size: 12px;\n line-height: 31px;\n padding: 8px 12px;\n color: #75757a;\n}\n.dx-multiselect-group select option:checked {\n background: #aac9ff -webkit-linear-gradient(bottom, #aac9ff 0%, #aac9ff 100%);\n}\n.dx-multiselect-group select::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 7px;\n height: 7px;\n}\n.dx-multiselect-group select::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: #b0b2b5;\n}\n.dx-multiselect-group select::-webkit-scrollbar-corner {\n background: transparent;\n}";
|
|
80
80
|
styleInject(css_248z$6);
|
|
81
81
|
|
|
82
|
-
var css_248z$5 = ".dx-
|
|
82
|
+
var css_248z$5 = ".dx-label {\n margin: 20px 0;\n display: block;\n}\n.dx-label .label-text,\n.dx-label .input-description {\n display: block;\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 14px;\n color: #75757a;\n}\n.dx-label .label-text {\n margin: 0 0 4px 0;\n}\n.dx-label .input-description {\n padding: 6px 20px;\n display: flex;\n flex-flow: row nowrap;\n gap: 8px;\n}\n.dx-label .input-description .icon {\n color: #597393;\n line-height: 0;\n}";
|
|
83
83
|
styleInject(css_248z$5);
|
|
84
84
|
|
|
85
|
-
var css_248z$4 = ".dx-label {\n margin: 20px 0;\n display: block;\n}\n.dx-label .label-text,\n.dx-label .input-description {\n display: block;\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 14px;\n color: #75757a;\n}\n.dx-label .label-text {\n margin: 0 0 4px 0;\n}\n.dx-label .input-description {\n padding: 6px 20px;\n display: flex;\n flex-flow: row nowrap;\n gap: 8px;\n}\n.dx-label .input-description .icon {\n color: #597393;\n line-height: 0;\n}";
|
|
86
|
-
styleInject(css_248z$4);
|
|
87
|
-
|
|
88
85
|
function DxLabel(props) {
|
|
89
86
|
const hasLabel = props.label && props.label !== '';
|
|
90
87
|
const description = props.description ? (React.createElement("div", { className: 'input-description' },
|
|
@@ -102,6 +99,15 @@ function DxLabel(props) {
|
|
|
102
99
|
description));
|
|
103
100
|
}
|
|
104
101
|
|
|
102
|
+
var css_248z$4 = ".dx-checkbox {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n margin: 15px 0;\n}\n.dx-checkbox:first-of-type {\n margin-top: 0;\n}\n.dx-checkbox .label-text {\n font-family: Roboto;\n font-style: normal;\n font-weight: normal;\n font-size: 12px;\n line-height: 18px;\n color: #75757a;\n}\n.dx-checkbox input[type=checkbox] {\n -webkit-appearance: none;\n appearance: none;\n margin: 0 8px 0 0;\n width: 16px;\n height: 16px;\n border: 1px solid #8a96a3;\n border-radius: 2px;\n background-color: #ffffff;\n flex-shrink: 0;\n}\n.dx-checkbox input[type=checkbox]::before {\n display: none;\n}\n.dx-checkbox input[type=checkbox]:checked {\n background-color: #8a96a3;\n}\n.dx-checkbox input[type=checkbox]:checked::before {\n display: block;\n position: relative;\n top: 7px;\n left: 3px;\n font-size: 9px;\n line-height: 0;\n color: #ffffff;\n content: \"\\f103\";\n font-family: genesys-dev-icons !important;\n font-style: normal;\n font-weight: normal !important;\n font-feature-settings: normal;\n font-variant: normal;\n text-transform: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.dx-checkbox input[type=checkbox]:not(:disabled):hover {\n border-color: #4d5061;\n}\n.dx-checkbox input[type=checkbox]:not(:disabled):focus {\n outline: #aac9ff solid 2px;\n}\n.dx-checkbox input[type=checkbox]:not(:disabled):focus-visible {\n outline: 0;\n}\n.dx-checkbox input[type=radio] {\n -webkit-appearance: none;\n appearance: none;\n margin: 0 8px 0 0;\n width: 16px;\n height: 16px;\n border: 1px solid #8a96a3;\n border-radius: 8px;\n background-color: #ffffff;\n flex-shrink: 0;\n}\n.dx-checkbox input[type=radio]::before {\n display: none;\n}\n.dx-checkbox input[type=radio]:checked::before {\n content: \"\";\n display: block;\n width: 10px;\n height: 10px;\n border-radius: 8px;\n position: relative;\n top: 2px;\n left: 2px;\n background-color: #8a96a3;\n}\n.dx-checkbox input[type=radio]:not(:disabled):hover {\n border-color: #4d5061;\n}\n.dx-checkbox input[type=radio]:not(:disabled):focus {\n outline: #aac9ff solid 2px;\n}\n.dx-checkbox input[type=radio]:not(:disabled):focus-visible {\n outline: 0;\n}\n\n.dx-label .dx-checkbox .label-text {\n margin: 0;\n}";
|
|
103
|
+
styleInject(css_248z$4);
|
|
104
|
+
|
|
105
|
+
function DxCheckbox(props) {
|
|
106
|
+
return (React.createElement("label", { className: `dx-checkbox ${props.className || ''}` },
|
|
107
|
+
React.createElement("input", { type: props.useRadioType ? 'radio' : 'checkbox', name: props.name, id: props.label, value: props.value, checked: props.initialValue, onChange: (e) => (props.onCheckChanged ? props.onCheckChanged(e.target.checked) : undefined) }),
|
|
108
|
+
React.createElement("span", { className: 'label-text' }, props.label)));
|
|
109
|
+
}
|
|
110
|
+
|
|
105
111
|
function DxItemGroup(props) {
|
|
106
112
|
const [data, setData] = useState(props.items.map((item) => {
|
|
107
113
|
return { item, isSelected: false };
|
|
@@ -114,15 +120,15 @@ function DxItemGroup(props) {
|
|
|
114
120
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
121
|
}, [data]);
|
|
116
122
|
// Handle checkbox changed
|
|
117
|
-
const onChange = (idx, item,
|
|
123
|
+
const onChange = (idx, item, checked) => {
|
|
118
124
|
if (props.onItemChanged)
|
|
119
|
-
props.onItemChanged(item,
|
|
125
|
+
props.onItemChanged(item, checked);
|
|
120
126
|
let newData = [...data];
|
|
121
127
|
// Unselect everything if it's radio buttons
|
|
122
128
|
if (props.format === 'radio')
|
|
123
129
|
newData.forEach((value) => (value.isSelected = false));
|
|
124
130
|
// Set the selected state of the new item
|
|
125
|
-
newData[idx].isSelected =
|
|
131
|
+
newData[idx].isSelected = checked;
|
|
126
132
|
setData(newData);
|
|
127
133
|
};
|
|
128
134
|
switch (props.format) {
|
|
@@ -135,14 +141,24 @@ function DxItemGroup(props) {
|
|
|
135
141
|
case 'checkbox':
|
|
136
142
|
case 'radio':
|
|
137
143
|
default: {
|
|
138
|
-
return (React.createElement(DxLabel, { label: props.title, description: props.description, className: 'dx-item-group', useFieldset: true }, data.map((d, i) => (React.createElement(
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
return (React.createElement(DxLabel, { label: props.title, description: props.description, className: 'dx-item-group', useFieldset: true }, data.map((d, i) => (React.createElement(DxCheckbox, { key: i, name: props.format === 'checkbox' ? `${id}-${i}` : id, label: d.item.label, value: d.item.value, initialValue: d.isSelected, onCheckChanged: (checked) => onChange(i, d.item, checked) })
|
|
145
|
+
// <label key={i}>
|
|
146
|
+
// <input
|
|
147
|
+
// type={props.format}
|
|
148
|
+
// name={props.format === 'checkbox' ? `${id}-${i}` : id}
|
|
149
|
+
// id={d.item.label}
|
|
150
|
+
// value={d.item.value}
|
|
151
|
+
// checked={d.isSelected}
|
|
152
|
+
// onChange={(e) => onChange(i, d.item, e)}
|
|
153
|
+
// />
|
|
154
|
+
// <span className='label-text'>{d.item.label}</span>
|
|
155
|
+
// </label>
|
|
156
|
+
))));
|
|
141
157
|
}
|
|
142
158
|
}
|
|
143
159
|
}
|
|
144
160
|
|
|
145
|
-
var css_248z$3 = ".dx-tabbed-content {\n margin: 40px 0;\n}\n.dx-tabbed-content .tab-titles {\n border-bottom: 1px solid #bfd4e4;\n font-weight: normal;\n font-size: 14px;\n line-height: 20px;\n}\n.dx-tabbed-content .tab-titles .tab-title {\n display: inline-block;\n padding: 5px 20px;\n border-bottom: 1px solid transparent;\n cursor: pointer;\n}\n.dx-tabbed-content .tab-titles .tab-title.active {\n border-bottom-color: #597393;\n font-weight: bold;\n}\n.dx-tabbed-content .tab-titles .tab-title p {\n margin: 0;\n display: inline;\n}\n.dx-tabbed-content .tab-content {\n padding: 13px 20px 20px 20px;\n border-bottom: 1px solid #bfd4e4;\n}\n.dx-tabbed-content .tab-content *:first-child {\n margin-top: 0;\n}\n.dx-tabbed-content .tab-content *:last-child {\n margin-bottom: 0;\n}";
|
|
161
|
+
var css_248z$3 = ".dx-tabbed-content {\n margin: 40px 0;\n}\n.dx-tabbed-content .tab-titles {\n border-bottom: 1px solid #bfd4e4;\n font-weight: normal;\n font-size: 14px;\n line-height: 20px;\n}\n.dx-tabbed-content .tab-titles .tab-title {\n display: inline-block;\n padding: 5px 20px;\n border-bottom: 1px solid transparent;\n cursor: pointer;\n}\n.dx-tabbed-content .tab-titles .tab-title.active {\n border-bottom-color: #597393;\n font-weight: bold;\n}\n.dx-tabbed-content .tab-titles .tab-title p {\n margin: 0;\n display: inline;\n}\n.dx-tabbed-content .tab-content {\n padding: 13px 20px 20px 20px;\n border-bottom: 1px solid #bfd4e4;\n}\n.dx-tabbed-content .tab-content > *:first-child {\n margin-top: 0;\n}\n.dx-tabbed-content .tab-content > *:last-child {\n margin-bottom: 0;\n}";
|
|
146
162
|
styleInject(css_248z$3);
|
|
147
163
|
|
|
148
164
|
function DxTabbedContent(props) {
|
|
@@ -295,5 +311,5 @@ function DxToggle(props) {
|
|
|
295
311
|
value !== true ? React.createElement(GenesysDevIcon, { icon: trueIcon }) : undefined))));
|
|
296
312
|
}
|
|
297
313
|
|
|
298
|
-
export { DxAccordion, DxAccordionGroup, DxButton, DxItemGroup, DxLabel, DxTabPanel, DxTabbedContent, DxTextbox, DxToggle };
|
|
314
|
+
export { DxAccordion, DxAccordionGroup, DxButton, DxCheckbox, DxItemGroup, DxLabel, DxTabPanel, DxTabbedContent, DxTextbox, DxToggle };
|
|
299
315
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/dxaccordion/DxAccordion.tsx","../src/dxaccordion/DxAccordionGroup.tsx","../src/dxbutton/DxButton.tsx","../src/dxlabel/DxLabel.tsx","../src/dxitemgroup/DxItemGroup.tsx","../src/dxtabbedcontent/DxTabbedContent.tsx","../src/dxtabbedcontent/DxTabPanel.tsx","../src/dxtextbox/DxTextbox.tsx","../src/dxtoggle/DxToggle.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport React, { useState } from 'react';\n\nimport './DxAccordion.scss';\n\ninterface IProps {\n\ttitle: React.ReactNode;\n\tchildren: React.ReactNode;\n\tshowOpen?: boolean;\n}\n\nexport default function DxAccordion(props: IProps) {\n\tconst [isOpen, setIsOpen] = useState(props.showOpen || false);\n\n\treturn (\n\t\t<div className='dx-accordion'>\n\t\t\t<div className='accordion-heading' onClick={() => setIsOpen(!isOpen)}>\n\t\t\t\t{props.title} <GenesysDevIcon icon={isOpen ? GenesysDevIcons.AppChevronUp : GenesysDevIcons.AppChevronDown} />\n\t\t\t</div>\n\t\t\t{isOpen ? <div className='accordion-content'>{props.children}</div> : undefined}\n\t\t</div>\n\t);\n}\n","import React from 'react';\n\nimport './DxAccordionGroup.scss';\n\ninterface IProps {\n\tchildren: React.ReactNode;\n}\n\nexport default function DxAccordionGroup(props: IProps) {\n\treturn <div className='dx-accordion-group'>{props.children}</div>;\n}\n","import React from 'react';\nimport { VoidEventCallback } from '..';\n\nimport './DxButton.scss';\n\ninterface IProps {\n\ttype?: 'primary' | 'secondary';\n\tdisabled?: boolean;\n\tchildren?: React.ReactNode;\n\tclassName?: string;\n\tonClick?: VoidEventCallback;\n}\n\nexport default function DxButton(props: IProps) {\n\tlet classNames = ['dx-button'];\n\tclassNames.push(`dx-button-${props.type || 'primary'}`);\n\tif (props.className) classNames.push(props.className);\n\n\tconst handleClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n\t\tif (!props.onClick) return;\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tprops.onClick();\n\t};\n\n\treturn (\n\t\t<button className={classNames.join(' ')} type='button' onClick={handleClick} disabled={props.disabled === true}>\n\t\t\t{props.children}\n\t\t</button>\n\t);\n}\n","import { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport React from 'react';\n\nimport './DxLabel.scss';\n\ninterface IProps {\n\tlabel?: string;\n\tdescription?: string;\n\tuseFieldset?: boolean;\n\tclassName?: string;\n\tchildren: React.ReactNode;\n}\n\nexport default function DxLabel(props: IProps) {\n\tconst hasLabel = props.label && props.label !== '';\n\n\tconst description = props.description ? (\n\t\t<div className='input-description'>\n\t\t\t<GenesysDevIcon icon={GenesysDevIcons.AppInfoSolid} />\n\t\t\t<span>{props.description}</span>\n\t\t</div>\n\t) : undefined;\n\n\tif (props.useFieldset) {\n\t\treturn (\n\t\t\t<fieldset className={'dx-label ' + props.className || ''}>\n\t\t\t\t{props.label ? <legend className='label-text'>{props.label}</legend> : undefined}\n\t\t\t\t{props.children}\n\t\t\t\t{description}\n\t\t\t</fieldset>\n\t\t);\n\t}\n\treturn (\n\t\t<label className={'dx-label ' + props.className || ''}>\n\t\t\t{hasLabel ? <span className='label-text'>{props.label}</span> : undefined}\n\t\t\t{props.children}\n\t\t\t{description}\n\t\t</label>\n\t);\n}\n","import React, { useEffect, useState } from 'react';\nimport { v4 as uuid } from 'uuid';\nimport { DxItemGroupItem, DxItemGroupItemValue, ItemChangedCallback, ItemGroupChangedCallback } from '..';\n\nimport './DxItemGroup.scss';\nimport './checkbox.scss';\nimport './radiobutton.scss';\nimport './dropdown.scss';\nimport './multiselect.scss';\nimport DxLabel from '../dxlabel/DxLabel';\n\ninterface IProps {\n\ttitle?: string;\n\tdescription?: string;\n\tformat: DxItemGroupFormat;\n\titems: DxItemGroupItem[];\n\tonItemChanged?: ItemChangedCallback;\n\tonItemsChanged?: ItemGroupChangedCallback;\n}\n\nexport type DxItemGroupFormat = 'checkbox' | 'radio' | 'dropdown' | 'multiselect';\n\nexport default function DxItemGroup(props: IProps) {\n\tconst [data, setData] = useState<DxItemGroupItemValue[]>(\n\t\tprops.items.map((item) => {\n\t\t\treturn { item, isSelected: false };\n\t\t})\n\t);\n\tconst [id] = useState(uuid());\n\n\t// data changed\n\tuseEffect(() => {\n\t\tif (props.onItemsChanged) props.onItemsChanged(data);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [data]);\n\n\t// Handle checkbox changed\n\tconst onChange = (idx: number, item: DxItemGroupItem, e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tif (props.onItemChanged) props.onItemChanged(item, e.target.checked);\n\t\tlet newData = [...data];\n\t\t// Unselect everything if it's radio buttons\n\t\tif (props.format === 'radio') newData.forEach((value) => (value.isSelected = false));\n\t\t// Set the selected state of the new item\n\t\tnewData[idx].isSelected = e.target.checked;\n\t\tsetData(newData);\n\t};\n\n\tswitch (props.format) {\n\t\tcase 'multiselect':\n\t\tcase 'dropdown': {\n\t\t\treturn (\n\t\t\t\t<DxLabel label={props.title} description={props.description}>\n\t\t\t\t\t<div className={`dx-item-group${props.format === 'multiselect' ? ' dx-multiselect-group' : ' dx-select-group'}`}>\n\t\t\t\t\t\t<select multiple={props.format === 'multiselect'}>\n\t\t\t\t\t\t\t{data.map((d, i) => (\n\t\t\t\t\t\t\t\t<option key={i} value={d.item.value}>\n\t\t\t\t\t\t\t\t\t{d.item.label}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</DxLabel>\n\t\t\t);\n\t\t}\n\t\tcase 'checkbox':\n\t\tcase 'radio':\n\t\tdefault: {\n\t\t\treturn (\n\t\t\t\t<DxLabel label={props.title} description={props.description} className='dx-item-group' useFieldset={true}>\n\t\t\t\t\t{data.map((d, i) => (\n\t\t\t\t\t\t<label key={i}>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype={props.format}\n\t\t\t\t\t\t\t\tname={props.format === 'checkbox' ? `${id}-${i}` : id}\n\t\t\t\t\t\t\t\tid={d.item.label}\n\t\t\t\t\t\t\t\tvalue={d.item.value}\n\t\t\t\t\t\t\t\tchecked={d.isSelected}\n\t\t\t\t\t\t\t\tonChange={(e) => onChange(i, d.item, e)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<span className='label-text'>{d.item.label}</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t))}\n\t\t\t\t</DxLabel>\n\t\t\t);\n\t\t}\n\t}\n}\n","import React, { useState } from 'react';\n\nimport './DxTabbedContent.scss';\n\ninterface IProps {\n\tchildren: React.ReactNode;\n\tinitialTabId?: number;\n}\n\nexport default function DxTabbedContent(props: IProps) {\n\tconst [activeTab, setActiveTab] = useState(props.initialTabId || 0);\n\tconst [titles] = useState<React.ReactNode[]>(\n\t\t// Scrape titles from child elements\n\t\tReact.Children.toArray(props.children).map((child: any) => {\n\t\t\tif (!child || !child.props || !child.props.title) return 'Unknown title';\n\t\t\treturn child.props.title;\n\t\t})\n\t);\n\n\treturn (\n\t\t<div className='dx-tabbed-content'>\n\t\t\t<div className='tab-titles'>\n\t\t\t\t{titles.map((title, i) => (\n\t\t\t\t\t<span key={i} className={`tab-title${i === activeTab ? ' active' : ''}`} onClick={() => setActiveTab(i)}>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</span>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div className='tab-content'>{React.Children.toArray(props.children)[activeTab]}</div>\n\t\t</div>\n\t);\n}\n","import React from 'react';\n\nimport './DxTabPanel.scss';\n\ninterface IProps {\n\ttitle: React.ReactNode;\n\tchildren: React.ReactNode;\n}\n\nexport default function DxTabPanel(props: IProps) {\n\treturn <div className='dx-tab-panel'>{props.children}</div>;\n}\n","import { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport React, { useEffect, useRef, useState } from 'react';\nimport DxLabel from '../dxlabel/DxLabel';\nimport { DxTextboxProps, StringChangedCallback, VoidEventCallback } from '..';\n\nimport './DxTextbox.scss';\n\nexport default function DxTextbox(props: DxTextboxProps) {\n\tconst [debounceMs, setDebounceMs] = useState(props.changeDebounceMs || 300);\n\tconst [value, setValue] = useState(props.initialValue || '');\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [escapePressed, setEscapePressed] = useState(Date.now());\n\tconst [step, setStep] = useState<string | number | undefined>(undefined);\n\tlet [timer, setTimer] = useState(undefined as unknown as ReturnType<typeof setTimeout>);\n\n\t// Constructor\n\tuseEffect(() => {\n\t\t// Register global key bindings\n\t\tdocument.addEventListener('keydown', globalKeyBindings, false);\n\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keydown', globalKeyBindings, false);\n\t\t};\n\t}, []);\n\n\t// Escape pressed\n\tuseEffect(() => {\n\t\tif (!isFocused) return;\n\t\tsetValue('');\n\t\tinputRef.current?.blur();\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [escapePressed]);\n\n\t// Value changed\n\tuseEffect(() => {\n\t\tif (props.inputType === 'decimal') {\n\t\t\t// Normalize step setting\n\t\t\tif (!isNaN(parseFloat(value))) {\n\t\t\t\tconst match = /\\.(.+)/.exec(value);\n\t\t\t\tconsole.log(match);\n\t\t\t\tif (match) {\n\t\t\t\t\tconst s = `0.${Array.apply(null, Array(match[1].length - 1))\n\t\t\t\t\t\t.map(() => '0')\n\t\t\t\t\t\t.join('')}1`;\n\t\t\t\t\tconsole.log(s);\n\t\t\t\t\tsetStep(s);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (props.inputType === 'integer') {\n\t\t\t// Overwrite value as integer to forcibly truncate floating point numbers\n\t\t\tsetValue(parseInt(value).toString());\n\t\t}\n\n\t\t// Debounce onChange notification\n\t\tif (!props.onChange) return;\n\t\tclearTimeout(timer);\n\t\tsetTimer(setTimeout(() => (props.onChange ? props.onChange(value) : undefined), debounceMs));\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [value]);\n\n\t// Update state from props\n\tuseEffect(() => {\n\t\tsetDebounceMs(props.changeDebounceMs || 300);\n\t}, [props.changeDebounceMs]);\n\n\t// Normalize inputRef\n\tlet inputRef = useRef<HTMLInputElement>(null);\n\tif (props.inputRef) inputRef = props.inputRef;\n\tconst hasLabel = props.label && props.label !== '';\n\n\t// Global key bindings\n\tfunction globalKeyBindings(event: KeyboardEvent) {\n\t\t// Escape - cancel search\n\t\tif (event.key === 'Escape') {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tsetEscapePressed(Date.now());\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Normalize input type\n\tlet inputType: React.HTMLInputTypeAttribute | undefined = props.inputType;\n\tif (inputType === 'integer' || inputType === 'decimal') inputType = 'number';\n\n\t// TODO: handle props.inputType\n\tlet component = (\n\t\t<div className={`dx-textbox${hasLabel ? ' with-label' : ''}`} style={{}}>\n\t\t\t{props.icon ? <GenesysDevIcon icon={props.icon} className='input-icon' /> : undefined}\n\t\t\t<input\n\t\t\t\tclassName='dx-input'\n\t\t\t\ttype={inputType}\n\t\t\t\tstep={step}\n\t\t\t\tvalue={value}\n\t\t\t\tplaceholder={props.placeholder}\n\t\t\t\tonChange={(e) => setValue(e.target.value)}\n\t\t\t\tref={inputRef}\n\t\t\t\tonFocus={() => {\n\t\t\t\t\tsetIsFocused(true);\n\t\t\t\t\tif (props.onFocus) props.onFocus();\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tsetIsFocused(false);\n\t\t\t\t\tif (props.onBlur) props.onBlur();\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{props.clearButton && (value || isFocused) ? (\n\t\t\t\t<GenesysDevIcon icon={GenesysDevIcons.AppTimes} className='clear-icon' onClick={() => setValue('')} />\n\t\t\t) : undefined}\n\t\t</div>\n\t);\n\n\t// Render\n\treturn (\n\t\t<DxLabel label={props.label} description={props.description}>\n\t\t\t{component}\n\t\t</DxLabel>\n\t);\n}\n","import React, { useEffect, useState } from 'react';\nimport { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport { BooleanChangedCallback, DxToggleProps } from '..';\n\nimport './DxToggle.scss';\nimport DxLabel from '../dxlabel/DxLabel';\n\nexport default function DxToggle(props: DxToggleProps) {\n\tconst [value, setValue] = useState(props.isTriState ? props.initialValue : props.initialValue || false);\n\n\tconst trueIcon = props.trueIcon || GenesysDevIcons.AppCheck;\n\tconst falseIcon = props.falseIcon || GenesysDevIcons.AppTimes;\n\n\tuseEffect(() => {\n\t\tif (props.onChange) props.onChange(value);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [value]);\n\n\tconst toggleValue = () => {\n\t\tif (props.isTriState) {\n\t\t\tif (value === undefined) setValue(true);\n\t\t\telse if (value === true) setValue(false);\n\t\t\telse setValue(undefined);\n\t\t} else {\n\t\t\tsetValue(!value);\n\t\t}\n\t};\n\n\treturn (\n\t\t<DxLabel label={props.label} description={props.description}>\n\t\t\t<div className='dx-toggle-container'>\n\t\t\t\t<div className='dx-toggle' onClick={toggleValue}>\n\t\t\t\t\t{value !== false ? <GenesysDevIcon icon={falseIcon} /> : undefined}\n\t\t\t\t\t{value === true && props.isTriState ? <div className='clear-placeholder'> </div> : undefined}\n\t\t\t\t\t<div className='slider'>{value !== undefined ? <GenesysDevIcon icon={value ? trueIcon : falseIcon} /> : undefined}</div>\n\t\t\t\t\t{value === false && props.isTriState ? <div className='clear-placeholder'> </div> : undefined}\n\t\t\t\t\t{value !== true ? <GenesysDevIcon icon={trueIcon} /> : undefined}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</DxLabel>\n\t);\n}\n"],"names":["uuid"],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;A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;iBACnC,IAAI,KAAK,KAAK,IAAI;gBAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;;gBACpC,QAAQ,CAAC,SAAS,CAAC,CAAC;SACzB;aAAM;YACN,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;SACjB;KACD,CAAC;IAEF,QACC,oBAAC,OAAO,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW;QAC1D,6BAAK,SAAS,EAAC,qBAAqB;YACnC,6BAAK,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,WAAW;gBAC7C,KAAK,KAAK,KAAK,GAAG,oBAAC,cAAc,IAAC,IAAI,EAAE,SAAS,GAAI,GAAG,SAAS;gBACjE,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,GAAG,6BAAK,SAAS,EAAC,mBAAmB,aAAa,GAAG,SAAS;gBACjG,6BAAK,SAAS,EAAC,QAAQ,IAAE,KAAK,KAAK,SAAS,GAAG,oBAAC,cAAc,IAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAI,GAAG,SAAS,CAAO;gBACvH,KAAK,KAAK,KAAK,IAAI,KAAK,CAAC,UAAU,GAAG,6BAAK,SAAS,EAAC,mBAAmB,aAAa,GAAG,SAAS;gBACjG,KAAK,KAAK,IAAI,GAAG,oBAAC,cAAc,IAAC,IAAI,EAAE,QAAQ,GAAI,GAAG,SAAS,CAC3D,CACD,CACG,EACT;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/dxaccordion/DxAccordion.tsx","../src/dxaccordion/DxAccordionGroup.tsx","../src/dxbutton/DxButton.tsx","../src/dxlabel/DxLabel.tsx","../src/dxitemgroup/DxCheckbox.tsx","../src/dxitemgroup/DxItemGroup.tsx","../src/dxtabbedcontent/DxTabbedContent.tsx","../src/dxtabbedcontent/DxTabPanel.tsx","../src/dxtextbox/DxTextbox.tsx","../src/dxtoggle/DxToggle.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport React, { useState } from 'react';\n\nimport './DxAccordion.scss';\n\ninterface IProps {\n\ttitle: React.ReactNode;\n\tchildren: React.ReactNode;\n\tshowOpen?: boolean;\n}\n\nexport default function DxAccordion(props: IProps) {\n\tconst [isOpen, setIsOpen] = useState(props.showOpen || false);\n\n\treturn (\n\t\t<div className='dx-accordion'>\n\t\t\t<div className='accordion-heading' onClick={() => setIsOpen(!isOpen)}>\n\t\t\t\t{props.title} <GenesysDevIcon icon={isOpen ? GenesysDevIcons.AppChevronUp : GenesysDevIcons.AppChevronDown} />\n\t\t\t</div>\n\t\t\t{isOpen ? <div className='accordion-content'>{props.children}</div> : undefined}\n\t\t</div>\n\t);\n}\n","import React from 'react';\n\nimport './DxAccordionGroup.scss';\n\ninterface IProps {\n\tchildren: React.ReactNode;\n}\n\nexport default function DxAccordionGroup(props: IProps) {\n\treturn <div className='dx-accordion-group'>{props.children}</div>;\n}\n","import React from 'react';\nimport { VoidEventCallback } from '..';\n\nimport './DxButton.scss';\n\ninterface IProps {\n\ttype?: 'primary' | 'secondary';\n\tdisabled?: boolean;\n\tchildren?: React.ReactNode;\n\tclassName?: string;\n\tonClick?: VoidEventCallback;\n}\n\nexport default function DxButton(props: IProps) {\n\tlet classNames = ['dx-button'];\n\tclassNames.push(`dx-button-${props.type || 'primary'}`);\n\tif (props.className) classNames.push(props.className);\n\n\tconst handleClick = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n\t\tif (!props.onClick) return;\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tprops.onClick();\n\t};\n\n\treturn (\n\t\t<button className={classNames.join(' ')} type='button' onClick={handleClick} disabled={props.disabled === true}>\n\t\t\t{props.children}\n\t\t</button>\n\t);\n}\n","import { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport React from 'react';\n\nimport './DxLabel.scss';\n\ninterface IProps {\n\tlabel?: string;\n\tdescription?: string;\n\tuseFieldset?: boolean;\n\tclassName?: string;\n\tchildren: React.ReactNode;\n}\n\nexport default function DxLabel(props: IProps) {\n\tconst hasLabel = props.label && props.label !== '';\n\n\tconst description = props.description ? (\n\t\t<div className='input-description'>\n\t\t\t<GenesysDevIcon icon={GenesysDevIcons.AppInfoSolid} />\n\t\t\t<span>{props.description}</span>\n\t\t</div>\n\t) : undefined;\n\n\tif (props.useFieldset) {\n\t\treturn (\n\t\t\t<fieldset className={'dx-label ' + props.className || ''}>\n\t\t\t\t{props.label ? <legend className='label-text'>{props.label}</legend> : undefined}\n\t\t\t\t{props.children}\n\t\t\t\t{description}\n\t\t\t</fieldset>\n\t\t);\n\t}\n\treturn (\n\t\t<label className={'dx-label ' + props.className || ''}>\n\t\t\t{hasLabel ? <span className='label-text'>{props.label}</span> : undefined}\n\t\t\t{props.children}\n\t\t\t{description}\n\t\t</label>\n\t);\n}\n","import React from 'react';\nimport { BooleanChangedCallback } from '..';\n\nimport './DxCheckbox.scss';\n\ninterface IProps {\n\tlabel: string;\n\tvalue: string;\n\tdescription?: string;\n\tinitialValue?: boolean;\n\tname?: string;\n\tclassName?: string;\n\tonCheckChanged?: BooleanChangedCallback;\n\tuseRadioType?: boolean;\n}\n\nexport default function DxCheckbox(props: IProps) {\n\treturn (\n\t\t<label className={`dx-checkbox ${props.className || ''}`}>\n\t\t\t<input\n\t\t\t\ttype={props.useRadioType ? 'radio' : 'checkbox'}\n\t\t\t\tname={props.name}\n\t\t\t\tid={props.label}\n\t\t\t\tvalue={props.value}\n\t\t\t\tchecked={props.initialValue}\n\t\t\t\tonChange={(e) => (props.onCheckChanged ? props.onCheckChanged(e.target.checked) : undefined)}\n\t\t\t/>\n\t\t\t<span className='label-text'>{props.label}</span>\n\t\t</label>\n\t);\n}\n","import React, { useEffect, useState } from 'react';\nimport { v4 as uuid } from 'uuid';\nimport { DxItemGroupItem, DxItemGroupItemValue, ItemChangedCallback, ItemGroupChangedCallback } from '..';\n\nimport './DxItemGroup.scss';\nimport './radiobutton.scss';\nimport './dropdown.scss';\nimport './multiselect.scss';\nimport DxLabel from '../dxlabel/DxLabel';\nimport DxCheckbox from './DxCheckbox';\n\ninterface IProps {\n\ttitle?: string;\n\tdescription?: string;\n\tformat: DxItemGroupFormat;\n\titems: DxItemGroupItem[];\n\tonItemChanged?: ItemChangedCallback;\n\tonItemsChanged?: ItemGroupChangedCallback;\n}\n\nexport type DxItemGroupFormat = 'checkbox' | 'radio' | 'dropdown' | 'multiselect';\n\nexport default function DxItemGroup(props: IProps) {\n\tconst [data, setData] = useState<DxItemGroupItemValue[]>(\n\t\tprops.items.map((item) => {\n\t\t\treturn { item, isSelected: false };\n\t\t})\n\t);\n\tconst [id] = useState(uuid());\n\n\t// data changed\n\tuseEffect(() => {\n\t\tif (props.onItemsChanged) props.onItemsChanged(data);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [data]);\n\n\t// Handle checkbox changed\n\tconst onChange = (idx: number, item: DxItemGroupItem, checked: boolean) => {\n\t\tif (props.onItemChanged) props.onItemChanged(item, checked);\n\t\tlet newData = [...data];\n\t\t// Unselect everything if it's radio buttons\n\t\tif (props.format === 'radio') newData.forEach((value) => (value.isSelected = false));\n\t\t// Set the selected state of the new item\n\t\tnewData[idx].isSelected = checked;\n\t\tsetData(newData);\n\t};\n\n\tswitch (props.format) {\n\t\tcase 'multiselect':\n\t\tcase 'dropdown': {\n\t\t\treturn (\n\t\t\t\t<DxLabel label={props.title} description={props.description}>\n\t\t\t\t\t<div className={`dx-item-group${props.format === 'multiselect' ? ' dx-multiselect-group' : ' dx-select-group'}`}>\n\t\t\t\t\t\t<select multiple={props.format === 'multiselect'}>\n\t\t\t\t\t\t\t{data.map((d, i) => (\n\t\t\t\t\t\t\t\t<option key={i} value={d.item.value}>\n\t\t\t\t\t\t\t\t\t{d.item.label}\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</DxLabel>\n\t\t\t);\n\t\t}\n\t\tcase 'checkbox':\n\t\tcase 'radio':\n\t\tdefault: {\n\t\t\treturn (\n\t\t\t\t<DxLabel label={props.title} description={props.description} className='dx-item-group' useFieldset={true}>\n\t\t\t\t\t{data.map((d, i) => (\n\t\t\t\t\t\t<DxCheckbox\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tname={props.format === 'checkbox' ? `${id}-${i}` : id}\n\t\t\t\t\t\t\tlabel={d.item.label}\n\t\t\t\t\t\t\tvalue={d.item.value}\n\t\t\t\t\t\t\tinitialValue={d.isSelected}\n\t\t\t\t\t\t\tonCheckChanged={(checked) => onChange(i, d.item, checked)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t// <label key={i}>\n\t\t\t\t\t\t// \t<input\n\t\t\t\t\t\t// \t\ttype={props.format}\n\t\t\t\t\t\t// \t\tname={props.format === 'checkbox' ? `${id}-${i}` : id}\n\t\t\t\t\t\t// \t\tid={d.item.label}\n\t\t\t\t\t\t// \t\tvalue={d.item.value}\n\t\t\t\t\t\t// \t\tchecked={d.isSelected}\n\t\t\t\t\t\t// \t\tonChange={(e) => onChange(i, d.item, e)}\n\t\t\t\t\t\t// \t/>\n\t\t\t\t\t\t// \t<span className='label-text'>{d.item.label}</span>\n\t\t\t\t\t\t// </label>\n\t\t\t\t\t))}\n\t\t\t\t</DxLabel>\n\t\t\t);\n\t\t}\n\t}\n}\n","import React, { useState } from 'react';\n\nimport './DxTabbedContent.scss';\n\ninterface IProps {\n\tchildren: React.ReactNode;\n\tinitialTabId?: number;\n}\n\nexport default function DxTabbedContent(props: IProps) {\n\tconst [activeTab, setActiveTab] = useState(props.initialTabId || 0);\n\tconst [titles] = useState<React.ReactNode[]>(\n\t\t// Scrape titles from child elements\n\t\tReact.Children.toArray(props.children).map((child: any) => {\n\t\t\tif (!child || !child.props || !child.props.title) return 'Unknown title';\n\t\t\treturn child.props.title;\n\t\t})\n\t);\n\n\treturn (\n\t\t<div className='dx-tabbed-content'>\n\t\t\t<div className='tab-titles'>\n\t\t\t\t{titles.map((title, i) => (\n\t\t\t\t\t<span key={i} className={`tab-title${i === activeTab ? ' active' : ''}`} onClick={() => setActiveTab(i)}>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</span>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t<div className='tab-content'>{React.Children.toArray(props.children)[activeTab]}</div>\n\t\t</div>\n\t);\n}\n","import React from 'react';\n\nimport './DxTabPanel.scss';\n\ninterface IProps {\n\ttitle: React.ReactNode;\n\tchildren: React.ReactNode;\n}\n\nexport default function DxTabPanel(props: IProps) {\n\treturn <div className='dx-tab-panel'>{props.children}</div>;\n}\n","import { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport React, { useEffect, useRef, useState } from 'react';\nimport DxLabel from '../dxlabel/DxLabel';\nimport { DxTextboxProps, StringChangedCallback, VoidEventCallback } from '..';\n\nimport './DxTextbox.scss';\n\nexport default function DxTextbox(props: DxTextboxProps) {\n\tconst [debounceMs, setDebounceMs] = useState(props.changeDebounceMs || 300);\n\tconst [value, setValue] = useState(props.initialValue || '');\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [escapePressed, setEscapePressed] = useState(Date.now());\n\tconst [step, setStep] = useState<string | number | undefined>(undefined);\n\tlet [timer, setTimer] = useState(undefined as unknown as ReturnType<typeof setTimeout>);\n\n\t// Constructor\n\tuseEffect(() => {\n\t\t// Register global key bindings\n\t\tdocument.addEventListener('keydown', globalKeyBindings, false);\n\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keydown', globalKeyBindings, false);\n\t\t};\n\t}, []);\n\n\t// Escape pressed\n\tuseEffect(() => {\n\t\tif (!isFocused) return;\n\t\tsetValue('');\n\t\tinputRef.current?.blur();\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [escapePressed]);\n\n\t// Value changed\n\tuseEffect(() => {\n\t\tif (props.inputType === 'decimal') {\n\t\t\t// Normalize step setting\n\t\t\tif (!isNaN(parseFloat(value))) {\n\t\t\t\tconst match = /\\.(.+)/.exec(value);\n\t\t\t\tconsole.log(match);\n\t\t\t\tif (match) {\n\t\t\t\t\tconst s = `0.${Array.apply(null, Array(match[1].length - 1))\n\t\t\t\t\t\t.map(() => '0')\n\t\t\t\t\t\t.join('')}1`;\n\t\t\t\t\tconsole.log(s);\n\t\t\t\t\tsetStep(s);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (props.inputType === 'integer') {\n\t\t\t// Overwrite value as integer to forcibly truncate floating point numbers\n\t\t\tsetValue(parseInt(value).toString());\n\t\t}\n\n\t\t// Debounce onChange notification\n\t\tif (!props.onChange) return;\n\t\tclearTimeout(timer);\n\t\tsetTimer(setTimeout(() => (props.onChange ? props.onChange(value) : undefined), debounceMs));\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [value]);\n\n\t// Update state from props\n\tuseEffect(() => {\n\t\tsetDebounceMs(props.changeDebounceMs || 300);\n\t}, [props.changeDebounceMs]);\n\n\t// Normalize inputRef\n\tlet inputRef = useRef<HTMLInputElement>(null);\n\tif (props.inputRef) inputRef = props.inputRef;\n\tconst hasLabel = props.label && props.label !== '';\n\n\t// Global key bindings\n\tfunction globalKeyBindings(event: KeyboardEvent) {\n\t\t// Escape - cancel search\n\t\tif (event.key === 'Escape') {\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\t\t\tsetEscapePressed(Date.now());\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Normalize input type\n\tlet inputType: React.HTMLInputTypeAttribute | undefined = props.inputType;\n\tif (inputType === 'integer' || inputType === 'decimal') inputType = 'number';\n\n\t// TODO: handle props.inputType\n\tlet component = (\n\t\t<div className={`dx-textbox${hasLabel ? ' with-label' : ''}`} style={{}}>\n\t\t\t{props.icon ? <GenesysDevIcon icon={props.icon} className='input-icon' /> : undefined}\n\t\t\t<input\n\t\t\t\tclassName='dx-input'\n\t\t\t\ttype={inputType}\n\t\t\t\tstep={step}\n\t\t\t\tvalue={value}\n\t\t\t\tplaceholder={props.placeholder}\n\t\t\t\tonChange={(e) => setValue(e.target.value)}\n\t\t\t\tref={inputRef}\n\t\t\t\tonFocus={() => {\n\t\t\t\t\tsetIsFocused(true);\n\t\t\t\t\tif (props.onFocus) props.onFocus();\n\t\t\t\t}}\n\t\t\t\tonBlur={() => {\n\t\t\t\t\tsetIsFocused(false);\n\t\t\t\t\tif (props.onBlur) props.onBlur();\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{props.clearButton && (value || isFocused) ? (\n\t\t\t\t<GenesysDevIcon icon={GenesysDevIcons.AppTimes} className='clear-icon' onClick={() => setValue('')} />\n\t\t\t) : undefined}\n\t\t</div>\n\t);\n\n\t// Render\n\treturn (\n\t\t<DxLabel label={props.label} description={props.description}>\n\t\t\t{component}\n\t\t</DxLabel>\n\t);\n}\n","import React, { useEffect, useState } from 'react';\nimport { GenesysDevIcon, GenesysDevIcons } from 'genesys-dev-icons';\nimport { BooleanChangedCallback, DxToggleProps } from '..';\n\nimport './DxToggle.scss';\nimport DxLabel from '../dxlabel/DxLabel';\n\nexport default function DxToggle(props: DxToggleProps) {\n\tconst [value, setValue] = useState(props.isTriState ? props.initialValue : props.initialValue || false);\n\n\tconst trueIcon = props.trueIcon || GenesysDevIcons.AppCheck;\n\tconst falseIcon = props.falseIcon || GenesysDevIcons.AppTimes;\n\n\tuseEffect(() => {\n\t\tif (props.onChange) props.onChange(value);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [value]);\n\n\tconst toggleValue = () => {\n\t\tif (props.isTriState) {\n\t\t\tif (value === undefined) setValue(true);\n\t\t\telse if (value === true) setValue(false);\n\t\t\telse setValue(undefined);\n\t\t} else {\n\t\t\tsetValue(!value);\n\t\t}\n\t};\n\n\treturn (\n\t\t<DxLabel label={props.label} description={props.description}>\n\t\t\t<div className='dx-toggle-container'>\n\t\t\t\t<div className='dx-toggle' onClick={toggleValue}>\n\t\t\t\t\t{value !== false ? <GenesysDevIcon icon={falseIcon} /> : undefined}\n\t\t\t\t\t{value === true && props.isTriState ? <div className='clear-placeholder'> </div> : undefined}\n\t\t\t\t\t<div className='slider'>{value !== undefined ? <GenesysDevIcon icon={value ? trueIcon : falseIcon} /> : undefined}</div>\n\t\t\t\t\t{value === false && props.isTriState ? <div className='clear-placeholder'> </div> : undefined}\n\t\t\t\t\t{value !== true ? <GenesysDevIcon icon={trueIcon} /> : undefined}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</DxLabel>\n\t);\n}\n"],"names":["uuid"],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAA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