acinguiux-ds-react-framework 0.0.3 → 0.0.4
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/CHANGELOG.md +5 -3
- package/README.md +111 -2
- package/build/esm/components/Card/Card.styles.js +11 -12
- package/build/esm/components/Table/components/TableElements/SorterButton.js +41 -21
- package/build/esm/react-base/src/components/Text/components/Display/Display.styles.js +10 -7
- package/build/esm/react-base/src/components/Text/components/Display/Display.utils.js +11 -10
- package/build/esm/react-base/src/components/Text/components/Heading/Heading.styles.js +5 -5
- package/build/esm/react-base/src/components/Text/components/Heading/Heading.utils.js +9 -10
- package/build/esm/react-base/src/components/Text/components/Label/Label.styles.js +9 -6
- package/build/esm/react-base/src/components/Text/components/Label/Label.utils.js +11 -12
- package/build/esm/react-base/src/components/Text/components/Text/Text.utils.js +23 -26
- package/package.json +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# acinguiux-ds-react-framework
|
|
2
2
|
|
|
3
|
-
## 0.0.
|
|
3
|
+
## 12.0.0-next-major.20
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#3142](https://github.com/acinguiux-ds-react-framework/pull/3142) [`90adfc0d`](https://github.com/acinguiux-ds-react-framework/commit/90adfc0dd507ddc3f37efa7a6e434df1a46b0d5e) Thanks [@Wyrobowa](https://github.com/Wyrobowa)! - feat(react-framework): add styles to sorter button
|
|
8
|
+
|
|
9
|
+
## 11.3.0-beta.10
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# acinguiux Design System - React Framework
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Welcome to the
|
|
5
|
+
Welcome to the acinguiux Design System React Framework, a collection of reusable components written in ReactJS. You can explore these components on our [Storybook page](https://acinguiux-ds-react-framework.azurewebsites.net/).
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
@@ -13,3 +13,112 @@ Welcome to the Acinguiux Design System React Framework, a collection of reusable
|
|
|
13
13
|
5. [Transpiling](#transpiling)
|
|
14
14
|
|
|
15
15
|
---
|
|
16
|
+
|
|
17
|
+
## Documentation
|
|
18
|
+
|
|
19
|
+
Our comprehensive documentation is available in the [GitHub Wiki](https://github.com/acinguiux-ds-react-framework/wiki).
|
|
20
|
+
We provide a Storybook page to showcase and document our components:
|
|
21
|
+
- beta (release/minor_patch branch): [https://acinguiux-ds-minor-patch-react-framework.azurewebsites.net/](https://acinguiux-ds-minor-patch-react-framework.azurewebsites.net/)
|
|
22
|
+
- next-major (release/major branch): [https://acinguiux-ds-major-react-framework.azurewebsites.net/](https://acinguiux-ds-major-react-framework.azurewebsites.net/)
|
|
23
|
+
- stable (main branch): [https://acinguiux-ds-react-framework.azurewebsites.net/](https://acinguiux-ds-react-framework.azurewebsites.net/)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
To use the acinguiux Design System React Framework in your project, follow these steps:
|
|
30
|
+
|
|
31
|
+
### Step 1: Generate GitHub Token
|
|
32
|
+
|
|
33
|
+
1. Go to [GitHub Tokens](https://github.com/settings/tokens)or navigate to GitHub Settings => Developer Settings => Personal Access Tokens.
|
|
34
|
+
2. Generate a new token with at least the repo and read:packages scopes.
|
|
35
|
+
3. Copy the token and, if prompted, configure SSO authorization in the `sede-x` organization.
|
|
36
|
+
|
|
37
|
+
Add the token to the file `~/.npmrc` (if it does not exist, create it):
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
//npm.pkg.github.com/:_authToken=YOUR_TOKEN_HERE
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If you do not have access to this file or you are in a Windows OS, you can run the following command:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
npm login --scope=@sede-x --registry=https://npm.pkg.github.com
|
|
47
|
+
> Username: USERNAME
|
|
48
|
+
> Password: TOKEN
|
|
49
|
+
> Email: PUBLIC-EMAIL-ADDRESS
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Step 2: Update NPM Registry
|
|
53
|
+
|
|
54
|
+
Update your npm registry. Create or edit a `.npmrc` file in your project root folder and add:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
@sede-x:registry=https://npm.pkg.github.com
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Your other dependencies will still be downloaded from the default npm registry.
|
|
61
|
+
|
|
62
|
+
### Step 3: Install the Framework
|
|
63
|
+
|
|
64
|
+
Run the following command:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
npm install --save acinguiux-ds-react-framework
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Step 4: Add Fonts
|
|
71
|
+
|
|
72
|
+
Add the following font link to your `index.html`:
|
|
73
|
+
|
|
74
|
+
```html
|
|
75
|
+
<link href="https://acinguiux-fonts.azureedge.net/index.css" rel="stylesheet">
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Step 5: Theme Provider
|
|
79
|
+
|
|
80
|
+
In your app entry point (e.g., `src/App.tsx` for Create React App), add the following snippet:
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
import React, { ReactElement } from 'react';
|
|
84
|
+
import { acinguiuxThemeProvider } from 'acinguiux-ds-react-framework';
|
|
85
|
+
|
|
86
|
+
function App(): ReactElement {
|
|
87
|
+
return <acinguiuxThemeProvider theme="light"><!-- Your app content --></acinguiuxThemeProvider>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export default App;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Choose between the light and dark themes.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Commands
|
|
98
|
+
|
|
99
|
+
- `pnpm start`: launches the Storybook app
|
|
100
|
+
- `pnpm test`: runs tests for all `*.test.ts?x` files
|
|
101
|
+
- `pnpm test:watch`: watches all `*.test.ts?x` files and runs tests on each change
|
|
102
|
+
- `pnpm build`: builds the application for distribution as a NPM package
|
|
103
|
+
- `pnpm lint`: runs TS and Styled Component linters
|
|
104
|
+
- `pnpm format`: formats all files based on Prettier configurations
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Support
|
|
109
|
+
|
|
110
|
+
For support or inquiries, please contact the acinguiux Design System Team:
|
|
111
|
+
|
|
112
|
+
- [GitHub issues page](https://github.com/acinguiux-ds-react-framework/issues)
|
|
113
|
+
- [SDS Teams channel](https://teams.microsoft.com/l/channel/19%3Aac0e8c95a3c840c2a1095a7440206c51%40thread.tacv2/Questions?groupId=dd072cdc-70c5-4aaf-a665-284c4fdeef4d&tenantId=db1e96a8-a3da-442a-930b-235cac24cd5c)
|
|
114
|
+
- [mail: GX-GL-acinguiuxDesignSystemTeam@acinguiux.com](mailto:GX-GL-acinguiuxDesignSystemTeam@acinguiux.com)
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Transpiling
|
|
119
|
+
|
|
120
|
+
Transpiling documentation can be found in the [root README.md file](../../README.md).
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
> See root README here: https://github.com/acinguiux-ds-react-framework/README.md
|
|
@@ -2,14 +2,13 @@ import n, { css as o } from "styled-components";
|
|
|
2
2
|
import { Directions as l, Sizes as s } from "../../react-base/src/consts.js";
|
|
3
3
|
import { consts as t } from "../../react-base/src/components/Card/Card.consts.js";
|
|
4
4
|
const c = n.div`
|
|
5
|
-
${({ size: r, $elevated: a, $direction:
|
|
5
|
+
${({ size: r, $elevated: a, $direction: i, $isClickable: e, theme: d }) => o`
|
|
6
6
|
display: flex;
|
|
7
|
-
flex-direction: ${
|
|
7
|
+
flex-direction: ${i === l.Vertical ? "column" : "row"};
|
|
8
8
|
width: 100%;
|
|
9
|
-
background-color: ${
|
|
10
|
-
border: 1px solid ${
|
|
9
|
+
background-color: ${d.onSurface.surface.default.background};
|
|
10
|
+
border: 1px solid ${d.onSurface.surface.default.border.subtle};
|
|
11
11
|
transition: box-shadow 0.3s ease;
|
|
12
|
-
overflow: hidden;
|
|
13
12
|
|
|
14
13
|
${r && o`
|
|
15
14
|
border-radius: ${t[r].borderRadius};
|
|
@@ -17,7 +16,7 @@ const c = n.div`
|
|
|
17
16
|
|
|
18
17
|
${a && o`
|
|
19
18
|
border: none;
|
|
20
|
-
box-shadow: ${
|
|
19
|
+
box-shadow: ${d.elevation.level1};
|
|
21
20
|
`}
|
|
22
21
|
|
|
23
22
|
${e && o`
|
|
@@ -26,16 +25,16 @@ const c = n.div`
|
|
|
26
25
|
cursor: pointer;
|
|
27
26
|
|
|
28
27
|
&:hover {
|
|
29
|
-
box-shadow: ${
|
|
28
|
+
box-shadow: ${d.elevation.level2};
|
|
30
29
|
}
|
|
31
30
|
`}
|
|
32
31
|
|
|
33
32
|
&:focus-visible {
|
|
34
|
-
outline: 3px solid ${
|
|
33
|
+
outline: 3px solid ${d.additional.focus.subtle};
|
|
35
34
|
}
|
|
36
35
|
`}
|
|
37
36
|
`, $ = n(c)`
|
|
38
|
-
${({ size: r = s.Medium, backgroundImage: a, $interactive:
|
|
37
|
+
${({ size: r = s.Medium, backgroundImage: a, $interactive: i }) => o`
|
|
39
38
|
overflow: hidden;
|
|
40
39
|
position: relative;
|
|
41
40
|
align-items: flex-end;
|
|
@@ -58,14 +57,14 @@ const c = n.div`
|
|
|
58
57
|
transition: all 0.5s;
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
${
|
|
60
|
+
${i && o`
|
|
62
61
|
&:hover::before {
|
|
63
62
|
transform: scale(1.05);
|
|
64
63
|
}
|
|
65
64
|
`}
|
|
66
65
|
`}
|
|
67
66
|
`, g = n.div`
|
|
68
|
-
${({ size: r, padding: a, bgColor:
|
|
67
|
+
${({ size: r, padding: a, bgColor: i, theme: e }) => o`
|
|
69
68
|
${e.paragraph.medium.normal};
|
|
70
69
|
display: grid;
|
|
71
70
|
flex-grow: 1;
|
|
@@ -76,7 +75,7 @@ const c = n.div`
|
|
|
76
75
|
padding: ${t[r].padding};
|
|
77
76
|
`}
|
|
78
77
|
|
|
79
|
-
${
|
|
78
|
+
${i && o`
|
|
80
79
|
background-color: ${e.onSurface.base.default.background};
|
|
81
80
|
`}
|
|
82
81
|
|
|
@@ -1,34 +1,54 @@
|
|
|
1
|
-
import { jsx as r, jsxs as i, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as i, Fragment as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c, useMemo as S } from "react";
|
|
3
|
+
import u, { css as l } from "styled-components";
|
|
4
|
+
import { useTable as p } from "../../hooks/useTable.js";
|
|
5
|
+
import d from "../../../Icon/components/ArrowDown.js";
|
|
6
|
+
import f from "../../../Icon/components/ArrowUp.js";
|
|
6
7
|
import _ from "../../../Icon/components/ChevronUpDown.js";
|
|
7
|
-
import { getSize as
|
|
8
|
-
import
|
|
9
|
-
import { Sizes as A, TABLE_SORTER_BUTTON_CLASS as C,
|
|
10
|
-
const
|
|
8
|
+
import { getSize as h } from "../../utils/tableUtils.js";
|
|
9
|
+
import m from "../../../Button/Button.js";
|
|
10
|
+
import { Sizes as A, TABLE_SORTER_BUTTON_CLASS as C, TABLE_ASC_ICON_CLASS as N, TABLE_DESC_ICON_CLASS as T, Variants as b, TABLE_NO_DIR_ICON_CLASS as w } from "../../../../react-base/src/consts.js";
|
|
11
|
+
const B = u(m)`
|
|
12
|
+
${({ theme: o }) => l`
|
|
13
|
+
background-color: ${o.focus.extraSubtle};
|
|
14
|
+
|
|
15
|
+
&:hover:not(:disabled) {
|
|
16
|
+
background-color: ${o.focus.subtle};
|
|
17
|
+
}
|
|
18
|
+
`}
|
|
19
|
+
`, $ = c(
|
|
11
20
|
({ sortDirection: o, ...t }, e) => {
|
|
12
|
-
const { size:
|
|
13
|
-
|
|
14
|
-
h,
|
|
15
|
-
{
|
|
21
|
+
const { size: s = A.Medium } = p(), a = S(
|
|
22
|
+
() => ({
|
|
16
23
|
className: C,
|
|
17
24
|
"aria-label": "Sorter button",
|
|
18
|
-
size:
|
|
19
|
-
variant: c.Transparent,
|
|
25
|
+
size: h(s),
|
|
20
26
|
iconOnly: !0,
|
|
21
|
-
icon: /* @__PURE__ */ i(a, { children: [
|
|
22
|
-
o === "asc" && /* @__PURE__ */ r(p, { className: l, width: 16, height: 16 }),
|
|
23
|
-
o === "desc" && /* @__PURE__ */ r(S, { className: N, width: 16, height: 16 }),
|
|
24
|
-
!o && /* @__PURE__ */ r(_, { className: T, width: 16, height: 16 })
|
|
25
|
-
] }),
|
|
26
27
|
ref: e,
|
|
27
28
|
...t
|
|
29
|
+
}),
|
|
30
|
+
[s, e, t]
|
|
31
|
+
);
|
|
32
|
+
return o === "asc" || o === "desc" ? /* @__PURE__ */ r(
|
|
33
|
+
B,
|
|
34
|
+
{
|
|
35
|
+
icon: /* @__PURE__ */ i(n, { children: [
|
|
36
|
+
o === "asc" && /* @__PURE__ */ r(f, { className: N, width: 16, height: 16 }),
|
|
37
|
+
o === "desc" && /* @__PURE__ */ r(d, { className: T, width: 16, height: 16 })
|
|
38
|
+
] }),
|
|
39
|
+
...a
|
|
40
|
+
}
|
|
41
|
+
) : /* @__PURE__ */ r(
|
|
42
|
+
m,
|
|
43
|
+
{
|
|
44
|
+
...a,
|
|
45
|
+
variant: b.Transparent,
|
|
46
|
+
icon: /* @__PURE__ */ r(_, { className: w, width: 16, height: 16 }),
|
|
47
|
+
...t
|
|
28
48
|
}
|
|
29
49
|
);
|
|
30
50
|
}
|
|
31
51
|
);
|
|
32
52
|
export {
|
|
33
|
-
|
|
53
|
+
$ as SorterButton
|
|
34
54
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { css as o } from "styled-components";
|
|
2
|
-
import { consts as
|
|
3
|
-
import { font as
|
|
2
|
+
import { consts as f } from "../Text/Text.consts.js";
|
|
3
|
+
import { font as i } from "./Display.utils.js";
|
|
4
4
|
const p = o`
|
|
5
|
-
${({ theme: t, level:
|
|
6
|
-
${
|
|
5
|
+
${({ theme: t, level: m, bold: s, gutter: a, prominence: r }) => o`
|
|
6
|
+
${i(m, t, s)}
|
|
7
7
|
margin-top: 0;
|
|
8
8
|
margin-bottom: 0;
|
|
9
|
-
color: ${t.onSurface.surface.default.text.strong};
|
|
10
9
|
|
|
11
|
-
${
|
|
12
|
-
|
|
10
|
+
${r && o`
|
|
11
|
+
color: ${t.onSurface.surface.default.text[r]};
|
|
12
|
+
`}
|
|
13
|
+
|
|
14
|
+
${a && o`
|
|
15
|
+
margin-bottom: ${f.gutter.display};
|
|
13
16
|
`}
|
|
14
17
|
`}
|
|
15
18
|
`;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { TextElementTypes as
|
|
2
|
-
import { getType as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
import { TextElementTypes as p } from "../../../../consts.js";
|
|
2
|
+
import { getType as s } from "../Text/Text.utils.js";
|
|
3
|
+
const a = (r, n, o) => o ? n.display[r].demi : n.display[r].normal, f = ({ level: r = 1, prominence: n, type: o = p.Span, ...t }) => {
|
|
4
|
+
const e = s(o);
|
|
5
5
|
return {
|
|
6
|
-
level:
|
|
7
|
-
type:
|
|
8
|
-
innerType:
|
|
9
|
-
|
|
6
|
+
level: r,
|
|
7
|
+
type: o,
|
|
8
|
+
innerType: e,
|
|
9
|
+
prominence: n,
|
|
10
|
+
...t
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
a as font,
|
|
15
|
+
f as useProps
|
|
15
16
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css as t } from "styled-components";
|
|
2
2
|
import { consts as a } from "../Text/Text.consts.js";
|
|
3
|
-
import { fontBold as
|
|
4
|
-
const
|
|
5
|
-
${({ innerLevel: o, gutter: m, bold:
|
|
6
|
-
${
|
|
3
|
+
import { fontBold as s, fontNormal as c } from "./Heading.utils.js";
|
|
4
|
+
const p = t`
|
|
5
|
+
${({ innerLevel: o, gutter: m, bold: r, prominence: f, theme: $ }) => t`
|
|
6
|
+
${r ? s(o, $) : c(o, $)}
|
|
7
7
|
margin: unset;
|
|
8
8
|
|
|
9
9
|
${f && t`
|
|
@@ -24,5 +24,5 @@ const b = t`
|
|
|
24
24
|
`}
|
|
25
25
|
`;
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
p as Styles
|
|
28
28
|
};
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { getType as
|
|
1
|
+
import { getType as f } from "../Text/Text.utils.js";
|
|
2
2
|
import { TextElementTypes as i } from "../../../../consts.js";
|
|
3
|
-
const
|
|
3
|
+
const g = [
|
|
4
4
|
i.H1,
|
|
5
5
|
i.H2,
|
|
6
6
|
i.H3,
|
|
7
7
|
i.H4,
|
|
8
8
|
i.H5,
|
|
9
9
|
i.H6
|
|
10
|
-
],
|
|
11
|
-
const d =
|
|
10
|
+
], H = (n, r) => n === 1 || n === 2 || n === 3 || n === 4 ? r.heading[n].normal : r.heading[5].normal, c = (n, r) => n === 1 || n === 2 || n === 3 ? r.heading[n].demi : n === 4 ? r.heading[n].bold : r.heading[5].bold, m = ({ type: n = i.H1, prominence: r, level: o, ...a }) => {
|
|
11
|
+
const d = f(n), t = o || g.indexOf(n || i.H1) + 1 || 1;
|
|
12
12
|
return {
|
|
13
13
|
...a,
|
|
14
14
|
type: n,
|
|
15
15
|
prominence: r,
|
|
16
16
|
innerType: d,
|
|
17
|
-
|
|
18
|
-
innerLevel: f
|
|
17
|
+
innerLevel: t
|
|
19
18
|
};
|
|
20
19
|
};
|
|
21
20
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
g as allHeadings,
|
|
22
|
+
c as fontBold,
|
|
23
|
+
H as fontNormal,
|
|
24
|
+
m as useProps
|
|
26
25
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { css as o } from "styled-components";
|
|
2
|
-
import { consts as
|
|
3
|
-
import { font as
|
|
2
|
+
import { consts as l } from "../Text/Text.consts.js";
|
|
3
|
+
import { font as s } from "./Label.utils.js";
|
|
4
4
|
const i = o`
|
|
5
|
-
${({ size:
|
|
6
|
-
${
|
|
5
|
+
${({ size: m, prominence: t, gutter: a, bold: f, theme: r }) => o`
|
|
6
|
+
${s(m, f ? "bold" : "normal", r)}
|
|
7
7
|
|
|
8
8
|
margin-top: 0;
|
|
9
9
|
margin-bottom: 0;
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
${t && o`
|
|
12
|
+
color: ${r.onSurface.surface.default.text[t]};
|
|
13
|
+
`}
|
|
11
14
|
|
|
12
15
|
${a && o`
|
|
13
|
-
margin-bottom: ${
|
|
16
|
+
margin-bottom: ${l.gutter.label};
|
|
14
17
|
`}
|
|
15
18
|
`}
|
|
16
19
|
`;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { Sizes as
|
|
2
|
-
import { getType as
|
|
3
|
-
const
|
|
4
|
-
size:
|
|
5
|
-
type: r =
|
|
1
|
+
import { Sizes as e, TextElementTypes as t } from "../../../../consts.js";
|
|
2
|
+
import { getType as u } from "../Text/Text.utils.js";
|
|
3
|
+
const b = (a, r, l) => a === e.XSmall ? l.label.extraSmall[r] : a === e.Small ? l.label.small[r] : a === e.Large ? l.label.large[r] : a === e.XLarge ? l.label.extraLarge[r === "bold" ? "demi" : "normal"] : l.label.medium[r], S = ({
|
|
4
|
+
size: a = e.Medium,
|
|
5
|
+
type: r = t.Span,
|
|
6
6
|
prominence: l,
|
|
7
|
-
gutter:
|
|
7
|
+
gutter: n = !1,
|
|
8
8
|
bold: o = !1,
|
|
9
9
|
...m
|
|
10
10
|
}) => {
|
|
11
|
-
const
|
|
11
|
+
const f = u(r);
|
|
12
12
|
return {
|
|
13
13
|
...m,
|
|
14
|
-
size:
|
|
14
|
+
size: a,
|
|
15
15
|
bold: o,
|
|
16
|
-
gutter:
|
|
16
|
+
gutter: n,
|
|
17
17
|
type: r,
|
|
18
18
|
prominence: l,
|
|
19
|
-
innerType:
|
|
20
|
-
innerProminence: f
|
|
19
|
+
innerType: f
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
22
|
export {
|
|
24
|
-
|
|
23
|
+
b as font,
|
|
25
24
|
S as useProps
|
|
26
25
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const d = (r, a, e) => r === t.Small ? e.paragraph.small[a] : r === t.Large ? e.paragraph.large[a] : r === t.XLarge ? e.paragraph.extraLarge[a] : e.paragraph.medium[a], m = (r) => r || g.Strong, f = (r) => {
|
|
1
|
+
import { css as s } from "styled-components";
|
|
2
|
+
import { Sizes as p, TextElementTypes as n } from "../../../../consts.js";
|
|
3
|
+
const m = (r, a, e) => r === p.Small ? e.paragraph.small[a] : r === p.Large ? e.paragraph.large[a] : r === p.XLarge ? e.paragraph.extraLarge[a] : e.paragraph.medium[a], g = (r) => {
|
|
5
4
|
switch (r) {
|
|
6
5
|
case "p":
|
|
7
6
|
return n.Paragraph;
|
|
@@ -24,37 +23,35 @@ const d = (r, a, e) => r === t.Small ? e.paragraph.small[a] : r === t.Large ? e.
|
|
|
24
23
|
default:
|
|
25
24
|
return r;
|
|
26
25
|
}
|
|
27
|
-
},
|
|
28
|
-
${({ theme: e }) =>
|
|
29
|
-
${r ===
|
|
30
|
-
${r ===
|
|
31
|
-
${r ===
|
|
32
|
-
${r ===
|
|
26
|
+
}, L = (r, a) => s`
|
|
27
|
+
${({ theme: e }) => s`
|
|
28
|
+
${r === p.Small && e.paragraph.small[a]}
|
|
29
|
+
${r === p.Medium && e.paragraph.medium[a]}
|
|
30
|
+
${r === p.Large && e.paragraph.large[a]}
|
|
31
|
+
${r === p.XLarge && e.paragraph.extraLarge[a]}
|
|
33
32
|
`}
|
|
34
|
-
`,
|
|
35
|
-
size: r =
|
|
33
|
+
`, H = ({
|
|
34
|
+
size: r = p.Medium,
|
|
36
35
|
type: a = n.Paragraph,
|
|
37
36
|
prominence: e,
|
|
38
|
-
gutter:
|
|
39
|
-
bold:
|
|
40
|
-
...
|
|
37
|
+
gutter: u = !1,
|
|
38
|
+
bold: t = !1,
|
|
39
|
+
...l
|
|
41
40
|
}) => {
|
|
42
|
-
const
|
|
41
|
+
const c = g(a);
|
|
43
42
|
return {
|
|
44
|
-
...
|
|
43
|
+
...l,
|
|
45
44
|
size: r,
|
|
46
|
-
gutter:
|
|
47
|
-
bold:
|
|
45
|
+
gutter: u,
|
|
46
|
+
bold: t,
|
|
48
47
|
type: a,
|
|
49
48
|
prominence: e,
|
|
50
|
-
innerType:
|
|
51
|
-
innerProminence: l
|
|
49
|
+
innerType: c
|
|
52
50
|
};
|
|
53
51
|
};
|
|
54
52
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
i as useProps
|
|
53
|
+
m as font,
|
|
54
|
+
g as getType,
|
|
55
|
+
L as textFont,
|
|
56
|
+
H as useProps
|
|
60
57
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acinguiux-ds-react-framework",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Acinguiux UI Web Library",
|
|
5
5
|
"main": "./build/esm/index.js",
|
|
6
6
|
"module": "./build/esm/index.mjs",
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"package.json"
|
|
13
13
|
],
|
|
14
14
|
"sideEffects": false,
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/acinguiux-ds-react-framework.git",
|
|
18
|
+
"directory": "packages/react-framework"
|
|
19
|
+
},
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "Acinguiux"
|
|
22
|
+
},
|
|
15
23
|
"homepage": "https://github.com/acinguiux-ds-react-framework#readme",
|
|
16
24
|
"scripts": {
|
|
17
25
|
"clean": "rimraf build",
|