norma-library 0.5.147 → 0.5.149
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/.babelrc.json +18 -18
- package/.prettierignore +10 -10
- package/.prettierrc.json +20 -20
- package/.storybook/main.ts +20 -20
- package/.storybook/preview.ts +15 -15
- package/README.md +43 -43
- package/commitlint.config.js +1 -1
- package/dist/esm/components/UncontrolledTable/components/header/index.js +7 -7
- package/dist/esm/components/UncontrolledTable/components/header/index.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/components/header/styles.js +2 -2
- package/dist/esm/components/UncontrolledTable/components/header/styles.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/components/tbody/styles.js +7 -1
- package/dist/esm/components/UncontrolledTable/components/tbody/styles.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/styles.js +7 -1
- package/dist/esm/components/UncontrolledTable/styles.js.map +1 -1
- package/dist/esm/utils/styledBreakpoints.d.ts +10 -0
- package/dist/esm/utils/styledBreakpoints.js +12 -0
- package/dist/esm/utils/styledBreakpoints.js.map +1 -0
- package/docs/index.md +118 -118
- package/package.json +136 -136
- package/src/components/Accordion.tsx +39 -39
- package/src/components/Avatar.tsx +17 -17
- package/src/components/Badge.tsx +14 -14
- package/src/components/Box/index.tsx +12 -12
- package/src/components/Box/interfaces.ts +3 -3
- package/src/components/Box/styles.tsx +22 -22
- package/src/components/Breadcrumb/index.tsx +27 -27
- package/src/components/Breadcrumb/interface.ts +8 -8
- package/src/components/Breadcrumb/styles.tsx +32 -32
- package/src/components/Button.tsx +26 -26
- package/src/components/Card.tsx +37 -37
- package/src/components/ChatMessage.tsx +87 -87
- package/src/components/ChatMessageBalloon/ChatMessageBalloon.style.ts +56 -56
- package/src/components/ChatMessageBalloon/ChatMessageBalloon.tsx +55 -55
- package/src/components/CheckBox.tsx +21 -21
- package/src/components/DateInput/index.tsx +34 -34
- package/src/components/DateInput/interface.ts +13 -13
- package/src/components/DateInput/styles.tsx +27 -27
- package/src/components/DatePicker.tsx +67 -67
- package/src/components/DropDown.tsx +24 -24
- package/src/components/IconButton.tsx +37 -37
- package/src/components/Icons.tsx +82 -82
- package/src/components/Modal.tsx +103 -103
- package/src/components/MultiSelectInput/components/MultiValue/index.tsx +44 -44
- package/src/components/MultiSelectInput/components/Option/index.tsx +62 -62
- package/src/components/MultiSelectInput/components/Option/styles.tsx +8 -8
- package/src/components/MultiSelectInput/index.tsx +60 -60
- package/src/components/MultiSelectInput/interfaces.ts +15 -15
- package/src/components/MultiSelectInput/styles.tsx +43 -43
- package/src/components/Paper.tsx +12 -12
- package/src/components/ProgressBar.tsx +71 -71
- package/src/components/RadioGroup.tsx +43 -43
- package/src/components/RangerSlider.tsx +65 -65
- package/src/components/Select.tsx +74 -74
- package/src/components/SelectInput/components/Option/index.tsx +61 -61
- package/src/components/SelectInput/components/Option/styles.tsx +8 -8
- package/src/components/SelectInput/index.tsx +45 -45
- package/src/components/SelectInput/interfaces.ts +15 -15
- package/src/components/SelectInput/styles.tsx +31 -31
- package/src/components/StatusModal/StatusModal.style.tsx +75 -75
- package/src/components/StatusModal/StatusModal.tsx +58 -58
- package/src/components/Svgs.tsx +506 -506
- package/src/components/Table/components/header/index.tsx +86 -86
- package/src/components/Table/components/header/styles.tsx +59 -59
- package/src/components/Table/components/index.tsx +8 -8
- package/src/components/Table/components/pagination/index.tsx +39 -39
- package/src/components/Table/components/pagination/styles.tsx +28 -28
- package/src/components/Table/components/tbody/index.tsx +30 -30
- package/src/components/Table/components/tbody/styles.tsx +4 -4
- package/src/components/Table/index.tsx +317 -317
- package/src/components/Table/interface.ts +23 -23
- package/src/components/Table/styles.tsx +117 -117
- package/src/components/Tabs.tsx +105 -105
- package/src/components/Tag.tsx +33 -33
- package/src/components/TextField.tsx +19 -19
- package/src/components/TextInput/index.tsx +37 -37
- package/src/components/TextInput/interface.ts +9 -9
- package/src/components/TextInput/styles.tsx +23 -23
- package/src/components/TimeLine.tsx +89 -89
- package/src/components/TimePicker.tsx +78 -78
- package/src/components/Typography/Text/index.tsx +20 -20
- package/src/components/Typography/Text/interfaces.ts +5 -5
- package/src/components/Typography/Text/styles.tsx +40 -40
- package/src/components/Typography/Title/index.tsx +22 -22
- package/src/components/Typography/Title/interfaces.ts +6 -6
- package/src/components/Typography/Title/styles.tsx +40 -40
- package/src/components/Typography/index.tsx +6 -6
- package/src/components/UncontrolledTable/components/header/index.tsx +65 -63
- package/src/components/UncontrolledTable/components/header/styles.tsx +63 -60
- package/src/components/UncontrolledTable/components/index.tsx +8 -8
- package/src/components/UncontrolledTable/components/pagination/index.tsx +43 -43
- package/src/components/UncontrolledTable/components/pagination/styles.tsx +28 -28
- package/src/components/UncontrolledTable/components/tbody/index.tsx +33 -33
- package/src/components/UncontrolledTable/components/tbody/styles.tsx +32 -25
- package/src/components/UncontrolledTable/index.tsx +221 -221
- package/src/components/UncontrolledTable/interface.ts +43 -43
- package/src/components/UncontrolledTable/styles.tsx +123 -116
- package/src/components/UncontrolledTabs/UncontrolledTabs.style.tsx +56 -56
- package/src/components/UncontrolledTabs/UncontrolledTabs.tsx +68 -68
- package/src/components/index.ts +24 -24
- package/src/helpers/alignments.ts +14 -14
- package/src/helpers/borders.ts +18 -18
- package/src/helpers/colors.ts +241 -241
- package/src/helpers/index.ts +5 -5
- package/src/helpers/radios.ts +24 -24
- package/src/helpers/sizes.ts +72 -72
- package/src/hooks/useClickOutside.tsx +18 -18
- package/src/index.ts +66 -66
- package/src/interfaces/Accordion.ts +12 -12
- package/src/interfaces/Avatar.tsx +15 -15
- package/src/interfaces/Badge.ts +19 -19
- package/src/interfaces/Button.ts +22 -22
- package/src/interfaces/Card.ts +11 -11
- package/src/interfaces/ChatMessage.ts +12 -12
- package/src/interfaces/ChatMessageBalloon.ts +17 -17
- package/src/interfaces/CheckBox.ts +27 -27
- package/src/interfaces/DatePicker.ts +13 -13
- package/src/interfaces/DropDown.ts +14 -14
- package/src/interfaces/IconButton.ts +22 -22
- package/src/interfaces/Icons.ts +17 -17
- package/src/interfaces/Modal.ts +18 -18
- package/src/interfaces/Paper.ts +12 -12
- package/src/interfaces/ProgressBar.ts +29 -29
- package/src/interfaces/RadioGroup.ts +23 -23
- package/src/interfaces/RangerSlider.ts +21 -21
- package/src/interfaces/Select.ts +17 -17
- package/src/interfaces/Tabs.ts +19 -19
- package/src/interfaces/Tag.ts +17 -17
- package/src/interfaces/TextField.ts +44 -44
- package/src/interfaces/TimeLine.ts +11 -11
- package/src/interfaces/TimePicker.ts +13 -13
- package/src/interfaces/index.ts +23 -23
- package/src/providers/NormaProvider.tsx +13 -13
- package/src/sample-data-2.json +178 -178
- package/src/sample-data.json +177 -177
- package/src/stories/Accordion.stories.tsx +65 -65
- package/src/stories/Avatar.stories.tsx +123 -123
- package/src/stories/Badge.stories.tsx +39 -39
- package/src/stories/Box.stories.tsx +35 -35
- package/src/stories/Breadcrumb.stories.tsx +44 -44
- package/src/stories/Button.stories.tsx +93 -93
- package/src/stories/Card.stories.tsx +39 -39
- package/src/stories/ChatMessage.stories.tsx +84 -84
- package/src/stories/ChatMessageBalloon.stories.tsx +108 -108
- package/src/stories/CheckBox.stories.tsx +88 -88
- package/src/stories/DateInput.stories.tsx +51 -51
- package/src/stories/DatePicker.stories.tsx +50 -50
- package/src/stories/DropDown.stories.tsx +57 -57
- package/src/stories/IconButton.stories.tsx +78 -78
- package/src/stories/Modal.stories.tsx +246 -246
- package/src/stories/ModalStatus.stories.tsx +46 -46
- package/src/stories/MultiSelectInput.stories.tsx +90 -90
- package/src/stories/Paper.stories.tsx +53 -53
- package/src/stories/ProgressBar.stories.tsx +116 -116
- package/src/stories/RadioGroup.stories.tsx +87 -87
- package/src/stories/RangerSlider.stories.tsx +149 -149
- package/src/stories/Select.stories.tsx +100 -100
- package/src/stories/SelectInput.stories.tsx +78 -78
- package/src/stories/Table.stories.tsx +372 -372
- package/src/stories/Tabs.stories.tsx +61 -61
- package/src/stories/Tag.stories.tsx +56 -56
- package/src/stories/Text.stories.tsx +37 -37
- package/src/stories/TextField.stories.tsx +310 -310
- package/src/stories/TextInput.stories.tsx +52 -52
- package/src/stories/TimeLine.stories.tsx +35 -35
- package/src/stories/TimePicker.stories.tsx +87 -87
- package/src/stories/Title.stories.tsx +43 -43
- package/src/stories/UncontrolledTable.stories.tsx +305 -305
- package/src/stories/UncontrolledTabs.stories.tsx +63 -63
- package/src/styles/globals.scss +17 -17
- package/src/types/index.ts +204 -204
- package/src/utils/styledBreakpoints.ts +25 -0
- package/vite.config.ts +15 -15
package/.babelrc.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"sourceType": "unambiguous",
|
|
3
|
-
"presets": [
|
|
4
|
-
[
|
|
5
|
-
"@babel/preset-env",
|
|
6
|
-
{
|
|
7
|
-
"targets": {
|
|
8
|
-
"chrome": 100,
|
|
9
|
-
"safari": 15,
|
|
10
|
-
"firefox": 91
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"@babel/preset-typescript",
|
|
15
|
-
"@babel/preset-react"
|
|
16
|
-
],
|
|
17
|
-
"plugins": []
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"sourceType": "unambiguous",
|
|
3
|
+
"presets": [
|
|
4
|
+
[
|
|
5
|
+
"@babel/preset-env",
|
|
6
|
+
{
|
|
7
|
+
"targets": {
|
|
8
|
+
"chrome": 100,
|
|
9
|
+
"safari": 15,
|
|
10
|
+
"firefox": 91
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"@babel/preset-typescript",
|
|
15
|
+
"@babel/preset-react"
|
|
16
|
+
],
|
|
17
|
+
"plugins": []
|
|
18
|
+
}
|
package/.prettierignore
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
*.json
|
|
2
|
-
.husky/
|
|
3
|
-
.storybook/
|
|
4
|
-
storybook-static/
|
|
5
|
-
scripts/
|
|
6
|
-
lib/
|
|
7
|
-
build/
|
|
8
|
-
dist/
|
|
9
|
-
src/styles/*
|
|
10
|
-
*.d.ts
|
|
1
|
+
*.json
|
|
2
|
+
.husky/
|
|
3
|
+
.storybook/
|
|
4
|
+
storybook-static/
|
|
5
|
+
scripts/
|
|
6
|
+
lib/
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
src/styles/*
|
|
10
|
+
*.d.ts
|
|
11
11
|
.rollup.cache
|
package/.prettierrc.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"printWidth": 120,
|
|
3
|
-
"singleQuote": true,
|
|
4
|
-
"trailingComma": "all",
|
|
5
|
-
"arrowParens": "avoid",
|
|
6
|
-
"overrides": [
|
|
7
|
-
{
|
|
8
|
-
"files": ["docs/**/*.md", "docs/src/pages/**/*.{js,tsx}", "docs/data/**/*.{js,tsx}"],
|
|
9
|
-
"options": {
|
|
10
|
-
"printWidth": 85
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"files": ["docs/pages/blog/**/*.md"],
|
|
15
|
-
"options": {
|
|
16
|
-
"printWidth": 82
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"printWidth": 120,
|
|
3
|
+
"singleQuote": true,
|
|
4
|
+
"trailingComma": "all",
|
|
5
|
+
"arrowParens": "avoid",
|
|
6
|
+
"overrides": [
|
|
7
|
+
{
|
|
8
|
+
"files": ["docs/**/*.md", "docs/src/pages/**/*.{js,tsx}", "docs/data/**/*.{js,tsx}"],
|
|
9
|
+
"options": {
|
|
10
|
+
"printWidth": 85
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"files": ["docs/pages/blog/**/*.md"],
|
|
15
|
+
"options": {
|
|
16
|
+
"printWidth": 82
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/.storybook/main.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
-
|
|
3
|
-
const config: StorybookConfig = {
|
|
4
|
-
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
5
|
-
addons: [
|
|
6
|
-
'@storybook/addon-links',
|
|
7
|
-
'@storybook/addon-essentials',
|
|
8
|
-
'@storybook/addon-onboarding',
|
|
9
|
-
'@storybook/addon-interactions',
|
|
10
|
-
'@storybook/addon-mdx-gfm'
|
|
11
|
-
],
|
|
12
|
-
framework: {
|
|
13
|
-
name: '@storybook/react-vite',
|
|
14
|
-
options: {},
|
|
15
|
-
},
|
|
16
|
-
docs: {
|
|
17
|
-
autodocs: 'tag',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export default config;
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
5
|
+
addons: [
|
|
6
|
+
'@storybook/addon-links',
|
|
7
|
+
'@storybook/addon-essentials',
|
|
8
|
+
'@storybook/addon-onboarding',
|
|
9
|
+
'@storybook/addon-interactions',
|
|
10
|
+
'@storybook/addon-mdx-gfm'
|
|
11
|
+
],
|
|
12
|
+
framework: {
|
|
13
|
+
name: '@storybook/react-vite',
|
|
14
|
+
options: {},
|
|
15
|
+
},
|
|
16
|
+
docs: {
|
|
17
|
+
autodocs: 'tag',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export default config;
|
package/.storybook/preview.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { Preview } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
const preview: Preview = {
|
|
4
|
-
parameters: {
|
|
5
|
-
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
6
|
-
controls: {
|
|
7
|
-
matchers: {
|
|
8
|
-
color: /(background|color)$/i,
|
|
9
|
-
date: /Date$/i,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default preview;
|
|
1
|
+
import type { Preview } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
const preview: Preview = {
|
|
4
|
+
parameters: {
|
|
5
|
+
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
6
|
+
controls: {
|
|
7
|
+
matchers: {
|
|
8
|
+
color: /(background|color)$/i,
|
|
9
|
+
date: /Date$/i,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default preview;
|
package/README.md
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
<!-- markdownlint-disable-next-line -->
|
|
2
|
-
<p align="center">
|
|
3
|
-
<img width="120" height="120" src="https://www.olos.com.br/wp-content/uploads/2023/03/cropped-selo-olos-1-180x180.png" alt="Olos logo">
|
|
4
|
-
</p>
|
|
5
|
-
<h1 align="center">Norma DS </h1>
|
|
6
|
-
<div align="center">
|
|
7
|
-
Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.
|
|
8
|
-
|
|
9
|
-
[](https://github.com/mui/material-ui/blob/HEAD/LICENSE)
|
|
10
|
-
[](https://www.npmjs.com/package/@mui/material)
|
|
11
|
-
[](https://github.com/prettier/prettier)
|
|
12
|
-
|
|
13
|
-
[Documentation](#Documentation) |
|
|
14
|
-
[Contributing](#Contributing) |
|
|
15
|
-
[Changelog](#Changelog) |
|
|
16
|
-
[License](#License)
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
## Configurações
|
|
23
|
-
|
|
24
|
-
- [React v18](https://react.dev/)
|
|
25
|
-
- [TypeScript](https://www.typescriptlang.org/)
|
|
26
|
-
- UI development with [Storybook](https://storybook.js.org/)
|
|
27
|
-
- Unit test with [Testing-library](https://testing-library.com/)
|
|
28
|
-
- Linting with [Eslint](https://eslint.org/) and code formatting with [Prettier](https://prettier.io/)
|
|
29
|
-
- Conventional commit messages with [Commitlint][commitlint-url]
|
|
30
|
-
- Build the library with [Rollup][rollup-url]
|
|
31
|
-
- Automated release with [changesets][changesets-url]
|
|
32
|
-
|
|
33
|
-
# Documentação
|
|
34
|
-
|
|
35
|
-
### Instalação
|
|
36
|
-
Para instalação das dependencias:
|
|
37
|
-
```
|
|
38
|
-
npm install
|
|
39
|
-
```
|
|
40
|
-
### Execução do projeto
|
|
41
|
-
Para utilizar o Storybook:
|
|
42
|
-
```
|
|
43
|
-
npm run storybook
|
|
1
|
+
<!-- markdownlint-disable-next-line -->
|
|
2
|
+
<p align="center">
|
|
3
|
+
<img width="120" height="120" src="https://www.olos.com.br/wp-content/uploads/2023/03/cropped-selo-olos-1-180x180.png" alt="Olos logo">
|
|
4
|
+
</p>
|
|
5
|
+
<h1 align="center">Norma DS </h1>
|
|
6
|
+
<div align="center">
|
|
7
|
+
Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.
|
|
8
|
+
|
|
9
|
+
[](https://github.com/mui/material-ui/blob/HEAD/LICENSE)
|
|
10
|
+
[](https://www.npmjs.com/package/@mui/material)
|
|
11
|
+
[](https://github.com/prettier/prettier)
|
|
12
|
+
|
|
13
|
+
[Documentation](#Documentation) |
|
|
14
|
+
[Contributing](#Contributing) |
|
|
15
|
+
[Changelog](#Changelog) |
|
|
16
|
+
[License](#License)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
## Configurações
|
|
23
|
+
|
|
24
|
+
- [React v18](https://react.dev/)
|
|
25
|
+
- [TypeScript](https://www.typescriptlang.org/)
|
|
26
|
+
- UI development with [Storybook](https://storybook.js.org/)
|
|
27
|
+
- Unit test with [Testing-library](https://testing-library.com/)
|
|
28
|
+
- Linting with [Eslint](https://eslint.org/) and code formatting with [Prettier](https://prettier.io/)
|
|
29
|
+
- Conventional commit messages with [Commitlint][commitlint-url]
|
|
30
|
+
- Build the library with [Rollup][rollup-url]
|
|
31
|
+
- Automated release with [changesets][changesets-url]
|
|
32
|
+
|
|
33
|
+
# Documentação
|
|
34
|
+
|
|
35
|
+
### Instalação
|
|
36
|
+
Para instalação das dependencias:
|
|
37
|
+
```
|
|
38
|
+
npm install
|
|
39
|
+
```
|
|
40
|
+
### Execução do projeto
|
|
41
|
+
Para utilizar o Storybook:
|
|
42
|
+
```
|
|
43
|
+
npm run storybook
|
|
44
44
|
```
|
package/commitlint.config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {extends: ['@commitlint/config-conventional']}
|
|
1
|
+
module.exports = {extends: ['@commitlint/config-conventional']}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
2
|
import * as S from './styles';
|
|
3
3
|
import SettingsIcon from '@mui/icons-material/Settings';
|
|
4
|
+
import { CheckBox } from '../../../CheckBox';
|
|
5
|
+
import useClickOutside from '../../../../hooks/useClickOutside';
|
|
4
6
|
var Header = function (_a) {
|
|
5
7
|
var table = _a.table, showTotalResults = _a.showTotalResults, showSettings = _a.showSettings, showClearFiels = _a.showClearFiels, onClearFieldsClick = _a.onClearFieldsClick, customTotalResults = _a.customTotalResults, clearLabel = _a.clearLabel;
|
|
6
8
|
var _b = useState(false), openTools = _b[0], setOpenTools = _b[1];
|
|
9
|
+
var listToolsRef = useRef(null);
|
|
10
|
+
useClickOutside(listToolsRef, function () { return setOpenTools(false); });
|
|
7
11
|
return (React.createElement(S.Header, { "$showResults": showTotalResults },
|
|
8
12
|
React.createElement("div", null,
|
|
9
13
|
showTotalResults && (React.createElement(S.Results, null,
|
|
@@ -12,13 +16,9 @@ var Header = function (_a) {
|
|
|
12
16
|
React.createElement(S.Tools, null,
|
|
13
17
|
showSettings ? (React.createElement(S.IconTools, { onClick: function () { return setOpenTools(!openTools); } },
|
|
14
18
|
React.createElement(SettingsIcon, { sx: { fontSize: 16, color: '#DE8B50' } }))) : null,
|
|
15
|
-
openTools ? (React.createElement(S.ListTools,
|
|
19
|
+
openTools ? (React.createElement(S.ListTools, { ref: listToolsRef }, table.getAllLeafColumns().map(function (column) {
|
|
16
20
|
return (React.createElement("div", { key: column.id, className: "px-1" },
|
|
17
|
-
React.createElement(
|
|
18
|
-
React.createElement("input", { type: 'checkbox',
|
|
19
|
-
checked: column.getIsVisible(),
|
|
20
|
-
onChange: column.getToggleVisibilityHandler() }),
|
|
21
|
-
column.id)));
|
|
21
|
+
React.createElement(CheckBox, { label: column.columnDef.header || column.id, size: "small", checked: column.getIsVisible(), value: column.getIsVisible(), onChange: column.getToggleVisibilityHandler() })));
|
|
22
22
|
}))) : null)));
|
|
23
23
|
};
|
|
24
24
|
export default Header;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAEhE,IAAM,MAAM,GAAkB,UAAC,EAQ9B;QAPC,KAAK,WAAA,EACL,gBAAgB,sBAAA,EAChB,YAAY,kBAAA,EACZ,cAAc,oBAAA,EACd,kBAAkB,wBAAA,EAClB,kBAAkB,wBAAA,EAClB,UAAU,gBAAA;IAEJ,IAAA,KAA4B,QAAQ,CAAC,KAAK,CAAC,EAA1C,SAAS,QAAA,EAAE,YAAY,QAAmB,CAAC;IAClD,IAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,eAAe,CAAC,YAAY,EAAE,cAAM,OAAA,YAAY,CAAC,KAAK,CAAC,EAAnB,CAAmB,CAAC,CAAC;IAEzD,OAAO,CACL,oBAAC,CAAC,CAAC,MAAM,oBAAe,gBAAgB;QACtC;YACG,gBAAgB,IAAI,CACnB,oBAAC,CAAC,CAAC,OAAO;gBACR,oBAAC,CAAC,CAAC,UAAU,QACV,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,UAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,MAAM,6BAA0B,CAC1F,CACL,CACb;YACA,cAAc,IAAI,CACjB,oBAAC,CAAC,CAAC,eAAe,IAAC,OAAO,EAAE,cAAM,OAAA,kBAAkB,IAAI,kBAAkB,EAAE,EAA1C,CAA0C,IACzE,UAAU,IAAI,cAAc,CACX,CACrB,CACG;QACN,oBAAC,CAAC,CAAC,KAAK;YACL,YAAY,CAAC,CAAC,CAAC,CACd,oBAAC,CAAC,CAAC,SAAS,IAAC,OAAO,EAAE,cAAM,OAAA,YAAY,CAAC,CAAC,SAAS,CAAC,EAAxB,CAAwB;gBAClD,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAI,CAC5C,CACf,CAAC,CAAC,CAAC,IAAI;YACP,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,CAAC,CAAC,SAAS,IAAC,GAAG,EAAE,YAAY,IAC3B,KAAK,CAAC,iBAAiB,EAAE,CAAC,GAAG,CAAC,UAAC,MAAW;gBACzC,OAAO,CACL,6BAAK,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,EAAC,MAAM;oBACnC,oBAAC,QAAQ,IACP,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,MAAM,IAAI,MAAM,CAAC,EAAE,EAC3C,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,EAC9B,KAAK,EAAE,MAAM,CAAC,YAAY,EAAE,EAC5B,QAAQ,EAAE,MAAM,CAAC,0BAA0B,EAAE,GAC7C,CACE,CACP,CAAC;YACJ,CAAC,CAAC,CACU,CACf,CAAC,CAAC,CAAC,IAAI,CACA,CACD,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
export var Header = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: calc(100% - 32px);\n margin: 0 auto;\n"], ["\n display: flex;\n justify-content: space-between;\n width: calc(100% - 32px);\n margin: 0 auto;\n"])));
|
|
3
|
+
export var Header = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n width: calc(100% - 32px);\n @media screen and (min-width: 1360px) {\n width: calc(100% - 16px);\n }\n margin: 0 auto;\n"], ["\n display: flex;\n justify-content: space-between;\n width: calc(100% - 32px);\n @media screen and (min-width: 1360px) {\n width: calc(100% - 16px);\n }\n margin: 0 auto;\n"])));
|
|
4
4
|
export var Results = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"])));
|
|
5
5
|
export var Tools = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
|
|
6
6
|
export var TextResult = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: #666666;\n font-size: 16px;\n"], ["\n color: #666666;\n font-size: 16px;\n"])));
|
|
7
7
|
export var TextClearSearchContent = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 10px;\n"], ["\n height: 10px;\n"])));
|
|
8
8
|
export var TextClearSearch = styled.p(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: #de8b50;\n font-size: 14px;\n cursor: pointer;\n margin: 0;\n &:hover {\n text-decoration: underline;\n }\n"], ["\n color: #de8b50;\n font-size: 14px;\n cursor: pointer;\n margin: 0;\n &:hover {\n text-decoration: underline;\n }\n"])));
|
|
9
9
|
export var IconTools = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 24px;\n height: 24px;\n cursor: pointer;\n"], ["\n width: 24px;\n height: 24px;\n cursor: pointer;\n"])));
|
|
10
|
-
export var ListTools = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n padding: 12px;\n margin: 6px 0 0 -106px;\n position: absolute;\n background: #fff;\n box-shadow: 0px 3px 6px #00000029;\n border: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n font-size: 14px;\n z-index:
|
|
10
|
+
export var ListTools = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n padding: 12px;\n margin: 6px 0 0 -106px;\n position: absolute;\n background: #fff;\n box-shadow: 0px 3px 6px #00000029;\n border: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n font-size: 14px;\n z-index: 100;\n label {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n"], ["\n padding: 12px;\n margin: 6px 0 0 -106px;\n position: absolute;\n background: #fff;\n box-shadow: 0px 3px 6px #00000029;\n border: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n font-size: 14px;\n z-index: 100;\n label {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n"])));
|
|
11
11
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
12
12
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/header/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,MAAM,GAAG,MAAM,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/header/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,MAAM,GAAG,MAAM,CAAC,GAAG,2PAAK,wLAQpC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,OAAO,GAAG,MAAM,CAAC,GAAG,iIAAA,8DAIhC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,qEAAA,EAAE,IAAA,CAAC;AAElC,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,GAAG,8GAAA,2CAGnC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,wFAAA,qBAE/C,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,eAAe,GAAG,MAAM,CAAC,CAAC,mMAAA,gIAQtC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,4HAAA,yDAIlC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,gZAAA,6UAiBlC,IAAA,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import { breakpoints } from '../../../../utils/styledBreakpoints';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
export var Tr = styled.tr(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: inherit;\n display: table-row;\n vertical-align: middle;\n outline: 0;\n &:nth-of-type(even) {\n background-color: #fafafa;\n }\n"], ["\n color: inherit;\n display: table-row;\n vertical-align: middle;\n outline: 0;\n &:nth-of-type(even) {\n background-color: #fafafa;\n }\n"])));
|
|
4
|
-
export var Td = styled.td(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n color: #666666;\n font-size: 0.875rem;\n"], ["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n color: #666666;\n font-size: 0.875rem;\n"]))
|
|
5
|
+
export var Td = styled.td(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n ", ";\n color: #666666;\n font-size: 0.875rem;\n"], ["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n ", ";\n color: #666666;\n font-size: 0.875rem;\n"])), breakpoints({
|
|
6
|
+
cssProp: 'padding',
|
|
7
|
+
cssPropUnits: 'px',
|
|
8
|
+
values: [{ 1360: 8 }],
|
|
9
|
+
mediaQueryType: 'min-width',
|
|
10
|
+
}));
|
|
5
11
|
var templateObject_1, templateObject_2;
|
|
6
12
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/tbody/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,yNAAK,sJAQ/B,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/components/UncontrolledTable/components/tbody/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,yNAAK,sJAQ/B,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,6WAAA,wPAUvB,EAKA,gDAGH,KARG,WAAW,CAAC;IACZ,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrB,cAAc,EAAE,WAAW;CAC5B,CAAC,CAGH,CAAC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import { breakpoints } from '../../utils/styledBreakpoints';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: #fff;\n"], ["\n background-color: #fff;\n"])));
|
|
4
5
|
export var Table = styled.table(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: table;\n width: 100%;\n border-collapse: collapse;\n border-spacing: 0;\n min-width: 650px;\n border: none;\n"], ["\n display: table;\n width: 100%;\n border-collapse: collapse;\n border-spacing: 0;\n min-width: 650px;\n border: none;\n"])));
|
|
5
6
|
var StickyStyles = "\n position: sticky;\n top: 0;\n z-index: 99;\n background: #fff;\n";
|
|
6
7
|
export var Thead = styled.thead(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: table-header-group;\n ", "\n"], ["\n display: table-header-group;\n ", "\n"])), function (props) { return props.$sticky && StickyStyles; });
|
|
7
8
|
export var TableRow = styled.tr(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: inherit;\n display: table-row;\n vertical-align: middle;\n outline: 0;\n"], ["\n color: inherit;\n display: table-row;\n vertical-align: middle;\n outline: 0;\n"])));
|
|
8
|
-
export var Th = styled.th(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n color: rgba(0, 0, 0, 0.87);\n color: #666666;\n font-size: 0.875rem;\n font-weight: 700;\n"], ["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n color: rgba(0, 0, 0, 0.87);\n color: #666666;\n font-size: 0.875rem;\n font-weight: 700;\n"]))
|
|
9
|
+
export var Th = styled.th(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n ", ";\n color: rgba(0, 0, 0, 0.87);\n color: #666666;\n font-size: 0.875rem;\n font-weight: 700;\n"], ["\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.5rem;\n letter-spacing: 0.01071em;\n display: table-cell;\n vertical-align: inherit;\n border-bottom: 1px solid rgba(224, 224, 224, 1);\n text-align: left;\n padding: 16px;\n ", ";\n color: rgba(0, 0, 0, 0.87);\n color: #666666;\n font-size: 0.875rem;\n font-weight: 700;\n"])), breakpoints({
|
|
10
|
+
cssProp: 'padding',
|
|
11
|
+
cssPropUnits: 'px',
|
|
12
|
+
values: [{ 1360: 8 }],
|
|
13
|
+
mediaQueryType: 'min-width',
|
|
14
|
+
}));
|
|
9
15
|
export var ColumnContent = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 5px;\n"], ["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
10
16
|
export var TextColumn = styled.span(templateObject_7 || (templateObject_7 = __makeTemplateObject([""], [""])));
|
|
11
17
|
export var IconFilterDialog = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: 20px;\n width: 20px;\n"], ["\n height: 20px;\n width: 20px;\n"])));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/UncontrolledTable/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,kGAAA,+BAElC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,oMAAA,iIAOhC,IAAA,CAAC;AAEF,IAAM,YAAY,GAAG,yEAKpB,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,+GAAuB,sCAEpD,EAAsC,IACzC,KADG,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAO,IAAI,YAAY,EAA7B,CAA6B,CACzC,CAAC;AAEF,MAAM,CAAC,IAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,2JAAA,wFAKhC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/UncontrolledTable/styles.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,kGAAA,+BAElC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,oMAAA,iIAOhC,IAAA,CAAC;AAEF,IAAM,YAAY,GAAG,yEAKpB,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,+GAAuB,sCAEpD,EAAsC,IACzC,KADG,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAO,IAAI,YAAY,EAA7B,CAA6B,CACzC,CAAC;AAEF,MAAM,CAAC,IAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,2JAAA,wFAKhC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,iaAAA,wPAUvB,EAKA,oGAKH,KAVG,WAAW,CAAC;IACZ,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrB,cAAc,EAAE,WAAW;CAC5B,CAAC,CAKH,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,8HAAA,2DAItC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,IAAI,qEAAA,EAAE,IAAA,CAAC;AAExC,MAAM,CAAC,IAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,wGAAA,qCAGzC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,YAAY,GAAG,MAAM,CAAC,GAAG,0QAAA,uMASrC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,kUAAA,6PAczC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,6bAAA,wXAyB3C,IAAA,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Breakpoint = {
|
|
2
|
+
cssProp: string;
|
|
3
|
+
cssPropUnits: string;
|
|
4
|
+
values: {
|
|
5
|
+
[key: number]: number;
|
|
6
|
+
}[];
|
|
7
|
+
mediaQueryType: 'max-width' | 'min-width' | 'max-height' | 'min-height';
|
|
8
|
+
};
|
|
9
|
+
export declare const breakpoints: (breakpoints: Breakpoint) => import("styled-components").RuleSet<object>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import { css } from 'styled-components';
|
|
3
|
+
export var breakpoints = function (breakpoints) {
|
|
4
|
+
var cssProp = breakpoints.cssProp, cssPropUnits = breakpoints.cssPropUnits, values = breakpoints.values, mediaQueryType = breakpoints.mediaQueryType;
|
|
5
|
+
var breakpointProps = values.reduce(function (mediaQueries, value) {
|
|
6
|
+
var _a = [Object.keys(value)[0], Object.values(value)[0]], screenBreakpoint = _a[0], cssPropBreakpoint = _a[1];
|
|
7
|
+
return (mediaQueries += "\n @media screen and (".concat(mediaQueryType, ": ").concat(screenBreakpoint, "px) {\n ").concat(cssProp, ": ").concat(cssPropBreakpoint).concat(cssPropUnits, ";\n }\n "));
|
|
8
|
+
}, '');
|
|
9
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), breakpointProps);
|
|
10
|
+
};
|
|
11
|
+
var templateObject_1;
|
|
12
|
+
//# sourceMappingURL=styledBreakpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styledBreakpoints.js","sourceRoot":"","sources":["../../../src/utils/styledBreakpoints.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AASxC,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,WAAuB;IACzC,IAAA,OAAO,GAA2C,WAAW,QAAtD,EAAE,YAAY,GAA6B,WAAW,aAAxC,EAAE,MAAM,GAAqB,WAAW,OAAhC,EAAE,cAAc,GAAK,WAAW,eAAhB,CAAiB;IAEtE,IAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,UAAC,YAAY,EAAE,KAAK;QAClD,IAAA,KAAwC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAvF,gBAAgB,QAAA,EAAE,iBAAiB,QAAoD,CAAC;QAC/F,OAAO,CAAC,YAAY,IAAI,mCACH,cAAc,eAAK,gBAAgB,0BACpD,OAAO,eAAK,iBAAiB,SAAG,YAAY,mBAE/C,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,GAAG,mFAAA,QACN,EAAe,MAClB,KADG,eAAe,EACjB;AACJ,CAAC,CAAC"}
|