@elliemae/ds-form 3.11.0-next.5 → 3.11.0-next.7
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/dist/cjs/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/dist/cjs/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/dist/cjs/DateInput/DSDateInput.js.map +1 -1
- package/dist/cjs/DateInput/components/DateInputImpl.js.map +1 -1
- package/dist/cjs/DateInput/components/DateInputs.js +10 -10
- package/dist/cjs/DateInput/components/DateInputs.js.map +2 -2
- package/dist/cjs/DateInputV2/components/DSDateInput.js.map +1 -1
- package/dist/cjs/DateInputV2/components/DateInputs.js +16 -16
- package/dist/cjs/DateInputV2/components/DateInputs.js.map +2 -2
- package/dist/cjs/DateInputV2/components/helpers.js.map +1 -1
- package/dist/cjs/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/dist/cjs/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/dist/cjs/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/dist/cjs/FormItem/DSFormItemLayout.js.map +1 -1
- package/dist/cjs/FormItem/Error/DSError.js.map +1 -1
- package/dist/cjs/FormItem/Feedback.js.map +1 -1
- package/dist/cjs/FormItem/Label/DSLabel.js.map +1 -1
- package/dist/cjs/InputGroup/AddonWrapper.js.map +1 -1
- package/dist/cjs/InputGroup/DSInputGroup.js.map +1 -1
- package/dist/cjs/InputMask/DSInputMask.js.map +1 -1
- package/dist/cjs/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/PhoneInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/cjs/InputMask/mask_types/index.js.map +1 -1
- package/dist/cjs/InputProtected/DSInputProtected.js.map +1 -1
- package/dist/cjs/LargeInputText/DSLargeInputText.js.map +1 -1
- package/dist/cjs/Radio/Circle.js.map +1 -1
- package/dist/cjs/Radio/DSRadio.js.map +1 -1
- package/dist/cjs/RadioGroup/DSRadioGroup.js.map +1 -1
- package/dist/cjs/RequiredMark/RequiredMark.js.map +1 -1
- package/dist/cjs/TimeInput/DSTimeInput.js.map +1 -1
- package/dist/cjs/TimeInput/TimeInputImpl.js.map +1 -1
- package/dist/cjs/TimeInput/TimeInputs.js +12 -12
- package/dist/cjs/TimeInput/TimeInputs.js.map +2 -2
- package/dist/cjs/Toggle/DSToggle.js.map +1 -1
- package/dist/cjs/Toggle/DSToggleImpl.js.map +1 -1
- package/dist/cjs/Toggle/DSToggleRender.js.map +1 -1
- package/dist/esm/CheckboxGroup/DSCheckboxGroup.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/ComboBoxFreeSolo.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueLabel.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/MultiValueRemove.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/SingleValue.js.map +1 -1
- package/dist/esm/ComboBoxFreeSolo/components/SingleValueRemove.js.map +1 -1
- package/dist/esm/DateInput/DSDateInput.js.map +1 -1
- package/dist/esm/DateInput/components/DateInputImpl.js.map +1 -1
- package/dist/esm/DateInput/components/DateInputs.js.map +1 -1
- package/dist/esm/DateInputV2/components/DSDateInput.js.map +1 -1
- package/dist/esm/DateInputV2/components/DateInputs.js.map +1 -1
- package/dist/esm/DateInputV2/components/helpers.js.map +1 -1
- package/dist/esm/ExpandableInput/DSExpandableInput.js.map +1 -1
- package/dist/esm/ExpandableInput/ExpandableInputImpl.js.map +1 -1
- package/dist/esm/FloatingLabelInput/DSFloatingLabelInput.js.map +1 -1
- package/dist/esm/FloatingLabelInput/FloatingLabelInputImpl.js.map +1 -1
- package/dist/esm/FormItem/DSFormItemLayout.js.map +1 -1
- package/dist/esm/FormItem/Error/DSError.js.map +1 -1
- package/dist/esm/FormItem/Feedback.js.map +1 -1
- package/dist/esm/FormItem/Label/DSLabel.js.map +1 -1
- package/dist/esm/InputGroup/AddonWrapper.js.map +1 -1
- package/dist/esm/InputGroup/DSInputGroup.js.map +1 -1
- package/dist/esm/InputMask/DSInputMask.js.map +1 -1
- package/dist/esm/InputMask/DSInputMaskDeprecated.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DateTimeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/DictionaryInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/NumberInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/PhoneInternationalInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/SsnInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/UsZipCodeInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/ZipCodeSearchInputMask.js.map +1 -1
- package/dist/esm/InputMask/mask_types/index.js.map +1 -1
- package/dist/esm/InputProtected/DSInputProtected.js.map +1 -1
- package/dist/esm/LargeInputText/DSLargeInputText.js.map +1 -1
- package/dist/esm/Radio/Circle.js.map +1 -1
- package/dist/esm/Radio/DSRadio.js.map +1 -1
- package/dist/esm/RadioGroup/DSRadioGroup.js.map +1 -1
- package/dist/esm/RequiredMark/RequiredMark.js.map +1 -1
- package/dist/esm/TimeInput/DSTimeInput.js.map +1 -1
- package/dist/esm/TimeInput/TimeInputImpl.js.map +1 -1
- package/dist/esm/TimeInput/TimeInputs.js.map +1 -1
- package/dist/esm/Toggle/DSToggle.js.map +1 -1
- package/dist/esm/Toggle/DSToggleImpl.js.map +1 -1
- package/dist/esm/Toggle/DSToggleRender.js.map +1 -1
- package/package.json +16 -13
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/InputMask/mask_types/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DateInputMask } from './DateInputMask';\nimport { DateTimeInputMask } from './DateTimeInputMask';\nimport { DictionaryInputMask } from './DictionaryInputMask';\nimport { NumberInputMask } from './NumberInputMask';\nimport { PhoneInputMask } from './PhoneInputMask';\nimport { PhoneInternationalInputMask } from './PhoneInternationalInputMask';\nimport { SsnInputMask } from './SsnInputMask';\nimport { UsZipCodeInputMask } from './UsZipCodeInputMask';\nimport { ZipCodeSearchInputMask } from './ZipCodeSearchInputMask';\n\nconst dollarSign = '$';\nconst percentSign = '%';\nconst emptyString = '';\nconst comma = ',';\nconst period = '.';\n\nexport const OutOfTheBoxMaskTypes = {\n 'ds-mask-date': (props) => <DateInputMask {...props} />,\n 'ds-mask-date-time': (props) => <DateTimeInputMask {...props} />,\n 'ds-mask-dictionary': ({ ignoreCase = true, ...rest }) => (\n <DictionaryInputMask ignoreCase={ignoreCase} {...rest} />\n ),\n 'ds-mask-number': ({\n prefix = dollarSign,\n suffix = emptyString,\n includeThousandsSeparator = true,\n thousandsSeparatorSymbol = comma,\n allowDecimal = false,\n decimalSymbol = period,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n allowLeadingZeroes = false,\n integerLimit = null,\n ...rest\n }) => (\n <NumberInputMask\n prefix={prefix}\n suffix={suffix}\n includeThousandsSeparator={includeThousandsSeparator}\n thousandsSeparatorSymbol={thousandsSeparatorSymbol}\n allowDecimal={allowDecimal}\n decimalSymbol={decimalSymbol}\n decimalLimit={decimalLimit}\n requireDecimal={requireDecimal}\n allowNegative={allowNegative}\n allowLeadingZeroes={allowLeadingZeroes}\n integerLimit={integerLimit}\n {...rest}\n />\n ),\n 'ds-mask-percent': ({\n prefix = emptyString,\n suffix = percentSign,\n includeThousandsSeparator = true,\n thousandsSeparatorSymbol = comma,\n allowDecimal = false,\n decimalSymbol = period,\n decimalLimit = 2,\n requireDecimal = false,\n allowNegative = false,\n allowLeadingZeroes = false,\n integerLimit = null,\n ...rest\n }) => (\n <NumberInputMask\n prefix={prefix}\n suffix={suffix}\n includeThousandsSeparator={includeThousandsSeparator}\n thousandsSeparatorSymbol={thousandsSeparatorSymbol}\n allowDecimal={allowDecimal}\n decimalSymbol={decimalSymbol}\n decimalLimit={decimalLimit}\n requireDecimal={requireDecimal}\n allowNegative={allowNegative}\n allowLeadingZeroes={allowLeadingZeroes}\n integerLimit={integerLimit}\n {...rest}\n />\n ),\n 'ds-mask-phone': (props) => <PhoneInputMask {...props} />,\n 'ds-mask-phone-international': (props) => (\n <PhoneInternationalInputMask {...props} />\n ),\n 'ds-mask-ssn': (props) => <SsnInputMask {...props} />,\n 'ds-mask-us-zip-code': (props) => <UsZipCodeInputMask {...props} />,\n 'ds-mask-zip-code-search': (props) => <ZipCodeSearchInputMask {...props} />,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkBM;AAjB7B,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,2BAA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IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACC,GAAG;AAAA,GACN;AAAA,EAEF,iBAAiB,CAAC,UAAU,oBAAC;AAAA,IAAgB,GAAG;AAAA,GAAO;AAAA,EACvD,+BAA+B,CAAC,UAC9B,oBAAC;AAAA,IAA6B,GAAG;AAAA,GAAO;AAAA,EAE1C,eAAe,CAAC,UAAU,oBAAC;AAAA,IAAc,GAAG;AAAA,GAAO;AAAA,EACnD,uBAAuB,CAAC,UAAU,oBAAC;AAAA,IAAoB,GAAG;AAAA,GAAO;AAAA,EACjE,2BAA2B,CAAC,UAAU,oBAAC;AAAA,IAAwB,GAAG;AAAA,GAAO;AAC3E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/InputProtected/DSInputProtected.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useState, useCallback, useEffect } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { LockUnlocked, LockLocked, VisibleView, InvisibleHide } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSInputGroup } from '../InputGroup';\nimport { DSInputMask } from '../InputMask';\nimport { inputProtectedProps } from './props';\nimport { defaultProps } from './defaultProps';\nimport { LEFT_ADDON_OPTIONS, RIGHT_ADDON_OPTIONS } from './options';\n\nconst ADDON_ICON_OPTIONS = {\n LockUnlocked: <LockUnlocked />,\n LockLocked: <LockLocked />,\n VisibleView: <VisibleView />,\n InvisibleHide: <InvisibleHide />,\n};\n\nconst DSInputProtected = ({\n leftAddon,\n rightAddon,\n onChange,\n value,\n readOnly,\n mask,\n type,\n placeholderChar = undefined,\n ...rest\n}) => {\n const left = leftAddon && ADDON_ICON_OPTIONS[leftAddon];\n const right = rightAddon && ADDON_ICON_OPTIONS[rightAddon];\n const [inputLocked, setLocked] = useState(leftAddon === LEFT_ADDON_OPTIONS.LockLocked);\n const [inputHidden, setHidden] = useState(rightAddon === RIGHT_ADDON_OPTIONS.InvisibleHide);\n\n useEffect(() => {\n setLocked(leftAddon === LEFT_ADDON_OPTIONS.LockLocked);\n setHidden(rightAddon === RIGHT_ADDON_OPTIONS.InvisibleHide);\n }, [leftAddon, rightAddon]);\n\n const handleLeft = useCallback(() => {\n setLocked(!inputLocked);\n }, [inputLocked]);\n const handleRight = useCallback(() => {\n setHidden(!inputHidden);\n }, [inputHidden]);\n\n return (\n <div>\n <DSInputGroup\n leftAddon={\n left ? (\n <DSButton\n aria-label={`${inputLocked ? 'Allow' : 'Disallow'} Edition`}\n buttonType=\"secondary\"\n icon={ADDON_ICON_OPTIONS[inputLocked ? LEFT_ADDON_OPTIONS.LockLocked : LEFT_ADDON_OPTIONS.LockUnlocked]}\n onClick={handleLeft}\n />\n ) : undefined\n }\n rightAddon={\n right ? (\n <DSButton\n aria-label={`${inputHidden ? 'Show' : 'Hide'} Characters`}\n buttonType=\"secondary\"\n icon={\n ADDON_ICON_OPTIONS[inputHidden ? RIGHT_ADDON_OPTIONS.InvisibleHide : RIGHT_ADDON_OPTIONS.VisibleView]\n }\n onClick={handleRight}\n containerProps={{\n 'data-testid': 'inputprotected-show-hide-button',\n }}\n />\n ) : undefined\n }\n >\n <DSInputMask\n {...rest}\n mask={mask}\n placeholderChar={placeholderChar}\n onChange={onChange}\n disabled={left ? inputLocked : readOnly}\n type={right && inputHidden ? 'password' : type}\n value={value}\n />\n </DSInputGroup>\n </div>\n );\n};\n\nDSInputProtected.propTypes = inputProtectedProps;\nDSInputProtected.defaultProps = defaultProps;\nDSInputProtected.displayName = 'DSInputProtected';\nconst DSInputProtectedWithSchema = describe(DSInputProtected);\nDSInputProtectedWithSchema.propTypes = inputProtectedProps;\n\nexport {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QACC,cAAY,GAAG,cAAc,UAAU;AAAA,QACvC,YAAW;AAAA,QACX,MAAM,mBAAmB,cAAc,mBAAmB,aAAa,mBAAmB;AAAA,QAC1F,SAAS;AAAA,OACX,IACE;AAAA,MAEN,YACE,QACE,oBAAC;AAAA,QACC,cAAY,GAAG,cAAc,SAAS;AAAA,QACtC,YAAW;AAAA,QACX,MACE,mBAAmB,cAAc,oBAAoB,gBAAgB,oBAAoB;AAAA,QAE3F,SAAS;AAAA,QACT,gBAAgB;AAAA,UACd,eAAe;AAAA,QACjB;AAAA,OACF,IACE;AAAA,MAGN,8BAAC;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,OAAO,cAAc;AAAA,QAC/B,MAAM,SAAS,cAAc,aAAa;AAAA,QAC1C;AAAA,OACF;AAAA,KACF;AAAA,GACF;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;AAGvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/LargeInputText/DSLargeInputText.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/no-autofocus, react/prop-types */\nimport React, { useMemo } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport {\n convertPropToCssClassName,\n aggregatedClasses,\n} from '@elliemae/ds-classnames';\nimport { props } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst CounterArea = aggregatedClasses('div')(\n 'counter',\n 'textarea',\n ({ limitError }) => ({\n 'limit-error': limitError,\n }),\n);\n\nconst DSLargeInputText = ({\n containerProps,\n autoFocus,\n className,\n disabled,\n name,\n id,\n maxLength,\n minLength,\n placeholder,\n onClick,\n onChange,\n onFocus,\n onBlur,\n onKeyUp,\n onKeyDown,\n onPaste,\n value,\n hasError,\n required,\n readOnly,\n resize,\n innerRef,\n ariaLabel,\n ariaAutocomplete,\n role,\n characterLimitCounter,\n rows,\n errorLimit,\n tabIndex,\n}) => {\n const limitError = useMemo(\n () =>\n characterLimitCounter < String(value).length && characterLimitCounter > 0,\n [characterLimitCounter, value],\n );\n const {\n cssClassName,\n classNameElement,\n classNameBlock,\n } = convertPropToCssClassName('form-element-textarea', 'text', {\n hasError: limitError || hasError,\n readOnly,\n disabled,\n });\n // auto size when user types\n const handleKeyUp = (e) => {\n // const { target } = e\n onKeyUp(e);\n // if (e.key !== 'Enter') return\n // target.style.cssText = 'height:auto; padding:0'\n // target.style.cssText = `height: ${target.scrollHeight}px`\n };\n return (\n <>\n <div {...containerProps} className={`${cssClassName} ${className}`}>\n <div className={classNameBlock('wrapper')}>\n <textarea\n ref={innerRef}\n aria-autocomplete={ariaAutocomplete}\n aria-label={ariaLabel}\n aria-multiline\n aria-placeholder={placeholder}\n aria-required={required}\n autoFocus={autoFocus}\n className={classNameElement('textarea')}\n data-testid=\"ds-large-input_main-component\"\n disabled={disabled}\n id={id}\n maxLength={maxLength}\n minLength={minLength}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n onKeyUp={handleKeyUp}\n onPaste={onPaste}\n placeholder={placeholder}\n role={role}\n rows={String(rows)}\n style={{\n resize,\n }}\n value={value}\n tabIndex={tabIndex}\n />\n </div>\n </div>\n {characterLimitCounter > 0 && (\n <CounterArea classProps={{ limitError }} data-testid=\"counter-area\">\n {`${\n limitError\n ? `${errorLimit} ${characterLimitCounter} characters. `\n : ''\n }${String(value).length} / ${characterLimitCounter}`}\n </CounterArea>\n )}\n </>\n );\n};\n\nDSLargeInputText.propTypes = props;\nDSLargeInputText.defaultProps = defaultProps;\nDSLargeInputText.displayName = 'DSLargeInputText';\nconst DSLargeInputTextWithSchema = describe(DSLargeInputText).description(\n 'A large input',\n);\nDSLargeInputTextWithSchema.propTypes = props;\n\nexport { DSLargeInputTextWithSchema, DSLargeInputText };\n\nexport default DSLargeInputText;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyEnB,mBAGM,KAHN;AAvEJ,SAAgB,eAAe;AAC/B,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAE7B,MAAM,cAAc,kBAAkB,KAAK;AAAA,EACzC;AAAA,EACA;AAAA,EACA,CAAC,EAAE,WAAW,OAAO;AAAA,IACnB,eAAe;AAAA,EACjB;AACF;AAEA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,aAAa;AAAA,IACjB,MACE,wBAAwB,OAAO,KAAK,EAAE,UAAU,wBAAwB;AAAA,IAC1E,CAAC,uBAAuB,KAAK;AAAA,EAC/B;AACA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,0BAA0B,yBAAyB,QAAQ;AAAA,IAC7D,UAAU,cAAc;AAAA,IACxB;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,cAAc,CAAC,MAAM;AAEzB,YAAQ,CAAC;AAAA,EAIX;AACA,SACE;AAAA,IACE;AAAA,0BAAC;AAAA,QAAK,GAAG;AAAA,QAAgB,WAAW,GAAG,gBAAgB;AAAA,QACrD,8BAAC;AAAA,UAAI,WAAW,eAAe,SAAS;AAAA,UACtC,8BAAC;AAAA,YACC,KAAK;AAAA,YACL,qBAAmB;AAAA,YACnB,cAAY;AAAA,YACZ,kBAAc;AAAA,YACd,oBAAkB;AAAA,YAClB,iBAAe;AAAA,YACf;AAAA,YACA,WAAW,iBAAiB,UAAU;AAAA,YACtC,eAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA,MAAM,OAAO,IAAI;AAAA,YACjB,OAAO;AAAA,cACL;AAAA,YACF;AAAA,YACA;AAAA,YACA;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,MACC,wBAAwB,KACvB,oBAAC;AAAA,QAAY,YAAY,EAAE,WAAW;AAAA,QAAG,eAAY;AAAA,QAClD,aACC,aACI,GAAG,cAAc,yCACjB,KACH,OAAO,KAAK,EAAE,YAAY;AAAA,OAC/B;AAAA;AAAA,GAEJ;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,eAAe;AAChC,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB,EAAE;AAAA,EAC5D;AACF;AACA,2BAA2B,YAAY;AAIvC,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Radio/Circle.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { withTheme } from '@elliemae/ds-system';\n\nconst Circle = ({ checked, theme }) => {\n const r =\n theme.breakpoints.medium.split('px')[0] - window.innerWidth >= 0 ? 6 : 4;\n return (\n <svg width=\"100%\" height=\"100%\">\n <circle\n className={checked ? 'checked' : 'unchecked'}\n r={r}\n cx=\"50%\"\n cy=\"50%\"\n />\n </svg>\n );\n};\n\nconst ThemedCircle = withTheme(Circle);\nexport { ThemedCircle as Circle };\nexport default ThemedCircle;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACQjB;AAPN,SAAS,iBAAiB;AAE1B,MAAM,SAAS,CAAC,EAAE,SAAS,MAAM,MAAM;AACrC,QAAM,IACJ,MAAM,YAAY,OAAO,MAAM,IAAI,EAAE,KAAK,OAAO,cAAc,IAAI,IAAI;AACzE,SACE,oBAAC;AAAA,IAAI,OAAM;AAAA,IAAO,QAAO;AAAA,IACvB,8BAAC;AAAA,MACC,WAAW,UAAU,YAAY;AAAA,MACjC;AAAA,MACA,IAAG;AAAA,MACH,IAAG;AAAA,KACL;AAAA,GACF;AAEJ;AAEA,MAAM,eAAe,UAAU,MAAM;AAErC,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Radio/DSRadio.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable react/no-unknown-property */\nimport React, { useRef } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { Circle } from './Circle';\n\ninterface DSRadioT {\n [x: string]: unknown;\n innerRef?: React.MutableRefObject<HTMLInputElement>;\n containerProps?: { [x: string]: unknown };\n className?: string;\n style?: React.CSSProperties;\n labelText?: string;\n htmlFor?: string;\n hasError?: boolean;\n readOnly?: boolean;\n disabled?: boolean;\n checked?: boolean;\n value?: string;\n name?: string;\n onKeyDown?: React.KeyboardEventHandler<HTMLSpanElement>;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n}\n\nconst DSRadio = ({\n containerProps,\n className,\n style,\n labelText,\n htmlFor,\n hasError,\n readOnly,\n disabled,\n checked,\n value,\n name,\n onChange,\n children,\n tabIndex,\n innerRef,\n ...otherProps\n}: DSRadioT) => {\n // this will be solved when we move to styled components...\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { cssClassName, classNameElement } = convertPropToCssClassName('form-element-radio', className, {\n hasError,\n readOnly,\n disabled,\n });\n const checkRef = useRef<HTMLInputElement | null>(null);\n return (\n <div {...containerProps} className={cssClassName}>\n <label className={classNameElement('label')} htmlFor={htmlFor}>\n <input\n {...otherProps}\n ref={checkRef}\n aria-disabled={disabled}\n checked={disabled ? false : checked}\n className={classNameElement('input')}\n disabled={disabled}\n name={name}\n onChange={(e) => {\n if (!readOnly && !disabled) {\n onChange(e);\n }\n }}\n readOnly={readOnly}\n tabIndex={-1}\n type=\"radio\"\n value={value}\n />\n <span\n ref={innerRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={classNameElement('input-button')}\n onKeyDown={(e) => {\n // really really bad pattern...\n // overwriting the target to point to the hidden input because the focus is on the span and not on the input...\n // we will solve this with a v2 of this when we move to controlled + styled components...\n e.target = checkRef.current;\n if (disabled) return;\n if (e.key === 'Enter' || e.keyCode === 32) {\n onChange(e);\n } else if (otherProps.onKeyDown) {\n otherProps.onKeyDown(e);\n }\n }}\n role=\"radio\"\n style={style}\n tabIndex={disabled ? -1 : tabIndex}\n // value={value} // should be unused?\n >\n <Circle checked={checked} />\n </span>\n <span className={classNameElement('label-text')}>{labelText}</span>\n </label>\n {children && <div className={classNameElement('radio-children')}>{children}</div>}\n </div>\n );\n};\n\nDSRadio.defaultProps = {\n containerProps: {},\n className: '',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: false,\n name: '',\n onChange: () => null,\n children: null,\n tabIndex: 0,\n};\n\nconst radioProps = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description('Injected props to wrapper element of component'),\n /** css class prop */\n className: PropTypes.string.description('css class prop'),\n /** name property to manage form */\n name: PropTypes.string.description('name property to manage form'),\n /**\n * Displayable label for the radio\n */\n labelText: PropTypes.string.description('Displayable label for the radio'),\n /** HTMLFOR property to manage form */\n htmlFor: PropTypes.element.description('HTMLFOR property to manage form'),\n /**\n * Whether the radio has error or not\n */\n hasError: PropTypes.bool.description('Whether the radio has error or not'),\n /**\n * Whether the radio is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the radio is read only or not'),\n /**\n * Whether the radio is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the radio is disabled or not'),\n /**\n * Whether the radio is checked or not\n */\n checked: PropTypes.bool.description('Whether the radio is checked or not'),\n /**\n * Value that takes the checkbox if it is checked\n */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description(\n 'Value that takes the checkbox if it is checked',\n ).isRequired,\n /**\n * Allows a function that is triggered once the radio changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the radio changes'),\n /**\n * Optional, if you want a checkbox customized\n */\n children: PropTypes.node.description('Optional, if you want a checkbox customized'),\n /** HTML tabindex to manage focus */\n tabIndex: PropTypes.number.description('HTML tabindex to manage focus'),\n /** style override object */\n style: PropTypes.object.description('style override object'),\n};\n\nDSRadio.propTypes = radioProps;\nDSRadio.displayName = 'DSRadio';\nconst DSRadioWithSchema = describe(DSRadio);\nDSRadioWithSchema.propTypes = radioProps;\n\nexport { DSRadio, DSRadioWithSchema };\n\nexport default DSRadio;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuDjB,SACE,KADF;AArDN,SAAgB,cAAc;AAC9B,SAAS,WAAW,gBAAgB;AACpC,SAAS,iCAAiC;AAC1C,SAAS,cAAc;AAsBvB,MAAM,UAAU,CAAC;AA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BAAkB,YAAY;AAI9B,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/RadioGroup/DSRadioGroup.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { GroupItem, Group } from '@elliemae/ds-shared';\nimport { DSFormItemLayout } from '../FormItem';\nimport { DSRadio } from '../Radio';\nimport { props as rprops } from './props';\nimport { defaultProps } from './defaultProps';\n\nconst emClassPrefix = 'em-ds';\nconst baseClass = `${emClassPrefix}-radio-group`;\n\nconst RadioItem = (props) => (\n <GroupItem\n render={(context) => (\n <DSRadio\n {...props}\n checked={context.activeValue === props.value}\n disabled={context.disabled || props.disabled}\n onChange={context.onChange}\n />\n )}\n />\n);\n\nconst DSRadioGroup = ({\n containerProps,\n onChange,\n activeValue,\n children,\n orientation,\n disabled,\n truncateText,\n labelProps,\n}) => {\n const checkRefs = [];\n const count = React.Children.count(children);\n const onKeyDown = (e, index) => {\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n if (index === 0) checkRefs[count - 1].focus();\n else checkRefs[index - 1].focus();\n }\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n if (index === count - 1) checkRefs[0].focus();\n else checkRefs[index + 1].focus();\n }\n };\n const group = (\n <Group activeValue={activeValue} disabled={disabled} onChange={onChange}>\n <div\n data-testid=\"ds-radiogroup\"\n {...(labelProps && labelProps.labelText ? {} : containerProps)}\n className={`${baseClass} ${baseClass}--${orientation}`}\n role=\"group\"\n >\n {React.Children.map(\n children,\n (child, index) => (\n <RadioItem\n {...child.props}\n innerRef={(t) => {\n checkRefs.push(t);\n }}\n onKeyDown={(e) => onKeyDown(e, index)}\n />\n ),\n null,\n )}\n </div>\n </Group>\n );\n\n if (labelProps && labelProps.labelText) {\n return (\n <div\n className={`${baseClass}-form-item-layout-wrapper`}\n {...containerProps}\n role=\"group\"\n >\n <DSFormItemLayout\n {...labelProps}\n inputComponent={group}\n onChange={onChange}\n truncateText={truncateText}\n />\n </div>\n );\n }\n return group;\n};\n\nDSRadioGroup.propTypes = rprops;\nDSRadioGroup.defaultProps = defaultProps;\nDSRadioGroup.displayName = 'DSRadioGroup';\nconst DSRadioGroupWithSchema = describe(DSRadioGroup);\nDSRadioGroupWithSchema.propTypes = rprops;\n\nexport { DSRadioGroup, DSRadioGroupWithSchema };\n\nexport default DSRadioGroup;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACcjB;AAdN,OAAOA,YAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,WAAW,aAAa;AACjC,SAAS,wBAAwB;AACjC,SAAS,eAAe;AACxB,SAAS,SAAS,cAAc;AAChC,SAAS,oBAAoB;AAE7B,MAAM,gBAAgB;AACtB,MAAM,YAAY,GAAG;AAErB,MAAM,YAAY,CAAC,UACjB,oBAAC;AAAA,EACC,QAAQ,CAAC,YACP,oBAAC;AAAA,IACE,GAAG;AAAA,IACJ,SAAS,QAAQ,gBAAgB,MAAM;AAAA,IACvC,UAAU,QAAQ,YAAY,MAAM;AAAA,IACpC,UAAU,QAAQ;AAAA,GACpB;AAAA,CAEJ;AAGF,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,YAAY,CAAC;AACnB,QAAM,QAAQA,OAAM,SAAS,MAAM,QAAQ;AAC3C,QAAM,YAAY,CAAC,GAAG,UAAU;AAC9B,QAAI,EAAE,QAAQ,eAAe,EAAE,QAAQ,WAAW;AAChD,UAAI,UAAU;AAAG,kBAAU,QAAQ,GAAG,MAAM;AAAA;AACvC,kBAAU,QAAQ,GAAG,MAAM;AAAA,IAClC;AACA,QAAI,EAAE,QAAQ,gBAAgB,EAAE,QAAQ,aAAa;AACnD,UAAI,UAAU,QAAQ;AAAG,kBAAU,GAAG,MAAM;AAAA;AACvC,kBAAU,QAAQ,GAAG,MAAM;AAAA,IAClC;AAAA,EACF;AACA,QAAM,QACJ,oBAAC;AAAA,IAAM;AAAA,IAA0B;AAAA,IAAoB;AAAA,IACnD,8BAAC;AAAA,MACC,eAAY;AAAA,MACX,GAAI,cAAc,WAAW,YAAY,CAAC,IAAI;AAAA,MAC/C,WAAW,GAAG,aAAa,cAAc;AAAA,MACzC,MAAK;AAAA,MAEJ,UAAAA,OAAM,SAAS;AAAA,QACd;AAAA,QACA,CAAC,OAAO,UACN,oBAAC;AAAA,UACE,GAAG,MAAM;AAAA,UACV,UAAU,CAAC,MAAM;AACf,sBAAU,KAAK,CAAC;AAAA,UAClB;AAAA,UACA,WAAW,CAAC,MAAM,UAAU,GAAG,KAAK;AAAA,SACtC;AAAA,QAEF;AAAA,MACF;AAAA,KACF;AAAA,GACF;AAGF,MAAI,cAAc,WAAW,WAAW;AACtC,WACE,oBAAC;AAAA,MACC,WAAW,GAAG;AAAA,MACb,GAAG;AAAA,MACJ,MAAK;AAAA,MAEL,8BAAC;AAAA,QACE,GAAG;AAAA,QACJ,gBAAgB;AAAA,QAChB;AAAA,QACA;AAAA,OACF;AAAA,KACF;AAAA,EAEJ;AACA,SAAO;AACT;AAEA,aAAa,YAAY;AACzB,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAInC,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/RequiredMark/RequiredMark.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst { cssClassName } = convertPropToCssClassName('form-required-mark');\nconst RequiredMark = ({ required = false, optional = false }) => {\n if (!required && !optional) return null;\n if (required) {\n return <span className={`${cssClassName}`}>●</span>;\n }\n return <span className={`${cssClassName} optional-mark`}>⚬</span>;\n};\n\nexport { RequiredMark, RequiredMark as DSRequiredMark };\nexport default RequiredMark;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACOZ;AANX,SAAS,iCAAiC;AAE1C,MAAM,EAAE,aAAa,IAAI,0BAA0B,oBAAoB;AACvE,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,WAAW,MAAM,MAAM;AAC/D,MAAI,CAAC,YAAY,CAAC;AAAU,WAAO;AACnC,MAAI,UAAU;AACZ,WAAO,oBAAC;AAAA,MAAK,WAAW,GAAG;AAAA,MAAgB;AAAA,KAAO;AAAA,EACpD;AACA,SAAO,oBAAC;AAAA,IAAK,WAAW,GAAG;AAAA,IAA8B;AAAA,GAAO;AAClE;AAGA,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/TimeInput/DSTimeInput.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSInput } from '../Input';\nimport { TimeInputImpl } from './TimeInputImpl';\n\nconst DSTimeInput = ({\n containerProps = {},\n innerRef,\n className = '',\n style = {},\n onChange = () => null,\n format,\n value = '',\n clearable = false,\n disabled = false,\n ariaLabel = 'Time input',\n}) => (\n <DSInput\n className={className}\n clearable={clearable}\n containerProps={containerProps}\n customInputType={({ onChange: inputOnChange, ...restInputProps }) => (\n <TimeInputImpl\n aria-label={ariaLabel}\n disabled={disabled}\n format={format}\n onChange={(time) => inputOnChange(time)}\n {...restInputProps}\n style={style}\n />\n )}\n disabled={disabled}\n innerRef={innerRef}\n isShowElipsisActive={false}\n onChange={onChange}\n onClear={() => onChange(null)}\n value={value}\n />\n);\n\nDSTimeInput.defaultProps = {\n format: 'hh:mm:ss',\n disabled: false,\n clearable: true,\n};\n\nconst props = {\n /** Injected props to wrapper element of component */\n containerProps: PropTypes.object.description(\n 'Injected props to wrapper element of component',\n ),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func.description(\n 'Allows a function that is triggered once the time input changes',\n ),\n /** a11y aria label */\n 'aria-label': PropTypes.string.description('a11y aria label'),\n /** style object for time input wrapper */\n style: PropTypes.object.description('style object for time input wrapper'),\n /** inner ref for time inpot wrapper */\n innerRef: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.any }),\n ]).description('inner ref for time input wrapper'),\n /** class for time input */\n className: PropTypes.string.description('class for time input'),\n /**\n * Valid time format\n */\n format: PropTypes.string.description('Valid time format'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description(\n 'Default value once the component is initialized',\n ),\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool.description(\n 'Whether the time input is clearable or not',\n ),\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool.description(\n 'Whether the time input is disabled or not',\n ),\n /**\n * Aria label\n */\n ariaLabel: PropTypes.string.description('Aria label'),\n};\n\nDSTimeInput.propTypes = props;\nDSTimeInput.displayName = 'DSTimeInput';\nconst DSTimeInputWithSchema = describe(DSTimeInput);\nDSTimeInputWithSchema.propTypes = props;\n\nexport { TimeInputImpl, DSTimeInputWithSchema, DSTimeInput };\n\nexport default DSTimeInput;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsBjB;AArBN,SAAS,WAAW,gBAAgB;AACpC,SAAS,eA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IA,UAAU,UAAU,KAAK;AAAA,IACvB;AAAA,EACF;AAAA,EAIA,WAAW,UAAU,OAAO,YAAY,YAAY;AACtD;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/TimeInput/TimeInputImpl.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { getVisibleTimeByFormat } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { TimeInputs } from './TimeInputs';\n\nconst blockName = 'input-time';\n\nconst InputTimeContainer = aggregatedClasses('div')(blockName);\n\nconst TimeInputImpl = ({\n format,\n innerRef,\n onChange,\n className,\n value,\n disabled,\n clearable,\n 'arial-label': ariaLabel,\n}) => {\n const getVisibleTimeInputs = memoizeOne((formatValue) =>\n getVisibleTimeByFormat(formatValue),\n );\n let inputsContainer = useRef();\n\n const handleFocus = (e) => {\n if (!e.target.type) {\n inputsContainer.querySelector('input').focus();\n }\n };\n\n const visibleInputs = useMemo(() => getVisibleTimeInputs(format));\n\n return (\n <InputTimeContainer\n className={className}\n disabled={disabled}\n innerRef={innerRef}\n onClick={handleFocus}\n >\n <TimeInputs\n aria-label={ariaLabel}\n clearable={clearable}\n disabled={disabled}\n format={format}\n innerRef={(node) => {\n inputsContainer = node;\n }}\n onChange={onChange}\n time={value}\n {...visibleInputs}\n />\n </InputTimeContainer>\n );\n};\n\nTimeInputImpl.propTypes = {\n containerProps: PropTypes.shape({}),\n /**\n * Inner reference to the input\n */\n innerRef: PropTypes.any,\n /**\n * Classes to add to the container\n */\n className: PropTypes.string,\n /**\n * Styles to add to the container\n */\n style: PropTypes.shape({}),\n /**\n * Allows a function that is triggered once the time input changes\n */\n onChange: PropTypes.func,\n /**\n * Valid time format\n */\n format: PropTypes.string,\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string,\n /**\n * Whether the time input is clearable or not\n */\n clearable: PropTypes.bool,\n /**\n * Whether the time input is disabled or not\n */\n disabled: PropTypes.bool,\n /**\n * Aria label to add to the container\n */\n 'aria-label': PropTypes.bool,\n 'arial-label': PropTypes.bool,\n};\n\nexport { TimeInputImpl };\nexport default TimeInputImpl;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyCjB;AAzCN,SAAgB,QAAQ,eAAe;AACvC,OAAO,eAAe;AACtB,SAAS,8BAA8B;AACvC,OAAO,gBAAgB;AACvB,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAE3B,MAAM,YAAY;AAElB,MAAM,qBAAqB,kBAAkB,KAAK,EAAE,SAAS;AAE7D,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,uBAAuB;AAAA,IAAW,CAAC,gBACvC,uBAAuB,WAAW;AAAA,EACpC;AACA,MAAI,kBAAkB,OAAO;AAE7B,QAAM,cAAc,CAAC,MAAM;AACzB,QAAI,CAAC,EAAE,OAAO,MAAM;AAClB,sBAAgB,cAAc,OAAO,EAAE,MAAM;AAAA,IAC/C;AAAA,EACF;AAEA,QAAM,gBAAgB,QAAQ,MAAM,qBAAqB,MAAM,CAAC;AAEhE,SACE,oBAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IAET,8BAAC;AAAA,MACC,cAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,CAAC,SAAS;AAClB,0BAAkB;AAAA,MACpB;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACL,GAAG;AAAA,KACN;AAAA,GACF;AAEJ;AAEA,cAAc,YAAY;AAAA,EACxB,gBAAgB,UAAU,MAAM,CAAC,CAAC;AAAA,EAIlC,UAAU,UAAU;AAAA,EAIpB,WAAW,UAAU;AAAA,EAIrB,OAAO,UAAU,MAAM,CAAC,CAAC;AAAA,EAIzB,UAAU,UAAU;AAAA,EAIpB,QAAQ,UAAU;AAAA,EAIlB,OAAO,UAAU;AAAA,EAIjB,WAAW,UAAU;AAAA,EAIrB,UAAU,UAAU;AAAA,EAIpB,cAAc,UAAU;AAAA,EACxB,eAAe,UAAU;AAC3B;AAGA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/TimeInput/TimeInputs.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { useEffect, useState } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport moment from 'moment';\nimport {\n commonInputProps,\n formatHour,\n formatMinutes,\n formatSeconds,\n formatMeridiem,\n getValidTimeNumber,\n setNativeValue,\n parseTimeNumberFromText,\n focusNextInput,\n focusPreviousInput,\n getTimeValuesFromTime,\n isArrowIncrementDecrement,\n shouldFocusNextInput,\n placeholderFormat,\n} from './utils';\nimport {\n AM,\n PM,\n ARROW_UP,\n ARROW_DOWN,\n BACKSPACE,\n ESCAPE,\n HOME,\n HOUR_RANGE_12,\n HOUR_RANGE_24,\n GENERAL_TIME_RANGE,\n END,\n PLACEHOLDER_TIME,\n SHIFT,\n} from '@elliemae/ds-shared';\n\nconst blockName = 'input-times-group';\n\nconst InputTimesGroup = aggregatedClasses('div')(blockName);\nconst TimeInput = aggregatedClasses('input')(blockName, 'input');\nconst Divider = aggregatedClasses('span')(blockName, 'divider', ({ value }) => ({\n value,\n}));\n\n// eslint-disable-next-line react/prop-types\nconst TimeDivider = ({ content = ':', value = '' }) => <Divider value={!!value}>{content}</Divider>;\n\nconst TimeInputs = ({\n time,\n format,\n use12Hours,\n step = 1,\n showHours,\n showMinutes,\n showSeconds,\n onChange,\n disabled,\n innerRef,\n clearable,\n 'arial-label': ariaLabel,\n 'aria-label': ariaLabel2,\n}) => {\n const [meridiem, setMeridiem] = useState('');\n const [hours, setHours] = useState('');\n const [minutes, setMinutes] = useState('');\n const [hasInputValue, setHasInputValue] = useState(false);\n const [seconds, setSeconds] = useState('');\n const [currentKey, setCurrentKey] = useState('');\n const [hasInputBeenTriggered, setHasInputBeenTriggered] = useState(false);\n\n const [lastTypedNumber, setLastTypedNumber] = useState(null);\n const inputRefs = {\n hours: null,\n minutes: null,\n seconds: null,\n meridiem: null,\n };\n\n useEffect(() => {\n if (time && moment(time).isValid()) {\n const timeValues = getTimeValuesFromTime(time, format, use12Hours);\n\n setMeridiem(timeValues.meridiem);\n setHours(timeValues.hours);\n setMinutes(timeValues.minutes);\n setSeconds(timeValues.seconds);\n } else {\n setMeridiem('');\n setHours('');\n setMinutes('');\n setSeconds('');\n }\n }, [time, format, use12Hours]);\n\n useEffect(() => {\n const selectedTime = time || moment();\n if (isTimeCompletelySet() && selectedTime.hours && hasInputBeenTriggered) {\n if (showHours && hours) selectedTime.hours(hours);\n if (showMinutes && minutes) selectedTime.minutes(minutes);\n if (showSeconds && seconds) selectedTime.seconds(seconds);\n if (use12Hours && meridiem) {\n const nextHours = meridiem.toLowerCase() === AM ? hours % 12 : (hours % 12) + 12;\n selectedTime.hour(nextHours);\n }\n onChange(selectedTime);\n setHasInputBeenTriggered(false);\n }\n }, [hours, minutes, seconds, meridiem]);\n\n const focusNextInputIfNeeded = (currentEl, max, number) => {\n if (\n shouldFocusNextInput(max, number, currentEl.value) &&\n !isArrowIncrementDecrement(currentKey) &&\n !hasInputValue\n ) {\n focusNextInput(currentEl);\n }\n };\n\n const getNextTimeValue = (value, incrementing = true) => {\n const parsedValue = parseTimeNumberFromText(value);\n return incrementing ? parsedValue + step : parsedValue - step;\n };\n\n const onInputFocus = (e) => {\n e.preventDefault();\n e.stopPropagation();\n e.target.select();\n };\n\n const onClick = (e) => {\n if (e.target.value) {\n setHasInputValue(true);\n }\n };\n\n // eslint-disable-next-line max-statements\n const onKeyDown = (event, max) => {\n const { target } = event;\n const { value } = target;\n setLastTypedNumber(event.key);\n switch (event.key) {\n case ARROW_UP: {\n event.preventDefault();\n setCurrentKey(event.key);\n const incrementedValue = getNextTimeValue(value);\n setNativeValue(event.target, incrementedValue);\n break;\n }\n case ARROW_DOWN: {\n event.preventDefault();\n setCurrentKey(event.key);\n const decrementedValue = getNextTimeValue(value, false);\n setNativeValue(event.target, decrementedValue);\n break;\n }\n case BACKSPACE: {\n event.preventDefault();\n if (!value) {\n focusPreviousInput(event.target);\n } else {\n setNativeValue(event.target, '');\n }\n break;\n }\n case ESCAPE: {\n event.preventDefault();\n event.target.blur();\n break;\n }\n case HOME: {\n event.preventDefault();\n setNativeValue(event.target, String(max));\n focusNextInput(event.target);\n break;\n }\n case END: {\n event.preventDefault();\n setNativeValue(event.target, '00');\n focusNextInput(event.target);\n break;\n }\n case SHIFT:\n event.preventDefault();\n setCurrentKey(event.key);\n break;\n default:\n break;\n }\n };\n\n const isTimeCompletelySet = () => {\n let neededValues = [];\n\n if (showHours) neededValues = [...neededValues, hours || null];\n if (showMinutes) neededValues = [...neededValues, minutes || null];\n if (showSeconds) neededValues = [...neededValues, seconds || null];\n if (use12Hours) neededValues = [...neededValues, meridiem || null];\n\n return !neededValues.some((value) => !value);\n };\n\n const handleSecondsChange = (e) => {\n const { value } = e.target;\n const secondsHandled = parseTimeNumberFromText(value);\n\n const nextSeconds = getValidTimeNumber(GENERAL_TIME_RANGE, secondsHandled, lastTypedNumber);\n\n setSeconds(formatSeconds(format, nextSeconds));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, GENERAL_TIME_RANGE.max, value);\n };\n\n const handleMinutesChange = (e) => {\n const { value } = e.target;\n const minutesHandled = parseTimeNumberFromText(value);\n const nextMinutes = getValidTimeNumber(GENERAL_TIME_RANGE, minutesHandled, lastTypedNumber);\n\n setMinutes(formatMinutes(format, nextMinutes));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, GENERAL_TIME_RANGE.max, value);\n };\n\n const handleHoursChange = (e) => {\n const { value } = e.target;\n const hour = parseTimeNumberFromText(value);\n const hoursRange = use12Hours ? HOUR_RANGE_12 : HOUR_RANGE_24;\n\n const nextHour = getValidTimeNumber(hoursRange, hour, lastTypedNumber);\n setHours(formatHour(format, nextHour));\n setHasInputBeenTriggered(true);\n focusNextInputIfNeeded(e.target, hoursRange.max, value);\n };\n\n const handleMeridiemKeyDown = (e) => {\n if (e.key === ARROW_UP || e.key === 'a') {\n setMeridiem(formatMeridiem(format, AM));\n } else if (e.key === ARROW_DOWN || e.key === 'p') {\n setMeridiem(formatMeridiem(format, PM));\n } else if (e.key === SHIFT) {\n setCurrentKey(e.key);\n } else if (e.key === BACKSPACE) {\n setMeridiem('');\n }\n setHasInputBeenTriggered(true);\n };\n\n const handleMeridiemBlur = (e) => {\n const { value } = e.target;\n if (value !== AM && value !== PM) {\n setMeridiem('');\n }\n };\n\n const handleOnBlur = (event) => {\n const selectedTime = moment();\n if (clearable && !event.currentTarget.contains(event.relatedTarget)) {\n if (showHours && hours) selectedTime.hours(hours);\n if (showMinutes && minutes) selectedTime.minutes(minutes);\n if (showSeconds && seconds) selectedTime.seconds(seconds);\n if (use12Hours && meridiem) {\n const nextHours = meridiem.toLowerCase() === AM ? hours % 12 : (hours % 12) + 12;\n selectedTime.hour(nextHours);\n }\n onChange(selectedTime);\n }\n };\n\n const renderSecondsInput = () => {\n if (!showSeconds) return null;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, GENERAL_TIME_RANGE.max), onInputFocus, onClick)}\n key=\"seconds-input\"\n data-testid=\"ds-time-input__seconds\"\n aria-label={ariaLabel || ariaLabel2 || 'Seconds Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.seconds = node)}\n onChange={handleSecondsChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.seconds, format)}\n value={seconds}\n />\n );\n };\n\n const renderMinutesInput = () => {\n if (!showMinutes) return null;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, GENERAL_TIME_RANGE.max), onInputFocus, onClick)}\n key=\"minutes-input\"\n data-testid=\"ds-time-input__minutes\"\n aria-label={ariaLabel || ariaLabel2 || 'Minutes Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.minutes = node)}\n onChange={handleMinutesChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.minutes, format)}\n value={minutes}\n />\n );\n };\n\n const renderHoursInput = () => {\n if (!showHours) return null;\n const hourFormatRange = use12Hours ? HOUR_RANGE_12 : HOUR_RANGE_24;\n\n return (\n <TimeInput\n {...commonInputProps((e) => onKeyDown(e, hourFormatRange.max), onInputFocus, onClick)}\n key=\"hour-input\"\n data-testid=\"ds-time-input__hours\"\n aria-label={ariaLabel || ariaLabel2 || 'Hours Input'}\n disabled={disabled}\n // eslint-disable-next-line no-return-assign\n innerRef={(node) => (inputRefs.hours = node)}\n onChange={handleHoursChange}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.hour, format, use12Hours)}\n value={hours}\n />\n );\n };\n\n const renderMeridiemInput = () => {\n if (!use12Hours) return null;\n\n return (\n <TimeInput\n {...commonInputProps}\n key=\"meridiem-input\"\n data-testid=\"ds-time-input__ampm\"\n aria-label={ariaLabel || ariaLabel2 || 'Meridiem Input'}\n disabled={disabled}\n onBlur={handleMeridiemBlur}\n onKeyDown={handleMeridiemKeyDown}\n placeholder={placeholderFormat(PLACEHOLDER_TIME.meridiem, format)}\n value={meridiem}\n />\n );\n };\n\n const renderTimeInputs = () => {\n const inputs = [renderHoursInput(), renderMinutesInput(), renderSecondsInput()];\n /* eslint-disable indent */\n const inputsWithDividers = inputs.reduce(\n (acc, input, index) =>\n input\n ? acc.concat([\n index ? (\n <TimeDivider\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n content=\":\"\n value={input.props.value}\n />\n ) : null,\n input,\n ])\n : acc,\n [],\n );\n /* eslint-enable indent */\n\n return [\n inputsWithDividers,\n React.createElement('span', { key: 'span' }), // hack for next/prev focus\n renderMeridiemInput(),\n ];\n };\n\n return (\n <InputTimesGroup onBlur={handleOnBlur} innerRef={innerRef}>\n {renderTimeInputs()}\n </InputTimesGroup>\n );\n};\n\nexport { TimeInputs };\nexport default TimeInputs;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACgDgC;AAmOjD;AA/QN,OAAOA,UAAS,WAAW,gBAAgB;AAC3C,SAAS,yBAAyB;AAClC,OAAO,YAAY;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,YAAY;AAElB,MAAM,kBAAkB,kBAAkB,KAAK,EAAE,SAAS;AAC1D,MAAM,YAAY,kBAAkB,OAAO,EAAE,WAAW,OAAO;AAC/D,MAAM,UAAU,kBAAkB,MAAM,EAAE,WAAW,WAAW,CAAC,EAAE,MAAM,OAAO;AAAA,EAC9E;A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iB;AAAA,GACpB;AAEJ;AAGA,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Toggle/DSToggle.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSToggleImpl } from './DSToggleImpl';\nimport { dsBasicSizes } from '@elliemae/ds-shared';\n\nconst DSToggle = ({\n containerProps,\n hasError,\n readOnly,\n disabled,\n checked,\n labelOn,\n labelOff,\n name,\n value,\n size,\n ...otherProps\n}) => (\n <DSToggleImpl\n {...otherProps}\n checked={checked}\n containerProps={containerProps}\n disabled={disabled}\n hasError={hasError}\n labelOff={labelOff}\n labelOn={labelOn}\n name={name}\n readOnly={readOnly}\n size={size}\n value={value}\n />\n);\n\nDSToggle.defaultProps = {\n labelOn: 'ON',\n labelOff: 'OFF',\n size: 's',\n hasError: false,\n readOnly: false,\n disabled: false,\n checked: undefined,\n};\n\nconst props = {\n /**\n * Set of Properties attached to the main container\n */\n containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),\n /**\n * Whether the toggle has error or not\n */\n hasError: PropTypes.bool.description('Whether the toggle has error or not'),\n /**\n * Whether the toggle is read only or not\n */\n readOnly: PropTypes.bool.description('Whether the toggle is read only or not'),\n /**\n * Whether the toggle is disabled or not\n */\n disabled: PropTypes.bool.description('Whether the toggle is disabled or not'),\n /**\n * Whether the toggle is checked or not\n */\n checked: PropTypes.bool.description('Whether the toggle is checked or not'),\n /**\n * Allows a function that is triggered once the toggle changes\n */\n onChange: PropTypes.func.description('Allows a function that is triggered once the toggle changes'),\n /**\n * Label to show when the toggle is ON\n */\n labelOn: PropTypes.string.description('Label to show when the toggle is ON'),\n /**\n * Label to show when the toggle is OFF\n */\n labelOff: PropTypes.string.description('Label to show when the toggle is OFF'),\n /**\n * Default value once the component is initialized\n */\n value: PropTypes.string.description('Default value once the component is initialized'),\n /**\n * ['s', 'm', 'l']\n */\n size: PropTypes.oneOf(dsBasicSizes).description(\"['s', 'm', 'l']\"),\n /**\n * Input name\n */\n name: PropTypes.string.description('Input name'),\n};\n\nDSToggle.propTypes = props;\nDSToggle.displayName = 'DSToggle';\nconst DSToggleWithSchema = describe(DSToggle);\n\nDSToggleWithSchema.propTypes = props;\n\nexport default DSToggle;\n\nexport { DSToggleWithSchema, DSToggle };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkBrB;AAjBF,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAE7B,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AACL,MACE,oBAAC;AAAA,EACE,GAAG;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,CACF;AAGF,SAAS,eAAe;AAAA,EACtB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,QAAQ;AAAA,EAIZ,gBAAgB,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,kDAAkD;AAAA,EAIlG,UAAU,UAAU,KAAK,YAAY,qCAAqC;AAAA,EAI1E,UAAU,UAAU,KAAK,YAAY,wCAAwC;AAAA,EAI7E,UAAU,UAAU,KAAK,YAAY,uCAAuC;AAAA,EAI5E,SAAS,UAAU,KAAK,YAAY,sCAAsC;AAAA,EAI1E,UAAU,UAAU,KAAK,YAAY,6DAA6D;AAAA,EAIlG,SAAS,UAAU,OAAO,YAAY,qCAAqC;AAAA,EAI3E,UAAU,UAAU,OAAO,YAAY,sCAAsC;AAAA,EAI7E,OAAO,UAAU,OAAO,YAAY,iDAAiD;AAAA,EAIrF,MAAM,UAAU,MAAM,YAAY,EAAE,YAAY,iBAAiB;AAAA,EAIjE,MAAM,UAAU,OAAO,YAAY,YAAY;AACjD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAE5C,mBAAmB,YAAY;AAE/B,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Toggle/DSToggleImpl.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport { isValidDrag, cleanDrag, calculateDrag, dragStartingPoints } from './toggleHelper';\nimport { DSToggleRender } from './DSToggleRender';\nimport { togglePropTypes } from './props';\n\nclass DSToggleImpl extends Component {\n constructor(props) {\n super(props);\n this.state = {\n checked: props.checked || false,\n inside: false,\n isDragging: false,\n // prevent draw of toggle before drag handle positioning calculations\n hide: true,\n drag: null,\n startPoint: null,\n circleWidth: null,\n boxWidth: null,\n };\n this.circle = React.createRef();\n this.box = React.createRef();\n\n this.setDragOnChange = this.setDragOnChange.bind(this);\n this.verifyElements = this.verifyElements.bind(this);\n }\n\n componentDidMount() {\n this.verifyElements();\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (\n this.state.hide &&\n this.state.circleWidth &&\n this.state.boxWidth &&\n prevState.hide &&\n this.state.drag !== null\n ) {\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ hide: false });\n }\n if (snapshot) {\n this.verifyElements();\n }\n }\n\n /**\n * ******************************************************\n * Drag\n * ****************************************************** *\n *\n * @param clientX\n */\n onDragStart = (clientX) => {\n const { startPoint, checked, isDragging, boxWidth, circleWidth } = this.state;\n // const { checked: checkedProp, } = this.props\n const drag = calculateDrag(clientX, {\n startPoint,\n checked,\n isDragging,\n boxWidth,\n circleWidth,\n });\n if (drag) this.setState({ drag });\n // else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n else this.setDragOnChange(checked); // set initial position\n };\n\n onDragStop = (e) => {\n const { checked } = this.state;\n // const { checked: checkedProp, } = this.props\n if (isValidDrag(this.state)) {\n this.onChange(e);\n this.setState(cleanDrag);\n // } else this.setDragOnChange(checkedProp != null ? checkedProp : checked) // set initial position\n } else this.setDragOnChange(checked); // set initial position\n };\n\n /**\n * ******************************************************\n * StandardEvents\n * ****************************************************** *\n *\n * @param e\n */\n onBlur = (e) => {\n const { onBlur, id } = this.props;\n if (onBlur) onBlur(e, id);\n };\n\n onFocus = (e) => {\n const { onFocus, id } = this.props;\n if (onFocus) onFocus(e, id);\n };\n\n onChange = (e) => {\n const { checked } = this.state;\n const {\n onChange,\n id,\n value,\n // checked: checkedProp,\n } = this.props;\n const newCheck = !checked;\n // this.setState({\n // checked: checkedProp != null ? checkedProp : newCheck,\n // })\n this.setState({\n checked: newCheck,\n });\n e.target.value = value;\n e.target.checked = newCheck;\n e.checked = newCheck;\n onChange(e, id);\n // this.setDragOnChange(checkedProp != null ? checkedProp : newCheck) // set new position\n this.setDragOnChange(newCheck); // set new position\n };\n\n /** ******************************************************\n MouseEvents\n ******************************************************* * */\n onMouseEnter = () => {\n this.setState({ inside: true });\n };\n\n onMouseLeave = () => {\n this.setState({ inside: false });\n };\n\n onMouseMove = (event) => {\n event.preventDefault();\n this.onDragStart(event.clientX);\n };\n\n onMouseDown = (event) => {\n this.onDragStart(event.clientX);\n this.setState({ startPoint: event.clientX, isDragging: true });\n window.addEventListener('mousemove', this.onMouseMove);\n window.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseUp = (event) => {\n this.onDragStop(event);\n window.removeEventListener('mousemove', this.onMouseMove);\n window.removeEventListener('mouseup', this.onMouseUp);\n };\n\n /** ******************************************************\n Touch\n ******************************************************* * */\n onTouchCancel = () => {\n this.setState({ inside: false });\n };\n\n onTouchEnd = (event) => {\n event.preventDefault();\n this.onDragStop(event);\n };\n\n onTouchMove = (event) => {\n this.onDragStart(event.touches[0].clientX);\n };\n\n onTouchStart = (event) => {\n this.onDragStart(event.touches[0].clientX);\n this.setState({ startPoint: event.touches[0].clientX, isDragging: true });\n };\n\n static getDerivedStateFromProps(props, state) {\n if (props.checked === true || props.checked === false) {\n return {\n checked: props.checked,\n ...dragStartingPoints(props.checked)(state),\n };\n }\n return null;\n }\n\n getSnapshotBeforeUpdate(prevProps) {\n const { size } = this.props;\n if (prevProps.size !== size) {\n return true;\n }\n return false;\n }\n\n /**\n * ******************************************************\n * other\n * ****************************************************** *\n *\n * @param currentCheckState\n */\n setDragOnChange(currentCheckState) {\n this.setState(dragStartingPoints(currentCheckState));\n }\n\n verifyElements() {\n const { checked } = this.state;\n const { checked: checkedProp } = this.props;\n const nodesInterval = setInterval(() => {\n // !important it checks when nodes are availables\n if (!this.circle || !this.box || !this.circle.current || !this.box.current) return;\n const {\n current: { clientWidth: circleWidth },\n } = this.circle;\n const {\n current: { clientWidth: boxWidth },\n } = this.box;\n if (!circleWidth || !boxWidth || circleWidth === boxWidth) return;\n this.setState({\n boxWidth,\n circleWidth,\n });\n this.setDragOnChange(checkedProp != null ? checkedProp : checked);\n // this.setDragOnChange(checked)\n clearInterval(nodesInterval);\n }, 5);\n }\n\n render() {\n const { checked, drag, inside, hide } = this.state;\n const dragStyle = drag !== null || checked || this.props.checked ? { left: `${drag}px` } : null;\n return (\n <DSToggleRender\n {...this.props}\n defaultState={this.props.checked}\n checked={checked}\n containerRef={this.box}\n hide={hide}\n dragStyle={dragStyle}\n handRef={this.circle}\n inside={inside}\n onBlur={this.onBlur}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onMouseDown={this.onMouseDown}\n onMouseEnter={this.onMouseEnter}\n onMouseLeave={this.onMouseLeave}\n onTouchCancel={this.onTouchCancel}\n onTouchEnd={this.onTouchEnd}\n onTouchMove={this.onTouchMove}\n onTouchStart={this.onTouchStart}\n />\n );\n }\n}\n\nDSToggleImpl.propTypes = togglePropTypes;\n\nexport { DSToggleImpl };\nexport default DSToggleImpl;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiOjB;AAhON,OAAOA,UAAS,iBAAiB;AACjC,SAAS,aAAa,WAAW,eAAe,0BAA0B;AAC1E,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAEhC,MAAM,qBAAqB,UAAU;AAAA,EACnC,YAAY,OAAO;AACjB,UAAM,KAAK;AA8Cb,uBAAc,CAAC,YAAY;AACzB,YAAM,EAAE,YAAY,SAAS,YAAY,UAAU,YAAY,IAAI,KAAK;AAExE,YAAM,OAAO,cAAc,SAAS;AAAA,QAClC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AACD,UAAI;AAAM,aAAK,SAAS,EAAE,KAAK,CAAC;AAAA;AAE3B,aAAK,gBAAgB,OAAO;AAAA,IACnC;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,QAAQ,IAAI,KAAK;AAEzB,UAAI,YAAY,KAAK,KAAK,GAAG;AAC3B,aAAK,SAAS,CAAC;AACf,aAAK,SAAS,SAAS;AAAA,MAEzB;AAAO,aAAK,gBAAgB,OAAO;AAAA,IACrC;AASA,kBAAS,CAAC,MAAM;AACd,YAAM,EAAE,QAAQ,GAAG,IAAI,KAAK;AAC5B,UAAI;AAAQ,eAAO,GAAG,EAAE;AAAA,IAC1B;AAEA,mBAAU,CAAC,MAAM;AACf,YAAM,EAAE,SAAS,GAAG,IAAI,KAAK;AAC7B,UAAI;AAAS,gBAAQ,GAAG,EAAE;AAAA,IAC5B;AAEA,oBA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3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Toggle/DSToggleRender.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { onClickHandlerForNonInteractiveElements } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSTooltip } from '@elliemae/ds-tooltip';\n\nconst DSToggleRender = ({\n containerProps,\n id,\n className = '',\n style = {},\n hasError = false,\n hide,\n readOnly = false,\n disabled = false,\n checked = false,\n onBlur = () => null,\n onFocus = () => null,\n onChange = () => null,\n onMouseDown = () => null,\n onMouseEnter = () => null,\n onMouseLeave = () => null,\n onTouchCancel = () => null,\n onTouchEnd = () => null,\n onTouchMove = () => null,\n onTouchStart = () => null,\n labelOn = 'ON',\n labelOff = 'OFF',\n dragStyle = {},\n containerRef = null,\n handRef = null,\n name = '',\n value = '',\n size = 's',\n defaultState,\n}) => {\n const {\n cssClassName,\n classNameBlock,\n classNameElement,\n } = convertPropToCssClassName('form-element-toggle', className, {\n hasError,\n readOnly,\n disabled,\n checked,\n id,\n size,\n });\n const allowChange = disabled || readOnly;\n\n let label = checked ? (\n <div className={classNameElement('icon-on')}>{labelOn}</div>\n ) : (\n <div className={classNameElement('icon-off')}>{labelOff}</div>\n );\n\n if (readOnly) {\n label = (\n <DSTooltip\n interactionType=\"hover\"\n title=\"Read Only\"\n triggerComponent={label}\n />\n );\n }\n\n return (\n <div\n data-testid=\"em-ds-toggle\"\n {...containerProps}\n aria-disabled={disabled}\n defaultChecked={checked}\n defaultValue={value}\n {...onClickHandlerForNonInteractiveElements(\n allowChange ? null : onChange,\n )}\n ref={containerRef}\n className={`${cssClassName} ${\n defaultState ? 'default-state-checked' : ''\n }${hide ? ' ds-form-element-toggle-hide' : ''}`}\n onBlur={onBlur}\n onFocus={onFocus}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n aria-checked={checked}\n role=\"checkbox\"\n tabIndex={0}\n >\n <div className={classNameBlock('box')}>{label}</div>\n <div\n ref={handRef}\n aria-checked={checked}\n aria-disabled={disabled}\n className={`${classNameElement('input')} ${\n defaultState ? 'default-state-checked' : ''\n }`}\n onMouseDown={allowChange ? null : onMouseDown}\n onMouseEnter={allowChange ? null : onMouseEnter}\n onMouseLeave={allowChange ? null : onMouseLeave}\n onTouchCancel={allowChange ? null : onTouchCancel}\n onTouchEnd={allowChange ? null : onTouchEnd}\n onTouchMove={allowChange ? null : onTouchMove}\n onTouchStart={allowChange ? null : onTouchStart}\n style={{\n ...style,\n ...dragStyle,\n }}\n />\n <input\n className={classNameElement('hidden-checkbox')}\n defaultChecked={checked}\n defaultValue={value}\n name={name}\n type=\"checkbox\"\n />\n </div>\n );\n};\n\nexport { DSToggleRender };\nexport default DSToggleRender;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACoDnB,cAgBA,YAhBA;AAjDJ,SAAS,+CAA+C;AACxD,SAAS,iCAAiC;AAC1C,SAAS,iBAAiB;AAE1B,MAAM,iBAAiB,CAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;AAAA,EACjB,cAAc,MAAM;AAAA,EACpB,eAAe,MAAM;AAAA,EACrB,eAAe,MAAM;AAAA,EACrB,gBAAgB,MAAM;AAAA,EACtB,aAAa,MAAM;AAAA,EACnB,cAAc,MAAM;AAAA,EACpB,eAAe,MAAM;AAAA,EACrB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY,CAAC;AAAA,EACb,eAAe;AAAA,EACf,UAAU;AAAA,EACV,OAAO;AAAA,EACP,Q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A,QAClC,cAAc,cAAc,OAAO;AAAA,QACnC,OAAO;AAAA,UACL,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,OACF;AAAA,MACA,oBAAC;AAAA,QACC,WAAW,iBAAiB,iBAAiB;AAAA,QAC7C,gBAAgB;AAAA,QAChB,cAAc;AAAA,QACd;AAAA,QACA,MAAK;AAAA,OACP;AAAA;AAAA,GACF;AAEJ;AAGA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form",
|
|
3
|
-
"version": "3.11.0-next.
|
|
3
|
+
"version": "3.11.0-next.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Form",
|
|
6
6
|
"files": [
|
|
@@ -475,17 +475,17 @@
|
|
|
475
475
|
"indent": 4
|
|
476
476
|
},
|
|
477
477
|
"dependencies": {
|
|
478
|
-
"@elliemae/ds-button": "3.11.0-next.
|
|
479
|
-
"@elliemae/ds-classnames": "3.11.0-next.
|
|
480
|
-
"@elliemae/ds-common": "3.11.0-next.
|
|
481
|
-
"@elliemae/ds-grid": "3.11.0-next.
|
|
482
|
-
"@elliemae/ds-icons": "3.11.0-next.
|
|
483
|
-
"@elliemae/ds-shared": "3.11.0-next.
|
|
484
|
-
"@elliemae/ds-system": "3.11.0-next.
|
|
485
|
-
"@elliemae/ds-text-wrapper": "3.11.0-next.
|
|
486
|
-
"@elliemae/ds-tooltip": "3.11.0-next.
|
|
487
|
-
"@elliemae/ds-truncated-tooltip-text": "3.11.0-next.
|
|
488
|
-
"@elliemae/ds-utilities": "3.11.0-next.
|
|
478
|
+
"@elliemae/ds-button": "3.11.0-next.7",
|
|
479
|
+
"@elliemae/ds-classnames": "3.11.0-next.7",
|
|
480
|
+
"@elliemae/ds-common": "3.11.0-next.7",
|
|
481
|
+
"@elliemae/ds-grid": "3.11.0-next.7",
|
|
482
|
+
"@elliemae/ds-icons": "3.11.0-next.7",
|
|
483
|
+
"@elliemae/ds-shared": "3.11.0-next.7",
|
|
484
|
+
"@elliemae/ds-system": "3.11.0-next.7",
|
|
485
|
+
"@elliemae/ds-text-wrapper": "3.11.0-next.7",
|
|
486
|
+
"@elliemae/ds-tooltip": "3.11.0-next.7",
|
|
487
|
+
"@elliemae/ds-truncated-tooltip-text": "3.11.0-next.7",
|
|
488
|
+
"@elliemae/ds-utilities": "3.11.0-next.7",
|
|
489
489
|
"memoize-one": "~6.0.0",
|
|
490
490
|
"moment": "~2.29.3",
|
|
491
491
|
"prop-types": "~15.8.1",
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
"text-mask-core": "5.1.2"
|
|
495
495
|
},
|
|
496
496
|
"devDependencies": {
|
|
497
|
-
"@testing-library/dom": "~8.
|
|
497
|
+
"@testing-library/dom": "~8.19.0",
|
|
498
498
|
"@testing-library/jest-dom": "~5.16.4",
|
|
499
499
|
"@testing-library/react": "~12.1.3",
|
|
500
500
|
"@testing-library/user-event": "~13.5.0",
|
|
@@ -516,8 +516,11 @@
|
|
|
516
516
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
517
517
|
"test": "node ../../scripts/testing/test.mjs",
|
|
518
518
|
"lint": "node ../../scripts/lint.mjs",
|
|
519
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
519
520
|
"dts": "node ../../scripts/dts.mjs",
|
|
520
521
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
522
|
+
"dev:build": "pnpm --filter {.}... build && pnpm --filter {.}... dts",
|
|
523
|
+
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
521
524
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
522
525
|
}
|
|
523
526
|
}
|