@elliemae/ds-ribbon 3.80.0-next.4 → 3.80.0-next.41
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/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCard/DSRibbonCard.js +15 -4
- package/dist/cjs/parts/DSRibbonCard/DSRibbonCard.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCard/DSRibbonCardWithAdditionalLabel.js +25 -5
- package/dist/cjs/parts/DSRibbonCard/DSRibbonCardWithAdditionalLabel.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCard/DSRibbonCardWithAdditionalValue.js +7 -3
- package/dist/cjs/parts/DSRibbonCard/DSRibbonCardWithAdditionalValue.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCard/PureLabelPlace.js +49 -12
- package/dist/cjs/parts/DSRibbonCard/PureLabelPlace.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCard/config/useRibbonCard.js +5 -1
- package/dist/cjs/parts/DSRibbonCard/config/useRibbonCard.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCard/react-desc-prop-types.js +2 -0
- package/dist/cjs/parts/DSRibbonCard/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCard/styled.js +6 -6
- package/dist/cjs/parts/DSRibbonCard/styled.js.map +2 -2
- package/dist/cjs/parts/DSRibbonCol/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSRibbonRow/DSRibbonRow.js +10 -3
- package/dist/cjs/parts/DSRibbonRow/DSRibbonRow.js.map +2 -2
- package/dist/cjs/parts/DSRibbonRow/react-desc-prop-types.js +6 -2
- package/dist/cjs/parts/DSRibbonRow/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSRibbonWrapper/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +66 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-card-valid.js +155 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-card-valid.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-col-valid.js +94 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-col-valid.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-row-valid.js +96 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-row-valid.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-wrapper-valid.js +94 -0
- package/dist/cjs/typescript-testing/typescript-ribbon-wrapper-valid.js.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/parts/DSRibbonCard/DSRibbonCard.js +15 -4
- package/dist/esm/parts/DSRibbonCard/DSRibbonCard.js.map +2 -2
- package/dist/esm/parts/DSRibbonCard/DSRibbonCardWithAdditionalLabel.js +25 -5
- package/dist/esm/parts/DSRibbonCard/DSRibbonCardWithAdditionalLabel.js.map +2 -2
- package/dist/esm/parts/DSRibbonCard/DSRibbonCardWithAdditionalValue.js +7 -3
- package/dist/esm/parts/DSRibbonCard/DSRibbonCardWithAdditionalValue.js.map +2 -2
- package/dist/esm/parts/DSRibbonCard/PureLabelPlace.js +50 -13
- package/dist/esm/parts/DSRibbonCard/PureLabelPlace.js.map +2 -2
- package/dist/esm/parts/DSRibbonCard/config/useRibbonCard.js +5 -1
- package/dist/esm/parts/DSRibbonCard/config/useRibbonCard.js.map +2 -2
- package/dist/esm/parts/DSRibbonCard/react-desc-prop-types.js +2 -0
- package/dist/esm/parts/DSRibbonCard/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSRibbonCard/styled.js +6 -6
- package/dist/esm/parts/DSRibbonCard/styled.js.map +2 -2
- package/dist/esm/parts/DSRibbonCol/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSRibbonRow/DSRibbonRow.js +11 -4
- package/dist/esm/parts/DSRibbonRow/DSRibbonRow.js.map +2 -2
- package/dist/esm/parts/DSRibbonRow/react-desc-prop-types.js +6 -2
- package/dist/esm/parts/DSRibbonRow/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSRibbonWrapper/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +43 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-ribbon-card-valid.js +125 -0
- package/dist/esm/typescript-testing/typescript-ribbon-card-valid.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-ribbon-col-valid.js +64 -0
- package/dist/esm/typescript-testing/typescript-ribbon-col-valid.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-ribbon-row-valid.js +66 -0
- package/dist/esm/typescript-testing/typescript-ribbon-row-valid.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-ribbon-wrapper-valid.js +64 -0
- package/dist/esm/typescript-testing/typescript-ribbon-wrapper-valid.js.map +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/parts/DSRibbonCard/PureLabelPlace.d.ts +2 -0
- package/dist/types/parts/DSRibbonCard/config/useRibbonCard.d.ts +2 -4
- package/dist/types/parts/DSRibbonCard/react-desc-prop-types.d.ts +10 -0
- package/dist/types/parts/DSRibbonCol/react-desc-prop-types.d.ts +3 -0
- package/dist/types/parts/DSRibbonRow/react-desc-prop-types.d.ts +4 -0
- package/dist/types/parts/DSRibbonWrapper/react-desc-prop-types.d.ts +3 -0
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSRibbonWrapper/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSRibbonName, RIBBON_WRAPPER_SLOTS } from './constants/index.js';\n\nexport declare namespace DSRibbonWrapperT {\n export interface RequiredProps {}\n\n export interface DefaultProps {}\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSRibbonName,\n typeof RIBBON_WRAPPER_SLOTS\n > {}\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSRibbonWrapperT.DefaultProps = {};\n\nexport const DSRibbonWrapperPropTypes: DSPropTypesSchema<DSRibbonWrapperT.Props> = {\n ...getPropsPerSlotPropTypes(DSRibbonName, RIBBON_WRAPPER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSRibbonWrapperPropTypesSchema =\n DSRibbonWrapperPropTypes as unknown as ValidationMap<DSRibbonWrapperT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAsF;AAEtF,uBAAmD;
|
|
4
|
+
"sourcesContent": ["import type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSRibbonName, RIBBON_WRAPPER_SLOTS } from './constants/index.js';\n\nexport declare namespace DSRibbonWrapperT {\n export interface RequiredProps {}\n\n export interface DefaultProps {}\n\n export type SlotFunctionArguments = {\n dsRibbonRibbonWrapper: () => object;\n };\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSRibbonName,\n typeof RIBBON_WRAPPER_SLOTS\n > {}\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSRibbonWrapperT.DefaultProps = {};\n\nexport const DSRibbonWrapperPropTypes: DSPropTypesSchema<DSRibbonWrapperT.Props> = {\n ...getPropsPerSlotPropTypes(DSRibbonName, RIBBON_WRAPPER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSRibbonWrapperPropTypesSchema =\n DSRibbonWrapperPropTypes as unknown as ValidationMap<DSRibbonWrapperT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAsF;AAEtF,uBAAmD;AAgC5C,MAAM,eAA8C,CAAC;AAErD,MAAM,2BAAsE;AAAA,EACjF,OAAG,kDAAyB,+BAAc,qCAAoB;AAAA,EAC9D,GAAG;AAAA,EACH,GAAG;AACL;AAEO,MAAM,iCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
const TEST_PROPS = { "aria-label": "just a typescript test" };
|
|
26
|
+
const WrapperSlotPropsAsObj = {
|
|
27
|
+
dsRibbonRibbonWrapper: TEST_PROPS
|
|
28
|
+
};
|
|
29
|
+
const WrapperSlotPropsAsFunctions = {
|
|
30
|
+
dsRibbonRibbonWrapper: () => TEST_PROPS
|
|
31
|
+
};
|
|
32
|
+
const EnsureAllWrapperSlotsExist = WrapperSlotPropsAsFunctions;
|
|
33
|
+
const RowSlotPropsAsObj = {
|
|
34
|
+
dsRibbonRibbonRow: TEST_PROPS
|
|
35
|
+
};
|
|
36
|
+
const RowSlotPropsAsFunctions = {
|
|
37
|
+
dsRibbonRibbonRow: () => TEST_PROPS
|
|
38
|
+
};
|
|
39
|
+
const EnsureAllRowSlotsExist = RowSlotPropsAsFunctions;
|
|
40
|
+
const ColSlotPropsAsObj = {
|
|
41
|
+
dsRibbonRibbonCol: TEST_PROPS
|
|
42
|
+
};
|
|
43
|
+
const ColSlotPropsAsFunctions = {
|
|
44
|
+
dsRibbonRibbonCol: () => TEST_PROPS
|
|
45
|
+
};
|
|
46
|
+
const EnsureAllColSlotsExist = ColSlotPropsAsFunctions;
|
|
47
|
+
const CardSlotPropsAsObj = {
|
|
48
|
+
dsRibbonRibbonCardBlock: TEST_PROPS,
|
|
49
|
+
dsRibbonRibbonCardBlockRow: TEST_PROPS,
|
|
50
|
+
dsRibbonRibbonCardBlockCol: TEST_PROPS,
|
|
51
|
+
dsRibbonRibbonCardBlockIcon: TEST_PROPS,
|
|
52
|
+
dsRibbonRibbonCardBlockLabel: TEST_PROPS,
|
|
53
|
+
dsRibbonRibbonCardBlockValue: TEST_PROPS,
|
|
54
|
+
dsRibbonRibbonCardBlockValueLabel: TEST_PROPS
|
|
55
|
+
};
|
|
56
|
+
const CardSlotPropsAsFunctions = {
|
|
57
|
+
dsRibbonRibbonCardBlock: () => TEST_PROPS,
|
|
58
|
+
dsRibbonRibbonCardBlockRow: () => TEST_PROPS,
|
|
59
|
+
dsRibbonRibbonCardBlockCol: () => TEST_PROPS,
|
|
60
|
+
dsRibbonRibbonCardBlockIcon: () => TEST_PROPS,
|
|
61
|
+
dsRibbonRibbonCardBlockLabel: () => TEST_PROPS,
|
|
62
|
+
dsRibbonRibbonCardBlockValue: () => TEST_PROPS,
|
|
63
|
+
dsRibbonRibbonCardBlockValueLabel: () => TEST_PROPS
|
|
64
|
+
};
|
|
65
|
+
const EnsureAllCardSlotsExist = CardSlotPropsAsFunctions;
|
|
66
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\n// ds-ribbon ships four independently importable parts rather than one component, so each gets its own\n// pair of declarations and its own exhaustiveness check. All four share the `DSRibbon` name; only the\n// slots constant differs.\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSRibbonName } from '../constants/index.js';\nimport type { RIBBON_WRAPPER_SLOTS } from '../parts/DSRibbonWrapper/constants/index.js';\nimport type { RIBBON_ROW_SLOTS } from '../parts/DSRibbonRow/constants/index.js';\nimport type { RIBBON_COL_SLOTS } from '../parts/DSRibbonCol/constants/index.js';\nimport type { RIBBON_CARD_SLOTS } from '../parts/DSRibbonCard/constants/index.js';\nimport type { DSRibbonWrapperT } from '../parts/DSRibbonWrapper/react-desc-prop-types.js';\nimport type { DSRibbonRowT } from '../parts/DSRibbonRow/react-desc-prop-types.js';\nimport type { DSRibbonColT } from '../parts/DSRibbonCol/react-desc-prop-types.js';\nimport type { DSRibbonCardT } from '../parts/DSRibbonCard/react-desc-prop-types.js';\n\nconst TEST_PROPS = { 'aria-label': 'just a typescript test' };\n\n// --- DSRibbonWrapper ---------------------------------------------------------------------------\n\nconst WrapperSlotPropsAsObj: Partial<DSRibbonWrapperT.Props> = {\n dsRibbonRibbonWrapper: TEST_PROPS,\n};\n\nconst WrapperSlotPropsAsFunctions: DSRibbonWrapperT.SlotFunctionArguments = {\n dsRibbonRibbonWrapper: () => TEST_PROPS,\n};\n\nconst EnsureAllWrapperSlotsExist: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSRibbonName, typeof RIBBON_WRAPPER_SLOTS>\n> = WrapperSlotPropsAsFunctions;\n\n// --- DSRibbonRow -------------------------------------------------------------------------------\n\nconst RowSlotPropsAsObj: Partial<DSRibbonRowT.Props> = {\n dsRibbonRibbonRow: TEST_PROPS,\n};\n\nconst RowSlotPropsAsFunctions: DSRibbonRowT.SlotFunctionArguments = {\n dsRibbonRibbonRow: () => TEST_PROPS,\n};\n\nconst EnsureAllRowSlotsExist: Required<TypescriptHelpersT.PropsForSlots<typeof DSRibbonName, typeof RIBBON_ROW_SLOTS>> =\n RowSlotPropsAsFunctions;\n\n// --- DSRibbonCol -------------------------------------------------------------------------------\n\nconst ColSlotPropsAsObj: Partial<DSRibbonColT.Props> = {\n dsRibbonRibbonCol: TEST_PROPS,\n};\n\nconst ColSlotPropsAsFunctions: DSRibbonColT.SlotFunctionArguments = {\n dsRibbonRibbonCol: () => TEST_PROPS,\n};\n\nconst EnsureAllColSlotsExist: Required<TypescriptHelpersT.PropsForSlots<typeof DSRibbonName, typeof RIBBON_COL_SLOTS>> =\n ColSlotPropsAsFunctions;\n\n// --- DSRibbonCard ------------------------------------------------------------------------------\n\nconst CardSlotPropsAsObj: Partial<DSRibbonCardT.Props> = {\n dsRibbonRibbonCardBlock: TEST_PROPS,\n dsRibbonRibbonCardBlockRow: TEST_PROPS,\n dsRibbonRibbonCardBlockCol: TEST_PROPS,\n dsRibbonRibbonCardBlockIcon: TEST_PROPS,\n dsRibbonRibbonCardBlockLabel: TEST_PROPS,\n dsRibbonRibbonCardBlockValue: TEST_PROPS,\n dsRibbonRibbonCardBlockValueLabel: TEST_PROPS,\n};\n\nconst CardSlotPropsAsFunctions: DSRibbonCardT.SlotFunctionArguments = {\n dsRibbonRibbonCardBlock: () => TEST_PROPS,\n dsRibbonRibbonCardBlockRow: () => TEST_PROPS,\n dsRibbonRibbonCardBlockCol: () => TEST_PROPS,\n dsRibbonRibbonCardBlockIcon: () => TEST_PROPS,\n dsRibbonRibbonCardBlockLabel: () => TEST_PROPS,\n dsRibbonRibbonCardBlockValue: () => TEST_PROPS,\n dsRibbonRibbonCardBlockValueLabel: () => TEST_PROPS,\n};\n\nconst EnsureAllCardSlotsExist: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSRibbonName, typeof RIBBON_CARD_SLOTS>\n> = CardSlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACiBvB,MAAM,aAAa,EAAE,cAAc,yBAAyB;AAI5D,MAAM,wBAAyD;AAAA,EAC7D,uBAAuB;AACzB;AAEA,MAAM,8BAAsE;AAAA,EAC1E,uBAAuB,MAAM;AAC/B;AAEA,MAAM,6BAEF;AAIJ,MAAM,oBAAiD;AAAA,EACrD,mBAAmB;AACrB;AAEA,MAAM,0BAA8D;AAAA,EAClE,mBAAmB,MAAM;AAC3B;AAEA,MAAM,yBACJ;AAIF,MAAM,oBAAiD;AAAA,EACrD,mBAAmB;AACrB;AAEA,MAAM,0BAA8D;AAAA,EAClE,mBAAmB,MAAM;AAC3B;AAEA,MAAM,yBACJ;AAIF,MAAM,qBAAmD;AAAA,EACvD,yBAAyB;AAAA,EACzB,4BAA4B;AAAA,EAC5B,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA,EAC7B,8BAA8B;AAAA,EAC9B,8BAA8B;AAAA,EAC9B,mCAAmC;AACrC;AAEA,MAAM,2BAAgE;AAAA,EACpE,yBAAyB,MAAM;AAAA,EAC/B,4BAA4B,MAAM;AAAA,EAClC,4BAA4B,MAAM;AAAA,EAClC,6BAA6B,MAAM;AAAA,EACnC,8BAA8B,MAAM;AAAA,EACpC,8BAA8B,MAAM;AAAA,EACpC,mCAAmC,MAAM;AAC3C;AAEA,MAAM,0BAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var typescript_ribbon_card_valid_exports = {};
|
|
30
|
+
__export(typescript_ribbon_card_valid_exports, {
|
|
31
|
+
default: () => typescript_ribbon_card_valid_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(typescript_ribbon_card_valid_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
|
+
var import_DSRibbonCard = require("../parts/DSRibbonCard/index.js");
|
|
38
|
+
const testRequiredProps = {};
|
|
39
|
+
const testOptionalProps = {};
|
|
40
|
+
const testPartialDefaults = {
|
|
41
|
+
label: "Start",
|
|
42
|
+
value: "04/05/2019"
|
|
43
|
+
};
|
|
44
|
+
const testCompleteDefaults = {
|
|
45
|
+
containerProps: {},
|
|
46
|
+
icon: null,
|
|
47
|
+
label: "",
|
|
48
|
+
value: "",
|
|
49
|
+
additionalValue: "",
|
|
50
|
+
additionalLabel: "",
|
|
51
|
+
info: false,
|
|
52
|
+
error: false,
|
|
53
|
+
warning: false,
|
|
54
|
+
success: false,
|
|
55
|
+
statusText: "",
|
|
56
|
+
center: false
|
|
57
|
+
};
|
|
58
|
+
const testProps = {
|
|
59
|
+
...testRequiredProps,
|
|
60
|
+
...testOptionalProps,
|
|
61
|
+
...testPartialDefaults
|
|
62
|
+
};
|
|
63
|
+
const testPropsAsSyntax = {
|
|
64
|
+
...testRequiredProps,
|
|
65
|
+
...testOptionalProps,
|
|
66
|
+
...testPartialDefaults
|
|
67
|
+
};
|
|
68
|
+
const testInternalProps = {
|
|
69
|
+
...testRequiredProps,
|
|
70
|
+
...testOptionalProps,
|
|
71
|
+
...testCompleteDefaults
|
|
72
|
+
};
|
|
73
|
+
const testInternalPropsAsSyntax = {
|
|
74
|
+
...testRequiredProps,
|
|
75
|
+
...testOptionalProps,
|
|
76
|
+
...testCompleteDefaults
|
|
77
|
+
};
|
|
78
|
+
const testExplicitDefinition = {
|
|
79
|
+
label: "Start",
|
|
80
|
+
value: "04/05/2019",
|
|
81
|
+
additionalValue: "12:15:46 pm",
|
|
82
|
+
center: true,
|
|
83
|
+
containerProps: { id: "my-custom-id" },
|
|
84
|
+
dsRibbonRibbonCardBlock: { "data-custom": "from-object" }
|
|
85
|
+
};
|
|
86
|
+
const testInferedTypeCompatibility = {
|
|
87
|
+
additionalLabel: "Processed",
|
|
88
|
+
value: "50",
|
|
89
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.FeesSolid, {}),
|
|
90
|
+
success: true,
|
|
91
|
+
statusText: "Completed",
|
|
92
|
+
dsRibbonRibbonCardBlockValue: () => ({ "data-custom": "from-function" })
|
|
93
|
+
};
|
|
94
|
+
const testDefinitionAsConst = {
|
|
95
|
+
label: "End",
|
|
96
|
+
value: "04/05/2019",
|
|
97
|
+
center: false
|
|
98
|
+
};
|
|
99
|
+
const testBaseLayout = {
|
|
100
|
+
label: "Start",
|
|
101
|
+
value: "04/05/2019"
|
|
102
|
+
};
|
|
103
|
+
const testAdditionalValueLayout = {
|
|
104
|
+
label: "Start",
|
|
105
|
+
value: "04/05/2019",
|
|
106
|
+
additionalValue: "12:15:46 pm"
|
|
107
|
+
};
|
|
108
|
+
const testAdditionalLabelLayout = {
|
|
109
|
+
additionalLabel: "Rejected",
|
|
110
|
+
value: "3",
|
|
111
|
+
error: true,
|
|
112
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.WarningCircleFill, {})
|
|
113
|
+
};
|
|
114
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCard.DSRibbonCard, { ...testExplicitDefinition }),
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCard.DSRibbonCard, { ...testInferedTypeCompatibility }),
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCard.DSRibbonCard, { ...testDefinitionAsConst }),
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCard.DSRibbonCard, { ...testBaseLayout }),
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCard.DSRibbonCard, { ...testAdditionalValueLayout }),
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCard.DSRibbonCard, { ...testAdditionalLabelLayout }),
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
import_DSRibbonCard.DSRibbonCard,
|
|
123
|
+
{
|
|
124
|
+
label: "Start",
|
|
125
|
+
value: "04/05/2019",
|
|
126
|
+
additionalValue: "12:15:46 pm",
|
|
127
|
+
additionalLabel: "Processed",
|
|
128
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.FeesSolid, {}),
|
|
129
|
+
info: true,
|
|
130
|
+
error: false,
|
|
131
|
+
warning: false,
|
|
132
|
+
success: false,
|
|
133
|
+
statusText: "Information",
|
|
134
|
+
center: true,
|
|
135
|
+
containerProps: { id: "inline-id" },
|
|
136
|
+
id: "card-id",
|
|
137
|
+
className: "custom-class"
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
|
+
import_DSRibbonCard.DSRibbonCard,
|
|
142
|
+
{
|
|
143
|
+
value: "50",
|
|
144
|
+
dsRibbonRibbonCardBlock: { "data-custom": "inline-object" },
|
|
145
|
+
dsRibbonRibbonCardBlockRow: () => ({ "data-custom": "inline-function" }),
|
|
146
|
+
dsRibbonRibbonCardBlockCol: { "data-custom": "inline-object" },
|
|
147
|
+
dsRibbonRibbonCardBlockIcon: () => ({ "data-custom": "inline-function" }),
|
|
148
|
+
dsRibbonRibbonCardBlockLabel: { "data-custom": "inline-object" },
|
|
149
|
+
dsRibbonRibbonCardBlockValue: () => ({ "data-custom": "inline-function" }),
|
|
150
|
+
dsRibbonRibbonCardBlockValueLabel: { "data-custom": "inline-object" }
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
] });
|
|
154
|
+
var typescript_ribbon_card_valid_default = ExampleUsageComponent;
|
|
155
|
+
//# sourceMappingURL=typescript-ribbon-card-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/typescript-testing/typescript-ribbon-card-valid.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n/* eslint-disable local-rules/custom-rule */\nimport { FeesSolid, WarningCircleFill } from '@elliemae/ds-icons';\nimport { DSRibbonCard } from '../parts/DSRibbonCard/index.js';\nimport type { DSRibbonCardT } from '../parts/DSRibbonCard/react-desc-prop-types.js';\n\ntype ComponentPropsForApp = DSRibbonCardT.Props;\ntype ComponentPropsInternals = DSRibbonCardT.InternalProps;\ntype ComponentPropsDefaultProps = DSRibbonCardT.DefaultProps;\ntype ComponentPropsOptionalProps = DSRibbonCardT.OptionalProps;\ntype ComponentPropsRequiredProps = DSRibbonCardT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n label: 'Start',\n value: '04/05/2019',\n};\n\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n containerProps: {},\n icon: null,\n label: '',\n value: '',\n additionalValue: '',\n additionalLabel: '',\n info: false,\n error: false,\n warning: false,\n success: false,\n statusText: '',\n center: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\nconst testExplicitDefinition: ComponentPropsForApp = {\n label: 'Start',\n value: '04/05/2019',\n additionalValue: '12:15:46 pm',\n center: true,\n containerProps: { id: 'my-custom-id' },\n dsRibbonRibbonCardBlock: { 'data-custom': 'from-object' },\n};\n\nconst testInferedTypeCompatibility = {\n additionalLabel: 'Processed',\n value: '50',\n icon: <FeesSolid />,\n success: true,\n statusText: 'Completed',\n dsRibbonRibbonCardBlockValue: () => ({ 'data-custom': 'from-function' }),\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n label: 'End',\n value: '04/05/2019',\n center: false,\n} as const;\n\n// The three layouts are selected by prop combination rather than by a variant prop, so each is\n// typed separately: the base card, the additionalValue form and the additionalLabel form.\nconst testBaseLayout: ComponentPropsForApp = {\n label: 'Start',\n value: '04/05/2019',\n};\n\nconst testAdditionalValueLayout: ComponentPropsForApp = {\n label: 'Start',\n value: '04/05/2019',\n additionalValue: '12:15:46 pm',\n};\n\nconst testAdditionalLabelLayout: ComponentPropsForApp = {\n additionalLabel: 'Rejected',\n value: '3',\n error: true,\n icon: <WarningCircleFill />,\n};\n\nconst ExampleUsageComponent = () => (\n <>\n <DSRibbonCard {...testExplicitDefinition} />\n <DSRibbonCard {...testInferedTypeCompatibility} />\n <DSRibbonCard {...testDefinitionAsConst} />\n\n <DSRibbonCard {...testBaseLayout} />\n <DSRibbonCard {...testAdditionalValueLayout} />\n <DSRibbonCard {...testAdditionalLabelLayout} />\n\n <DSRibbonCard\n label=\"Start\"\n value=\"04/05/2019\"\n additionalValue=\"12:15:46 pm\"\n additionalLabel=\"Processed\"\n icon={<FeesSolid />}\n info\n error={false}\n warning={false}\n success={false}\n statusText=\"Information\"\n center\n containerProps={{ id: 'inline-id' }}\n id=\"card-id\"\n className=\"custom-class\"\n />\n\n {/* Every slot prop accepts both the object and the function form. */}\n <DSRibbonCard\n value=\"50\"\n dsRibbonRibbonCardBlock={{ 'data-custom': 'inline-object' }}\n dsRibbonRibbonCardBlockRow={() => ({ 'data-custom': 'inline-function' })}\n dsRibbonRibbonCardBlockCol={{ 'data-custom': 'inline-object' }}\n dsRibbonRibbonCardBlockIcon={() => ({ 'data-custom': 'inline-function' })}\n dsRibbonRibbonCardBlockLabel={{ 'data-custom': 'inline-object' }}\n dsRibbonRibbonCardBlockValue={() => ({ 'data-custom': 'inline-function' })}\n dsRibbonRibbonCardBlockValueLabel={{ 'data-custom': 'inline-object' }}\n />\n </>\n);\n\nexport default ExampleUsageComponent;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwEf;AAtER,sBAA6C;AAC7C,0BAA6B;AAS7B,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD,CAAC;AAExD,MAAM,sBAA2D;AAAA,EAC/D,OAAO;AAAA,EACP,OAAO;AACT;AAEA,MAAM,uBAA6D;AAAA,EACjE,gBAAgB,CAAC;AAAA,EACjB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AACV;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,yBAA+C;AAAA,EACnD,OAAO;AAAA,EACP,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,gBAAgB,EAAE,IAAI,eAAe;AAAA,EACrC,yBAAyB,EAAE,eAAe,cAAc;AAC1D;AAEA,MAAM,+BAA+B;AAAA,EACnC,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,MAAM,4CAAC,6BAAU;AAAA,EACjB,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,8BAA8B,OAAO,EAAE,eAAe,gBAAgB;AACxE;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AACV;AAIA,MAAM,iBAAuC;AAAA,EAC3C,OAAO;AAAA,EACP,OAAO;AACT;AAEA,MAAM,4BAAkD;AAAA,EACtD,OAAO;AAAA,EACP,OAAO;AAAA,EACP,iBAAiB;AACnB;AAEA,MAAM,4BAAkD;AAAA,EACtD,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM,4CAAC,qCAAkB;AAC3B;AAEA,MAAM,wBAAwB,MAC5B,4EACE;AAAA,8CAAC,oCAAc,GAAG,wBAAwB;AAAA,EAC1C,4CAAC,oCAAc,GAAG,8BAA8B;AAAA,EAChD,4CAAC,oCAAc,GAAG,uBAAuB;AAAA,EAEzC,4CAAC,oCAAc,GAAG,gBAAgB;AAAA,EAClC,4CAAC,oCAAc,GAAG,2BAA2B;AAAA,EAC7C,4CAAC,oCAAc,GAAG,2BAA2B;AAAA,EAE7C;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAM;AAAA,MACN,iBAAgB;AAAA,MAChB,iBAAgB;AAAA,MAChB,MAAM,4CAAC,6BAAU;AAAA,MACjB,MAAI;AAAA,MACJ,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAW;AAAA,MACX,QAAM;AAAA,MACN,gBAAgB,EAAE,IAAI,YAAY;AAAA,MAClC,IAAG;AAAA,MACH,WAAU;AAAA;AAAA,EACZ;AAAA,EAGA;AAAA,IAAC;AAAA;AAAA,MACC,OAAM;AAAA,MACN,yBAAyB,EAAE,eAAe,gBAAgB;AAAA,MAC1D,4BAA4B,OAAO,EAAE,eAAe,kBAAkB;AAAA,MACtE,4BAA4B,EAAE,eAAe,gBAAgB;AAAA,MAC7D,6BAA6B,OAAO,EAAE,eAAe,kBAAkB;AAAA,MACvE,8BAA8B,EAAE,eAAe,gBAAgB;AAAA,MAC/D,8BAA8B,OAAO,EAAE,eAAe,kBAAkB;AAAA,MACxE,mCAAmC,EAAE,eAAe,gBAAgB;AAAA;AAAA,EACtE;AAAA,GACF;AAGF,IAAO,uCAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var typescript_ribbon_col_valid_exports = {};
|
|
30
|
+
__export(typescript_ribbon_col_valid_exports, {
|
|
31
|
+
default: () => typescript_ribbon_col_valid_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(typescript_ribbon_col_valid_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_DSRibbonCol = require("../parts/DSRibbonCol/index.js");
|
|
37
|
+
const testRequiredProps = {};
|
|
38
|
+
const testOptionalProps = {};
|
|
39
|
+
const testPartialDefaults = {};
|
|
40
|
+
const testCompleteDefaults = {};
|
|
41
|
+
const testProps = {
|
|
42
|
+
...testRequiredProps,
|
|
43
|
+
...testOptionalProps,
|
|
44
|
+
...testPartialDefaults
|
|
45
|
+
};
|
|
46
|
+
const testPropsAsSyntax = {
|
|
47
|
+
...testRequiredProps,
|
|
48
|
+
...testOptionalProps,
|
|
49
|
+
...testPartialDefaults
|
|
50
|
+
};
|
|
51
|
+
const testInternalProps = {
|
|
52
|
+
...testRequiredProps,
|
|
53
|
+
...testOptionalProps,
|
|
54
|
+
...testCompleteDefaults
|
|
55
|
+
};
|
|
56
|
+
const testInternalPropsAsSyntax = {
|
|
57
|
+
...testRequiredProps,
|
|
58
|
+
...testOptionalProps,
|
|
59
|
+
...testCompleteDefaults
|
|
60
|
+
};
|
|
61
|
+
const testExplicitDefinition = {
|
|
62
|
+
id: "ribbon-col",
|
|
63
|
+
className: "custom-class",
|
|
64
|
+
"aria-label": "Job registered 3 errors",
|
|
65
|
+
dsRibbonRibbonCol: { "data-custom": "from-object" }
|
|
66
|
+
};
|
|
67
|
+
const testInferedTypeCompatibility = {
|
|
68
|
+
id: "ribbon-col",
|
|
69
|
+
className: "custom-class",
|
|
70
|
+
dsRibbonRibbonCol: () => ({ "data-custom": "from-function" })
|
|
71
|
+
};
|
|
72
|
+
const testDefinitionAsConst = {
|
|
73
|
+
id: "ribbon-col",
|
|
74
|
+
className: "custom-class"
|
|
75
|
+
};
|
|
76
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCol.DSRibbonCol, { ...testExplicitDefinition, children: "content" }),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCol.DSRibbonCol, { ...testInferedTypeCompatibility, children: "content" }),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCol.DSRibbonCol, { ...testDefinitionAsConst, children: "content" }),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
import_DSRibbonCol.DSRibbonCol,
|
|
82
|
+
{
|
|
83
|
+
id: "ribbon-col",
|
|
84
|
+
className: "custom-class",
|
|
85
|
+
role: "region",
|
|
86
|
+
"aria-label": "Job registered 3 errors",
|
|
87
|
+
dsRibbonRibbonCol: { "data-custom": "inline-object" },
|
|
88
|
+
children: "content"
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonCol.DSRibbonCol, { dsRibbonRibbonCol: () => ({ "data-custom": "inline-function" }), children: "content" })
|
|
92
|
+
] });
|
|
93
|
+
var typescript_ribbon_col_valid_default = ExampleUsageComponent;
|
|
94
|
+
//# sourceMappingURL=typescript-ribbon-col-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/typescript-testing/typescript-ribbon-col-valid.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n/* eslint-disable local-rules/custom-rule */\nimport { DSRibbonCol } from '../parts/DSRibbonCol/index.js';\nimport type { DSRibbonColT } from '../parts/DSRibbonCol/react-desc-prop-types.js';\n\ntype ComponentPropsForApp = DSRibbonColT.Props;\ntype ComponentPropsInternals = DSRibbonColT.InternalProps;\ntype ComponentPropsDefaultProps = DSRibbonColT.DefaultProps;\ntype ComponentPropsOptionalProps = DSRibbonColT.OptionalProps;\ntype ComponentPropsRequiredProps = DSRibbonColT.RequiredProps;\n\n// Same shape as the wrapper: no required, default or own optional props. The empty buckets fail to\n// compile the moment one is added.\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {};\n\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\nconst testExplicitDefinition: ComponentPropsForApp = {\n id: 'ribbon-col',\n className: 'custom-class',\n 'aria-label': 'Job registered 3 errors',\n dsRibbonRibbonCol: { 'data-custom': 'from-object' },\n};\n\nconst testInferedTypeCompatibility = {\n id: 'ribbon-col',\n className: 'custom-class',\n dsRibbonRibbonCol: () => ({ 'data-custom': 'from-function' }),\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n id: 'ribbon-col',\n className: 'custom-class',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n <DSRibbonCol {...testExplicitDefinition}>content</DSRibbonCol>\n <DSRibbonCol {...testInferedTypeCompatibility}>content</DSRibbonCol>\n <DSRibbonCol {...testDefinitionAsConst}>content</DSRibbonCol>\n\n <DSRibbonCol\n id=\"ribbon-col\"\n className=\"custom-class\"\n role=\"region\"\n aria-label=\"Job registered 3 errors\"\n dsRibbonRibbonCol={{ 'data-custom': 'inline-object' }}\n >\n content\n </DSRibbonCol>\n\n <DSRibbonCol dsRibbonRibbonCol={() => ({ 'data-custom': 'inline-function' })}>content</DSRibbonCol>\n </>\n);\n\nexport default ExampleUsageComponent;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgErB;AA9DF,yBAA4B;AAW5B,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD,CAAC;AAExD,MAAM,sBAA2D,CAAC;AAElE,MAAM,uBAA6D,CAAC;AAEpE,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,yBAA+C;AAAA,EACnD,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,cAAc;AAAA,EACd,mBAAmB,EAAE,eAAe,cAAc;AACpD;AAEA,MAAM,+BAA+B;AAAA,EACnC,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,mBAAmB,OAAO,EAAE,eAAe,gBAAgB;AAC7D;AAEA,MAAM,wBAAwB;AAAA,EAC5B,IAAI;AAAA,EACJ,WAAW;AACb;AAEA,MAAM,wBAAwB,MAC5B,4EACE;AAAA,8CAAC,kCAAa,GAAG,wBAAwB,qBAAO;AAAA,EAChD,4CAAC,kCAAa,GAAG,8BAA8B,qBAAO;AAAA,EACtD,4CAAC,kCAAa,GAAG,uBAAuB,qBAAO;AAAA,EAE/C;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,WAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,mBAAmB,EAAE,eAAe,gBAAgB;AAAA,MACrD;AAAA;AAAA,EAED;AAAA,EAEA,4CAAC,kCAAY,mBAAmB,OAAO,EAAE,eAAe,kBAAkB,IAAI,qBAAO;AAAA,GACvF;AAGF,IAAO,sCAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var typescript_ribbon_row_valid_exports = {};
|
|
30
|
+
__export(typescript_ribbon_row_valid_exports, {
|
|
31
|
+
default: () => typescript_ribbon_row_valid_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(typescript_ribbon_row_valid_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_DSRibbonRow = require("../parts/DSRibbonRow/index.js");
|
|
37
|
+
const testRequiredProps = {};
|
|
38
|
+
const testOptionalProps = {};
|
|
39
|
+
const testPartialDefaults = {
|
|
40
|
+
alignLeft: true
|
|
41
|
+
};
|
|
42
|
+
const testCompleteDefaults = {
|
|
43
|
+
alignLeft: false,
|
|
44
|
+
solid: false,
|
|
45
|
+
wrapColumns: false
|
|
46
|
+
};
|
|
47
|
+
const testProps = {
|
|
48
|
+
...testRequiredProps,
|
|
49
|
+
...testOptionalProps,
|
|
50
|
+
...testPartialDefaults
|
|
51
|
+
};
|
|
52
|
+
const testPropsAsSyntax = {
|
|
53
|
+
...testRequiredProps,
|
|
54
|
+
...testOptionalProps,
|
|
55
|
+
...testPartialDefaults
|
|
56
|
+
};
|
|
57
|
+
const testInternalProps = {
|
|
58
|
+
...testRequiredProps,
|
|
59
|
+
...testOptionalProps,
|
|
60
|
+
...testCompleteDefaults
|
|
61
|
+
};
|
|
62
|
+
const testInternalPropsAsSyntax = {
|
|
63
|
+
...testRequiredProps,
|
|
64
|
+
...testOptionalProps,
|
|
65
|
+
...testCompleteDefaults
|
|
66
|
+
};
|
|
67
|
+
const testExplicitDefinition = {
|
|
68
|
+
alignLeft: true,
|
|
69
|
+
solid: true,
|
|
70
|
+
wrapColumns: true,
|
|
71
|
+
id: "ribbon-row",
|
|
72
|
+
className: "custom-class",
|
|
73
|
+
dsRibbonRibbonRow: { "data-custom": "from-object" }
|
|
74
|
+
};
|
|
75
|
+
const testInferedTypeCompatibility = {
|
|
76
|
+
alignLeft: false,
|
|
77
|
+
solid: false,
|
|
78
|
+
wrapColumns: false,
|
|
79
|
+
dsRibbonRibbonRow: () => ({ "data-custom": "from-function" })
|
|
80
|
+
};
|
|
81
|
+
const testDefinitionAsConst = {
|
|
82
|
+
alignLeft: true,
|
|
83
|
+
solid: false,
|
|
84
|
+
wrapColumns: true
|
|
85
|
+
};
|
|
86
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonRow.DSRibbonRow, { ...testExplicitDefinition, children: "content" }),
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonRow.DSRibbonRow, { ...testInferedTypeCompatibility, children: "content" }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonRow.DSRibbonRow, { ...testDefinitionAsConst, children: "content" }),
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonRow.DSRibbonRow, { alignLeft: true, solid: true, wrapColumns: true, id: "ribbon-row", className: "custom-class", children: "content" }),
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonRow.DSRibbonRow, { alignLeft: false, solid: false, wrapColumns: false, children: "content" }),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonRow.DSRibbonRow, { dsRibbonRibbonRow: { tabIndex: 0, role: "group", "aria-label": "Job stats" }, children: "content" }),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonRow.DSRibbonRow, { dsRibbonRibbonRow: () => ({ "data-custom": "inline-function" }), children: "content" })
|
|
94
|
+
] });
|
|
95
|
+
var typescript_ribbon_row_valid_default = ExampleUsageComponent;
|
|
96
|
+
//# sourceMappingURL=typescript-ribbon-row-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/typescript-testing/typescript-ribbon-row-valid.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n/* eslint-disable local-rules/custom-rule */\nimport { DSRibbonRow } from '../parts/DSRibbonRow/index.js';\nimport type { DSRibbonRowT } from '../parts/DSRibbonRow/react-desc-prop-types.js';\n\ntype ComponentPropsForApp = DSRibbonRowT.Props;\ntype ComponentPropsInternals = DSRibbonRowT.InternalProps;\ntype ComponentPropsDefaultProps = DSRibbonRowT.DefaultProps;\ntype ComponentPropsOptionalProps = DSRibbonRowT.OptionalProps;\ntype ComponentPropsRequiredProps = DSRibbonRowT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n alignLeft: true,\n};\n\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n alignLeft: false,\n solid: false,\n wrapColumns: false,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\nconst testExplicitDefinition: ComponentPropsForApp = {\n alignLeft: true,\n solid: true,\n wrapColumns: true,\n id: 'ribbon-row',\n className: 'custom-class',\n dsRibbonRibbonRow: { 'data-custom': 'from-object' },\n};\n\nconst testInferedTypeCompatibility = {\n alignLeft: false,\n solid: false,\n wrapColumns: false,\n dsRibbonRibbonRow: () => ({ 'data-custom': 'from-function' }),\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n alignLeft: true,\n solid: false,\n wrapColumns: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n <DSRibbonRow {...testExplicitDefinition}>content</DSRibbonRow>\n <DSRibbonRow {...testInferedTypeCompatibility}>content</DSRibbonRow>\n <DSRibbonRow {...testDefinitionAsConst}>content</DSRibbonRow>\n\n <DSRibbonRow alignLeft solid wrapColumns id=\"ribbon-row\" className=\"custom-class\">\n content\n </DSRibbonRow>\n\n <DSRibbonRow alignLeft={false} solid={false} wrapColumns={false}>\n content\n </DSRibbonRow>\n\n {/* The slot prop is valid in both shapes, so both are exercised. */}\n <DSRibbonRow dsRibbonRibbonRow={{ tabIndex: 0, role: 'group', 'aria-label': 'Job stats' }}>content</DSRibbonRow>\n <DSRibbonRow dsRibbonRibbonRow={() => ({ 'data-custom': 'inline-function' })}>content</DSRibbonRow>\n </>\n);\n\nexport default ExampleUsageComponent;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwErB;AAtEF,yBAA4B;AAS5B,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD,CAAC;AAExD,MAAM,sBAA2D;AAAA,EAC/D,WAAW;AACb;AAEA,MAAM,uBAA6D;AAAA,EACjE,WAAW;AAAA,EACX,OAAO;AAAA,EACP,aAAa;AACf;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,yBAA+C;AAAA,EACnD,WAAW;AAAA,EACX,OAAO;AAAA,EACP,aAAa;AAAA,EACb,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,mBAAmB,EAAE,eAAe,cAAc;AACpD;AAEA,MAAM,+BAA+B;AAAA,EACnC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,aAAa;AAAA,EACb,mBAAmB,OAAO,EAAE,eAAe,gBAAgB;AAC7D;AAEA,MAAM,wBAAwB;AAAA,EAC5B,WAAW;AAAA,EACX,OAAO;AAAA,EACP,aAAa;AACf;AAEA,MAAM,wBAAwB,MAC5B,4EACE;AAAA,8CAAC,kCAAa,GAAG,wBAAwB,qBAAO;AAAA,EAChD,4CAAC,kCAAa,GAAG,8BAA8B,qBAAO;AAAA,EACtD,4CAAC,kCAAa,GAAG,uBAAuB,qBAAO;AAAA,EAE/C,4CAAC,kCAAY,WAAS,MAAC,OAAK,MAAC,aAAW,MAAC,IAAG,cAAa,WAAU,gBAAe,qBAElF;AAAA,EAEA,4CAAC,kCAAY,WAAW,OAAO,OAAO,OAAO,aAAa,OAAO,qBAEjE;AAAA,EAGA,4CAAC,kCAAY,mBAAmB,EAAE,UAAU,GAAG,MAAM,SAAS,cAAc,YAAY,GAAG,qBAAO;AAAA,EAClG,4CAAC,kCAAY,mBAAmB,OAAO,EAAE,eAAe,kBAAkB,IAAI,qBAAO;AAAA,GACvF;AAGF,IAAO,sCAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var typescript_ribbon_wrapper_valid_exports = {};
|
|
30
|
+
__export(typescript_ribbon_wrapper_valid_exports, {
|
|
31
|
+
default: () => typescript_ribbon_wrapper_valid_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(typescript_ribbon_wrapper_valid_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_DSRibbonWrapper = require("../parts/DSRibbonWrapper/index.js");
|
|
37
|
+
const testRequiredProps = {};
|
|
38
|
+
const testOptionalProps = {};
|
|
39
|
+
const testPartialDefaults = {};
|
|
40
|
+
const testCompleteDefaults = {};
|
|
41
|
+
const testProps = {
|
|
42
|
+
...testRequiredProps,
|
|
43
|
+
...testOptionalProps,
|
|
44
|
+
...testPartialDefaults
|
|
45
|
+
};
|
|
46
|
+
const testPropsAsSyntax = {
|
|
47
|
+
...testRequiredProps,
|
|
48
|
+
...testOptionalProps,
|
|
49
|
+
...testPartialDefaults
|
|
50
|
+
};
|
|
51
|
+
const testInternalProps = {
|
|
52
|
+
...testRequiredProps,
|
|
53
|
+
...testOptionalProps,
|
|
54
|
+
...testCompleteDefaults
|
|
55
|
+
};
|
|
56
|
+
const testInternalPropsAsSyntax = {
|
|
57
|
+
...testRequiredProps,
|
|
58
|
+
...testOptionalProps,
|
|
59
|
+
...testCompleteDefaults
|
|
60
|
+
};
|
|
61
|
+
const testExplicitDefinition = {
|
|
62
|
+
id: "ribbon-wrapper",
|
|
63
|
+
className: "custom-class",
|
|
64
|
+
"aria-label": "Job stats",
|
|
65
|
+
dsRibbonRibbonWrapper: { "data-custom": "from-object" }
|
|
66
|
+
};
|
|
67
|
+
const testInferedTypeCompatibility = {
|
|
68
|
+
id: "ribbon-wrapper",
|
|
69
|
+
className: "custom-class",
|
|
70
|
+
dsRibbonRibbonWrapper: () => ({ "data-custom": "from-function" })
|
|
71
|
+
};
|
|
72
|
+
const testDefinitionAsConst = {
|
|
73
|
+
id: "ribbon-wrapper",
|
|
74
|
+
className: "custom-class"
|
|
75
|
+
};
|
|
76
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonWrapper.DSRibbonWrapper, { ...testExplicitDefinition, children: "content" }),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonWrapper.DSRibbonWrapper, { ...testInferedTypeCompatibility, children: "content" }),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonWrapper.DSRibbonWrapper, { ...testDefinitionAsConst, children: "content" }),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
import_DSRibbonWrapper.DSRibbonWrapper,
|
|
82
|
+
{
|
|
83
|
+
id: "ribbon-wrapper",
|
|
84
|
+
className: "custom-class",
|
|
85
|
+
role: "region",
|
|
86
|
+
"aria-label": "Job stats",
|
|
87
|
+
dsRibbonRibbonWrapper: { "data-custom": "inline-object" },
|
|
88
|
+
children: "content"
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSRibbonWrapper.DSRibbonWrapper, { dsRibbonRibbonWrapper: () => ({ "data-custom": "inline-function" }), children: "content" })
|
|
92
|
+
] });
|
|
93
|
+
var typescript_ribbon_wrapper_valid_default = ExampleUsageComponent;
|
|
94
|
+
//# sourceMappingURL=typescript-ribbon-wrapper-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/typescript-testing/typescript-ribbon-wrapper-valid.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n/* eslint-disable local-rules/custom-rule */\nimport { DSRibbonWrapper } from '../parts/DSRibbonWrapper/index.js';\nimport type { DSRibbonWrapperT } from '../parts/DSRibbonWrapper/react-desc-prop-types.js';\n\ntype ComponentPropsForApp = DSRibbonWrapperT.Props;\ntype ComponentPropsInternals = DSRibbonWrapperT.InternalProps;\ntype ComponentPropsDefaultProps = DSRibbonWrapperT.DefaultProps;\ntype ComponentPropsOptionalProps = DSRibbonWrapperT.OptionalProps;\ntype ComponentPropsRequiredProps = DSRibbonWrapperT.RequiredProps;\n\n// This part declares no required, default or own optional props \u2014 its surface is children, global\n// attributes, xstyled props and its single slot. The empty buckets are the assertion: if a prop is\n// ever added to any of those interfaces, these stop compiling.\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {};\n\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\nconst testExplicitDefinition: ComponentPropsForApp = {\n id: 'ribbon-wrapper',\n className: 'custom-class',\n 'aria-label': 'Job stats',\n dsRibbonRibbonWrapper: { 'data-custom': 'from-object' },\n};\n\nconst testInferedTypeCompatibility = {\n id: 'ribbon-wrapper',\n className: 'custom-class',\n dsRibbonRibbonWrapper: () => ({ 'data-custom': 'from-function' }),\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n id: 'ribbon-wrapper',\n className: 'custom-class',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n <DSRibbonWrapper {...testExplicitDefinition}>content</DSRibbonWrapper>\n <DSRibbonWrapper {...testInferedTypeCompatibility}>content</DSRibbonWrapper>\n <DSRibbonWrapper {...testDefinitionAsConst}>content</DSRibbonWrapper>\n\n <DSRibbonWrapper\n id=\"ribbon-wrapper\"\n className=\"custom-class\"\n role=\"region\"\n aria-label=\"Job stats\"\n dsRibbonRibbonWrapper={{ 'data-custom': 'inline-object' }}\n >\n content\n </DSRibbonWrapper>\n\n <DSRibbonWrapper dsRibbonRibbonWrapper={() => ({ 'data-custom': 'inline-function' })}>content</DSRibbonWrapper>\n </>\n);\n\nexport default ExampleUsageComponent;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiErB;AA/DF,6BAAgC;AAYhC,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD,CAAC;AAExD,MAAM,sBAA2D,CAAC;AAElE,MAAM,uBAA6D,CAAC;AAEpE,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,yBAA+C;AAAA,EACnD,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,cAAc;AAAA,EACd,uBAAuB,EAAE,eAAe,cAAc;AACxD;AAEA,MAAM,+BAA+B;AAAA,EACnC,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,uBAAuB,OAAO,EAAE,eAAe,gBAAgB;AACjE;AAEA,MAAM,wBAAwB;AAAA,EAC5B,IAAI;AAAA,EACJ,WAAW;AACb;AAEA,MAAM,wBAAwB,MAC5B,4EACE;AAAA,8CAAC,0CAAiB,GAAG,wBAAwB,qBAAO;AAAA,EACpD,4CAAC,0CAAiB,GAAG,8BAA8B,qBAAO;AAAA,EAC1D,4CAAC,0CAAiB,GAAG,uBAAuB,qBAAO;AAAA,EAEnD;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,WAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,uBAAuB,EAAE,eAAe,gBAAgB;AAAA,MACzD;AAAA;AAAA,EAED;AAAA,EAEA,4CAAC,0CAAgB,uBAAuB,OAAO,EAAE,eAAe,kBAAkB,IAAI,qBAAO;AAAA,GAC/F;AAGF,IAAO,0CAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -9,6 +9,7 @@ const DSRibbon = {
|
|
|
9
9
|
RibbonCol: DSRibbonCol,
|
|
10
10
|
RibbonCard: DSRibbonCard
|
|
11
11
|
};
|
|
12
|
+
import { DSRibbonName } from "./constants/index.js";
|
|
12
13
|
import {
|
|
13
14
|
DSRibbonCard as DSRibbonCard2,
|
|
14
15
|
DSRibbonCardWithSchema,
|
|
@@ -45,6 +46,7 @@ export {
|
|
|
45
46
|
DSRibbonCol2 as DSRibbonCol,
|
|
46
47
|
DSRibbonColPropTypes,
|
|
47
48
|
DSRibbonColWithSchema,
|
|
49
|
+
DSRibbonName,
|
|
48
50
|
DSRibbonRow2 as DSRibbonRow,
|
|
49
51
|
DSRibbonRowPropTypes,
|
|
50
52
|
DSRibbonRowWithSchema,
|