@amboss/design-system 1.9.5 → 1.9.7-canary-datatable-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/build-tokens/assets/icons.json.js +1 -1
- package/build/cjs/build-tokens/assets/icons16.json.js +1 -1
- package/build/cjs/src/components/Button/Button.js +11 -8
- package/build/cjs/src/components/Column/Columns.js +2 -2
- package/build/cjs/src/components/DataTable/DataTable.js +100 -0
- package/build/cjs/src/components/DataTable/TableBody.js +88 -0
- package/build/cjs/src/components/DataTable/TableCell.js +48 -0
- package/build/cjs/src/components/DataTable/TableFooter.js +22 -0
- package/build/cjs/src/components/DataTable/TableHeader.js +170 -0
- package/build/cjs/src/components/Form/Select/Select.js +5 -5
- package/build/cjs/src/components/PictogramButton/PictogramButton.js +5 -4
- package/build/cjs/src/components/RoundButton/RoundButton.js +5 -4
- package/build/cjs/src/index.js +2 -0
- package/build/esm/build-tokens/assets/icons.json.js +1 -1
- package/build/esm/build-tokens/assets/icons16.json.js +1 -1
- package/build/esm/src/components/Button/Button.js +11 -8
- package/build/esm/src/components/Button/Button.js.map +1 -1
- package/build/esm/src/components/Column/Columns.js +2 -2
- package/build/esm/src/components/Column/Columns.js.map +1 -1
- package/build/esm/src/components/DataTable/DataTable.d.ts +54 -0
- package/build/esm/src/components/DataTable/DataTable.js +94 -0
- package/build/esm/src/components/DataTable/DataTable.js.map +1 -0
- package/build/esm/src/components/DataTable/TableBody.d.ts +8 -0
- package/build/esm/src/components/DataTable/TableBody.js +80 -0
- package/build/esm/src/components/DataTable/TableBody.js.map +1 -0
- package/build/esm/src/components/DataTable/TableCell.d.ts +9 -0
- package/build/esm/src/components/DataTable/TableCell.js +41 -0
- package/build/esm/src/components/DataTable/TableCell.js.map +1 -0
- package/build/esm/src/components/DataTable/TableFooter.d.ts +5 -0
- package/build/esm/src/components/DataTable/TableFooter.js +15 -0
- package/build/esm/src/components/DataTable/TableFooter.js.map +1 -0
- package/build/esm/src/components/DataTable/TableHeader.d.ts +8 -0
- package/build/esm/src/components/DataTable/TableHeader.js +162 -0
- package/build/esm/src/components/DataTable/TableHeader.js.map +1 -0
- package/build/esm/src/components/DataTable/types.d.ts +16 -0
- package/build/esm/src/components/Form/Select/Select.js +5 -5
- package/build/esm/src/components/Form/Select/Select.js.map +1 -1
- package/build/esm/src/components/PictogramButton/PictogramButton.js +5 -4
- package/build/esm/src/components/PictogramButton/PictogramButton.js.map +1 -1
- package/build/esm/src/components/RoundButton/RoundButton.js +5 -4
- package/build/esm/src/components/RoundButton/RoundButton.js.map +1 -1
- package/build/esm/src/index.d.ts +1 -0
- package/build/esm/src/index.js +1 -0
- package/build/esm/src/index.js.map +1 -1
- package/build/esm/src/shared/mediaQueries.js.map +1 -1
- package/package.json +21 -17
|
@@ -57,7 +57,7 @@ const StyledRoundButton = /*#__PURE__*/_styled("button", process.env.NODE_ENV ==
|
|
|
57
57
|
}
|
|
58
58
|
})
|
|
59
59
|
};
|
|
60
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJvdW5kQnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRMEIiLCJmaWxlIjoiUm91bmRCdXR0b24udHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgcmVhY3QvanN4LXByb3BzLW5vLXNwcmVhZGluZyAqL1xuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyBJY29uTmFtZSwgSWNvbiB9IGZyb20gXCIuLi9JY29uL0ljb25cIjtcbmltcG9ydCB7IElubGluZSB9IGZyb20gXCIuLi9JbmxpbmUvSW5saW5lXCI7XG5pbXBvcnQgeyBCdXR0b25Qcm9wcyB9IGZyb20gXCIuLi9CdXR0b24vQnV0dG9uXCI7XG5pbXBvcnQgeyBBc1Byb3AgfSBmcm9tIFwiLi4vLi4vdHlwZXNcIjtcblxuY29uc3QgU3R5bGVkUm91bmRCdXR0b24gPSBzdHlsZWQuYnV0dG9uPFBhcnRpYWw8Um91bmRCdXR0b25Qcm9wcz4+
|
|
60
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJvdW5kQnV0dG9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRMEIiLCJmaWxlIjoiUm91bmRCdXR0b24udHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgcmVhY3QvanN4LXByb3BzLW5vLXNwcmVhZGluZyAqL1xuaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgeyBJY29uTmFtZSwgSWNvbiB9IGZyb20gXCIuLi9JY29uL0ljb25cIjtcbmltcG9ydCB7IElubGluZSB9IGZyb20gXCIuLi9JbmxpbmUvSW5saW5lXCI7XG5pbXBvcnQgeyBCdXR0b25Qcm9wcyB9IGZyb20gXCIuLi9CdXR0b24vQnV0dG9uXCI7XG5pbXBvcnQgeyBBc1Byb3AgfSBmcm9tIFwiLi4vLi4vdHlwZXNcIjtcblxuY29uc3QgU3R5bGVkUm91bmRCdXR0b24gPSBzdHlsZWQuYnV0dG9uPFBhcnRpYWw8Um91bmRCdXR0b25Qcm9wcz4+KFxuICAoeyB0aGVtZSwgdmFyaWFudCB9KSA9PiAoe1xuICAgIFwiJlt0eXBlPSdidXR0b24nXVwiOiB7XG4gICAgICBhcHBlYXJhbmNlOiBcIm5vbmVcIixcbiAgICAgIFwiLW1vei1hcHBlYXJhbmNlXCI6IFwibm9uZ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ge1xuICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAob25DbGljaykge1xuICAgICAgICAgIG9uQ2xpY2soZSk7XG4gICAgICAgIH1cbiAgICAgIH19XG4gICAgICBvbkZvY3VzPXtvbkZvY3VzfVxuICAgICAgb25CbHVyPXtvbkJsdXJ9XG4gICAgICB7Li4ucmVzdH1cbiAgICA+XG4gICAgICA8SW5saW5lIHZBbGlnbkl0ZW1zPVwiY2VudGVyXCIgYWxpZ25JdGVtcz1cImNlbnRlclwiIHNwYWNlPVwieHhzXCIgbm9XcmFwPlxuICAgICAgICB7aWNvbiAmJiAoXG4gICAgICAgICAgPEljb25cbiAgICAgICAgICAgIHNpemU9XCJzXCJcbiAgICAgICAgICAgIG5hbWU9e2ljb259XG4gICAgICAgICAgICBkYXRhLXRlc3RpZD17aWNvbn1cbiAgICAgICAgICAgIGRhdGEtZTJlLXRlc3QtaWQ9e2ljb259XG4gICAgICAgICAgLz5cbiAgICAgICAgKX1cbiAgICAgIDwvSW5saW5lPlxuICAgIDwvU3R5bGVkUm91bmRCdXR0b24+XG4gICk7XG59XG5Sb3VuZEJ1dHRvbi5kZWZhdWx0UHJvcHMgPSBkZWZhdWx0UHJvcHM7XG4iXX0= */");
|
|
61
61
|
const defaultProps = {
|
|
62
62
|
type: "button",
|
|
63
63
|
variant: "tertiary",
|
|
@@ -91,8 +91,7 @@ function RoundButton(_ref2) {
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
onFocus: onFocus,
|
|
94
|
-
onBlur: onBlur
|
|
95
|
-
"aria-label": icon
|
|
94
|
+
onBlur: onBlur
|
|
96
95
|
}, rest), /*#__PURE__*/React.createElement(Inline, {
|
|
97
96
|
vAlignItems: "center",
|
|
98
97
|
alignItems: "center",
|
|
@@ -100,7 +99,9 @@ function RoundButton(_ref2) {
|
|
|
100
99
|
noWrap: true
|
|
101
100
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
102
101
|
size: "s",
|
|
103
|
-
name: icon
|
|
102
|
+
name: icon,
|
|
103
|
+
"data-testid": icon,
|
|
104
|
+
"data-e2e-test-id": icon
|
|
104
105
|
})));
|
|
105
106
|
}
|
|
106
107
|
RoundButton.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoundButton.js","sources":["../../../../../src/components/RoundButton/RoundButton.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { IconName, Icon } from \"../Icon/Icon\";\nimport { Inline } from \"../Inline/Inline\";\nimport { ButtonProps } from \"../Button/Button\";\nimport { AsProp } from \"../../types\";\n\nconst StyledRoundButton = styled.button<Partial<RoundButtonProps>>(\n ({ theme, variant }) => ({\n \"&[type='button']\": {\n appearance: \"none\",\n \"-moz-appearance\": \"none\",\n \"-webkit-appearance\": \"none\",\n },\n border: 0,\n display: \"inline-block\",\n textTransform: \"none\",\n textDecoration: \"none\",\n borderRadius: \"100%\",\n fontFamily: theme.variables.fontFamily.lato,\n fontSize: theme.variables.size.font.button.m,\n lineHeight: theme.variables.size.lineHeight.button.m,\n fontWeight: theme.variables.weight.bold,\n padding: theme.variables.size.spacing.xs,\n cursor: \"pointer\",\n \"&[disabled], &:disabled\": {\n opacity: theme.variables.opacity.button.disabled,\n pointerEvents: \"none\",\n },\n backgroundColor: theme.values.color.background.button[variant].base,\n color: theme.values.color.text.button[variant].base,\n \"&:hover\": {\n backgroundColor: theme.values.color.background.button[variant].hover,\n color: theme.values.color.text.button[variant].hover,\n },\n \"&:active\": {\n backgroundColor: theme.values.color.background.button[variant].active,\n color: theme.values.color.text.button[variant].active,\n },\n ...(variant === \"secondary\" && {\n border: \"2px solid\",\n borderColor: theme.values.color.border.toggleButton.default,\n padding: parseInt(theme.variables.size.spacing.xs, 10) - 2,\n \"&:hover\": {\n borderColor: theme.values.color.border.toggleButton.defaultHover,\n },\n \"&:active\": {\n borderColor: theme.values.color.border.toggleButton.defaultHover,\n },\n }),\n })\n);\n\nexport type RoundButtonProps = Pick<\n ButtonProps,\n | \"variant\"\n | \"type\"\n | \"disabled\"\n | \"onClick\"\n | \"onFocus\"\n | \"onBlur\"\n | \"data-e2e-test-id\"\n> & {\n /** The centered icon to be displayed. */\n icon: IconName;\n};\n\nconst defaultProps: Partial<RoundButtonProps> & AsProp<\"button\"> = {\n type: \"button\",\n variant: \"tertiary\",\n disabled: false,\n as: \"button\",\n \"data-e2e-test-id\": undefined,\n};\n\nexport function RoundButton<C extends React.ElementType = \"button\">({\n onClick,\n onFocus,\n onBlur,\n type,\n disabled,\n as,\n icon,\n \"data-e2e-test-id\": dataE2eTestId,\n ...rest\n}: RoundButtonProps & AsProp<C>): React.ReactElement {\n return (\n <StyledRoundButton\n data-e2e-test-id={dataE2eTestId}\n as={as}\n disabled={disabled}\n type={as === \"a\" ? undefined : type}\n onClick={(e: React.MouseEvent) => {\n if (disabled) {\n e.preventDefault();\n }\n if (onClick) {\n onClick(e);\n }\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n
|
|
1
|
+
{"version":3,"file":"RoundButton.js","sources":["../../../../../src/components/RoundButton/RoundButton.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { IconName, Icon } from \"../Icon/Icon\";\nimport { Inline } from \"../Inline/Inline\";\nimport { ButtonProps } from \"../Button/Button\";\nimport { AsProp } from \"../../types\";\n\nconst StyledRoundButton = styled.button<Partial<RoundButtonProps>>(\n ({ theme, variant }) => ({\n \"&[type='button']\": {\n appearance: \"none\",\n \"-moz-appearance\": \"none\",\n \"-webkit-appearance\": \"none\",\n },\n border: 0,\n display: \"inline-block\",\n textTransform: \"none\",\n textDecoration: \"none\",\n borderRadius: \"100%\",\n fontFamily: theme.variables.fontFamily.lato,\n fontSize: theme.variables.size.font.button.m,\n lineHeight: theme.variables.size.lineHeight.button.m,\n fontWeight: theme.variables.weight.bold,\n padding: theme.variables.size.spacing.xs,\n cursor: \"pointer\",\n \"&[disabled], &:disabled\": {\n opacity: theme.variables.opacity.button.disabled,\n pointerEvents: \"none\",\n },\n backgroundColor: theme.values.color.background.button[variant].base,\n color: theme.values.color.text.button[variant].base,\n \"&:hover\": {\n backgroundColor: theme.values.color.background.button[variant].hover,\n color: theme.values.color.text.button[variant].hover,\n },\n \"&:active\": {\n backgroundColor: theme.values.color.background.button[variant].active,\n color: theme.values.color.text.button[variant].active,\n },\n ...(variant === \"secondary\" && {\n border: \"2px solid\",\n borderColor: theme.values.color.border.toggleButton.default,\n padding: parseInt(theme.variables.size.spacing.xs, 10) - 2,\n \"&:hover\": {\n borderColor: theme.values.color.border.toggleButton.defaultHover,\n },\n \"&:active\": {\n borderColor: theme.values.color.border.toggleButton.defaultHover,\n },\n }),\n })\n);\n\nexport type RoundButtonProps = Pick<\n ButtonProps,\n | \"variant\"\n | \"type\"\n | \"disabled\"\n | \"onClick\"\n | \"onFocus\"\n | \"onBlur\"\n | \"data-e2e-test-id\"\n> & {\n /** The centered icon to be displayed. */\n icon: IconName;\n};\n\nconst defaultProps: Partial<RoundButtonProps> & AsProp<\"button\"> = {\n type: \"button\",\n variant: \"tertiary\",\n disabled: false,\n as: \"button\",\n \"data-e2e-test-id\": undefined,\n};\n\nexport function RoundButton<C extends React.ElementType = \"button\">({\n onClick,\n onFocus,\n onBlur,\n type,\n disabled,\n as,\n icon,\n \"data-e2e-test-id\": dataE2eTestId,\n ...rest\n}: RoundButtonProps & AsProp<C>): React.ReactElement {\n return (\n <StyledRoundButton\n data-e2e-test-id={dataE2eTestId}\n as={as}\n disabled={disabled}\n type={as === \"a\" ? undefined : type}\n onClick={(e: React.MouseEvent) => {\n if (disabled) {\n e.preventDefault();\n }\n if (onClick) {\n onClick(e);\n }\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n {...rest}\n >\n <Inline vAlignItems=\"center\" alignItems=\"center\" space=\"xxs\" noWrap>\n {icon && (\n <Icon\n size=\"s\"\n name={icon}\n data-testid={icon}\n data-e2e-test-id={icon}\n />\n )}\n </Inline>\n </StyledRoundButton>\n );\n}\nRoundButton.defaultProps = defaultProps;\n"],"names":["StyledRoundButton","_styled","process","env","NODE_ENV","target","label","_ref","theme","variant","appearance","border","display","textTransform","textDecoration","borderRadius","fontFamily","variables","lato","fontSize","size","font","button","m","lineHeight","fontWeight","weight","bold","padding","spacing","xs","cursor","opacity","disabled","pointerEvents","backgroundColor","values","color","background","base","text","hover","active","borderColor","toggleButton","default","parseInt","defaultHover","defaultProps","type","as","undefined","RoundButton","_ref2","onClick","onFocus","onBlur","icon","dataE2eTestId","rest","React","createElement","_extends","e","preventDefault","Inline","vAlignItems","alignItems","space","noWrap","Icon","name"],"mappings":";;;;;;AAQA,MAAMA,iBAAiB,gBAAGC,OAAA,CAAA,QAAA,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,KAAA,YAAA,GAAA;EAAAC,MAAA,EAAA,WAAA;AAAA,CAAA,GAAA;EAAAA,MAAA,EAAA,WAAA;EAAAC,KAAA,EAAA,mBAAA;AAAA,CAAA,CAAA,CACxBC,IAAA,IAAA;EAAA,IAAC;IAAEC,KAAK;AAAEC,IAAAA,OAAAA;AAAQ,GAAC,GAAAF,IAAA,CAAA;EAAA,OAAM;AACvB,IAAA,kBAAkB,EAAE;AAClBG,MAAAA,UAAU,EAAE,MAAM;AAClB,MAAA,iBAAiB,EAAE,MAAM;AACzB,MAAA,oBAAoB,EAAE,MAAA;KACvB;AACDC,IAAAA,MAAM,EAAE,CAAC;AACTC,IAAAA,OAAO,EAAE,cAAc;AACvBC,IAAAA,aAAa,EAAE,MAAM;AACrBC,IAAAA,cAAc,EAAE,MAAM;AACtBC,IAAAA,YAAY,EAAE,MAAM;AACpBC,IAAAA,UAAU,EAAER,KAAK,CAACS,SAAS,CAACD,UAAU,CAACE,IAAI;IAC3CC,QAAQ,EAAEX,KAAK,CAACS,SAAS,CAACG,IAAI,CAACC,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A,EAAG;AACPjB,IAAAA,QAAQ,EAAEA,QAAS;AACnBgB,IAAAA,IAAI,EAAEC,EAAE,KAAK,GAAG,GAAGC,SAAS,GAAGF,IAAK;IACpCK,OAAO,EAAGS,CAAmB,IAAK;AAChC,MAAA,IAAI9B,QAAQ,EAAE;QACZ8B,CAAC,CAACC,cAAc,EAAE,CAAA;AACpB,OAAA;AACA,MAAA,IAAIV,OAAO,EAAE;QACXA,OAAO,CAACS,CAAC,CAAC,CAAA;AACZ,OAAA;KACA;AACFR,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAA,EACXG,IAAI,CAERC,eAAAA,KAAA,CAAAC,aAAA,CAACI,MAAM,EAAA;AAACC,IAAAA,WAAW,EAAC,QAAQ;AAACC,IAAAA,UAAU,EAAC,QAAQ;AAACC,IAAAA,KAAK,EAAC,KAAK;IAACC,MAAM,EAAA,IAAA;AAAA,GAAA,EAChEZ,IAAI,iBACHG,KAAA,CAAAC,aAAA,CAACS,IAAI,EAAA;AACHlD,IAAAA,IAAI,EAAC,GAAG;AACRmD,IAAAA,IAAI,EAAEd,IAAK;AACX,IAAA,aAAA,EAAaA,IAAK;IAClB,kBAAkBA,EAAAA,IAAAA;AAAK,GAAA,CAE1B,CACM,CACS,CAAA;AAExB,CAAA;AACAL,WAAW,CAACJ,YAAY,GAAGA,YAAY;;;;"}
|
package/build/esm/src/index.d.ts
CHANGED
|
@@ -43,3 +43,4 @@ export { Callout } from "./components/Callout/Callout";
|
|
|
43
43
|
export { Modal } from "./components/Patterns/Modal/Modal";
|
|
44
44
|
export { ButtonGroup } from "./components/Patterns/ButtonGroup/ButtonGroup";
|
|
45
45
|
export { Collapsible, CollapsibleHeader, } from "./components/Collapsible/Collapsible";
|
|
46
|
+
export { DataTable } from "./components/DataTable/DataTable";
|
package/build/esm/src/index.js
CHANGED
|
@@ -43,6 +43,7 @@ export { Callout } from './components/Callout/Callout.js';
|
|
|
43
43
|
export { Modal } from './components/Patterns/Modal/Modal.js';
|
|
44
44
|
export { ButtonGroup } from './components/Patterns/ButtonGroup/ButtonGroup.js';
|
|
45
45
|
export { Collapsible, CollapsibleHeader } from './components/Collapsible/Collapsible.js';
|
|
46
|
+
export { DataTable } from './components/DataTable/DataTable.js';
|
|
46
47
|
|
|
47
48
|
const {
|
|
48
49
|
dark,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { ambossVisualConfiguration } from \"../build-tokens/visualConfig\";\n\nexport const { dark, light } = ambossVisualConfiguration;\nexport { ThemeProvider, CacheProvider } from \"@emotion/react\";\nexport { default as createCache } from \"@emotion/cache\";\nexport { Card } from \"./components/Card/Card\";\nexport { CardBox } from \"./components/Card/CardBox\";\nexport { Box } from \"./components/Box/Box\";\nexport { Inline } from \"./components/Inline/Inline\";\nexport { Stack } from \"./components/Stack/Stack\";\nexport { H1, H2, H3, H4, H5, H6 } from \"./components/Typography/Header/Header\";\nexport { Text } from \"./components/Typography/Text/Text\";\nexport { TextClamped } from \"./components/Typography/TextClamped/TextClamped\";\nexport { StyledText } from \"./components/Typography/StyledText/StyledText\";\nexport { Link } from \"./components/Link/Link\";\nexport { Icon } from \"./components/Icon/Icon\";\nexport { Button } from \"./components/Button/Button\";\nexport { Divider } from \"./components/Divider/Divider\";\nexport { Column, Columns } from \"./components/Column/Columns\";\nexport { Tabs } from \"./components/Tabs/Tabs\";\nexport { Badge } from \"./components/Badge/Badge\";\nexport { SearchResult } from \"./components/SearchResult/SearchResult\";\nexport { ToggleButton } from \"./components/Form/ToggleButton/ToggleButton\";\nexport { DropdownMenu } from \"./components/DropdownMenu/DropdownMenu\";\nexport { FormFieldGroup } from \"./components/Form/FormFieldGroup/FormFieldGroup\";\nexport { Input } from \"./components/Form/Input/Input\";\nexport { Checkbox } from \"./components/Form/Checkbox/Checkbox\";\nexport { Toggle } from \"./components/Form/Toggle/Toggle\";\nexport { Radio } from \"./components/Form/Radio/Radio\";\nexport { RadioButton } from \"./components/Form/RadioButton/RadioButton\";\nexport { Textarea } from \"./components/Form/Textarea/Textarea\";\nexport { Select } from \"./components/Form/Select/Select\";\nexport { SubThemeProvider } from \"./components/SubThemeProvider/SubThemeProvider\";\nexport { PictogramButton } from \"./components/PictogramButton/PictogramButton\";\nexport { MediaViewerBar } from \"./components/MediaViewerBar/MediaViewerBar\";\nexport { SegmentedProgressBar } from \"./components/SegmentedProgressBar/SegmentedProgressBar\";\nexport { ProgressBar } from \"./components/ProgressBar/ProgressBar\";\nexport { Container } from \"./components/Container/Container\";\nexport { PasswordInput } from \"./components/Form/PasswordInput/PasswordInput\";\nexport { RoundButton } from \"./components/RoundButton/RoundButton\";\nexport { Notification } from \"./components/Notification/Notification\";\nexport { Logo } from \"./components/Logo/Logo\";\nexport { MediaItem } from \"./components/MediaItem/MediaItem\";\nexport { Callout } from \"./components/Callout/Callout\";\nexport { Modal } from \"./components/Patterns/Modal/Modal\";\nexport { ButtonGroup } from \"./components/Patterns/ButtonGroup/ButtonGroup\";\nexport {\n Collapsible,\n CollapsibleHeader,\n} from \"./components/Collapsible/Collapsible\";\n"],"names":["dark","light","ambossVisualConfiguration"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { ambossVisualConfiguration } from \"../build-tokens/visualConfig\";\n\nexport const { dark, light } = ambossVisualConfiguration;\nexport { ThemeProvider, CacheProvider } from \"@emotion/react\";\nexport { default as createCache } from \"@emotion/cache\";\nexport { Card } from \"./components/Card/Card\";\nexport { CardBox } from \"./components/Card/CardBox\";\nexport { Box } from \"./components/Box/Box\";\nexport { Inline } from \"./components/Inline/Inline\";\nexport { Stack } from \"./components/Stack/Stack\";\nexport { H1, H2, H3, H4, H5, H6 } from \"./components/Typography/Header/Header\";\nexport { Text } from \"./components/Typography/Text/Text\";\nexport { TextClamped } from \"./components/Typography/TextClamped/TextClamped\";\nexport { StyledText } from \"./components/Typography/StyledText/StyledText\";\nexport { Link } from \"./components/Link/Link\";\nexport { Icon } from \"./components/Icon/Icon\";\nexport { Button } from \"./components/Button/Button\";\nexport { Divider } from \"./components/Divider/Divider\";\nexport { Column, Columns } from \"./components/Column/Columns\";\nexport { Tabs } from \"./components/Tabs/Tabs\";\nexport { Badge } from \"./components/Badge/Badge\";\nexport { SearchResult } from \"./components/SearchResult/SearchResult\";\nexport { ToggleButton } from \"./components/Form/ToggleButton/ToggleButton\";\nexport { DropdownMenu } from \"./components/DropdownMenu/DropdownMenu\";\nexport { FormFieldGroup } from \"./components/Form/FormFieldGroup/FormFieldGroup\";\nexport { Input } from \"./components/Form/Input/Input\";\nexport { Checkbox } from \"./components/Form/Checkbox/Checkbox\";\nexport { Toggle } from \"./components/Form/Toggle/Toggle\";\nexport { Radio } from \"./components/Form/Radio/Radio\";\nexport { RadioButton } from \"./components/Form/RadioButton/RadioButton\";\nexport { Textarea } from \"./components/Form/Textarea/Textarea\";\nexport { Select } from \"./components/Form/Select/Select\";\nexport { SubThemeProvider } from \"./components/SubThemeProvider/SubThemeProvider\";\nexport { PictogramButton } from \"./components/PictogramButton/PictogramButton\";\nexport { MediaViewerBar } from \"./components/MediaViewerBar/MediaViewerBar\";\nexport { SegmentedProgressBar } from \"./components/SegmentedProgressBar/SegmentedProgressBar\";\nexport { ProgressBar } from \"./components/ProgressBar/ProgressBar\";\nexport { Container } from \"./components/Container/Container\";\nexport { PasswordInput } from \"./components/Form/PasswordInput/PasswordInput\";\nexport { RoundButton } from \"./components/RoundButton/RoundButton\";\nexport { Notification } from \"./components/Notification/Notification\";\nexport { Logo } from \"./components/Logo/Logo\";\nexport { MediaItem } from \"./components/MediaItem/MediaItem\";\nexport { Callout } from \"./components/Callout/Callout\";\nexport { Modal } from \"./components/Patterns/Modal/Modal\";\nexport { ButtonGroup } from \"./components/Patterns/ButtonGroup/ButtonGroup\";\nexport {\n Collapsible,\n CollapsibleHeader,\n} from \"./components/Collapsible/Collapsible\";\nexport { DataTable } from \"./components/DataTable/DataTable\";\n"],"names":["dark","light","ambossVisualConfiguration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEa,MAAA;EAAEA,IAAI;AAAEC,EAAAA,KAAAA;AAAM,CAAC,GAAGC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaQueries.js","sources":["../../../../src/shared/mediaQueries.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {\n ColumnSizes,\n HorizontalAlignment,\n MQ,\n SpaceSizes,\n TextAlignment,\n VerticalAlignment,\n Order,\n ColumnAlignment,\n Hyphens,\n} from \"../types\";\nimport breakpoints from \"../../build-tokens/_breakpoints.json\";\n\ntype MqProp<T> = [\n T | MQ<T>,\n Record<T extends string ? T : never, string | number>\n];\n\n/*\n Although, mq implementation supports any property type, the following types are specified to provide type safety. If you need support for a new type, add it here.\n*/\ntype MqRules = Record<\n string,\n | MqProp<TextAlignment>\n | MqProp<SpaceSizes>\n | MqProp<HorizontalAlignment>\n | MqProp<VerticalAlignment>\n | MqProp<ColumnSizes>\n | MqProp<Order>\n | MqProp<ColumnAlignment>\n | MqProp<Hyphens>\n>;\n\ntype EmotionCssPropertyName = string;\ntype EmotionCssValue = string | number;\ntype EmotionCssDescription = Record<EmotionCssPropertyName, EmotionCssValue>;\ntype MqFunc = (\n rules: MqRules\n) => Record<string, EmotionCssValue | EmotionCssDescription>;\n\n// this thing probably deserves to be a separate library, like facepaint for emotion\nfunction getMq(breakpointRules: string[]): MqFunc {\n const keys = breakpointRules;\n\n return (rules) => {\n const res: Record<string, EmotionCssValue | EmotionCssDescription> = {};\n\n keys.forEach((key: string) => {\n res[key] = {};\n });\n res[`@media screen`] = {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Object.entries(rules).forEach(([cssProperty, [prop, map]]: any) => {\n if (Array.isArray(prop)) {\n const sm = prop[0];\n const md = prop[1] || prop[0];\n const lg = prop[2] || prop[1] || prop[0];\n const [s, m, l]: string[] = keys;\n\n (res[s] as EmotionCssDescription)[cssProperty] = map[sm];\n (res[m] as EmotionCssDescription)[cssProperty] = map[md];\n (res[l] as EmotionCssDescription)[cssProperty] = map[lg];\n } else {\n (res[`@media screen`] as EmotionCssDescription)[cssProperty] = map[\n prop as string\n ] as string;\n }\n });\n\n return res;\n };\n}\n\nexport const mq = getMq([\n `@media (max-width: ${breakpoints[1].value}px)`,\n `@media (min-width: ${breakpoints[1].value}px) and (max-width: ${breakpoints[2].value}px)`,\n `@media (min-width: ${breakpoints[2].value}px)`,\n]);\n\nfunction getMqValue(breakpointRules: string[]) {\n const keys = breakpointRules;\n return (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n rules: Record<EmotionCssPropertyName, EmotionCssValue[] | EmotionCssValue>\n ): Record<string, EmotionCssValue | EmotionCssDescription> => {\n const res: Record<string, EmotionCssValue | EmotionCssDescription> = {};\n keys.forEach((key: string) => {\n res[key] = {};\n });\n res[`@media screen`] = {};\n\n Object.entries(rules).forEach(([cssProperty, cssValues]) => {\n if (Array.isArray(cssValues)) {\n breakpointRules.forEach((breakpoint, index) => {\n let i = index;\n while (!cssValues[i] && i !== 0) {\n i -= 1;\n }\n\n (res[breakpoint] as EmotionCssDescription)[cssProperty] =\n cssValues[i];\n });\n } else {\n (res[`@media screen`] as EmotionCssDescription)[
|
|
1
|
+
{"version":3,"file":"mediaQueries.js","sources":["../../../../src/shared/mediaQueries.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {\n ColumnSizes,\n HorizontalAlignment,\n MQ,\n SpaceSizes,\n TextAlignment,\n VerticalAlignment,\n Order,\n ColumnAlignment,\n Hyphens,\n} from \"../types\";\nimport breakpoints from \"../../build-tokens/_breakpoints.json\";\n\ntype MqProp<T> = [\n T | MQ<T>,\n Record<T extends string ? T : never, string | number>\n];\n\n/*\n Although, mq implementation supports any property type, the following types are specified to provide type safety. If you need support for a new type, add it here.\n*/\ntype MqRules = Record<\n string,\n | MqProp<TextAlignment>\n | MqProp<SpaceSizes>\n | MqProp<HorizontalAlignment>\n | MqProp<VerticalAlignment>\n | MqProp<ColumnSizes>\n | MqProp<Order>\n | MqProp<ColumnAlignment>\n | MqProp<Hyphens>\n>;\n\ntype EmotionCssPropertyName = string;\ntype EmotionCssValue = string | number;\ntype EmotionCssDescription = Record<EmotionCssPropertyName, EmotionCssValue>;\ntype MqFunc = (\n rules: MqRules\n) => Record<string, EmotionCssValue | EmotionCssDescription>;\n\n// this thing probably deserves to be a separate library, like facepaint for emotion\nfunction getMq(breakpointRules: string[]): MqFunc {\n const keys = breakpointRules;\n\n return (rules) => {\n const res: Record<string, EmotionCssValue | EmotionCssDescription> = {};\n\n keys.forEach((key: string) => {\n res[key] = {};\n });\n res[`@media screen`] = {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Object.entries(rules).forEach(([cssProperty, [prop, map]]: any) => {\n if (Array.isArray(prop)) {\n const sm = prop[0];\n const md = prop[1] || prop[0];\n const lg = prop[2] || prop[1] || prop[0];\n const [s, m, l]: string[] = keys;\n\n (res[s] as EmotionCssDescription)[cssProperty] = map[sm];\n (res[m] as EmotionCssDescription)[cssProperty] = map[md];\n (res[l] as EmotionCssDescription)[cssProperty] = map[lg];\n } else {\n (res[`@media screen`] as EmotionCssDescription)[cssProperty] = map[\n prop as string\n ] as string;\n }\n });\n\n return res;\n };\n}\n\nexport const mq = getMq([\n `@media (max-width: ${breakpoints[1].value}px)`,\n `@media (min-width: ${breakpoints[1].value}px) and (max-width: ${breakpoints[2].value}px)`,\n `@media (min-width: ${breakpoints[2].value}px)`,\n]);\n\nfunction getMqValue(breakpointRules: string[]) {\n const keys = breakpointRules;\n return (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n rules: Record<EmotionCssPropertyName, EmotionCssValue[] | EmotionCssValue>\n ): Record<string, EmotionCssValue | EmotionCssDescription> => {\n const res: Record<string, EmotionCssValue | EmotionCssDescription> = {};\n keys.forEach((key: string) => {\n res[key] = {};\n });\n res[`@media screen`] = {};\n\n Object.entries(rules).forEach(([cssProperty, cssValues]) => {\n if (Array.isArray(cssValues)) {\n breakpointRules.forEach((breakpoint, index) => {\n let i = index;\n while (!cssValues[i] && i !== 0) {\n i -= 1;\n }\n\n (res[breakpoint] as EmotionCssDescription)[cssProperty] =\n cssValues[i];\n });\n } else {\n (res[`@media screen`] as EmotionCssDescription)[cssProperty] =\n cssValues;\n }\n });\n\n return res;\n };\n}\n\nexport const mqValue = getMqValue([\n `@media (max-width: ${breakpoints[1].value}px)`,\n `@media (min-width: ${breakpoints[1].value}px) and (max-width: ${breakpoints[2].value}px)`,\n `@media (min-width: ${breakpoints[2].value}px)`,\n]);\n\nexport function getMediaQueryClasses<T>(\n s: T | MQ<T> | undefined,\n styles: Record<string, string>,\n prefix = \"\"\n): string[] {\n if (s === undefined) return [];\n\n let res;\n if (Array.isArray(s)) {\n const sm = s[0];\n const md = s[1] || s[0];\n const lg = s[2] || s[1] || s[0];\n\n res = [`${sm}-small`, `${md}-medium`, `${lg}-large`];\n } else {\n res = [s as unknown as string];\n }\n\n return res.map((cl) => `${prefix}${cl}`).map((cl) => styles[cl]);\n}\n"],"names":["getMq","breakpointRules","keys","rules","res","forEach","key","Object","entries","_ref","cssProperty","prop","map","Array","isArray","sm","md","lg","s","m","l","mq","breakpoints","value","getMqValue","_ref2","cssValues","breakpoint","index","i","mqValue"],"mappings":";;AAAA;;AAoBA;AACA;AACA;;AAoBA;AACA,SAASA,KAAKA,CAACC,eAAyB,EAAU;EAChD,MAAMC,IAAI,GAAGD,eAAe,CAAA;AAE5B,EAAA,OAAQE,KAAK,IAAK;IAChB,MAAMC,GAA4D,GAAG,EAAE,CAAA;AAEvEF,IAAAA,IAAI,CAACG,OAAO,CAAEC,GAAW,IAAK;AAC5BF,MAAAA,GAAG,CAACE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AG,CAAE,CAAc,aAAA,CAAA,CAAC,CAA2BM,WAAW,CAAC,GAC1DgB,SAAS,CAAA;AACb,OAAA;AACF,KAAC,CAAC,CAAA;AAEF,IAAA,OAAOtB,GAAG,CAAA;GACX,CAAA;AACH,CAAA;MAEa0B,OAAO,GAAGN,UAAU,CAAC,CAC/B,sBAAqBF,WAAW,CAAC,CAAC,CAAC,CAACC,KAAM,CAAA,GAAA,CAAI,EAC9C,CAAqBD,mBAAAA,EAAAA,WAAW,CAAC,CAAC,CAAC,CAACC,KAAM,uBAAsBD,WAAW,CAAC,CAAC,CAAC,CAACC,KAAM,CAAI,GAAA,CAAA,EACzF,CAAqBD,mBAAAA,EAAAA,WAAW,CAAC,CAAC,CAAC,CAACC,KAAM,CAAA,GAAA,CAAI,CAChD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amboss/design-system",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7-canary-datatable-1",
|
|
4
4
|
"description": "the design system for AMBOSS products",
|
|
5
5
|
"author": "Bagrat Gobedashvili",
|
|
6
6
|
"license": "ISC",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
],
|
|
27
27
|
"husky": {
|
|
28
28
|
"hooks": {
|
|
29
|
-
"pre-
|
|
29
|
+
"pre-commit": "npm run lint",
|
|
30
|
+
"pre-push": "npm run test"
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
"auto": {
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
},
|
|
48
49
|
"engines": {
|
|
49
50
|
"npm": ">=8.10.0",
|
|
50
|
-
"node": "16.
|
|
51
|
+
"node": "16.x.x"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
|
53
54
|
"clean": "rimraf build build-tokens",
|
|
@@ -55,8 +56,8 @@
|
|
|
55
56
|
"prestart": "npm run tokens",
|
|
56
57
|
"start": "npm run tokens:watch & npm run storybook",
|
|
57
58
|
"static": "http-server storybook-static/ -p 6006",
|
|
58
|
-
"storybook": "
|
|
59
|
-
"build-storybook": "npm run tokens &&
|
|
59
|
+
"storybook": "storybook dev -p 6006",
|
|
60
|
+
"build-storybook": "npm run tokens && storybook build",
|
|
60
61
|
"test": "jest",
|
|
61
62
|
"test:watch": "jest --watch",
|
|
62
63
|
"test:coverage": "TZ=Europe/Berlin jest --coverage",
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
"chromatic:master": "npx chromatic --project-token ${CHROMATIC_TOKEN} --auto-accept-changes",
|
|
70
71
|
"lint": "npm run lint:eslint && npm run lint:prettier",
|
|
71
72
|
"lint:eslint": "eslint -c .eslintrc --fix src .storybook",
|
|
72
|
-
"lint:prettier": "prettier --write \"{src,tokens,.storybook}/**/*.(t|j)s*\"
|
|
73
|
+
"lint:prettier": "prettier --write \"{src,tokens,.storybook}/**/*.(t|j)s*\"",
|
|
73
74
|
"component": "DS_ROOT=/src/components DS_COMP_FOLDER=/components node scripts/createComponent/createComponent.js",
|
|
74
75
|
"link-ds": "./scripts/link-ds.sh"
|
|
75
76
|
},
|
|
@@ -114,20 +115,20 @@
|
|
|
114
115
|
"@babel/preset-react": "^7.14.5",
|
|
115
116
|
"@babel/preset-typescript": "^7.15.0",
|
|
116
117
|
"@emotion/babel-plugin": "^11.3.0",
|
|
117
|
-
"@geometricpanda/storybook-addon-badges": "0.
|
|
118
|
+
"@geometricpanda/storybook-addon-badges": "2.0.0",
|
|
118
119
|
"@rollup/plugin-babel": "^6.0.3",
|
|
119
120
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
120
121
|
"@rollup/plugin-json": "^6.0.0",
|
|
121
122
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
122
|
-
"@storybook/addon-a11y": "^
|
|
123
|
-
"@storybook/addon-
|
|
124
|
-
"@storybook/addon-
|
|
125
|
-
"@storybook/addon-links": "^
|
|
126
|
-
"@storybook/
|
|
127
|
-
"@storybook/
|
|
128
|
-
"@storybook/
|
|
129
|
-
"@storybook/react": "^
|
|
130
|
-
"@storybook/theming": "^
|
|
123
|
+
"@storybook/addon-a11y": "^7.0.6",
|
|
124
|
+
"@storybook/addon-essentials": "^7.0.6",
|
|
125
|
+
"@storybook/addon-interactions": "^7.0.6",
|
|
126
|
+
"@storybook/addon-links": "^7.0.6",
|
|
127
|
+
"@storybook/blocks": "^7.0.6",
|
|
128
|
+
"@storybook/manager-api": "^7.0.6",
|
|
129
|
+
"@storybook/react": "^7.0.6",
|
|
130
|
+
"@storybook/react-webpack5": "^7.0.6",
|
|
131
|
+
"@storybook/theming": "^7.0.6",
|
|
131
132
|
"@testing-library/jest-dom": "^5.11.5",
|
|
132
133
|
"@testing-library/react": "^11.1.0",
|
|
133
134
|
"@testing-library/user-event": "^13.0.1",
|
|
@@ -143,6 +144,7 @@
|
|
|
143
144
|
"babel-loader": "^8.1.0",
|
|
144
145
|
"chokidar-cli": "^2.1.0",
|
|
145
146
|
"chromatic": "^5.7.1",
|
|
147
|
+
"copyfiles": "^2.4.1",
|
|
146
148
|
"eslint": "^7.11.0",
|
|
147
149
|
"eslint-config-airbnb": "^18.2.0",
|
|
148
150
|
"eslint-config-prettier": "^7.1.0",
|
|
@@ -162,9 +164,11 @@
|
|
|
162
164
|
"jest": "^26.6.1",
|
|
163
165
|
"jest-junit": "^12.0.0",
|
|
164
166
|
"prettier": "^2.2.1",
|
|
167
|
+
"react": "^17.0.1",
|
|
168
|
+
"react-dom": "^17.0.1",
|
|
165
169
|
"rollup": "^3.21.0",
|
|
166
170
|
"slackify-markdown": "^4.1.0",
|
|
167
|
-
"storybook
|
|
171
|
+
"storybook": "^7.0.6",
|
|
168
172
|
"style-dictionary": "^3.0.1",
|
|
169
173
|
"ts-jest": "^26.4.3",
|
|
170
174
|
"typescript": "^4.1.2",
|