@lanaco/lnc-react-ui 3.11.35 → 4.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/README.md +0 -3
- package/dist/Accordion.cjs +6 -0
- package/dist/Accordion.js +65 -0
- package/dist/AccordionDetails.cjs +7 -0
- package/dist/AccordionDetails.js +32 -0
- package/dist/AccordionSummary.cjs +12 -0
- package/dist/AccordionSummary.js +78 -0
- package/dist/ActionsToolbar.cjs +19 -0
- package/dist/ActionsToolbar.js +225 -0
- package/dist/Alert.cjs +40 -0
- package/dist/Alert.js +138 -0
- package/dist/Avatar.cjs +16 -0
- package/dist/Avatar.js +114 -0
- package/dist/Badge.cjs +17 -0
- package/dist/Badge.js +70 -0
- package/dist/Breadcrumbs.cjs +8 -0
- package/dist/Breadcrumbs.js +131 -0
- package/dist/Button.cjs +127 -0
- package/dist/Button.js +542 -0
- package/dist/ButtonGroup.cjs +44 -0
- package/dist/ButtonGroup.js +112 -0
- package/dist/CheckBoxInput.cjs +118 -0
- package/dist/CheckBoxInput.js +348 -0
- package/dist/Chip.cjs +27 -0
- package/dist/Chip.js +189 -0
- package/dist/ColorInput.cjs +60 -0
- package/dist/ColorInput.js +256 -0
- package/dist/ConfirmationForm.cjs +22 -0
- package/dist/ConfirmationForm.js +169 -0
- package/dist/Content.cjs +1 -0
- package/dist/Content.js +18 -0
- package/dist/CustomStyles-CqlCjTgU.cjs +8 -0
- package/dist/CustomStyles-nfD3J1mi.js +2881 -0
- package/dist/DataView.cjs +1 -0
- package/dist/DataView.js +62 -0
- package/dist/DateInput.cjs +296 -0
- package/dist/DateInput.js +7042 -0
- package/dist/DecimalInput.cjs +54 -0
- package/dist/DecimalInput.js +697 -0
- package/dist/DetailsView.cjs +18 -0
- package/dist/DetailsView.js +243 -0
- package/dist/DoubleRangeSlider.cjs +114 -0
- package/dist/DoubleRangeSlider.js +289 -0
- package/dist/DragAndDropFile.cjs +31 -0
- package/dist/DragAndDropFile.js +2331 -0
- package/dist/DragDropFiles.cjs +14 -0
- package/dist/DragDropFiles.js +175 -0
- package/dist/Drawer.cjs +6 -0
- package/dist/Drawer.js +206 -0
- package/dist/Dropdown.cjs +1 -0
- package/dist/Dropdown.js +266 -0
- package/dist/DropdownItem.cjs +36 -0
- package/dist/DropdownItem.js +241 -0
- package/dist/DropdownLookup.cjs +1 -0
- package/dist/DropdownLookup.js +325 -0
- package/dist/DropdownMenu-B6qr13ik.cjs +19 -0
- package/dist/DropdownMenu-DZi3TJ8Q.js +1547 -0
- package/dist/DropdownMenu.cjs +1 -0
- package/dist/DropdownMenu.js +12 -0
- package/dist/EditableTable.cjs +21 -0
- package/dist/EditableTable.js +462 -0
- package/dist/FileInput.cjs +47 -0
- package/dist/FileInput.js +206 -0
- package/dist/FlexBox.cjs +9 -0
- package/dist/FlexBox.js +97 -0
- package/dist/FlexGrid.cjs +1 -0
- package/dist/FlexGrid.js +78 -0
- package/dist/FlexGridItem.cjs +7 -0
- package/dist/FlexGridItem.js +97 -0
- package/dist/Footer.cjs +1 -0
- package/dist/Footer.js +18 -0
- package/dist/FormField.cjs +11 -0
- package/dist/FormField.js +65 -0
- package/dist/FormView.cjs +13 -0
- package/dist/FormView.js +354 -0
- package/dist/Grid.cjs +13 -0
- package/dist/Grid.js +62 -0
- package/dist/GridItem.cjs +15 -0
- package/dist/GridItem.js +72 -0
- package/dist/Header.cjs +1 -0
- package/dist/Header.js +18 -0
- package/dist/Icon.cjs +8 -0
- package/dist/Icon.js +59 -0
- package/dist/IconButton.cjs +122 -0
- package/dist/IconButton.js +481 -0
- package/dist/Kanban.cjs +85 -0
- package/dist/Kanban.js +4793 -0
- package/dist/KanbanActionsToolbar.cjs +19 -0
- package/dist/KanbanActionsToolbar.js +152 -0
- package/dist/KanbanCard-ConTmu3w.cjs +30 -0
- package/dist/KanbanCard-D9OhU8C6.js +175 -0
- package/dist/KanbanCard.cjs +1 -0
- package/dist/KanbanCard.js +12 -0
- package/dist/KanbanFooter.cjs +5 -0
- package/dist/KanbanFooter.js +84 -0
- package/dist/KanbanHeader.cjs +15 -0
- package/dist/KanbanHeader.js +127 -0
- package/dist/KanbanView.cjs +8 -0
- package/dist/KanbanView.js +255 -0
- package/dist/Link.cjs +15 -0
- package/dist/Link.js +62 -0
- package/dist/MenuItem.cjs +36 -0
- package/dist/MenuItem.js +230 -0
- package/dist/Modal.cjs +84 -0
- package/dist/Modal.js +372 -0
- package/dist/MultiSelectDropdown.cjs +1 -0
- package/dist/MultiSelectDropdown.js +261 -0
- package/dist/MultiSelectDropdownLookup.cjs +1 -0
- package/dist/MultiSelectDropdownLookup.js +274 -0
- package/dist/NestedDropdownItem.cjs +6 -0
- package/dist/NestedDropdownItem.js +102 -0
- package/dist/NestedMenuItem.cjs +6 -0
- package/dist/NestedMenuItem.js +115 -0
- package/dist/Notification.cjs +83 -0
- package/dist/Notification.js +1079 -0
- package/dist/NumberInput.cjs +45 -0
- package/dist/NumberInput.js +241 -0
- package/dist/PageLayout.cjs +26 -0
- package/dist/PageLayout.js +92 -0
- package/dist/PasswordInput.cjs +47 -0
- package/dist/PasswordInput.js +230 -0
- package/dist/ProgressBar.cjs +22 -0
- package/dist/ProgressBar.js +92 -0
- package/dist/RadioGroup.cjs +7 -0
- package/dist/RadioGroup.js +104 -0
- package/dist/RadioInput.cjs +117 -0
- package/dist/RadioInput.js +362 -0
- package/dist/RangeSlider.cjs +72 -0
- package/dist/RangeSlider.js +253 -0
- package/dist/SearchBar.cjs +100 -0
- package/dist/SearchBar.js +994 -0
- package/dist/Separator.cjs +6 -0
- package/dist/Separator.js +37 -0
- package/dist/Sidebar.cjs +39 -0
- package/dist/Sidebar.js +123 -0
- package/dist/Spinner.cjs +38 -0
- package/dist/Spinner.js +114 -0
- package/dist/Surface.cjs +7 -0
- package/dist/Surface.js +60 -0
- package/dist/SwipeableDrawer.cjs +33 -0
- package/dist/SwipeableDrawer.js +213 -0
- package/dist/Table.cjs +170 -0
- package/dist/Table.js +1408 -0
- package/dist/TableView-Cj5_fbSR.js +481 -0
- package/dist/TableView-D8ex512p.cjs +19 -0
- package/dist/TableView.cjs +1 -0
- package/dist/TableView.js +11 -0
- package/dist/Tabs.cjs +7 -0
- package/dist/Tabs.js +72 -0
- package/dist/TextAreaInput.cjs +33 -0
- package/dist/TextAreaInput.js +320 -0
- package/dist/TextInput.cjs +45 -0
- package/dist/TextInput.js +227 -0
- package/dist/ThemeProvider.cjs +113 -0
- package/dist/ThemeProvider.js +1340 -0
- package/dist/TimeInput.cjs +31 -0
- package/dist/TimeInput.js +133 -0
- package/dist/Toggle.cjs +151 -0
- package/dist/Toggle.js +421 -0
- package/dist/TreeMenu.cjs +15 -0
- package/dist/TreeMenu.js +108 -0
- package/dist/TreeMenuSeparator.cjs +6 -0
- package/dist/TreeMenuSeparator.js +40 -0
- package/dist/UploadedFile.cjs +39 -0
- package/dist/UploadedFile.js +192 -0
- package/dist/defineProperty-BHpTtkhC.js +110 -0
- package/dist/defineProperty-DHvxLH8G.cjs +1 -0
- package/dist/emotion-element-5486c51c.browser.esm-CSejtOeT.js +886 -0
- package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +1 -0
- package/dist/emotion-is-prop-valid.esm-BzFBwmJz.js +10 -0
- package/dist/emotion-is-prop-valid.esm-CMrshNb7.cjs +1 -0
- package/dist/emotion-react.browser.esm-DQBL7Wls.cjs +1 -0
- package/dist/emotion-react.browser.esm-OWM-uG8Q.js +94 -0
- package/dist/emotion-styled.browser.esm-BZSYYThs.js +210 -0
- package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +1 -0
- package/dist/floating-ui.dom-1F2mTXOe.cjs +1 -0
- package/dist/floating-ui.dom-BdUovkEr.js +938 -0
- package/dist/hoist-non-react-statics.cjs-B8r9S_ak.cjs +15 -0
- package/dist/hoist-non-react-statics.cjs-Drf1aBlk.js +235 -0
- package/dist/index-BLQWNy78.js +109 -0
- package/dist/index-BP5r5zGN.cjs +1 -0
- package/dist/index-B_da1uvD.js +451 -0
- package/dist/index-BjdOz5Ok.cjs +1 -0
- package/dist/index-BklgDeu4.js +42 -0
- package/dist/index-C29T0m2a.cjs +174 -0
- package/dist/index-CZJEA84h.js +19069 -0
- package/dist/index-Cdkz-XH-.js +127 -0
- package/dist/index-D5vEbKUT.js +81 -0
- package/dist/index-DXnSjbfJ.cjs +20 -0
- package/dist/index-Ds9PUTwb.js +667 -0
- package/dist/index-Dzkd2i4n.cjs +1 -0
- package/dist/index-IO9v6o0I.cjs +5 -0
- package/dist/index-P-naJISQ.cjs +1 -0
- package/dist/index.cjs +26 -0
- package/dist/index.js +378 -0
- package/dist/motion-CtkUpWEn.js +3785 -0
- package/dist/motion-Oud-wpUz.cjs +1 -0
- package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +1 -0
- package/dist/objectWithoutPropertiesLoose-DwEN6RBQ.js +12 -0
- package/dist/setPrototypeOf-4aSEnBDm.cjs +1 -0
- package/dist/setPrototypeOf-a891FLQJ.js +13 -0
- package/dist/style.css +5 -0
- package/dist/tslib.es6-ZNVz5r_T.js +90 -0
- package/dist/tslib.es6-fPwcSa2V.cjs +1 -0
- package/dist/use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs +1 -0
- package/dist/use-isomorphic-layout-effect.browser.esm-DERp5kr6.js +5 -0
- package/dist/useUpdateEffect-BtMgpgIV.cjs +1 -0
- package/dist/useUpdateEffect-CuYWz7EA.js +15 -0
- package/dist/utils-DEke8iwo.js +10196 -0
- package/dist/utils-hdRGTsQ7.cjs +13 -0
- package/eslint.config.js +38 -0
- package/package.json +137 -58
- package/vite.config.js +135 -0
- package/jest.config.js +0 -7
- package/lib/index.esm.js +0 -84028
- package/lib/index.js +0 -84165
- package/rc1 +0 -0
- package/test/jest/__mocks__/styleMock.js +0 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { jsxs as R, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import S, { useState as g } from "react";
|
|
3
|
+
import { n as c } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
4
|
+
import { P as t } from "./index-Ds9PUTwb.js";
|
|
5
|
+
import { f as y, b as r, h as V, a as x, g as p } from "./utils-DEke8iwo.js";
|
|
6
|
+
import { u as _ } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
7
|
+
const B = c.label`
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
width: 100%;
|
|
11
|
+
min-height: ${(e) => y(e.theme, e.size)};
|
|
12
|
+
max-height: ${(e) => y(e.theme, e.size)};
|
|
13
|
+
background-color: ${(e) => r(
|
|
14
|
+
e.theme,
|
|
15
|
+
"Input",
|
|
16
|
+
e.color,
|
|
17
|
+
"enabled",
|
|
18
|
+
"background"
|
|
19
|
+
)};
|
|
20
|
+
border-radius: 8px;
|
|
21
|
+
${(e) => e.focused === !0 && e.readOnly !== !0 ? V(e.theme) : ""}
|
|
22
|
+
`, D = c.input`
|
|
23
|
+
width: 0.1px;
|
|
24
|
+
height: 0.1px;
|
|
25
|
+
opacity: 0;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
position: absolute;
|
|
28
|
+
z-index: -1;
|
|
29
|
+
`, L = c.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
padding: 0.625rem 0.75rem;
|
|
34
|
+
${(e) => x(e.theme, "Input", e.size, "enabled")}
|
|
35
|
+
color: ${(e) => r(
|
|
36
|
+
e.theme,
|
|
37
|
+
"Input",
|
|
38
|
+
e.focused === !0 ? "primary" : e.color,
|
|
39
|
+
"enabled",
|
|
40
|
+
"prefix"
|
|
41
|
+
)};
|
|
42
|
+
cursor: ${(e) => e.disabled === !0 ? "default" : "pointer"};
|
|
43
|
+
background-color: ${(e) => r(
|
|
44
|
+
e.theme,
|
|
45
|
+
"Input",
|
|
46
|
+
e.color,
|
|
47
|
+
"enabled",
|
|
48
|
+
"background"
|
|
49
|
+
)};
|
|
50
|
+
border: 1px solid
|
|
51
|
+
${(e) => r(
|
|
52
|
+
e.theme,
|
|
53
|
+
"Input",
|
|
54
|
+
e.focused === !0 ? "primary" : e.color,
|
|
55
|
+
e.disabled === !0 ? "disabled" : "enabled",
|
|
56
|
+
"border"
|
|
57
|
+
)};
|
|
58
|
+
border-radius: 8px 0 0 8px;
|
|
59
|
+
|
|
60
|
+
${(e) => e.disabled === !0 ? p(e.theme) : ""}
|
|
61
|
+
`, U = c.input`
|
|
62
|
+
width: 100%;
|
|
63
|
+
appearance: none;
|
|
64
|
+
outline: none;
|
|
65
|
+
padding: 0.625rem 0.75rem;
|
|
66
|
+
${(e) => x(e.theme, "Input", e.size, "enabled")}
|
|
67
|
+
border: 1px solid
|
|
68
|
+
${(e) => r(
|
|
69
|
+
e.theme,
|
|
70
|
+
"Input",
|
|
71
|
+
e.focused === !0 ? "primary" : e.color,
|
|
72
|
+
e.disabled === !0 ? "disabled" : "enabled",
|
|
73
|
+
"border"
|
|
74
|
+
)};
|
|
75
|
+
border-radius: 0 8px 8px 0;
|
|
76
|
+
border-left: transparent;
|
|
77
|
+
color: ${(e) => r(
|
|
78
|
+
e.theme,
|
|
79
|
+
"Input",
|
|
80
|
+
e.focused === !0 ? "primary" : e.color,
|
|
81
|
+
"enabled",
|
|
82
|
+
"text"
|
|
83
|
+
)};
|
|
84
|
+
|
|
85
|
+
background-color: ${(e) => r(
|
|
86
|
+
e.theme,
|
|
87
|
+
"Input",
|
|
88
|
+
e.color,
|
|
89
|
+
"enabled",
|
|
90
|
+
"background"
|
|
91
|
+
)};
|
|
92
|
+
color: ${(e) => r(
|
|
93
|
+
e.theme,
|
|
94
|
+
"Input",
|
|
95
|
+
e.focused === !0 ? "primary" : e.color,
|
|
96
|
+
"enabled",
|
|
97
|
+
"text"
|
|
98
|
+
)};
|
|
99
|
+
|
|
100
|
+
${(e) => e.disabled === !0 ? p(e.theme) : ""}
|
|
101
|
+
`, W = S.forwardRef((e, $) => {
|
|
102
|
+
const {
|
|
103
|
+
className: I = "",
|
|
104
|
+
style: C = {},
|
|
105
|
+
onChange: i,
|
|
106
|
+
onFocus: d,
|
|
107
|
+
onBlur: s,
|
|
108
|
+
disabled: l,
|
|
109
|
+
readOnly: f,
|
|
110
|
+
multiple: w = !1,
|
|
111
|
+
accept: z = "",
|
|
112
|
+
label: O = "Choose File",
|
|
113
|
+
color: F = "primary",
|
|
114
|
+
size: k = "small",
|
|
115
|
+
...v
|
|
116
|
+
} = e, T = _(), [o, N] = g([]), [b, h] = g(!1);
|
|
117
|
+
var u = { theme: T, size: k, color: F, disabled: l, focused: b };
|
|
118
|
+
const j = () => {
|
|
119
|
+
if (o.length > 0) {
|
|
120
|
+
var n = "";
|
|
121
|
+
for (const a in o)
|
|
122
|
+
n += a == o.length - 1 ? `${o[a].name}` : `${o[a].name}, `;
|
|
123
|
+
return n;
|
|
124
|
+
}
|
|
125
|
+
return "";
|
|
126
|
+
};
|
|
127
|
+
return /* @__PURE__ */ R(
|
|
128
|
+
B,
|
|
129
|
+
{
|
|
130
|
+
...u,
|
|
131
|
+
className: I,
|
|
132
|
+
style: C,
|
|
133
|
+
focused: b,
|
|
134
|
+
readOnly: f,
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ m(
|
|
137
|
+
D,
|
|
138
|
+
{
|
|
139
|
+
...u,
|
|
140
|
+
accept: z,
|
|
141
|
+
multiple: w,
|
|
142
|
+
ref: $,
|
|
143
|
+
onChange: l || f ? () => {
|
|
144
|
+
} : (n) => {
|
|
145
|
+
var a = [];
|
|
146
|
+
if (n.target.files && n.target.files.length > 0)
|
|
147
|
+
for (const P of n.target.files)
|
|
148
|
+
a.push(P);
|
|
149
|
+
else a = [];
|
|
150
|
+
N(a), i && (i == null || i(n, a));
|
|
151
|
+
},
|
|
152
|
+
type: "file",
|
|
153
|
+
onFocus: (n) => {
|
|
154
|
+
l || h(!0), d && !l && (d == null || d(n));
|
|
155
|
+
},
|
|
156
|
+
onBlur: (n) => {
|
|
157
|
+
l || h(!1), s && !l && (s == null || s(n));
|
|
158
|
+
},
|
|
159
|
+
...v
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ m(L, { ...u, children: O }),
|
|
163
|
+
/* @__PURE__ */ m(
|
|
164
|
+
U,
|
|
165
|
+
{
|
|
166
|
+
tabIndex: -1,
|
|
167
|
+
...u,
|
|
168
|
+
onChange: () => {
|
|
169
|
+
},
|
|
170
|
+
value: j()
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
W.propTypes = {
|
|
178
|
+
id: t.any,
|
|
179
|
+
disabled: t.bool,
|
|
180
|
+
readOnly: t.bool,
|
|
181
|
+
multiple: t.bool,
|
|
182
|
+
accept: t.string,
|
|
183
|
+
label: t.oneOfType([t.string, t.element]),
|
|
184
|
+
tabIndex: t.number,
|
|
185
|
+
//-------------------------
|
|
186
|
+
onChange: t.func,
|
|
187
|
+
onFocus: t.func,
|
|
188
|
+
onBlur: t.func,
|
|
189
|
+
//-------------------------
|
|
190
|
+
className: t.string,
|
|
191
|
+
style: t.object,
|
|
192
|
+
size: t.oneOf(["small", "medium", "large"]),
|
|
193
|
+
color: t.oneOf([
|
|
194
|
+
"primary",
|
|
195
|
+
"secondary",
|
|
196
|
+
"success",
|
|
197
|
+
"danger",
|
|
198
|
+
"warning",
|
|
199
|
+
"information",
|
|
200
|
+
"neutral",
|
|
201
|
+
"gray"
|
|
202
|
+
])
|
|
203
|
+
};
|
|
204
|
+
export {
|
|
205
|
+
W as default
|
|
206
|
+
};
|
package/dist/FlexBox.cjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";const w=require("react/jsx-runtime"),d=require("react"),y=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),r=require("./index-DXnSjbfJ.cjs"),f={Row:"row",RowReverse:"row-reverse",Column:"column",ColumnReverse:"column-reverse"},m={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},x={Start:"flex-start",Center:"center",End:"flex-end",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},S={Start:"flex-start",Center:"center",Stretch:"stretch",End:"flex-end",Baseline:"baseline"},g=y.newStyled.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: ${e=>f[e.direction]};
|
|
4
|
+
flex-wrap: ${e=>m[e.wrap]};
|
|
5
|
+
justify-content: ${e=>x[e.justifyContent]};
|
|
6
|
+
align-items: ${e=>S[e.alignItems]};
|
|
7
|
+
column-gap: ${e=>e.columnGap?e.columnGap:e.gap};
|
|
8
|
+
row-gap: ${e=>e.rowGap?e.rowGap:e.gap};
|
|
9
|
+
`,t=d.forwardRef((e,o)=>{const{className:n="",children:a,direction:s="Row",wrap:p="NoWrap",justifyContent:c="Start",alignItems:i="Stretch",gap:l="0",...u}=e;return w.jsx(g,{className:"lnc-flexbox-container "+(n||""),ref:o,wrap:p,gap:l,alignItems:i,direction:s,justifyContent:c,...u,children:a})});t.propTypes={rowGap:r.PropTypes.string,columnGap:r.PropTypes.string,gap:r.PropTypes.string,direction:r.PropTypes.oneOf(["Row","RowReverse","Column","ColumnReverse"]),wrap:r.PropTypes.oneOf(["NoWrap","Wrap","WrapReverse"]),justifyContent:r.PropTypes.oneOf(["Start","Center","End","SpaceAround","SpaceBetween","SpaceEvenly"]),alignItems:r.PropTypes.oneOf(["Start","Center","Stretch","End","Baseline"])};module.exports=t;
|
package/dist/FlexBox.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { n as w } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
4
|
+
import { P as t } from "./index-Ds9PUTwb.js";
|
|
5
|
+
const d = {
|
|
6
|
+
Row: "row",
|
|
7
|
+
RowReverse: "row-reverse",
|
|
8
|
+
Column: "column",
|
|
9
|
+
ColumnReverse: "column-reverse"
|
|
10
|
+
}, u = {
|
|
11
|
+
NoWrap: "nowrap",
|
|
12
|
+
Wrap: "wrap",
|
|
13
|
+
WrapReverse: "wrap-reverse"
|
|
14
|
+
}, S = {
|
|
15
|
+
Start: "flex-start",
|
|
16
|
+
Center: "center",
|
|
17
|
+
End: "flex-end",
|
|
18
|
+
SpaceAround: "space-around",
|
|
19
|
+
SpaceBetween: "space-between",
|
|
20
|
+
SpaceEvenly: "space-evenly"
|
|
21
|
+
}, x = {
|
|
22
|
+
Start: "flex-start",
|
|
23
|
+
Center: "center",
|
|
24
|
+
Stretch: "stretch",
|
|
25
|
+
End: "flex-end",
|
|
26
|
+
Baseline: "baseline"
|
|
27
|
+
}, g = w.div`
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: ${(e) => d[e.direction]};
|
|
30
|
+
flex-wrap: ${(e) => u[e.wrap]};
|
|
31
|
+
justify-content: ${(e) => S[e.justifyContent]};
|
|
32
|
+
align-items: ${(e) => x[e.alignItems]};
|
|
33
|
+
column-gap: ${(e) => e.columnGap ? e.columnGap : e.gap};
|
|
34
|
+
row-gap: ${(e) => e.rowGap ? e.rowGap : e.gap};
|
|
35
|
+
`, v = m.forwardRef((e, n) => {
|
|
36
|
+
const {
|
|
37
|
+
className: r = "",
|
|
38
|
+
children: a,
|
|
39
|
+
direction: o = "Row",
|
|
40
|
+
wrap: s = "NoWrap",
|
|
41
|
+
justifyContent: c = "Start",
|
|
42
|
+
alignItems: l = "Stretch",
|
|
43
|
+
gap: p = "0",
|
|
44
|
+
...i
|
|
45
|
+
} = e;
|
|
46
|
+
return /* @__PURE__ */ f(
|
|
47
|
+
g,
|
|
48
|
+
{
|
|
49
|
+
className: "lnc-flexbox-container " + (r || ""),
|
|
50
|
+
ref: n,
|
|
51
|
+
wrap: s,
|
|
52
|
+
gap: p,
|
|
53
|
+
alignItems: l,
|
|
54
|
+
direction: o,
|
|
55
|
+
justifyContent: c,
|
|
56
|
+
...i,
|
|
57
|
+
children: a
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
v.propTypes = {
|
|
62
|
+
rowGap: t.string,
|
|
63
|
+
columnGap: t.string,
|
|
64
|
+
gap: t.string,
|
|
65
|
+
/**
|
|
66
|
+
* Controls the direction of items in FlexBox.
|
|
67
|
+
*/
|
|
68
|
+
direction: t.oneOf(["Row", "RowReverse", "Column", "ColumnReverse"]),
|
|
69
|
+
/**
|
|
70
|
+
* Determines whether the FlexBox should wrap, when there is not enough space to display all items in one line.
|
|
71
|
+
*/
|
|
72
|
+
wrap: t.oneOf(["NoWrap", "Wrap", "WrapReverse"]),
|
|
73
|
+
/**
|
|
74
|
+
* Controls how the space is distributed between items along the main-axis.
|
|
75
|
+
*/
|
|
76
|
+
justifyContent: t.oneOf([
|
|
77
|
+
"Start",
|
|
78
|
+
"Center",
|
|
79
|
+
"End",
|
|
80
|
+
"SpaceAround",
|
|
81
|
+
"SpaceBetween",
|
|
82
|
+
"SpaceEvenly"
|
|
83
|
+
]),
|
|
84
|
+
/**
|
|
85
|
+
* Controls how the space is distributed between items along the cross-axis.
|
|
86
|
+
*/
|
|
87
|
+
alignItems: t.oneOf([
|
|
88
|
+
"Start",
|
|
89
|
+
"Center",
|
|
90
|
+
"Stretch",
|
|
91
|
+
"End",
|
|
92
|
+
"Baseline"
|
|
93
|
+
])
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
v as default
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const P=require("react/jsx-runtime"),r=require("react"),e=require("./index-DXnSjbfJ.cjs"),S=require("./FlexBox.cjs"),d=require("./FlexGridItem.cjs"),t=r.forwardRef((p,o)=>{const{columns:s=12,spacing:c,rowSpacing:i,columnSpacing:a,justifyContent:u="Start",alignItems:y="Stretch",children:l,rest:T}=p,m=r.Children.map(l,n=>{if(!(!r.isValidElement(n)||n.type!=d))return r.cloneElement(n,{columns:s,spacing:c,rowSpacing:i,columnSpacing:a})});return P.jsx(S,{ref:o,wrap:"Wrap",justifyContent:u,alignItems:y,...T,children:m})});t.propTypes={columns:e.PropTypes.number,spacing:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.object]),rowSpacing:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.object]),columnSpacing:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.object]),justifyContent:e.PropTypes.oneOf(["Start","Center","End","SpaceAround","SpaceBetween","SpaceEvenly"]),alignItems:e.PropTypes.oneOf(["Start","Center","Stretch","End","Baseline"])};module.exports=t;
|
package/dist/FlexGrid.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { P as e } from "./index-Ds9PUTwb.js";
|
|
4
|
+
import S from "./FlexBox.js";
|
|
5
|
+
import y from "./FlexGridItem.js";
|
|
6
|
+
const g = n.forwardRef((t, o) => {
|
|
7
|
+
const {
|
|
8
|
+
columns: p = 12,
|
|
9
|
+
spacing: a,
|
|
10
|
+
rowSpacing: c,
|
|
11
|
+
columnSpacing: m,
|
|
12
|
+
justifyContent: i = "Start",
|
|
13
|
+
alignItems: l = "Stretch",
|
|
14
|
+
children: s,
|
|
15
|
+
rest: f
|
|
16
|
+
} = t, u = n.Children.map(s, (r) => {
|
|
17
|
+
if (!(!n.isValidElement(r) || r.type != y))
|
|
18
|
+
return n.cloneElement(r, {
|
|
19
|
+
columns: p,
|
|
20
|
+
spacing: a,
|
|
21
|
+
rowSpacing: c,
|
|
22
|
+
columnSpacing: m
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ d(
|
|
26
|
+
S,
|
|
27
|
+
{
|
|
28
|
+
ref: o,
|
|
29
|
+
wrap: "Wrap",
|
|
30
|
+
justifyContent: i,
|
|
31
|
+
alignItems: l,
|
|
32
|
+
...f,
|
|
33
|
+
children: u
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
g.propTypes = {
|
|
38
|
+
/**
|
|
39
|
+
* Number of available grid columns.
|
|
40
|
+
*/
|
|
41
|
+
columns: e.number,
|
|
42
|
+
/**
|
|
43
|
+
* Defines spacing for rows and columns.
|
|
44
|
+
*/
|
|
45
|
+
spacing: e.oneOfType([e.number, e.object]),
|
|
46
|
+
/**
|
|
47
|
+
* Defines row spacing. If this is set, `spacing` property is ignored for this value.
|
|
48
|
+
*/
|
|
49
|
+
rowSpacing: e.oneOfType([e.number, e.object]),
|
|
50
|
+
/**
|
|
51
|
+
* Defines column spacing. If this is set, `spacing` property is ignored for this value.
|
|
52
|
+
*/
|
|
53
|
+
columnSpacing: e.oneOfType([e.number, e.object]),
|
|
54
|
+
/**
|
|
55
|
+
* Controls how the space is distributed between items along the main-axis.
|
|
56
|
+
*/
|
|
57
|
+
justifyContent: e.oneOf([
|
|
58
|
+
"Start",
|
|
59
|
+
"Center",
|
|
60
|
+
"End",
|
|
61
|
+
"SpaceAround",
|
|
62
|
+
"SpaceBetween",
|
|
63
|
+
"SpaceEvenly"
|
|
64
|
+
]),
|
|
65
|
+
/**
|
|
66
|
+
* Controls how the space is distributed between items along the cross-axis.
|
|
67
|
+
*/
|
|
68
|
+
alignItems: e.oneOf([
|
|
69
|
+
"Start",
|
|
70
|
+
"Center",
|
|
71
|
+
"Stretch",
|
|
72
|
+
"End",
|
|
73
|
+
"Baseline"
|
|
74
|
+
])
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
g as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const X=require("react/jsx-runtime"),i=require("react"),n=require("./index-DXnSjbfJ.cjs"),g=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),q=require("./utils-hdRGTsQ7.cjs"),$=g.newStyled.div`
|
|
2
|
+
${s=>s.width>0?"":"flex: 1;"}
|
|
3
|
+
min-width: ${s=>100/s.columns}%;
|
|
4
|
+
width: ${s=>s.width}%;
|
|
5
|
+
padding: ${s=>s.rowGap}px ${s=>s.columnGap}px;
|
|
6
|
+
overflow-wrap: break-word;
|
|
7
|
+
`,y=i.forwardRef((s,x)=>{const{XS:t,S:c,M:o,L:a,XL:m,col:S,columns:e,spacing:l,rowSpacing:p,columnSpacing:u,children:G}=s,d=q.useScreenSize(),[T,k]=i.useState(0),[L,w]=i.useState(0),[P,f]=i.useState(0);i.useEffect(()=>{b()},[e,t,c,o,a,m,S]),i.useEffect(()=>{b(),h()},[d]),i.useEffect(()=>{h()},[l,p,u]);const b=()=>{let r=S?100/(e/S):0;switch(d){case"XS":r=t?100/(e/t):r;break;case"S":r=c?100/(e/c):t?100/(e/t):r;break;case"M":r=o?100/(e/o):c?100/(e/c):t?100/(e/t):r;break;case"L":r=a?100/(e/a):o?100/(e/o):c?100/(e/c):t?100/(e/t):r;break;case"XL":r=m?100/(e/m):a?100/(e/a):o?100/(e/o):c?100/(e/c):t?100/(e/t):r;break}k(r)},h=()=>{l?(w(l),f(l)):(p&&(isNaN(p)?w(p[d]??0):w(p)),u&&(isNaN(u)?f(u[d]??0):f(u)))};return X.jsx($,{ref:x,columns:e,width:T,rowGap:L,columnGap:P,children:G})});y.propTypes={XS:n.PropTypes.number,S:n.PropTypes.number,M:n.PropTypes.number,L:n.PropTypes.number,XL:n.PropTypes.number,col:n.PropTypes.number};module.exports=y;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import N, { useState as S, useEffect as b } from "react";
|
|
3
|
+
import { P as i } from "./index-Ds9PUTwb.js";
|
|
4
|
+
import { n as I } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
5
|
+
import { u as M } from "./utils-DEke8iwo.js";
|
|
6
|
+
const R = I.div`
|
|
7
|
+
${(t) => t.width > 0 ? "" : "flex: 1;"}
|
|
8
|
+
min-width: ${(t) => 100 / t.columns}%;
|
|
9
|
+
width: ${(t) => t.width}%;
|
|
10
|
+
padding: ${(t) => t.rowGap}px ${(t) => t.columnGap}px;
|
|
11
|
+
overflow-wrap: break-word;
|
|
12
|
+
`, W = N.forwardRef((t, x) => {
|
|
13
|
+
const {
|
|
14
|
+
XS: r,
|
|
15
|
+
S: s,
|
|
16
|
+
M: a,
|
|
17
|
+
L: c,
|
|
18
|
+
XL: d,
|
|
19
|
+
col: u,
|
|
20
|
+
columns: e,
|
|
21
|
+
spacing: p,
|
|
22
|
+
rowSpacing: n,
|
|
23
|
+
columnSpacing: m,
|
|
24
|
+
children: k
|
|
25
|
+
} = t, l = M(), [L, X] = S(0), [g, f] = S(0), [$, w] = S(0);
|
|
26
|
+
b(() => {
|
|
27
|
+
h();
|
|
28
|
+
}, [e, r, s, a, c, d, u]), b(() => {
|
|
29
|
+
h(), G();
|
|
30
|
+
}, [l]), b(() => {
|
|
31
|
+
G();
|
|
32
|
+
}, [p, n, m]);
|
|
33
|
+
const h = () => {
|
|
34
|
+
let o = u ? 100 / (e / u) : 0;
|
|
35
|
+
switch (l) {
|
|
36
|
+
case "XS":
|
|
37
|
+
o = r ? 100 / (e / r) : o;
|
|
38
|
+
break;
|
|
39
|
+
case "S":
|
|
40
|
+
o = s ? 100 / (e / s) : r ? 100 / (e / r) : o;
|
|
41
|
+
break;
|
|
42
|
+
case "M":
|
|
43
|
+
o = a ? 100 / (e / a) : s ? 100 / (e / s) : r ? 100 / (e / r) : o;
|
|
44
|
+
break;
|
|
45
|
+
case "L":
|
|
46
|
+
o = c ? 100 / (e / c) : a ? 100 / (e / a) : s ? 100 / (e / s) : r ? 100 / (e / r) : o;
|
|
47
|
+
break;
|
|
48
|
+
case "XL":
|
|
49
|
+
o = d ? 100 / (e / d) : c ? 100 / (e / c) : a ? 100 / (e / a) : s ? 100 / (e / s) : r ? 100 / (e / r) : o;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
X(o);
|
|
53
|
+
}, G = () => {
|
|
54
|
+
p ? (f(p), w(p)) : (n && (isNaN(n) ? f(n[l] ?? 0) : f(n)), m && (isNaN(m) ? w(m[l] ?? 0) : w(m)));
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ y(
|
|
57
|
+
R,
|
|
58
|
+
{
|
|
59
|
+
ref: x,
|
|
60
|
+
columns: e,
|
|
61
|
+
width: L,
|
|
62
|
+
rowGap: g,
|
|
63
|
+
columnGap: $,
|
|
64
|
+
children: k
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
W.propTypes = {
|
|
69
|
+
/**
|
|
70
|
+
* Number of columns to take up on XS screens.
|
|
71
|
+
*/
|
|
72
|
+
XS: i.number,
|
|
73
|
+
/**
|
|
74
|
+
* Number of columns to take up on S screens.
|
|
75
|
+
*/
|
|
76
|
+
S: i.number,
|
|
77
|
+
/**
|
|
78
|
+
* Number of columns to take up on M screens.
|
|
79
|
+
*/
|
|
80
|
+
M: i.number,
|
|
81
|
+
/**
|
|
82
|
+
* Number of columns to take up on L screens.
|
|
83
|
+
*/
|
|
84
|
+
L: i.number,
|
|
85
|
+
/**
|
|
86
|
+
* Number of columns to take up on XL screens.
|
|
87
|
+
*/
|
|
88
|
+
XL: i.number,
|
|
89
|
+
/**
|
|
90
|
+
* Number of columns to take up on any screen size.
|
|
91
|
+
* Defining number on columns for specific screen sizes takes priority over this.
|
|
92
|
+
*/
|
|
93
|
+
col: i.number
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
W as default
|
|
97
|
+
};
|
package/dist/Footer.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),i=require("react"),c=require("./index-DXnSjbfJ.cjs"),e=i.forwardRef((r,o)=>{const{children:t,__TYPE__:_="Footer",...s}=r;return n.jsx("footer",{ref:o,...s,children:t})});e.propTypes={__TYPE__:c.PropTypes.string};e.displayName="Footer";module.exports=e;
|
package/dist/Footer.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import _ from "react";
|
|
3
|
+
import { P as a } from "./index-Ds9PUTwb.js";
|
|
4
|
+
const o = _.forwardRef((r, t) => {
|
|
5
|
+
const { children: e, __TYPE__: f = "Footer", ...p } = r;
|
|
6
|
+
return /* @__PURE__ */ s("footer", { ref: t, ...p, children: e });
|
|
7
|
+
});
|
|
8
|
+
o.propTypes = {
|
|
9
|
+
/**
|
|
10
|
+
* Do not override this property.
|
|
11
|
+
* Should only be used as indicator for type if you are passing custom component.
|
|
12
|
+
*/
|
|
13
|
+
__TYPE__: a.string
|
|
14
|
+
};
|
|
15
|
+
o.displayName = "Footer";
|
|
16
|
+
export {
|
|
17
|
+
o as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime");require("react");const r=require("./index-DXnSjbfJ.cjs"),a=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),o=require("./utils-hdRGTsQ7.cjs"),b=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),g=a.newStyled.label`
|
|
2
|
+
display: block;
|
|
3
|
+
margin-bottom: 4px;
|
|
4
|
+
${e=>o.getComponentTypographyCss(e.theme,"FormField",e.size,"enabled")}
|
|
5
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"FormField","primary","enabled","label")};
|
|
6
|
+
`,u=a.newStyled.span`
|
|
7
|
+
display: block;
|
|
8
|
+
margin-top: 8px;
|
|
9
|
+
${e=>o.getComponentTypographyCss(e.theme,"FormField",e.size,"enabled")}
|
|
10
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"FormField",e.color,"enabled","text")};
|
|
11
|
+
`,m=e=>{const{size:l="small",color:c="primary",className:d="",style:p={},text:t="",label:n="",children:y,...h}=e,i=b.useTheme();return s.jsxs("div",{style:p,className:"lnc-ui-form-field "+d,children:[n&&s.jsx(g,{theme:i,size:l,children:n}),y,t&&s.jsx(u,{size:l,theme:i,color:c,children:t})]})};m.propTypes={text:r.PropTypes.string,label:r.PropTypes.string,size:r.PropTypes.oneOf(["small","medium","large"]),color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"]),style:r.PropTypes.object,className:r.PropTypes.string};module.exports=m;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { P as l } from "./index-Ds9PUTwb.js";
|
|
4
|
+
import { n as m } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
5
|
+
import { a as i, b as n } from "./utils-DEke8iwo.js";
|
|
6
|
+
import { u as g } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
7
|
+
const f = m.label`
|
|
8
|
+
display: block;
|
|
9
|
+
margin-bottom: 4px;
|
|
10
|
+
${(e) => i(e.theme, "FormField", e.size, "enabled")}
|
|
11
|
+
color: ${(e) => n(e.theme, "FormField", "primary", "enabled", "label")};
|
|
12
|
+
`, h = m.span`
|
|
13
|
+
display: block;
|
|
14
|
+
margin-top: 8px;
|
|
15
|
+
${(e) => i(e.theme, "FormField", e.size, "enabled")}
|
|
16
|
+
color: ${(e) => n(
|
|
17
|
+
e.theme,
|
|
18
|
+
"FormField",
|
|
19
|
+
e.color,
|
|
20
|
+
"enabled",
|
|
21
|
+
"text"
|
|
22
|
+
)};
|
|
23
|
+
`, F = (e) => {
|
|
24
|
+
const {
|
|
25
|
+
size: r = "small",
|
|
26
|
+
color: c = "primary",
|
|
27
|
+
className: d = "",
|
|
28
|
+
style: p = {},
|
|
29
|
+
text: o = "",
|
|
30
|
+
label: t = "",
|
|
31
|
+
children: y,
|
|
32
|
+
...u
|
|
33
|
+
} = e, a = g();
|
|
34
|
+
return /* @__PURE__ */ b("div", { style: p, className: "lnc-ui-form-field " + d, children: [
|
|
35
|
+
t && /* @__PURE__ */ s(f, { theme: a, size: r, children: t }),
|
|
36
|
+
y,
|
|
37
|
+
o && /* @__PURE__ */ s(h, { size: r, theme: a, color: c, children: o })
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
40
|
+
F.propTypes = {
|
|
41
|
+
/**
|
|
42
|
+
* Additional text that appears below the main element.
|
|
43
|
+
*/
|
|
44
|
+
text: l.string,
|
|
45
|
+
/**
|
|
46
|
+
* Label text that appears above the main element.
|
|
47
|
+
*/
|
|
48
|
+
label: l.string,
|
|
49
|
+
size: l.oneOf(["small", "medium", "large"]),
|
|
50
|
+
color: l.oneOf([
|
|
51
|
+
"primary",
|
|
52
|
+
"secondary",
|
|
53
|
+
"success",
|
|
54
|
+
"danger",
|
|
55
|
+
"warning",
|
|
56
|
+
"information",
|
|
57
|
+
"neutral",
|
|
58
|
+
"gray"
|
|
59
|
+
]),
|
|
60
|
+
style: l.object,
|
|
61
|
+
className: l.string
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
F as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),W=require("react"),r=require("./index-DXnSjbfJ.cjs"),g=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),$=require("./FlexGrid.cjs"),M=require("./FlexGridItem.cjs"),b=require("./Button.cjs"),m=require("./IconButton.cjs"),Y=require("./TextInput.cjs"),U=require("./CheckBoxInput.cjs"),H=require("./RadioGroup.cjs"),J=require("./NumberInput.cjs"),K=require("./DecimalInput.cjs"),L=require("./PasswordInput.cjs"),Q=require("./TextAreaInput.cjs"),X=require("./TimeInput.cjs"),Z=require("./ColorInput.cjs"),z=require("./FileInput.cjs"),ee=require("./RangeSlider.cjs"),x=require("./utils-hdRGTsQ7.cjs"),re=require("./FormField.cjs"),te=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),oe=g.newStyled.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
`,se=g.newStyled.form`
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 1rem;
|
|
8
|
+
box-shadow: ${l=>x.getComponentPropValue(l.theme,"Popover",l.color,"enabled","boxShadow")};
|
|
9
|
+
border-radius: ${l=>x.getBorderRadiusValueWithUnits(l.theme,l.borderRadius)};
|
|
10
|
+
border-top: 1px solid rgba(0, 0, 0, 0.04);
|
|
11
|
+
padding: 12px;
|
|
12
|
+
background-color: ${l=>x.getColorRgbaValue(l.theme,"Popover","default","enabled","bg")};
|
|
13
|
+
`,ne=(l,s,i,n,a,o)=>{var c;switch(l||""){case"text":return e.jsx(Y,{name:i,color:a,size:o,...s,defaultValue:n});case"checkbox":return e.jsx(U,{color:a,size:o,name:i,...s});case"radioGroup":return e.jsx(H,{color:a,size:o,value:n,radioProps:s.radioProps,name:i,items:[...(c=s.items)==null?void 0:c.map(d=>({value:d.value,label:d.label}))]});case"number":return e.jsx(J,{color:a,size:o,name:i,...s,defaultValue:n});case"decimal":return e.jsx(K,{name:i,color:a,size:o,...s,defaultValue:n});case"file":return e.jsx(z,{name:i,color:a,size:o,...s,defaultValue:n});case"password":return e.jsx(L,{name:i,color:a,...s,defaultValue:n});case"textArea":return e.jsx(Q,{name:i,color:a,size:o,...s,defaultValue:n});case"time":return e.jsx(X,{name:i,color:a,size:o,...s,defaultValue:n});case"color":return e.jsx(Z,{name:i,color:a,size:o,...s,defaultValue:n});case"range":return e.jsx(ee,{name:i,color:a,size:o,...s,defaultValue:n});default:return n}},y=W.forwardRef((l,s)=>{const{__TYPE__:i="FORM_VIEW",goToPreviousView:n,id:a,data:o,fields:c=[],errors:d={},flexGridProps:f,goBackText:P="Go back",backActive:j=!0,nextActive:h=!0,previousActive:q=!0,editActive:ae,disableGoBack:k=!1,disableNext:w=!1,disablePrevious:v=!1,disableEdit:ie,disableDiscard:I=!1,disableSave:V=!1,discardText:_="Discard",saveText:S="Save",goToNext:B=()=>{},goToPrevious:F=()=>{},onEdit:le=()=>{},goBack:R=()=>{},onSubmit:A=()=>{},onDiscard:C=()=>{},className:de="",style:ce={},color:p="primary",size:T="small",children:G,...E}=l,N=te.useTheme(),D=(t,u)=>{n&&n(),R(t,u)},O=()=>e.jsx(e.Fragment,{children:G||e.jsx($,{spacing:10,...f,children:c.map((t,u)=>e.jsx(M,{...t,children:e.jsx(re,{label:t.label,text:d[t.accessor],color:d[t.accessor]?"danger":p,size:T,children:t.type=="custom"?t.element:ne(t.type,t.inputProps,t.accessor,o[t.accessor],d[t.accessor]?"danger":p,T)},u)},u))})});return e.jsxs(se,{ref:s,theme:N,color:p,borderRadius:"regular",...E,children:[j&&e.jsx(b,{leadingIcon:"arrow-circle-left",text:P,btnType:"outline",style:{width:"fit-content"},onClick:t=>D(t,o),disabled:k,type:"button"},0),O(),e.jsxs(oe,{children:[e.jsxs("div",{children:[h&&e.jsxs(e.Fragment,{children:[e.jsx(m,{btnType:"outline",icon:"angle-left",disabled:v,onClick:t=>F(o,t),type:"button"})," "]}),q&&e.jsx(m,{btnType:"outline",icon:"angle-right",disabled:w,onClick:t=>B(o,t),type:"button"})]}),e.jsxs("div",{children:[e.jsx(b,{leadingIcon:"eraser",btnType:"outline",color:"warning",text:_,disabled:I,onClick:C,type:"button"})," ",e.jsx(b,{leadingIcon:"floppy-disk",btnType:"tinted",color:"success",text:S,disabled:V,onClick:A})]})]})]},a)});y.propTypes={__TYPE__:r.PropTypes.string,goBackText:r.PropTypes.string,fields:r.PropTypes.array,data:r.PropTypes.object,errors:r.PropTypes.object,backActive:r.PropTypes.bool,nextActive:r.PropTypes.bool,disableGoBack:r.PropTypes.bool,disableNext:r.PropTypes.bool,disablePrevious:r.PropTypes.bool,previousActive:r.PropTypes.bool,editActive:r.PropTypes.bool,flexGridProps:r.PropTypes.any,disableDiscard:r.PropTypes.bool,disableSave:r.PropTypes.bool,discardText:r.PropTypes.string,saveText:r.PropTypes.string,goToNext:r.PropTypes.func,goToPrevious:r.PropTypes.func,onEdit:r.PropTypes.func,goBack:r.PropTypes.func,onSubmit:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,color:r.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:r.PropTypes.oneOf(["small","medium","large"])};y.displayName="FORM_VIEW";module.exports=y;
|