@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
package/dist/Button.js
ADDED
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
import { jsx as i, jsxs as K, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import _ from "react";
|
|
3
|
+
import { P as o } from "./index-Ds9PUTwb.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { i as y } from "./index-Cdkz-XH-.js";
|
|
6
|
+
import { n as r } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
7
|
+
import { a as x, b as t, f as c, g as T, h as z, c as E } from "./utils-DEke8iwo.js";
|
|
8
|
+
import j from "./Icon.js";
|
|
9
|
+
import { u as q } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
10
|
+
const k = {
|
|
11
|
+
small: {
|
|
12
|
+
regular: "1rem",
|
|
13
|
+
icon: "0.75rem",
|
|
14
|
+
justIcon: "0.5rem"
|
|
15
|
+
},
|
|
16
|
+
medium: {
|
|
17
|
+
regular: "1.5rem",
|
|
18
|
+
icon: "1rem",
|
|
19
|
+
justIcon: "0.5rem"
|
|
20
|
+
},
|
|
21
|
+
large: {
|
|
22
|
+
regular: "1.5rem",
|
|
23
|
+
icon: "1rem",
|
|
24
|
+
justIcon: "0.5rem"
|
|
25
|
+
}
|
|
26
|
+
}, I = (e) => `
|
|
27
|
+
outline: none;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
border: none;
|
|
33
|
+
transition: all 50 ms ease-in;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
color: ${!e.disabled && "white"};
|
|
36
|
+
|
|
37
|
+
border-radius: ${E(
|
|
38
|
+
e.theme,
|
|
39
|
+
e.borderRadius
|
|
40
|
+
)};
|
|
41
|
+
|
|
42
|
+
padding-left: ${e.hasLeadingIcon ? k[e.size].icon : k[e.size].regular};
|
|
43
|
+
padding-right: ${e.hasTrailingIcon ? k[e.size].icon : k[e.size].regular};
|
|
44
|
+
`, A = r.span`
|
|
45
|
+
padding-right: ${(e) => e.size === "small" ? "0.25rem" : "0.5rem"};
|
|
46
|
+
`, G = r.span`
|
|
47
|
+
padding-left: ${(e) => e.size === "small" ? "0.25rem" : "0.5rem"};
|
|
48
|
+
`, w = r.button`
|
|
49
|
+
${(e) => I(e)}
|
|
50
|
+
|
|
51
|
+
${(e) => x(
|
|
52
|
+
e.theme,
|
|
53
|
+
"ButtonFilled",
|
|
54
|
+
e.size,
|
|
55
|
+
"enabled"
|
|
56
|
+
)};
|
|
57
|
+
|
|
58
|
+
background-color: ${(e) => !e.disabled && t(
|
|
59
|
+
e.theme,
|
|
60
|
+
"ButtonFilled",
|
|
61
|
+
e.color,
|
|
62
|
+
"enabled",
|
|
63
|
+
"background"
|
|
64
|
+
)};
|
|
65
|
+
color: ${(e) => t(
|
|
66
|
+
e.theme,
|
|
67
|
+
"ButtonFilled",
|
|
68
|
+
e.color,
|
|
69
|
+
"enabled",
|
|
70
|
+
"text"
|
|
71
|
+
)};
|
|
72
|
+
|
|
73
|
+
min-height: ${(e) => c(e.theme, e.size)};
|
|
74
|
+
max-height: ${(e) => c(e.theme, e.size)};
|
|
75
|
+
|
|
76
|
+
&:disabled {
|
|
77
|
+
${(e) => e.disabled === !0 && T(e.theme)};
|
|
78
|
+
cursor: default;
|
|
79
|
+
background-color: ${(e) => t(
|
|
80
|
+
e.theme,
|
|
81
|
+
"ButtonFilled",
|
|
82
|
+
"gray",
|
|
83
|
+
"disabled",
|
|
84
|
+
"background"
|
|
85
|
+
)};
|
|
86
|
+
color: ${(e) => t(
|
|
87
|
+
e.theme,
|
|
88
|
+
"ButtonFilled",
|
|
89
|
+
e.color,
|
|
90
|
+
"disabled",
|
|
91
|
+
"text"
|
|
92
|
+
)};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:hover {
|
|
96
|
+
background-color: ${(e) => e.disabled === !1 && t(
|
|
97
|
+
e.theme,
|
|
98
|
+
"ButtonFilled",
|
|
99
|
+
e.color,
|
|
100
|
+
"hover",
|
|
101
|
+
"background"
|
|
102
|
+
)};
|
|
103
|
+
color: ${(e) => e.disabled === !1 && t(
|
|
104
|
+
e.theme,
|
|
105
|
+
"ButtonFilled",
|
|
106
|
+
e.color,
|
|
107
|
+
"hover",
|
|
108
|
+
"text"
|
|
109
|
+
)};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:focus {
|
|
113
|
+
background-color: ${(e) => !e.disabled && t(
|
|
114
|
+
e.theme,
|
|
115
|
+
"ButtonFilled",
|
|
116
|
+
e.color,
|
|
117
|
+
"focus",
|
|
118
|
+
"background"
|
|
119
|
+
)};
|
|
120
|
+
color: ${(e) => e.disabled === !1 && t(
|
|
121
|
+
e.theme,
|
|
122
|
+
"ButtonFilled",
|
|
123
|
+
e.color,
|
|
124
|
+
"focus",
|
|
125
|
+
"text"
|
|
126
|
+
)};
|
|
127
|
+
${(e) => !e.disabled && z(e.theme)};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&:active {
|
|
131
|
+
background-color: ${(e) => e.disabled === !1 && t(
|
|
132
|
+
e.theme,
|
|
133
|
+
"ButtonFilled",
|
|
134
|
+
e.color,
|
|
135
|
+
"active",
|
|
136
|
+
"background"
|
|
137
|
+
)};
|
|
138
|
+
color: ${(e) => e.disabled === !1 && t(
|
|
139
|
+
e.theme,
|
|
140
|
+
"ButtonFilled",
|
|
141
|
+
e.color,
|
|
142
|
+
"active",
|
|
143
|
+
"text"
|
|
144
|
+
)};
|
|
145
|
+
}
|
|
146
|
+
`, H = r.button`
|
|
147
|
+
${(e) => I(e)}
|
|
148
|
+
|
|
149
|
+
min-height: ${(e) => c(e.theme, e.size)};
|
|
150
|
+
max-height: ${(e) => c(e.theme, e.size)};
|
|
151
|
+
${(e) => x(
|
|
152
|
+
e.theme,
|
|
153
|
+
"ButtonTinted",
|
|
154
|
+
e.size,
|
|
155
|
+
"enabled"
|
|
156
|
+
)};
|
|
157
|
+
|
|
158
|
+
backdrop-filter: blur(48px);
|
|
159
|
+
background-color: ${(e) => t(
|
|
160
|
+
e.theme,
|
|
161
|
+
"ButtonTinted",
|
|
162
|
+
e.color,
|
|
163
|
+
"enabled",
|
|
164
|
+
"background",
|
|
165
|
+
"backgroundOpacity"
|
|
166
|
+
)};
|
|
167
|
+
|
|
168
|
+
color: ${(e) => t(
|
|
169
|
+
e.theme,
|
|
170
|
+
"ButtonTinted",
|
|
171
|
+
e.color,
|
|
172
|
+
"enabled",
|
|
173
|
+
"text"
|
|
174
|
+
)};
|
|
175
|
+
|
|
176
|
+
&:hover {
|
|
177
|
+
background-color: ${(e) => t(
|
|
178
|
+
e.theme,
|
|
179
|
+
"ButtonTinted",
|
|
180
|
+
e.color,
|
|
181
|
+
"hover",
|
|
182
|
+
"background",
|
|
183
|
+
"backgroundOpacity"
|
|
184
|
+
)};
|
|
185
|
+
|
|
186
|
+
color: ${(e) => t(
|
|
187
|
+
e.theme,
|
|
188
|
+
"ButtonTinted",
|
|
189
|
+
e.color,
|
|
190
|
+
"hover",
|
|
191
|
+
"text"
|
|
192
|
+
)};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&:focus {
|
|
196
|
+
background-color: ${(e) => t(
|
|
197
|
+
e.theme,
|
|
198
|
+
"ButtonTinted",
|
|
199
|
+
e.color,
|
|
200
|
+
"focus",
|
|
201
|
+
"background",
|
|
202
|
+
"backgroundOpacity"
|
|
203
|
+
)};
|
|
204
|
+
|
|
205
|
+
color: ${(e) => t(
|
|
206
|
+
e.theme,
|
|
207
|
+
"ButtonTinted",
|
|
208
|
+
e.color,
|
|
209
|
+
"focus",
|
|
210
|
+
"text"
|
|
211
|
+
)};
|
|
212
|
+
${(e) => e.disabled === !1 && z(e.theme)};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:active {
|
|
216
|
+
background-color: ${(e) => t(
|
|
217
|
+
e.theme,
|
|
218
|
+
"ButtonTinted",
|
|
219
|
+
e.color,
|
|
220
|
+
"active",
|
|
221
|
+
"background",
|
|
222
|
+
"backgroundOpacity"
|
|
223
|
+
)};
|
|
224
|
+
|
|
225
|
+
color: ${(e) => t(
|
|
226
|
+
e.theme,
|
|
227
|
+
"ButtonTinted",
|
|
228
|
+
e.color,
|
|
229
|
+
"focus",
|
|
230
|
+
"text"
|
|
231
|
+
)};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&:disabled {
|
|
235
|
+
${(e) => e.disabled === !0 && T(e.theme)};
|
|
236
|
+
cursor: default;
|
|
237
|
+
background-color: ${(e) => t(
|
|
238
|
+
e.theme,
|
|
239
|
+
"ButtonTinted",
|
|
240
|
+
"gray",
|
|
241
|
+
"disabled",
|
|
242
|
+
"background"
|
|
243
|
+
)};
|
|
244
|
+
}
|
|
245
|
+
`, R = r.button`
|
|
246
|
+
${(e) => I(e)}
|
|
247
|
+
|
|
248
|
+
${(e) => x(
|
|
249
|
+
e.theme,
|
|
250
|
+
"ButtonTinted",
|
|
251
|
+
e.size,
|
|
252
|
+
"enabled"
|
|
253
|
+
)};
|
|
254
|
+
|
|
255
|
+
color: ${(e) => e.disabled === !1 && t(
|
|
256
|
+
e.theme,
|
|
257
|
+
"ButtonBasic",
|
|
258
|
+
e.color,
|
|
259
|
+
"enabled",
|
|
260
|
+
"text"
|
|
261
|
+
)};
|
|
262
|
+
|
|
263
|
+
background-color: ${(e) => e.disabled === !1 && t(
|
|
264
|
+
e.theme,
|
|
265
|
+
"ButtonBasic",
|
|
266
|
+
e.color,
|
|
267
|
+
"enabled",
|
|
268
|
+
"background",
|
|
269
|
+
"backgroundOpacity"
|
|
270
|
+
)};
|
|
271
|
+
|
|
272
|
+
min-height: ${(e) => c(e.theme, e.size)};
|
|
273
|
+
max-height: ${(e) => c(e.theme, e.size)};
|
|
274
|
+
|
|
275
|
+
&:hover {
|
|
276
|
+
background-color: ${(e) => t(
|
|
277
|
+
e.theme,
|
|
278
|
+
"ButtonBasic",
|
|
279
|
+
e.color,
|
|
280
|
+
"hover",
|
|
281
|
+
"background",
|
|
282
|
+
"backgroundOpacity"
|
|
283
|
+
)};
|
|
284
|
+
|
|
285
|
+
color: ${(e) => t(
|
|
286
|
+
e.theme,
|
|
287
|
+
"ButtonBasic",
|
|
288
|
+
e.color,
|
|
289
|
+
"hover",
|
|
290
|
+
"text"
|
|
291
|
+
)};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&:focus {
|
|
295
|
+
background-color: ${(e) => t(
|
|
296
|
+
e.theme,
|
|
297
|
+
"ButtonBasic",
|
|
298
|
+
e.color,
|
|
299
|
+
"focus",
|
|
300
|
+
"background",
|
|
301
|
+
"backgroundOpacity"
|
|
302
|
+
)};
|
|
303
|
+
color: ${(e) => t(
|
|
304
|
+
e.theme,
|
|
305
|
+
"ButtonBasic",
|
|
306
|
+
e.color,
|
|
307
|
+
"focus",
|
|
308
|
+
"text"
|
|
309
|
+
)};
|
|
310
|
+
|
|
311
|
+
${(e) => !e.disabled && z(e.theme)};
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&:active {
|
|
315
|
+
background-color: ${(e) => t(
|
|
316
|
+
e.theme,
|
|
317
|
+
"ButtonBasic",
|
|
318
|
+
e.color,
|
|
319
|
+
"active",
|
|
320
|
+
"background",
|
|
321
|
+
"backgroundOpacity"
|
|
322
|
+
)};
|
|
323
|
+
color: ${(e) => t(
|
|
324
|
+
e.theme,
|
|
325
|
+
"ButtonBasic",
|
|
326
|
+
e.color,
|
|
327
|
+
"active",
|
|
328
|
+
"text"
|
|
329
|
+
)};
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
&:disabled {
|
|
333
|
+
${(e) => e.disabled === !0 && T(e.theme)};
|
|
334
|
+
cursor: default;
|
|
335
|
+
background-color: ${(e) => t(
|
|
336
|
+
e.theme,
|
|
337
|
+
"ButtonBasic",
|
|
338
|
+
"gray",
|
|
339
|
+
"disabled",
|
|
340
|
+
"background",
|
|
341
|
+
"backgroundOpacity"
|
|
342
|
+
)};
|
|
343
|
+
}
|
|
344
|
+
`, J = r(R)`
|
|
345
|
+
border: 1px solid
|
|
346
|
+
${(e) => t(
|
|
347
|
+
e.theme,
|
|
348
|
+
"ButtonBasic",
|
|
349
|
+
e.color,
|
|
350
|
+
"enabled",
|
|
351
|
+
"border",
|
|
352
|
+
"borderOpacity"
|
|
353
|
+
)};
|
|
354
|
+
`, M = _.forwardRef((e, d) => {
|
|
355
|
+
const {
|
|
356
|
+
text: v = "",
|
|
357
|
+
iconStyle: O = "solid",
|
|
358
|
+
leadingIcon: F = null,
|
|
359
|
+
trailingIcon: C = null,
|
|
360
|
+
borderRadius: S = "regular",
|
|
361
|
+
btnType: n = "filled",
|
|
362
|
+
disabled: L = !1,
|
|
363
|
+
tabIndex: u = 0,
|
|
364
|
+
//----------------
|
|
365
|
+
onFocus: s,
|
|
366
|
+
onBlur: m,
|
|
367
|
+
onClick: b,
|
|
368
|
+
onKeyDown: g,
|
|
369
|
+
onLeadingIconClick: Q,
|
|
370
|
+
onTrailingIconClick: X,
|
|
371
|
+
//----------------
|
|
372
|
+
size: B = "small",
|
|
373
|
+
color: U = "primary",
|
|
374
|
+
className: D = "",
|
|
375
|
+
style: N = {},
|
|
376
|
+
children: P,
|
|
377
|
+
...h
|
|
378
|
+
} = e, f = {
|
|
379
|
+
theme: q(),
|
|
380
|
+
color: U,
|
|
381
|
+
size: B,
|
|
382
|
+
style: N,
|
|
383
|
+
disabled: L,
|
|
384
|
+
borderRadius: S,
|
|
385
|
+
btnType: n,
|
|
386
|
+
className: "lnc-ui-button " + D
|
|
387
|
+
}, a = !y(F), l = !y(C), V = !y(v), $ = () => /* @__PURE__ */ K(W, { children: [
|
|
388
|
+
a && /* @__PURE__ */ i(A, { size: B, children: /* @__PURE__ */ i(
|
|
389
|
+
j,
|
|
390
|
+
{
|
|
391
|
+
icon: F,
|
|
392
|
+
sizeInUnits: "1.125rem",
|
|
393
|
+
iconStyle: O
|
|
394
|
+
}
|
|
395
|
+
) }),
|
|
396
|
+
v,
|
|
397
|
+
P,
|
|
398
|
+
l && /* @__PURE__ */ i(G, { size: B, children: /* @__PURE__ */ i(
|
|
399
|
+
j,
|
|
400
|
+
{
|
|
401
|
+
icon: C,
|
|
402
|
+
sizeInUnits: "1.125rem",
|
|
403
|
+
iconStyle: O
|
|
404
|
+
}
|
|
405
|
+
) })
|
|
406
|
+
] });
|
|
407
|
+
return n === "filled" ? /* @__PURE__ */ i(
|
|
408
|
+
w,
|
|
409
|
+
{
|
|
410
|
+
ref: d,
|
|
411
|
+
"data-type": "filled",
|
|
412
|
+
...f,
|
|
413
|
+
hasLeadingIcon: a,
|
|
414
|
+
hasTrailingIcon: l,
|
|
415
|
+
onFocus: s,
|
|
416
|
+
onBlur: m,
|
|
417
|
+
onClick: b,
|
|
418
|
+
onKeyDown: g,
|
|
419
|
+
tabIndex: u,
|
|
420
|
+
btnType: n,
|
|
421
|
+
...h,
|
|
422
|
+
children: $()
|
|
423
|
+
}
|
|
424
|
+
) : n === "tinted" ? /* @__PURE__ */ i(
|
|
425
|
+
H,
|
|
426
|
+
{
|
|
427
|
+
ref: d,
|
|
428
|
+
"data-type": "tinted",
|
|
429
|
+
...f,
|
|
430
|
+
hasLeadingIcon: a,
|
|
431
|
+
hasTrailingIcon: l,
|
|
432
|
+
onFocus: s,
|
|
433
|
+
onBlur: m,
|
|
434
|
+
onClick: b,
|
|
435
|
+
onKeyDown: g,
|
|
436
|
+
tabIndex: u,
|
|
437
|
+
btnType: n,
|
|
438
|
+
...h,
|
|
439
|
+
children: $()
|
|
440
|
+
}
|
|
441
|
+
) : n === "outline" ? /* @__PURE__ */ i(
|
|
442
|
+
J,
|
|
443
|
+
{
|
|
444
|
+
ref: d,
|
|
445
|
+
"data-type": "outline",
|
|
446
|
+
...f,
|
|
447
|
+
hasLeadingIcon: a,
|
|
448
|
+
hasTrailingIcon: l,
|
|
449
|
+
onFocus: s,
|
|
450
|
+
onBlur: m,
|
|
451
|
+
onClick: b,
|
|
452
|
+
onKeyDown: g,
|
|
453
|
+
tabIndex: u,
|
|
454
|
+
btnType: n,
|
|
455
|
+
...h,
|
|
456
|
+
children: $()
|
|
457
|
+
}
|
|
458
|
+
) : n === "basic" ? /* @__PURE__ */ i(
|
|
459
|
+
R,
|
|
460
|
+
{
|
|
461
|
+
ref: d,
|
|
462
|
+
"data-type": "basic",
|
|
463
|
+
...f,
|
|
464
|
+
hasLeadingIcon: a,
|
|
465
|
+
hasTrailingIcon: l,
|
|
466
|
+
onFocus: s,
|
|
467
|
+
onBlur: m,
|
|
468
|
+
onClick: b,
|
|
469
|
+
onKeyDown: g,
|
|
470
|
+
tabIndex: u,
|
|
471
|
+
btnType: n,
|
|
472
|
+
...h,
|
|
473
|
+
children: $()
|
|
474
|
+
}
|
|
475
|
+
) : /* @__PURE__ */ i(
|
|
476
|
+
w,
|
|
477
|
+
{
|
|
478
|
+
ref: d,
|
|
479
|
+
"data-type": "filled",
|
|
480
|
+
size: B,
|
|
481
|
+
...f,
|
|
482
|
+
hasLeadingIcon: a,
|
|
483
|
+
hasTrailingIcon: l,
|
|
484
|
+
onFocus: s,
|
|
485
|
+
onBlur: m,
|
|
486
|
+
onClick: b,
|
|
487
|
+
onKeyDown: g,
|
|
488
|
+
hasText: V,
|
|
489
|
+
tabIndex: u,
|
|
490
|
+
btnType: n,
|
|
491
|
+
...h,
|
|
492
|
+
children: $()
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
});
|
|
496
|
+
M.propTypes = {
|
|
497
|
+
text: o.string,
|
|
498
|
+
iconStyle: o.oneOf(["regular", "solid"]),
|
|
499
|
+
/**
|
|
500
|
+
* Icon before the text
|
|
501
|
+
*/
|
|
502
|
+
leadingIcon: o.string,
|
|
503
|
+
/**
|
|
504
|
+
* Icon after the text
|
|
505
|
+
*/
|
|
506
|
+
trailingIcon: o.string,
|
|
507
|
+
borderRadius: o.oneOf([
|
|
508
|
+
"slight",
|
|
509
|
+
"regular",
|
|
510
|
+
"edged",
|
|
511
|
+
"curved",
|
|
512
|
+
"none"
|
|
513
|
+
]),
|
|
514
|
+
/**
|
|
515
|
+
* Different styles
|
|
516
|
+
*/
|
|
517
|
+
btnType: o.oneOf(["filled", "tinted", "outline", "basic"]),
|
|
518
|
+
disabled: o.bool,
|
|
519
|
+
tabIndex: o.number,
|
|
520
|
+
//---------------------------------------------------------------
|
|
521
|
+
onBlur: o.func,
|
|
522
|
+
onFocus: o.func,
|
|
523
|
+
onClick: o.func,
|
|
524
|
+
onKeyDown: o.func,
|
|
525
|
+
//---------------------------------------------------------------
|
|
526
|
+
className: o.string,
|
|
527
|
+
style: o.object,
|
|
528
|
+
color: o.oneOf([
|
|
529
|
+
"primary",
|
|
530
|
+
"secondary",
|
|
531
|
+
"success",
|
|
532
|
+
"warning",
|
|
533
|
+
"danger",
|
|
534
|
+
"information",
|
|
535
|
+
"neutral",
|
|
536
|
+
"gray"
|
|
537
|
+
]),
|
|
538
|
+
size: o.oneOf(["small", "medium", "large"])
|
|
539
|
+
};
|
|
540
|
+
export {
|
|
541
|
+
M as default
|
|
542
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime");require("react");const a=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),t=require("./index-DXnSjbfJ.cjs"),o=require("./utils-hdRGTsQ7.cjs"),b=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),s=a.newStyled.div`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
border-radius: ${e=>e.borderRadius};
|
|
6
|
+
|
|
7
|
+
& button {
|
|
8
|
+
border: none;
|
|
9
|
+
border-top: ${e=>"0.0625rem solid "+o.getColorRgbaValue(e.theme,"ButtonGroup",e.color,"enabled","border")};
|
|
10
|
+
|
|
11
|
+
border-bottom: ${e=>"0.0625rem solid "+o.getColorRgbaValue(e.theme,"ButtonGroup",e.color,"enabled","border")};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
& button:focus {
|
|
15
|
+
outline: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
& button:not(:first-of-type):not(:last-of-type) {
|
|
19
|
+
border-radius: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& button[data-type="filled"],
|
|
23
|
+
button[data-type="tinted"] {
|
|
24
|
+
border: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
& button:first-of-type {
|
|
28
|
+
border-radius: ${e=>`${e.borderRadius} 0 0 ${e.borderRadius}`};
|
|
29
|
+
border-left: ${e=>"0.0625rem solid "+o.getColorRgbaValue(e.theme,"ButtonGroup",e.color,"enabled","border")};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& button:last-of-type {
|
|
33
|
+
border-radius: ${e=>`0 ${e.borderRadius} ${e.borderRadius} 0`};
|
|
34
|
+
border-right: ${e=>"0.0625rem solid "+o.getColorRgbaValue(e.theme,"ButtonGroup",e.color,"enabled","border")};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
& button:first-of-type:not([data-type="filled"]) {
|
|
38
|
+
border-right: ${e=>"0.0625rem solid "+o.getColorRgbaValue(e.theme,"ButtonGroup",e.color,"enabled","border")};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& button:not(:first-of-type):not(:last-of-type):not([data-type="filled"]) {
|
|
42
|
+
border-right: ${e=>"0.0625rem solid "+o.getColorRgbaValue(e.theme,"ButtonGroup",e.color,"enabled","border")};
|
|
43
|
+
}
|
|
44
|
+
`,d=({children:e,borderRadius:n="regular",style:u={},className:l=""})=>{const r=b.useTheme();return i.jsx(s,{borderRadius:o.getBorderRadiusValueWithUnits(r,n),theme:r,style:u,className:"lnc-ui-button-group "+l,children:e})};d.propTypes={borderRadius:t.PropTypes.oneOf(["slight","regular","edged","curved","none"]),className:t.PropTypes.string,style:t.PropTypes.object};module.exports=d;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { n as i } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
4
|
+
import { P as t } from "./index-Ds9PUTwb.js";
|
|
5
|
+
import { b as o, c as b } from "./utils-DEke8iwo.js";
|
|
6
|
+
import { u as l } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
7
|
+
const s = i.div`
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
width: fit-content;
|
|
11
|
+
border-radius: ${(e) => e.borderRadius};
|
|
12
|
+
|
|
13
|
+
& button {
|
|
14
|
+
border: none;
|
|
15
|
+
border-top: ${(e) => "0.0625rem solid " + o(
|
|
16
|
+
e.theme,
|
|
17
|
+
"ButtonGroup",
|
|
18
|
+
e.color,
|
|
19
|
+
"enabled",
|
|
20
|
+
"border"
|
|
21
|
+
)};
|
|
22
|
+
|
|
23
|
+
border-bottom: ${(e) => "0.0625rem solid " + o(
|
|
24
|
+
e.theme,
|
|
25
|
+
"ButtonGroup",
|
|
26
|
+
e.color,
|
|
27
|
+
"enabled",
|
|
28
|
+
"border"
|
|
29
|
+
)};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& button:focus {
|
|
33
|
+
outline: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& button:not(:first-of-type):not(:last-of-type) {
|
|
37
|
+
border-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& button[data-type="filled"],
|
|
41
|
+
button[data-type="tinted"] {
|
|
42
|
+
border: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& button:first-of-type {
|
|
46
|
+
border-radius: ${(e) => `${e.borderRadius} 0 0 ${e.borderRadius}`};
|
|
47
|
+
border-left: ${(e) => "0.0625rem solid " + o(
|
|
48
|
+
e.theme,
|
|
49
|
+
"ButtonGroup",
|
|
50
|
+
e.color,
|
|
51
|
+
"enabled",
|
|
52
|
+
"border"
|
|
53
|
+
)};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& button:last-of-type {
|
|
57
|
+
border-radius: ${(e) => `0 ${e.borderRadius} ${e.borderRadius} 0`};
|
|
58
|
+
border-right: ${(e) => "0.0625rem solid " + o(
|
|
59
|
+
e.theme,
|
|
60
|
+
"ButtonGroup",
|
|
61
|
+
e.color,
|
|
62
|
+
"enabled",
|
|
63
|
+
"border"
|
|
64
|
+
)};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
& button:first-of-type:not([data-type="filled"]) {
|
|
68
|
+
border-right: ${(e) => "0.0625rem solid " + o(
|
|
69
|
+
e.theme,
|
|
70
|
+
"ButtonGroup",
|
|
71
|
+
e.color,
|
|
72
|
+
"enabled",
|
|
73
|
+
"border"
|
|
74
|
+
)};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
& button:not(:first-of-type):not(:last-of-type):not([data-type="filled"]) {
|
|
78
|
+
border-right: ${(e) => "0.0625rem solid " + o(
|
|
79
|
+
e.theme,
|
|
80
|
+
"ButtonGroup",
|
|
81
|
+
e.color,
|
|
82
|
+
"enabled",
|
|
83
|
+
"border"
|
|
84
|
+
)};
|
|
85
|
+
}
|
|
86
|
+
`, m = ({ children: e, borderRadius: d = "regular", style: n = {}, className: a = "" }) => {
|
|
87
|
+
const r = l();
|
|
88
|
+
return /* @__PURE__ */ u(
|
|
89
|
+
s,
|
|
90
|
+
{
|
|
91
|
+
borderRadius: b(r, d),
|
|
92
|
+
theme: r,
|
|
93
|
+
style: n,
|
|
94
|
+
className: "lnc-ui-button-group " + a,
|
|
95
|
+
children: e
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
m.propTypes = {
|
|
100
|
+
borderRadius: t.oneOf([
|
|
101
|
+
"slight",
|
|
102
|
+
"regular",
|
|
103
|
+
"edged",
|
|
104
|
+
"curved",
|
|
105
|
+
"none"
|
|
106
|
+
]),
|
|
107
|
+
className: t.string,
|
|
108
|
+
style: t.object
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
m as default
|
|
112
|
+
};
|