forstok-ui-lib 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +8 -1
- package/dist/index.js +37 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/button/index.tsx +1 -0
- package/src/components/form/styles.ts +56 -0
- package/src/components/index.ts +3 -1
- package/src/components/popup/styles.ts +2 -2
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ const ButtonComponent = ({ children, $mode, $isIndicatorArrow=false, isIndicator
|
|
|
24
24
|
) : null;
|
|
25
25
|
return (
|
|
26
26
|
<ButtonContainer
|
|
27
|
+
{...$mode && { name: $mode }}
|
|
27
28
|
$mode={$mode}
|
|
28
29
|
$isIndicatorArrow={$isIndicatorArrow ? true : false}
|
|
29
30
|
$isShown={$isShown ? true : false}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
|
|
3
|
+
const PartialFormContainerStyles = css`
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-row-gap: 12px;
|
|
6
|
+
grid-column-gap: 16px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
margin-bottom: 12px;
|
|
9
|
+
align-items: start;
|
|
10
|
+
`
|
|
11
|
+
|
|
12
|
+
const getFormContainerModifiedStyles = ({ name }:{ name?: string }) => {
|
|
13
|
+
let style = ``
|
|
14
|
+
if (name === 'invoiceForm') {
|
|
15
|
+
style += `
|
|
16
|
+
grid-gap: 15px;
|
|
17
|
+
`
|
|
18
|
+
}
|
|
19
|
+
return style
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const getInnerFormContainerModifiedStyles =({ $width }:{ $width?: string | number }) => {
|
|
23
|
+
let style = ``
|
|
24
|
+
if ($width) {
|
|
25
|
+
style += `
|
|
26
|
+
@media (min-width: 768px) {
|
|
27
|
+
width: ${$width};
|
|
28
|
+
}
|
|
29
|
+
`
|
|
30
|
+
}
|
|
31
|
+
return style
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const FormContainer = styled.form.attrs((props: { name?: string; autoComplete?: string }) => ({
|
|
35
|
+
name: props.name || 'form',
|
|
36
|
+
autoComplete: props.autoComplete || 'off'
|
|
37
|
+
}))<{ name?: string }>`
|
|
38
|
+
display: inline-grid;
|
|
39
|
+
grid-auto-flow: row;
|
|
40
|
+
grid-gap: 25px;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
[class*='singleValue'] {
|
|
44
|
+
width: 100%;
|
|
45
|
+
color: var(--inp-clr);
|
|
46
|
+
._refLabel {
|
|
47
|
+
top: 5.5px;
|
|
48
|
+
right: 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
${getFormContainerModifiedStyles}
|
|
52
|
+
`
|
|
53
|
+
export const SingleFormContainer = styled.section<{ $width?: string | number }>`
|
|
54
|
+
${PartialFormContainerStyles}
|
|
55
|
+
${getInnerFormContainerModifiedStyles}
|
|
56
|
+
`
|
package/src/components/index.ts
CHANGED
|
@@ -102,13 +102,13 @@ const getPopupHeaderWrapperModifiedStyled = ({ $width, $mode, $isOpen }:Pick<TPo
|
|
|
102
102
|
position: fixed;
|
|
103
103
|
z-index: 10;
|
|
104
104
|
border-bottom: 1px solid var(--sec-clr-ln);
|
|
105
|
-
button[
|
|
105
|
+
button[name=round-close] {
|
|
106
106
|
position: absolute;
|
|
107
107
|
top: 12px;
|
|
108
108
|
right: 0px;
|
|
109
109
|
}
|
|
110
110
|
@media only screen and (min-width: 768px) {
|
|
111
|
-
button[
|
|
111
|
+
button[name=round-close] {
|
|
112
112
|
top: 16px;
|
|
113
113
|
right: 20px;
|
|
114
114
|
}
|