@amboss/design-system 1.12.0 → 1.13.0
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/README.md +19 -15
- package/build/cjs/build-tokens/assets/icons.json.js +4 -1
- package/build/cjs/build-tokens/assets/icons16.json.js +4 -1
- package/build/cjs/build-tokens/visualConfig.js +707 -894
- package/build/cjs/src/components/Badge/Badge.js +5 -5
- package/build/cjs/src/components/Button/Button.js +61 -26
- package/build/cjs/src/components/Callout/Callout.js +30 -14
- package/build/cjs/src/components/Card/Card.js +2 -2
- package/build/cjs/src/components/Card/CardHeader/CardHeader.js +2 -2
- package/build/cjs/src/components/Collapsible/Collapsible.js +8 -8
- package/build/cjs/src/components/Container/Container.js +2 -2
- package/build/cjs/src/components/DataTable/DataTable.js +72 -23
- package/build/cjs/src/components/DataTable/TableBody.js +8 -18
- package/build/cjs/src/components/DataTable/TableCell.js +2 -2
- package/build/cjs/src/components/DataTable/TableHeader.js +7 -10
- package/build/cjs/src/components/Divider/Divider.js +4 -4
- package/build/cjs/src/components/DropdownMenu/DropdownMenu.js +5 -5
- package/build/cjs/src/components/DropdownMenu/MenuItem.js +8 -9
- package/build/cjs/src/components/Form/Checkbox/Checkbox.js +11 -11
- package/build/cjs/src/components/Form/FormLabelText/FormLabelText.js +2 -2
- package/build/cjs/src/components/Form/Input/Input.js +17 -16
- package/build/cjs/src/components/Form/PasswordInput/PasswordInput.js +23 -25
- package/build/cjs/src/components/Form/Radio/Radio.js +9 -9
- package/build/cjs/src/components/Form/RadioButton/RadioButton.js +17 -18
- package/build/cjs/src/components/Form/SegmentedControl/SegmentedControl.js +9 -4
- package/build/cjs/src/components/Form/SegmentedControl/SegmentedControlOption.js +12 -12
- package/build/cjs/src/components/Form/Select/Select.js +9 -9
- package/build/cjs/src/components/Form/Textarea/Textarea.js +5 -5
- package/build/cjs/src/components/Form/Toggle/Toggle.js +13 -13
- package/build/cjs/src/components/Form/ToggleButton/ToggleButton.js +17 -17
- package/build/cjs/src/components/Icon/Icon.js +29 -11
- package/build/cjs/src/components/Link/Link.js +12 -10
- package/build/cjs/src/components/Logo/Logo.js +2 -2
- package/build/cjs/src/components/MediaItem/MediaItem.js +6 -6
- package/build/cjs/src/components/MediaViewerBar/MediaViewerBar.js +5 -5
- package/build/cjs/src/components/Notification/Notification.js +3 -3
- package/build/cjs/src/components/Patterns/Modal/Modal.js +7 -7
- package/build/cjs/src/components/PictogramButton/PictogramButton.js +37 -14
- package/build/cjs/src/components/RoundButton/RoundButton.js +36 -14
- package/build/cjs/src/components/SearchResult/SearchResult.js +10 -10
- package/build/cjs/src/components/SegmentedProgressBar/SegmentedProgressBar.js +8 -6
- package/build/cjs/src/components/Tabs/Tabs.js +72 -68
- package/build/cjs/src/components/Typography/Header/Header.js +8 -8
- package/build/cjs/src/components/Typography/Text/Text.js +15 -4
- package/build/cjs/src/index.js +1 -0
- package/build/esm/build-tokens/assets/icons.json.js +2 -2
- package/build/esm/build-tokens/assets/icons16.json.js +2 -2
- package/build/esm/build-tokens/visualConfig.d.ts +325 -416
- package/build/esm/build-tokens/visualConfig.js +707 -894
- package/build/esm/build-tokens/visualConfig.js.map +1 -1
- package/build/esm/src/components/Badge/Badge.js +5 -5
- package/build/esm/src/components/Badge/Badge.js.map +1 -1
- package/build/esm/src/components/Button/Button.d.ts +1 -0
- package/build/esm/src/components/Button/Button.js +61 -26
- package/build/esm/src/components/Button/Button.js.map +1 -1
- package/build/esm/src/components/Button/mock.d.ts +326 -0
- package/build/esm/src/components/Callout/Callout.js +30 -14
- package/build/esm/src/components/Callout/Callout.js.map +1 -1
- package/build/esm/src/components/Card/Card.js +2 -2
- package/build/esm/src/components/Card/Card.js.map +1 -1
- package/build/esm/src/components/Card/CardHeader/CardHeader.js +2 -2
- package/build/esm/src/components/Card/CardHeader/CardHeader.js.map +1 -1
- package/build/esm/src/components/Collapsible/Collapsible.js +8 -8
- package/build/esm/src/components/Collapsible/Collapsible.js.map +1 -1
- package/build/esm/src/components/Container/Container.js +2 -2
- package/build/esm/src/components/Container/Container.js.map +1 -1
- package/build/esm/src/components/DataTable/DataTable.d.ts +1 -0
- package/build/esm/src/components/DataTable/DataTable.js +72 -24
- package/build/esm/src/components/DataTable/DataTable.js.map +1 -1
- package/build/esm/src/components/DataTable/TableBody.js +8 -18
- package/build/esm/src/components/DataTable/TableBody.js.map +1 -1
- package/build/esm/src/components/DataTable/TableCell.js +2 -2
- package/build/esm/src/components/DataTable/TableCell.js.map +1 -1
- package/build/esm/src/components/DataTable/TableHeader.js +7 -10
- package/build/esm/src/components/DataTable/TableHeader.js.map +1 -1
- package/build/esm/src/components/DataTable/index.d.ts +1 -1
- package/build/esm/src/components/Divider/Divider.js +4 -4
- package/build/esm/src/components/Divider/Divider.js.map +1 -1
- package/build/esm/src/components/DropdownMenu/DropdownMenu.js +5 -5
- package/build/esm/src/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/build/esm/src/components/DropdownMenu/MenuItem.js +8 -9
- package/build/esm/src/components/DropdownMenu/MenuItem.js.map +1 -1
- package/build/esm/src/components/Form/Checkbox/Checkbox.js +11 -11
- package/build/esm/src/components/Form/Checkbox/Checkbox.js.map +1 -1
- package/build/esm/src/components/Form/FormLabelText/FormLabelText.js +2 -2
- package/build/esm/src/components/Form/FormLabelText/FormLabelText.js.map +1 -1
- package/build/esm/src/components/Form/Input/Input.js +17 -16
- package/build/esm/src/components/Form/Input/Input.js.map +1 -1
- package/build/esm/src/components/Form/PasswordInput/PasswordInput.js +23 -25
- package/build/esm/src/components/Form/PasswordInput/PasswordInput.js.map +1 -1
- package/build/esm/src/components/Form/Radio/Radio.js +9 -9
- package/build/esm/src/components/Form/Radio/Radio.js.map +1 -1
- package/build/esm/src/components/Form/RadioButton/RadioButton.d.ts +1 -0
- package/build/esm/src/components/Form/RadioButton/RadioButton.js +17 -18
- package/build/esm/src/components/Form/RadioButton/RadioButton.js.map +1 -1
- package/build/esm/src/components/Form/SegmentedControl/SegmentedControl.js +9 -4
- package/build/esm/src/components/Form/SegmentedControl/SegmentedControl.js.map +1 -1
- package/build/esm/src/components/Form/SegmentedControl/SegmentedControlOption.js +12 -12
- package/build/esm/src/components/Form/SegmentedControl/SegmentedControlOption.js.map +1 -1
- package/build/esm/src/components/Form/Select/Select.js +9 -9
- package/build/esm/src/components/Form/Select/Select.js.map +1 -1
- package/build/esm/src/components/Form/Textarea/Textarea.js +5 -5
- package/build/esm/src/components/Form/Textarea/Textarea.js.map +1 -1
- package/build/esm/src/components/Form/Toggle/Toggle.js +13 -13
- package/build/esm/src/components/Form/Toggle/Toggle.js.map +1 -1
- package/build/esm/src/components/Form/ToggleButton/ToggleButton.js +17 -17
- package/build/esm/src/components/Form/ToggleButton/ToggleButton.js.map +1 -1
- package/build/esm/src/components/Icon/Icon.d.ts +5 -3
- package/build/esm/src/components/Icon/Icon.js +29 -11
- package/build/esm/src/components/Icon/Icon.js.map +1 -1
- package/build/esm/src/components/Link/Link.d.ts +4 -2
- package/build/esm/src/components/Link/Link.js +12 -10
- package/build/esm/src/components/Link/Link.js.map +1 -1
- package/build/esm/src/components/Logo/Logo.js +2 -2
- package/build/esm/src/components/Logo/Logo.js.map +1 -1
- package/build/esm/src/components/MediaItem/MediaItem.js +6 -6
- package/build/esm/src/components/MediaItem/MediaItem.js.map +1 -1
- package/build/esm/src/components/MediaViewerBar/MediaViewerBar.js +5 -5
- package/build/esm/src/components/MediaViewerBar/MediaViewerBar.js.map +1 -1
- package/build/esm/src/components/Notification/Notification.js +3 -3
- package/build/esm/src/components/Notification/Notification.js.map +1 -1
- package/build/esm/src/components/Patterns/Modal/Modal.js +7 -7
- package/build/esm/src/components/Patterns/Modal/Modal.js.map +1 -1
- package/build/esm/src/components/PictogramButton/PictogramButton.js +37 -14
- package/build/esm/src/components/PictogramButton/PictogramButton.js.map +1 -1
- package/build/esm/src/components/RoundButton/RoundButton.js +36 -14
- package/build/esm/src/components/RoundButton/RoundButton.js.map +1 -1
- package/build/esm/src/components/SearchResult/SearchResult.js +10 -10
- package/build/esm/src/components/SearchResult/SearchResult.js.map +1 -1
- package/build/esm/src/components/SegmentedProgressBar/SegmentedProgressBar.js +8 -6
- package/build/esm/src/components/SegmentedProgressBar/SegmentedProgressBar.js.map +1 -1
- package/build/esm/src/components/Tabs/Tabs.d.ts +20 -9
- package/build/esm/src/components/Tabs/Tabs.js +72 -68
- package/build/esm/src/components/Tabs/Tabs.js.map +1 -1
- package/build/esm/src/components/Typography/Header/Header.js +8 -8
- package/build/esm/src/components/Typography/Header/Header.js.map +1 -1
- package/build/esm/src/components/Typography/Text/Text.d.ts +3 -1
- package/build/esm/src/components/Typography/Text/Text.js +15 -4
- package/build/esm/src/components/Typography/Text/Text.js.map +1 -1
- package/build/esm/src/index.js +1 -1
- package/build/esm/src/types/index.d.ts +10 -0
- package/package.json +9 -6
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TextAlignment, TextVariations, TextSize, MQ, Hyphens } from "../../../types";
|
|
2
|
+
import { TextAlignment, TextVariations, TextColors, TextSize, MQ, Hyphens } from "../../../types";
|
|
3
3
|
export declare type TextProps = {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
size?: TextSize;
|
|
6
6
|
weight?: "normal" | "bold" | "black" | "inherit";
|
|
7
7
|
transform?: "none" | "capitalize" | "uppercase" | "lowercase";
|
|
8
8
|
as?: "p" | "span";
|
|
9
|
+
/** @deprecated variant property is deprecated now. Please use color prop. */
|
|
9
10
|
variant?: TextVariations;
|
|
11
|
+
color?: TextColors;
|
|
10
12
|
align?: TextAlignment;
|
|
11
13
|
hyphens?: Hyphens | MQ<Hyphens>;
|
|
12
14
|
"data-e2e-test-id"?: string;
|
|
@@ -7,7 +7,7 @@ const defaultProps = {
|
|
|
7
7
|
weight: "normal",
|
|
8
8
|
transform: "none",
|
|
9
9
|
as: "p",
|
|
10
|
-
|
|
10
|
+
color: "primary",
|
|
11
11
|
align: "left",
|
|
12
12
|
hyphens: "none",
|
|
13
13
|
"data-e2e-test-id": undefined,
|
|
@@ -28,7 +28,8 @@ const Text = /*#__PURE__*/_styled("p", process.env.NODE_ENV === "production" ? {
|
|
|
28
28
|
size,
|
|
29
29
|
transform,
|
|
30
30
|
hyphens,
|
|
31
|
-
variant
|
|
31
|
+
variant,
|
|
32
|
+
color
|
|
32
33
|
} = _ref;
|
|
33
34
|
return {
|
|
34
35
|
fontFamily: theme.variables.fontFamily.lato,
|
|
@@ -36,7 +37,17 @@ const Text = /*#__PURE__*/_styled("p", process.env.NODE_ENV === "production" ? {
|
|
|
36
37
|
textTransform: transform,
|
|
37
38
|
textAlign: align,
|
|
38
39
|
fontWeight: theme.variables.weight[weight],
|
|
39
|
-
color: theme.values.color.text[
|
|
40
|
+
color: theme.values.color.text[color].default,
|
|
41
|
+
// variant is deprecated and it should be deleted asap
|
|
42
|
+
...(variant && {
|
|
43
|
+
color: theme.values.color.text[variant].default,
|
|
44
|
+
...(variant === "primary" && {
|
|
45
|
+
color: theme.values.color.text.accent.default
|
|
46
|
+
}),
|
|
47
|
+
...(variant === "secondary" && {
|
|
48
|
+
color: theme.values.color.text.primary.default
|
|
49
|
+
})
|
|
50
|
+
}),
|
|
40
51
|
fontSize: theme.variables.size.font.text[size],
|
|
41
52
|
lineHeight: theme.variables.size.lineHeight.text[size],
|
|
42
53
|
...mq({
|
|
@@ -47,7 +58,7 @@ const Text = /*#__PURE__*/_styled("p", process.env.NODE_ENV === "production" ? {
|
|
|
47
58
|
}]
|
|
48
59
|
})
|
|
49
60
|
};
|
|
50
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
61
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRleHQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBDb0IiLCJmaWxlIjoiVGV4dC50c3gi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gYXNhcFxuICAgICAgLi4uKHZhcmlhbnQgJiYge1xuICAgICAgICBjb2xvcjogdGhlbWUudmFsdWVzLmNvbG9yLnRleHRbdmFyaWFudF0uZGVmYXVsdCxcbiAgICAgICAgLi4uKHZhcmlhbnQgPT09IFwicHJpbWFyeVwiICYmIHtcbiAgICAgICAgICBjb2xvcjogdGhlbWUudmFsdWVzLmNvbG9yLnRleHQuYWNjZW50LmRlZmF1bHQsXG4gICAgICAgIH0pLFxuICAgICAgICAuLi4odmFyaWFudCA9PT0gXCJzZWNvbmRhcnlcIiAmJiB7XG4gICAgICAgICAgY29sb3I6IHRoZW1lLnZhbHVlcy5jb2xvci50ZXh0LnByaW1hcnkuZGVmYXVsdCxcbiAgICAgICAgfSksXG4gICAgICB9KSxcblxuICAgICAgZm9udFNpemU6IHRoZW1lLnZhcmlhYmxlcy5zaXplLmZvbnQudGV4dFtzaXplXSxcbiAgICAgIGxpbmVIZWlnaHQ6IHRoZW1lLnZhcmlhYmxlcy5zaXplLmxpbmVIZWlnaHQudGV4dFtzaXplXSxcbiAgICAgIC4uLm1xKHtcbiAgICAgICAgaHlwaGVuczogW2h5cGhlbnMsIHsgbm9uZTogXCJub25lXCIsIGF1dG86IFwiYXV0b1wiLCBtYW51YWw6IFwibWFudWFsXCIgfV0sXG4gICAgICB9KSxcbiAgICB9IGFzIENTU09iamVjdClcbik7XG5cblRleHQuZGVmYXVsdFByb3BzID0gZGVmYXVsdFByb3BzO1xuIl19 */");
|
|
51
62
|
Text.defaultProps = defaultProps;
|
|
52
63
|
|
|
53
64
|
export { Text };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../../../../src/components/Typography/Text/Text.tsx"],"sourcesContent":["import React from \"react\";\nimport styled, { CSSObject } from \"@emotion/styled\";\nimport isPropValid from \"@emotion/is-prop-valid\";\nimport { mq } from \"../../../shared/mediaQueries\";\n\nimport {\n TextAlignment,\n TextVariations,\n TextSize,\n MQ,\n Hyphens,\n} from \"../../../types\";\n\nexport type TextProps = {\n children: React.ReactNode;\n size?: TextSize;\n weight?: \"normal\" | \"bold\" | \"black\" | \"inherit\";\n transform?: \"none\" | \"capitalize\" | \"uppercase\" | \"lowercase\";\n as?: \"p\" | \"span\";\n variant?: TextVariations;\n align?: TextAlignment;\n hyphens?: Hyphens | MQ<Hyphens>;\n \"data-e2e-test-id\"?: string;\n /** @ignore */\n \"data-ds-id\"?: string;\n};\n\nconst defaultProps: Partial<TextProps> = {\n size: \"m\",\n weight: \"normal\",\n transform: \"none\",\n as: \"p\",\n
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../../../src/components/Typography/Text/Text.tsx"],"sourcesContent":["import React from \"react\";\nimport styled, { CSSObject } from \"@emotion/styled\";\nimport isPropValid from \"@emotion/is-prop-valid\";\nimport { mq } from \"../../../shared/mediaQueries\";\n\nimport {\n TextAlignment,\n TextVariations,\n TextColors,\n TextSize,\n MQ,\n Hyphens,\n} from \"../../../types\";\n\nexport type TextProps = {\n children: React.ReactNode;\n size?: TextSize;\n weight?: \"normal\" | \"bold\" | \"black\" | \"inherit\";\n transform?: \"none\" | \"capitalize\" | \"uppercase\" | \"lowercase\";\n as?: \"p\" | \"span\";\n /** @deprecated variant property is deprecated now. Please use color prop. */\n variant?: TextVariations;\n color?: TextColors;\n align?: TextAlignment;\n hyphens?: Hyphens | MQ<Hyphens>;\n \"data-e2e-test-id\"?: string;\n /** @ignore */\n \"data-ds-id\"?: string;\n};\n\nconst defaultProps: Partial<TextProps> = {\n size: \"m\",\n weight: \"normal\",\n transform: \"none\",\n as: \"p\",\n color: \"primary\",\n align: \"left\",\n hyphens: \"none\",\n \"data-e2e-test-id\": undefined,\n \"data-ds-id\": \"Text\",\n};\n\nexport const Text = styled(\"p\", {\n shouldForwardProp: (prop: string) =>\n isPropValid(prop) && prop !== \"transform\",\n})<TextProps>(\n ({ theme, align, weight, size, transform, hyphens, variant, color }) =>\n ({\n fontFamily: theme.variables.fontFamily.lato,\n margin: 0,\n textTransform: transform,\n textAlign: align,\n fontWeight: theme.variables.weight[weight],\n color: theme.values.color.text[color].default,\n\n // variant is deprecated and it should be deleted asap\n ...(variant && {\n color: theme.values.color.text[variant].default,\n ...(variant === \"primary\" && {\n color: theme.values.color.text.accent.default,\n }),\n ...(variant === \"secondary\" && {\n color: theme.values.color.text.primary.default,\n }),\n }),\n\n fontSize: theme.variables.size.font.text[size],\n lineHeight: theme.variables.size.lineHeight.text[size],\n ...mq({\n hyphens: [hyphens, { none: \"none\", auto: \"auto\", manual: \"manual\" }],\n }),\n } as CSSObject)\n);\n\nText.defaultProps = defaultProps;\n"],"names":["defaultProps","size","weight","transform","as","color","align","hyphens","undefined","Text","_styled","process","env","NODE_ENV","shouldForwardProp","prop","isPropValid","target","label","_ref","theme","variant","fontFamily","variables","lato","margin","textTransform","textAlign","fontWeight","values","text","default","accent","primary","fontSize","font","lineHeight","mq","none","auto","manual"],"mappings":";;;;AA8BA,MAAMA,YAAgC,GAAG;AACvCC,EAAAA,IAAI,EAAE,GAAG;AACTC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,SAAS,EAAE,MAAM;AACjBC,EAAAA,EAAE,EAAE,GAAG;AACPC,EAAAA,KAAK,EAAE,SAAS;AAChBC,EAAAA,KAAK,EAAE,MAAM;AACbC,EAAAA,OAAO,EAAE,MAAM;AACf,EAAA,kBAAkB,EAAEC,SAAS;AAC7B,EAAA,YAAY,EAAE,MAAA;AAChB,CAAC,CAAA;AAEM,MAAMC,IAAI,gBAAGC,OAAA,CAAO,GAAG,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,KAAA,YAAA,GAAA;EAC5BC,iBAAiB,EAAGC,IAAY,IAC9BC,WAAW,CAACD,IAAI,CAAC,IAAIA,IAAI,KAAK,WAAW;EAAAE,MAAA,EAAA,UAAA;AAAA,CAAA,GAAA;EAD3CH,iBAAiB,EAAGC,IAAY,IAC9BC,WAAW,CAACD,IAAI,CAAC,IAAIA,IAAI,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,CAACmC,UAAU,CAACN,IAAI,CAAC7B,IAAI,CAAC;AACtD,IAAA,GAAGoC,EAAE,CAAC;MACJ9B,OAAO,EAAE,CAACA,OAAO,EAAE;AAAE+B,QAAAA,IAAI,EAAE,MAAM;AAAEC,QAAAA,IAAI,EAAE,MAAM;AAAEC,QAAAA,MAAM,EAAE,QAAA;OAAU,CAAA;KACpE,CAAA;GACF,CAAA;AAAA,CAAc,EAAA7B,OAAA,CAAAC,GAAA,CAAAC,QAAA,8oGACnB,EAAC;AAEDJ,IAAI,CAACT,YAAY,GAAGA,YAAY;;;;"}
|
package/build/esm/src/index.js
CHANGED
|
@@ -46,7 +46,7 @@ export { Pagination } from './components/Pagination/Pagination.js';
|
|
|
46
46
|
export { SegmentedControl } from './components/Form/SegmentedControl/SegmentedControl.js';
|
|
47
47
|
export { Input } from './components/Form/Input/Input.js';
|
|
48
48
|
export { PasswordInput } from './components/Form/PasswordInput/PasswordInput.js';
|
|
49
|
-
export { DataTable } from './components/DataTable/DataTable.js';
|
|
49
|
+
export { BaseDataTable, DataTable } from './components/DataTable/DataTable.js';
|
|
50
50
|
export { useDataTableSort } from './components/DataTable/useDataTableSort.js';
|
|
51
51
|
|
|
52
52
|
const {
|
|
@@ -4,6 +4,8 @@ export declare const LinkTextSizeRuntype: Union<[Literal<"xs">, Literal<"s">, Li
|
|
|
4
4
|
export declare type LinkTextSize = Static<typeof LinkTextSizeRuntype>;
|
|
5
5
|
export declare const TextSizeRuntype: Union<[Literal<"xs">, Literal<"s">, Literal<"m">]>;
|
|
6
6
|
export declare type TextSize = Static<typeof TextSizeRuntype>;
|
|
7
|
+
export declare const BorderRadiusRuntype: Union<[Literal<"xs">, Literal<"s">, Literal<"m">]>;
|
|
8
|
+
export declare type BorderRadius = Static<typeof BorderRadiusRuntype>;
|
|
7
9
|
export declare const TextAlignmentRuntype: Union<[Literal<"left">, Literal<"right">, Literal<"center">]>;
|
|
8
10
|
export declare type TextAlignment = Static<typeof TextAlignmentRuntype>;
|
|
9
11
|
export declare const HorizontalAlignmentRuntype: Union<[Literal<"left">, Literal<"right">, Literal<"center">, Literal<"spaceBetween">]>;
|
|
@@ -19,15 +21,23 @@ export declare type ColumnAlignment = Static<typeof ColumnAlignmentRunType>;
|
|
|
19
21
|
export declare const OrderRuntype: Union<[Literal<"first">, Literal<"last">, Literal<"unset">]>;
|
|
20
22
|
export declare type Order = Static<typeof OrderRuntype>;
|
|
21
23
|
export declare const BaseVariationsRuntype: Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>;
|
|
24
|
+
export declare const BaseColorsRuntype: Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"accent">]>;
|
|
22
25
|
export declare type BaseVariations = Static<typeof BaseVariationsRuntype>;
|
|
26
|
+
export declare type BaseColors = Static<typeof BaseColorsRuntype>;
|
|
27
|
+
declare const TextColorsRuntype: Union<[Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"accent">]>, Literal<"info">, Literal<"error">, Literal<"warning">]>;
|
|
28
|
+
export declare type TextColors = Static<typeof TextColorsRuntype>;
|
|
23
29
|
declare const TextVariationsRuntype: Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"info">, Literal<"error">, Literal<"warning">]>;
|
|
24
30
|
export declare type TextVariations = Static<typeof TextVariationsRuntype>;
|
|
31
|
+
declare const IconsColorsRuntime: Union<[Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"accent">]>, Literal<"info">, Literal<"error">, Literal<"warning">, Literal<"inherit">, Literal<"brand">]>;
|
|
32
|
+
export declare type IconsColors = Static<typeof IconsColorsRuntime>;
|
|
25
33
|
declare const IconsVariationsRuntype: Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"info">, Literal<"error">, Literal<"warning">, Literal<"inherit">, Literal<"brand">]>;
|
|
26
34
|
export declare type IconsVariations = Static<typeof IconsVariationsRuntype>;
|
|
27
35
|
declare const CalloutVariationsRuntype: Union<[Literal<"info">, Literal<"success">, Literal<"error">, Literal<"warning">]>;
|
|
28
36
|
export declare type CalloutVariations = Static<typeof CalloutVariationsRuntype>;
|
|
29
37
|
declare const LinkVariationsRuntype: Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>]>;
|
|
30
38
|
export declare type LinkVariations = Static<typeof LinkVariationsRuntype>;
|
|
39
|
+
declare const LinkColorsRuntype: Union<[Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"accent">]>]>;
|
|
40
|
+
export declare type LinkColors = Static<typeof LinkColorsRuntype>;
|
|
31
41
|
export declare type MQ<T> = [T, T?, T?];
|
|
32
42
|
declare const ButtonSizeRuntype: Union<[Literal<"s">, Literal<"m">, Literal<"l">]>;
|
|
33
43
|
export declare type ButtonSize = Static<typeof ButtonSizeRuntype>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amboss/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "the design system for AMBOSS products",
|
|
5
5
|
"author": "Bagrat Gobedashvili",
|
|
6
6
|
"license": "ISC",
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
"{src,tokens,.storybook,test-utils}/**/*.{js,jsx,ts,tsx}": [
|
|
29
29
|
"prettier --write",
|
|
30
30
|
"eslint --fix"
|
|
31
|
+
],
|
|
32
|
+
"{src,tokens,.storybook,test-utils}/**/*.mdx": [
|
|
33
|
+
"prettier --write"
|
|
31
34
|
]
|
|
32
35
|
},
|
|
33
36
|
"auto": {
|
|
@@ -65,12 +68,12 @@
|
|
|
65
68
|
"tokens": "node style-dictionary/style-dictionary.build.js",
|
|
66
69
|
"tokens:watch": "chokidar \"tokens/**/*.json\" -c \"npm run tokens\"",
|
|
67
70
|
"tokens:prettier": "prettier --write \"build-tokens/*.(t|j)s*\"",
|
|
68
|
-
"chromatic": "npx chromatic --project-token ${CHROMATIC_TOKEN} --exit-zero-on-changes",
|
|
69
|
-
"chromatic:ci": "npx chromatic --project-token ${CHROMATIC_TOKEN} --skip 'dependabot/**' --exit-zero-on-changes",
|
|
70
|
-
"chromatic:master": "npx chromatic --project-token ${CHROMATIC_TOKEN} --auto-accept-changes",
|
|
71
|
+
"chromatic": "npx chromatic --project-token ${CHROMATIC_TOKEN} --exit-zero-on-changes --only-changed",
|
|
72
|
+
"chromatic:ci": "npx chromatic --project-token ${CHROMATIC_TOKEN} --skip 'dependabot/**' --exit-zero-on-changes --only-changed",
|
|
73
|
+
"chromatic:master": "npx chromatic --project-token ${CHROMATIC_TOKEN} --auto-accept-changes --only-changed",
|
|
71
74
|
"lint": "npm run lint:eslint && npm run lint:prettier",
|
|
72
75
|
"lint:eslint": "eslint -c .eslintrc --fix src .storybook test-utils",
|
|
73
|
-
"lint:prettier": "prettier --write \"{src,tokens,.storybook,test-utils}/**/*.
|
|
76
|
+
"lint:prettier": "prettier --write \"{src,tokens,.storybook,test-utils}/**/*.{js,jsx,ts,tsx,mdx}\"",
|
|
74
77
|
"component": "DS_ROOT=/src/components DS_COMP_FOLDER=/components node scripts/createComponent/createComponent.js",
|
|
75
78
|
"link-ds": "./scripts/link-ds.sh",
|
|
76
79
|
"prepare": "husky install"
|
|
@@ -156,7 +159,7 @@
|
|
|
156
159
|
"eslint-plugin-prettier": "^3.1.4",
|
|
157
160
|
"eslint-plugin-react": "^7.20.0",
|
|
158
161
|
"eslint-plugin-react-hooks": "^4.0.4",
|
|
159
|
-
"feather-icons": "^4.
|
|
162
|
+
"feather-icons": "^4.29.0",
|
|
160
163
|
"html-webpack-plugin": "^5.5.0",
|
|
161
164
|
"http-server": "^14.1.1",
|
|
162
165
|
"husky": "^8.0.3",
|