@elliemae/ds-form-layout-label 3.22.0-next.26 → 3.22.0-next.28
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/DSFormLayoutLabel.js.map +1 -1
- package/dist/cjs/config/useFormLayoutLabel.js.map +1 -1
- package/dist/cjs/config/useValidateProps.js.map +1 -1
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/styled.js.map +1 -1
- package/dist/esm/DSFormLayoutLabel.js.map +1 -1
- package/dist/esm/config/useFormLayoutLabel.js.map +1 -1
- package/dist/esm/config/useValidateProps.js.map +1 -1
- package/dist/esm/constants/index.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js.map +1 -1
- package/dist/esm/styled.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSFormLayoutLabel.tsx", "
|
|
3
|
+
"sources": ["../../src/DSFormLayoutLabel.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { type DSFormLayoutLabelT, DSFormLayoutLabelPropTypes } from './react-desc-prop-types.js';\nimport { useFormLayoutLabel } from './config/useFormLayoutLabel.js';\nimport { DSFormLayoutLabelName } from './constants/index.js';\nimport { StyledLabel, StyledMark } from './styled.js';\nconst DSFormLayoutLabel: React.ComponentType<DSFormLayoutLabelT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useFormLayoutLabel(props);\n const { children, required, hideLabel, optional } = propsWithDefault;\n return (\n <StyledLabel {...globalProps} {...xstyledProps} hideLabel={hideLabel}>\n {children}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n );\n};\n\nDSFormLayoutLabel.propTypes = DSFormLayoutLabelPropTypes;\nDSFormLayoutLabel.displayName = DSFormLayoutLabelName;\nconst DSFormLayoutLabelWithSchema = describe(DSFormLayoutLabel);\nDSFormLayoutLabelWithSchema.propTypes = DSFormLayoutLabelPropTypes;\n\nexport { DSFormLayoutLabel, DSFormLayoutLabelWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUnB;AATJ,8BAAyB;AACzB,mCAAoE;AACpE,gCAAmC;AACnC,uBAAsC;AACtC,oBAAwC;AACxC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,aAAa,QAAI,8CAAmB,KAAK;AAChF,QAAM,EAAE,UAAU,UAAU,WAAW,SAAS,IAAI;AACpD,SACE,6CAAC,6BAAa,GAAG,aAAc,GAAG,cAAc,WAC7C;AAAA;AAAA,KACC,YAAY,aAAa,4CAAC,4BAAW,UAAoB;AAAA,KAC7D;AAEJ;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AAChC,MAAM,kCAA8B,kCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/config/useFormLayoutLabel.ts", "
|
|
3
|
+
"sources": ["../../../src/config/useFormLayoutLabel.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { type DSFormLayoutLabelT, DSFormLayoutLabelPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface FormLayoutLabelCTX {\n propsWithDefault: DSFormLayoutLabelT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n}\n\nexport const useFormLayoutLabel = (propsFromUser: DSFormLayoutLabelT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFormLayoutLabelT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSFormLayoutLabelPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSFormLayoutLabelT.InternalProps>(propsWithDefault), [\n 'cols',\n 'rows',\n 'wrap',\n ]);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n }),\n [propsWithDefault, globalProps, xstyledProps],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,oBAAqB;AACrB,8BAAyF;AACzF,mCAAkF;AAClF,8BAAiC;AAQ1B,MAAM,qBAAqB,CAAC,kBAA4C;AAI7E,QAAM,uBAAmB,sDAA+D,eAAe,yCAAY;AACnH,gDAAiB,kBAAkB,uDAA0B;AAI7D,QAAM,kBAAc,wBAAK,gDAAyD,gBAAgB,GAAG;AAAA,IACnG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,mBAAe,4CAAmB,gBAAgB;AAExD,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,aAAa,YAAY;AAAA,EAC9C;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/config/useValidateProps.ts", "
|
|
3
|
+
"sources": ["../../../src/config/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { type WeakValidationMap } from 'react';\nimport { type DSFormLayoutLabelT } from '../react-desc-prop-types.js';\nimport { DSFormLayoutLabelName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSFormLayoutLabelT.InternalProps,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFormLayoutLabelName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAsC;AAE/B,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,sCAAqB;AACxE;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/constants/index.ts", "
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFormLayoutLabelName = 'DSFormLayoutLabel';\n\nexport const DSFormLayoutLabelSlots = {\n LABEL: 'label',\n MARK: 'mark',\n};\n\nexport const DSFormLayoutBlockItemDataTestId = slotObjectToDataTestIds(DSFormLayoutLabelName, DSFormLayoutLabelSlots);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,wBAAwB;AAE9B,MAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,sCAAkC,0CAAwB,uBAAuB,sBAAsB;",
|
|
6
6
|
"names": []
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts", "
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSFormLayoutLabel, DSFormLayoutLabelWithSchema } from './DSFormLayoutLabel.js';\nexport { type DSFormLayoutLabelT } from './react-desc-prop-types.js';\nexport { DSFormLayoutBlockItemDataTestId, DSFormLayoutLabelName, DSFormLayoutLabelSlots } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,+BAA+D;AAC/D,mCAAwC;AACxC,uBAA+F;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/react-desc-prop-types.ts", "
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type React from 'react';\nimport type { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n type GlobalAttributesT,\n type XstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSFormLayoutLabelT {\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {\n required?: boolean;\n optional?: boolean;\n hideLabel?: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export type ExampleState = '0' | '1';\n}\n\nexport const defaultProps: DSFormLayoutLabelT.DefaultProps = {};\n\nexport const DSFormLayoutLabelPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.isRequired.description('label string'),\n required: PropTypes.bool.description('Adds required extra styling.'),\n optional: PropTypes.bool.description('Adds optional extra styling.'),\n hideLabel: PropTypes.bool.description('Hides the label.'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAMO;AAsCA,MAAM,eAAgD,CAAC;AAEvD,MAAM,6BAA6B;AAAA,EACxC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,kCAAU,KAAK,WAAW,YAAY,cAAc;AAAA,EAC9D,UAAU,kCAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,UAAU,kCAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,WAAW,kCAAU,KAAK,YAAY,kBAAkB;AAC1D;",
|
|
6
6
|
"names": []
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/styled.tsx", "
|
|
3
|
+
"sources": ["../../src/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSFormLayoutLabelName, DSFormLayoutLabelSlots } from './constants/index.js';\n\ninterface DSFormLayoutBlockItemStyledLabelT {\n hideLabel?: boolean;\n}\n\ninterface DSFormLayoutBlockItemStyledMarkT {\n required?: boolean;\n}\n\nexport const StyledLabel = styled('label', {\n name: DSFormLayoutLabelName,\n slot: DSFormLayoutLabelSlots.LABEL,\n})<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ hideLabel }) =>\n hideLabel\n ? `position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n `\n : undefined}\n ${xStyledCommonProps}\n`;\n\nexport const StyledMark = styled('span', {\n name: DSFormLayoutLabelName,\n slot: DSFormLayoutLabelSlots.MARK,\n})<DSFormLayoutBlockItemStyledMarkT>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-left: ${({ theme }) => theme.space.xxxs};\n ${({ theme, required }) =>\n required\n ? `\n background-color: ${theme.colors.danger[900]};\n `\n : `\n border: 1px solid ${theme.colors.brand[600]};\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2C;AAC3C,uBAA8D;AAUvD,MAAM,kBAAc,yBAAO,SAAS;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,wCAAuB;AAC/B,CAAC;AAAA;AAAA,IAEG,CAAC,EAAE,UAAU,MACb,YACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUA;AAAA,IACJ;AAAA;AAGG,MAAM,iBAAa,yBAAO,QAAQ;AAAA,EACvC,MAAM;AAAA,EACN,MAAM,wCAAuB;AAC/B,CAAC;AAAA;AAAA;AAAA;AAAA,iBAIgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,IACxC,CAAC,EAAE,OAAO,SAAS,MACnB,WACI;AAAA,sBACc,MAAM,OAAO,OAAO,GAAG;AAAA,MAErC;AAAA,sBACc,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSFormLayoutLabel.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { type DSFormLayoutLabelT, DSFormLayoutLabelPropTypes } from './react-desc-prop-types.js';\nimport { useFormLayoutLabel } from './config/useFormLayoutLabel.js';\nimport { DSFormLayoutLabelName } from './constants/index.js';\nimport { StyledLabel, StyledMark } from './styled.js';\nconst DSFormLayoutLabel: React.ComponentType<DSFormLayoutLabelT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useFormLayoutLabel(props);\n const { children, required, hideLabel, optional } = propsWithDefault;\n return (\n <StyledLabel {...globalProps} {...xstyledProps} hideLabel={hideLabel}>\n {children}\n {(required || optional) && <StyledMark required={required} />}\n </StyledLabel>\n );\n};\n\nDSFormLayoutLabel.propTypes = DSFormLayoutLabelPropTypes;\nDSFormLayoutLabel.displayName = DSFormLayoutLabelName;\nconst DSFormLayoutLabelWithSchema = describe(DSFormLayoutLabel);\nDSFormLayoutLabelWithSchema.propTypes = DSFormLayoutLabelPropTypes;\n\nexport { DSFormLayoutLabel, DSFormLayoutLabelWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACUnB,SAE6B,KAF7B;AATJ,SAAS,gBAAgB;AACzB,SAAkC,kCAAkC;AACpE,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AACtC,SAAS,aAAa,kBAAkB;AACxC,MAAM,oBAAmE,CAAC,UAAU;AAClF,QAAM,EAAE,kBAAkB,aAAa,aAAa,IAAI,mBAAmB,KAAK;AAChF,QAAM,EAAE,UAAU,UAAU,WAAW,SAAS,IAAI;AACpD,SACE,qBAAC,eAAa,GAAG,aAAc,GAAG,cAAc,WAC7C;AAAA;AAAA,KACC,YAAY,aAAa,oBAAC,cAAW,UAAoB;AAAA,KAC7D;AAEJ;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AAChC,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useFormLayoutLabel.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { type DSFormLayoutLabelT, DSFormLayoutLabelPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface FormLayoutLabelCTX {\n propsWithDefault: DSFormLayoutLabelT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n}\n\nexport const useFormLayoutLabel = (propsFromUser: DSFormLayoutLabelT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFormLayoutLabelT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSFormLayoutLabelPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSFormLayoutLabelT.InternalProps>(propsWithDefault), [\n 'cols',\n 'rows',\n 'wrap',\n ]);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n }),\n [propsWithDefault, globalProps, xstyledProps],\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAkC,4BAA4B,oBAAoB;AAClF,SAAS,wBAAwB;AAQ1B,MAAM,qBAAqB,CAAC,kBAA4C;AAI7E,QAAM,mBAAmB,6BAA+D,eAAe,YAAY;AACnH,mBAAiB,kBAAkB,0BAA0B;AAI7D,QAAM,cAAc,KAAK,uBAAyD,gBAAgB,GAAG;AAAA,IACnG;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,eAAe,mBAAmB,gBAAgB;AAExD,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,aAAa,YAAY;AAAA,EAC9C;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { type WeakValidationMap } from 'react';\nimport { type DSFormLayoutLabelT } from '../react-desc-prop-types.js';\nimport { DSFormLayoutLabelName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSFormLayoutLabelT.InternalProps,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFormLayoutLabelName);\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,6BAA6B;AAE/B,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,iCAA+B,OAAO,WAAW,qBAAqB;AACxE;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFormLayoutLabelName = 'DSFormLayoutLabel';\n\nexport const DSFormLayoutLabelSlots = {\n LABEL: 'label',\n MARK: 'mark',\n};\n\nexport const DSFormLayoutBlockItemDataTestId = slotObjectToDataTestIds(DSFormLayoutLabelName, DSFormLayoutLabelSlots);\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,wBAAwB;AAE9B,MAAM,yBAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR;AAEO,MAAM,kCAAkC,wBAAwB,uBAAuB,sBAAsB;",
|
|
6
6
|
"names": []
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSFormLayoutLabel, DSFormLayoutLabelWithSchema } from './DSFormLayoutLabel.js';\nexport { type DSFormLayoutLabelT } from './react-desc-prop-types.js';\nexport { DSFormLayoutBlockItemDataTestId, DSFormLayoutLabelName, DSFormLayoutLabelSlots } from './constants/index.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,mBAAmB,mCAAmC;AAC/D,eAAwC;AACxC,SAAS,iCAAiC,uBAAuB,8BAA8B;",
|
|
6
6
|
"names": []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type React from 'react';\nimport type { WeakValidationMap } from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n type GlobalAttributesT,\n type XstyledProps,\n} from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSFormLayoutLabelT {\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {\n required?: boolean;\n optional?: boolean;\n hideLabel?: boolean;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export type ExampleState = '0' | '1';\n}\n\nexport const defaultProps: DSFormLayoutLabelT.DefaultProps = {};\n\nexport const DSFormLayoutLabelPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.node.isRequired.description('label string'),\n required: PropTypes.bool.description('Adds required extra styling.'),\n optional: PropTypes.bool.description('Adds optional extra styling.'),\n hideLabel: PropTypes.bool.description('Hides the label.'),\n} as WeakValidationMap<unknown>;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAsCA,MAAM,eAAgD,CAAC;AAEvD,MAAM,6BAA6B;AAAA,EACxC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU,KAAK,WAAW,YAAY,cAAc;AAAA,EAC9D,UAAU,UAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,UAAU,UAAU,KAAK,YAAY,8BAA8B;AAAA,EACnE,WAAW,UAAU,KAAK,YAAY,kBAAkB;AAC1D;",
|
|
6
6
|
"names": []
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSFormLayoutLabelName, DSFormLayoutLabelSlots } from './constants/index.js';\n\ninterface DSFormLayoutBlockItemStyledLabelT {\n hideLabel?: boolean;\n}\n\ninterface DSFormLayoutBlockItemStyledMarkT {\n required?: boolean;\n}\n\nexport const StyledLabel = styled('label', {\n name: DSFormLayoutLabelName,\n slot: DSFormLayoutLabelSlots.LABEL,\n})<DSFormLayoutBlockItemStyledLabelT>`\n display: flex;\n ${({ hideLabel }) =>\n hideLabel\n ? `position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n `\n : undefined}\n ${xStyledCommonProps}\n`;\n\nexport const StyledMark = styled('span', {\n name: DSFormLayoutLabelName,\n slot: DSFormLayoutLabelSlots.MARK,\n})<DSFormLayoutBlockItemStyledMarkT>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-left: ${({ theme }) => theme.space.xxxs};\n ${({ theme, required }) =>\n required\n ? `\n background-color: ${theme.colors.danger[900]};\n `\n : `\n border: 1px solid ${theme.colors.brand[600]};\n `}\n`;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;AAC3C,SAAS,uBAAuB,8BAA8B;AAUvD,MAAM,cAAc,OAAO,SAAS;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA;AAAA,IAEG,CAAC,EAAE,UAAU,MACb,YACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUA;AAAA,IACJ;AAAA;AAGG,MAAM,aAAa,OAAO,QAAQ;AAAA,EACvC,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA;AAAA;AAAA;AAAA,iBAIgB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,IACxC,CAAC,EAAE,OAAO,SAAS,MACnB,WACI;AAAA,sBACc,MAAM,OAAO,OAAO,GAAG;AAAA,MAErC;AAAA,sBACc,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-layout-label",
|
|
3
|
-
"version": "3.22.0-next.
|
|
3
|
+
"version": "3.22.0-next.28",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Form Layout Label",
|
|
6
6
|
"files": [
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@xstyled/system": "~3.7.3",
|
|
39
|
-
"@elliemae/ds-props-helpers": "3.22.0-next.
|
|
40
|
-
"@elliemae/ds-system": "3.22.0-next.
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.22.0-next.28",
|
|
40
|
+
"@elliemae/ds-system": "3.22.0-next.28"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@elliemae/pui-cli": "~9.0.0-next.22",
|
|
44
44
|
"lodash": "^4.17.21",
|
|
45
45
|
"styled-components": "~5.3.9",
|
|
46
|
-
"@elliemae/ds-monorepo-devops": "3.22.0-next.
|
|
46
|
+
"@elliemae/ds-monorepo-devops": "3.22.0-next.28"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@testing-library/jest-dom": "~5.16.4",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"typeSafety": true
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
|
-
"dev": "cross-env NODE_ENV=development node
|
|
62
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
63
63
|
"test": "pui-cli test --passWithNoTests",
|
|
64
|
-
"lint": "node
|
|
65
|
-
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='
|
|
66
|
-
"dts": "node
|
|
64
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
65
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
|
|
66
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
67
67
|
"dts:withdeps": "pnpm --filter {.}... dts",
|
|
68
|
-
"build": "cross-env NODE_ENV=production node
|
|
68
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
69
69
|
"dev:build": "pnpm --filter {.}... build",
|
|
70
70
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
71
|
-
"checkDeps": "npx -yes
|
|
71
|
+
"checkDeps": "npx -yes ../../util/ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
72
72
|
}
|
|
73
73
|
}
|