@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,118 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),z=require("react"),t=require("./index-DXnSjbfJ.cjs"),R=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),o=require("./utils-hdRGTsQ7.cjs"),j=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),V=e=>e=="left"?"row-reverse":"row",i=(e,s)=>`calc(${e.components.Checkbox.default.enabled.sizes[s]} / 2)`,O=R.newStyled.label`
|
|
2
|
+
-webkit-user-select: none;
|
|
3
|
+
-moz-user-select: none;
|
|
4
|
+
-ms-user-select: none;
|
|
5
|
+
user-select: none;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
min-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
8
|
+
max-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: start;
|
|
12
|
+
flex-direction: ${e=>V(e.labelPosition)};
|
|
13
|
+
${e=>e.spaceBetween==!0&&"justify-content: space-between;"}
|
|
14
|
+
width: 100%;
|
|
15
|
+
${e=>e.disabled===!0&&"pointer-events: none;"}
|
|
16
|
+
${e=>o.getComponentTypographyCss(e.theme,"Checkbox",e.size,"enabled")};
|
|
17
|
+
gap: 0.75rem;
|
|
18
|
+
position: relative;
|
|
19
|
+
& .checkbox-label {
|
|
20
|
+
${e=>!e.disabled&&e.readOnly!==!0&&"cursor: pointer;"}
|
|
21
|
+
min-width: 0;
|
|
22
|
+
flex-shrink: 1;
|
|
23
|
+
min-height: 0;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
text-overflow: ellipsis;
|
|
26
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
|
|
27
|
+
}
|
|
28
|
+
& input {
|
|
29
|
+
position: absolute;
|
|
30
|
+
opacity: 0;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
height: 100%;
|
|
33
|
+
width: 100%;
|
|
34
|
+
z-index: 3;
|
|
35
|
+
}
|
|
36
|
+
& input:focus {
|
|
37
|
+
outline: none;
|
|
38
|
+
background: transparent;
|
|
39
|
+
}
|
|
40
|
+
& input:active {
|
|
41
|
+
outline: none;
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
& .checkmark {
|
|
45
|
+
min-height: ${e=>e.theme.components.Checkbox.default.enabled.sizes[e.size]};
|
|
46
|
+
min-width: ${e=>e.theme.components.Checkbox.default.enabled.sizes[e.size]};
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
transition: all 0.2s ease;
|
|
51
|
+
background-color: transparent;
|
|
52
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
|
|
53
|
+
border: 1px solid
|
|
54
|
+
${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","border")};
|
|
55
|
+
border-radius: ${e=>o.getBorderRadiusValueWithUnits(e.theme,"slight")};
|
|
56
|
+
${e=>e.disabled===!0&&`background-color: ${o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")}`};
|
|
57
|
+
& svg {
|
|
58
|
+
height: 0;
|
|
59
|
+
width: 0;
|
|
60
|
+
stroke: transparent;
|
|
61
|
+
}
|
|
62
|
+
& img {
|
|
63
|
+
max-height: 0;
|
|
64
|
+
max-width: 0;
|
|
65
|
+
filter: brightness(0) invert(1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
& input:checked ~ .checkmark {
|
|
69
|
+
background-color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
|
|
70
|
+
border: 1px solid
|
|
71
|
+
${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","border")};
|
|
72
|
+
& .checked {
|
|
73
|
+
height: ${e=>i(e.theme,e.size)};
|
|
74
|
+
width: ${e=>i(e.theme,e.size)};
|
|
75
|
+
stroke: white;
|
|
76
|
+
}
|
|
77
|
+
& .indeterminate {
|
|
78
|
+
height: 0;
|
|
79
|
+
width: 0;
|
|
80
|
+
}
|
|
81
|
+
& img {
|
|
82
|
+
max-height: ${e=>i(e.theme,e.size)};
|
|
83
|
+
max-width: ${e=>i(e.theme,e.size)};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
& input:checked ~ .checkbox-label {
|
|
87
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","text")};
|
|
88
|
+
}
|
|
89
|
+
& input:indeterminate ~ .checkmark {
|
|
90
|
+
& .checked {
|
|
91
|
+
height: 0;
|
|
92
|
+
width: 0;
|
|
93
|
+
}
|
|
94
|
+
background-color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
|
|
95
|
+
& .indeterminate {
|
|
96
|
+
height: ${e=>i(e.theme,e.size)};
|
|
97
|
+
width: ${e=>i(e.theme,e.size)};
|
|
98
|
+
stroke: white;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
& input:indeterminate ~ .checkbox-label {
|
|
102
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
|
|
103
|
+
}
|
|
104
|
+
& input:disabled ~ .checkmark {
|
|
105
|
+
${e=>e.readOnly!==!0&&`background-color: ${o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")};
|
|
106
|
+
border-color: ${o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")};
|
|
107
|
+
`};
|
|
108
|
+
}
|
|
109
|
+
& input:disabled ~ .checkbox-label {
|
|
110
|
+
color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","text")};
|
|
111
|
+
}
|
|
112
|
+
& input:focus ~ .checkmark {
|
|
113
|
+
${e=>o.getOutlineCss(e.theme)};
|
|
114
|
+
}
|
|
115
|
+
& input:active ~ .checkmark {
|
|
116
|
+
${e=>o.getOutlineCss(e.theme)};
|
|
117
|
+
}
|
|
118
|
+
`,g=z.forwardRef((e,s)=>{const{containerRef:k,id:B,indeterminate:I,disabled:u,readOnly:d,label:a,labelPosition:m="right",spaceBetween:x,customCheckmark:h,onChange:b,onFocus:l,onBlur:c,onClick:y,color:p="primary",size:C="small",className:w="",style:f={},children:L,...$}=e;var P={theme:j.useTheme(),size:C,color:p,disabled:u,readOnly:d};const T=r=>{c&&(c==null||c(r))},v=r=>{l&&(l==null||l(r))};return n.jsxs(O,{ref:k,direction:m,className:w,style:f,label:a,labelPosition:m,spaceBetween:x,tabIndex:-1,readOnly:d,onClick:y,...P,children:[n.jsx("input",{ref:s,type:"checkbox",onBlur:T,onFocus:v,disabled:u||d,onChange:r=>b==null?void 0:b(r),...$}),n.jsxs("div",{className:"checkmark",tabIndex:-1,children:[!h&&n.jsx("svg",{viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,disabled:!0,tabIndex:-1,className:"checked",children:n.jsx("path",{d:"M1 3.15385L2.89474 5L7 1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",tabIndex:-1})}),n.jsx("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,disabled:!0,tabIndex:-1,className:"indeterminate",children:n.jsx("path",{d:"M1 1H7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",tabIndex:-1,title:a})}),h&&n.jsx(n.Fragment,{children:h})]}),a&&n.jsx("div",{className:"checkbox-label",tabIndex:-1,children:a})]})});g.propTypes={containerRef:t.PropTypes.any,id:t.PropTypes.any,defaultChecked:t.PropTypes.bool,checked:t.PropTypes.bool,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,label:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),indeterminate:t.PropTypes.bool,labelPosition:t.PropTypes.oneOf(["right","left"]),tabIndex:t.PropTypes.number,spaceBetween:t.PropTypes.bool,customCheckmark:t.PropTypes.element,onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,onClick:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=g;
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { jsxs as k, jsx as i, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import I from "react";
|
|
3
|
+
import { P as t } from "./index-Ds9PUTwb.js";
|
|
4
|
+
import { n as j } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
5
|
+
import { f as g, a as L, b as n, c as N, h as x } from "./utils-DEke8iwo.js";
|
|
6
|
+
import { u as P } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
7
|
+
const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.components.Checkbox.default.enabled.sizes[d]} / 2)`, T = j.label`
|
|
8
|
+
-webkit-user-select: none;
|
|
9
|
+
-moz-user-select: none;
|
|
10
|
+
-ms-user-select: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
min-height: ${(e) => g(e.theme, e.size)};
|
|
14
|
+
max-height: ${(e) => g(e.theme, e.size)};
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: start;
|
|
18
|
+
flex-direction: ${(e) => R(e.labelPosition)};
|
|
19
|
+
${(e) => e.spaceBetween == !0 && "justify-content: space-between;"}
|
|
20
|
+
width: 100%;
|
|
21
|
+
${(e) => e.disabled === !0 && "pointer-events: none;"}
|
|
22
|
+
${(e) => L(e.theme, "Checkbox", e.size, "enabled")};
|
|
23
|
+
gap: 0.75rem;
|
|
24
|
+
position: relative;
|
|
25
|
+
& .checkbox-label {
|
|
26
|
+
${(e) => !e.disabled && e.readOnly !== !0 && "cursor: pointer;"}
|
|
27
|
+
min-width: 0;
|
|
28
|
+
flex-shrink: 1;
|
|
29
|
+
min-height: 0;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
color: ${(e) => n(
|
|
33
|
+
e.theme,
|
|
34
|
+
"Checkbox",
|
|
35
|
+
e.color,
|
|
36
|
+
"enabled",
|
|
37
|
+
"text"
|
|
38
|
+
)};
|
|
39
|
+
}
|
|
40
|
+
& input {
|
|
41
|
+
position: absolute;
|
|
42
|
+
opacity: 0;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
height: 100%;
|
|
45
|
+
width: 100%;
|
|
46
|
+
z-index: 3;
|
|
47
|
+
}
|
|
48
|
+
& input:focus {
|
|
49
|
+
outline: none;
|
|
50
|
+
background: transparent;
|
|
51
|
+
}
|
|
52
|
+
& input:active {
|
|
53
|
+
outline: none;
|
|
54
|
+
background: transparent;
|
|
55
|
+
}
|
|
56
|
+
& .checkmark {
|
|
57
|
+
min-height: ${(e) => e.theme.components.Checkbox.default.enabled.sizes[e.size]};
|
|
58
|
+
min-width: ${(e) => e.theme.components.Checkbox.default.enabled.sizes[e.size]};
|
|
59
|
+
display: flex;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
align-items: center;
|
|
62
|
+
transition: all 0.2s ease;
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
color: ${(e) => n(
|
|
65
|
+
e.theme,
|
|
66
|
+
"Checkbox",
|
|
67
|
+
e.color,
|
|
68
|
+
"enabled",
|
|
69
|
+
"text"
|
|
70
|
+
)};
|
|
71
|
+
border: 1px solid
|
|
72
|
+
${(e) => n(
|
|
73
|
+
e.theme,
|
|
74
|
+
"Checkbox",
|
|
75
|
+
e.color,
|
|
76
|
+
"enabled",
|
|
77
|
+
"border"
|
|
78
|
+
)};
|
|
79
|
+
border-radius: ${(e) => N(e.theme, "slight")};
|
|
80
|
+
${(e) => e.disabled === !0 && `background-color: ${n(
|
|
81
|
+
e.theme,
|
|
82
|
+
"Checkbox",
|
|
83
|
+
e.color,
|
|
84
|
+
"disabled",
|
|
85
|
+
"border"
|
|
86
|
+
)}`};
|
|
87
|
+
& svg {
|
|
88
|
+
height: 0;
|
|
89
|
+
width: 0;
|
|
90
|
+
stroke: transparent;
|
|
91
|
+
}
|
|
92
|
+
& img {
|
|
93
|
+
max-height: 0;
|
|
94
|
+
max-width: 0;
|
|
95
|
+
filter: brightness(0) invert(1);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
& input:checked ~ .checkmark {
|
|
99
|
+
background-color: ${(e) => n(
|
|
100
|
+
e.theme,
|
|
101
|
+
"Checkbox",
|
|
102
|
+
e.color,
|
|
103
|
+
"active",
|
|
104
|
+
"background",
|
|
105
|
+
"backgroundOpacity"
|
|
106
|
+
)};
|
|
107
|
+
border: 1px solid
|
|
108
|
+
${(e) => n(
|
|
109
|
+
e.theme,
|
|
110
|
+
"Checkbox",
|
|
111
|
+
e.color,
|
|
112
|
+
"active",
|
|
113
|
+
"border"
|
|
114
|
+
)};
|
|
115
|
+
& .checked {
|
|
116
|
+
height: ${(e) => o(e.theme, e.size)};
|
|
117
|
+
width: ${(e) => o(e.theme, e.size)};
|
|
118
|
+
stroke: white;
|
|
119
|
+
}
|
|
120
|
+
& .indeterminate {
|
|
121
|
+
height: 0;
|
|
122
|
+
width: 0;
|
|
123
|
+
}
|
|
124
|
+
& img {
|
|
125
|
+
max-height: ${(e) => o(e.theme, e.size)};
|
|
126
|
+
max-width: ${(e) => o(e.theme, e.size)};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
& input:checked ~ .checkbox-label {
|
|
130
|
+
color: ${(e) => n(
|
|
131
|
+
e.theme,
|
|
132
|
+
"Checkbox",
|
|
133
|
+
e.color,
|
|
134
|
+
"active",
|
|
135
|
+
"text"
|
|
136
|
+
)};
|
|
137
|
+
}
|
|
138
|
+
& input:indeterminate ~ .checkmark {
|
|
139
|
+
& .checked {
|
|
140
|
+
height: 0;
|
|
141
|
+
width: 0;
|
|
142
|
+
}
|
|
143
|
+
background-color: ${(e) => n(
|
|
144
|
+
e.theme,
|
|
145
|
+
"Checkbox",
|
|
146
|
+
e.color,
|
|
147
|
+
"active",
|
|
148
|
+
"background",
|
|
149
|
+
"backgroundOpacity"
|
|
150
|
+
)};
|
|
151
|
+
& .indeterminate {
|
|
152
|
+
height: ${(e) => o(e.theme, e.size)};
|
|
153
|
+
width: ${(e) => o(e.theme, e.size)};
|
|
154
|
+
stroke: white;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
& input:indeterminate ~ .checkbox-label {
|
|
158
|
+
color: ${(e) => n(
|
|
159
|
+
e.theme,
|
|
160
|
+
"Checkbox",
|
|
161
|
+
e.color,
|
|
162
|
+
"enabled",
|
|
163
|
+
"text"
|
|
164
|
+
)};
|
|
165
|
+
}
|
|
166
|
+
& input:disabled ~ .checkmark {
|
|
167
|
+
${(e) => e.readOnly !== !0 && `background-color: ${n(
|
|
168
|
+
e.theme,
|
|
169
|
+
"Checkbox",
|
|
170
|
+
e.color,
|
|
171
|
+
"disabled",
|
|
172
|
+
"border"
|
|
173
|
+
)};
|
|
174
|
+
border-color: ${n(
|
|
175
|
+
e.theme,
|
|
176
|
+
"Checkbox",
|
|
177
|
+
e.color,
|
|
178
|
+
"disabled",
|
|
179
|
+
"border"
|
|
180
|
+
)};
|
|
181
|
+
`};
|
|
182
|
+
}
|
|
183
|
+
& input:disabled ~ .checkbox-label {
|
|
184
|
+
color: ${(e) => n(
|
|
185
|
+
e.theme,
|
|
186
|
+
"Checkbox",
|
|
187
|
+
e.color,
|
|
188
|
+
"disabled",
|
|
189
|
+
"text"
|
|
190
|
+
)};
|
|
191
|
+
}
|
|
192
|
+
& input:focus ~ .checkmark {
|
|
193
|
+
${(e) => x(e.theme)};
|
|
194
|
+
}
|
|
195
|
+
& input:active ~ .checkmark {
|
|
196
|
+
${(e) => x(e.theme)};
|
|
197
|
+
}
|
|
198
|
+
`, F = I.forwardRef((e, d) => {
|
|
199
|
+
const {
|
|
200
|
+
containerRef: f,
|
|
201
|
+
id: W,
|
|
202
|
+
indeterminate: S,
|
|
203
|
+
disabled: b,
|
|
204
|
+
readOnly: h,
|
|
205
|
+
label: a,
|
|
206
|
+
labelPosition: u = "right",
|
|
207
|
+
spaceBetween: w,
|
|
208
|
+
customCheckmark: s,
|
|
209
|
+
//----------------
|
|
210
|
+
onChange: m,
|
|
211
|
+
onFocus: c,
|
|
212
|
+
onBlur: l,
|
|
213
|
+
onClick: $,
|
|
214
|
+
//----------------
|
|
215
|
+
color: C = "primary",
|
|
216
|
+
size: y = "small",
|
|
217
|
+
className: v = "",
|
|
218
|
+
style: z = {},
|
|
219
|
+
children: V,
|
|
220
|
+
...O
|
|
221
|
+
} = e;
|
|
222
|
+
var p = { theme: P(), size: y, color: C, disabled: b, readOnly: h };
|
|
223
|
+
return /* @__PURE__ */ k(
|
|
224
|
+
T,
|
|
225
|
+
{
|
|
226
|
+
ref: f,
|
|
227
|
+
direction: u,
|
|
228
|
+
className: v,
|
|
229
|
+
style: z,
|
|
230
|
+
label: a,
|
|
231
|
+
labelPosition: u,
|
|
232
|
+
spaceBetween: w,
|
|
233
|
+
tabIndex: -1,
|
|
234
|
+
readOnly: h,
|
|
235
|
+
onClick: $,
|
|
236
|
+
...p,
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ i(
|
|
239
|
+
"input",
|
|
240
|
+
{
|
|
241
|
+
ref: d,
|
|
242
|
+
type: "checkbox",
|
|
243
|
+
onBlur: (r) => {
|
|
244
|
+
l && (l == null || l(r));
|
|
245
|
+
},
|
|
246
|
+
onFocus: (r) => {
|
|
247
|
+
c && (c == null || c(r));
|
|
248
|
+
},
|
|
249
|
+
disabled: b || h,
|
|
250
|
+
onChange: (r) => m == null ? void 0 : m(r),
|
|
251
|
+
...O
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
/* @__PURE__ */ k("div", { className: "checkmark", tabIndex: -1, children: [
|
|
255
|
+
!s && /* @__PURE__ */ i(
|
|
256
|
+
"svg",
|
|
257
|
+
{
|
|
258
|
+
viewBox: "0 0 8 6",
|
|
259
|
+
fill: "none",
|
|
260
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
261
|
+
"aria-hidden": !0,
|
|
262
|
+
disabled: !0,
|
|
263
|
+
tabIndex: -1,
|
|
264
|
+
className: "checked",
|
|
265
|
+
children: /* @__PURE__ */ i(
|
|
266
|
+
"path",
|
|
267
|
+
{
|
|
268
|
+
d: "M1 3.15385L2.89474 5L7 1",
|
|
269
|
+
strokeWidth: "2",
|
|
270
|
+
strokeLinecap: "round",
|
|
271
|
+
strokeLinejoin: "round",
|
|
272
|
+
tabIndex: -1
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ i(
|
|
278
|
+
"svg",
|
|
279
|
+
{
|
|
280
|
+
width: "8",
|
|
281
|
+
height: "2",
|
|
282
|
+
viewBox: "0 0 8 2",
|
|
283
|
+
fill: "none",
|
|
284
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
285
|
+
"aria-hidden": !0,
|
|
286
|
+
disabled: !0,
|
|
287
|
+
tabIndex: -1,
|
|
288
|
+
className: "indeterminate",
|
|
289
|
+
children: /* @__PURE__ */ i(
|
|
290
|
+
"path",
|
|
291
|
+
{
|
|
292
|
+
d: "M1 1H7",
|
|
293
|
+
stroke: "white",
|
|
294
|
+
strokeWidth: "2",
|
|
295
|
+
strokeLinecap: "round",
|
|
296
|
+
strokeLinejoin: "round",
|
|
297
|
+
tabIndex: -1,
|
|
298
|
+
title: a
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
s && /* @__PURE__ */ i(B, { children: s })
|
|
304
|
+
] }),
|
|
305
|
+
a && /* @__PURE__ */ i("div", { className: "checkbox-label", tabIndex: -1, children: a })
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
});
|
|
310
|
+
F.propTypes = {
|
|
311
|
+
containerRef: t.any,
|
|
312
|
+
id: t.any,
|
|
313
|
+
defaultChecked: t.bool,
|
|
314
|
+
checked: t.bool,
|
|
315
|
+
disabled: t.bool,
|
|
316
|
+
readOnly: t.bool,
|
|
317
|
+
label: t.oneOfType([t.string, t.element]),
|
|
318
|
+
/**
|
|
319
|
+
* Default state indeterminate
|
|
320
|
+
*/
|
|
321
|
+
indeterminate: t.bool,
|
|
322
|
+
labelPosition: t.oneOf(["right", "left"]),
|
|
323
|
+
tabIndex: t.number,
|
|
324
|
+
spaceBetween: t.bool,
|
|
325
|
+
customCheckmark: t.element,
|
|
326
|
+
//---------------------------------------------------------------
|
|
327
|
+
onChange: t.func,
|
|
328
|
+
onBlur: t.func,
|
|
329
|
+
onFocus: t.func,
|
|
330
|
+
onClick: t.func,
|
|
331
|
+
//---------------------------------------------------------------
|
|
332
|
+
className: t.string,
|
|
333
|
+
style: t.object,
|
|
334
|
+
size: t.oneOf(["small", "medium", "large"]),
|
|
335
|
+
color: t.oneOf([
|
|
336
|
+
"primary",
|
|
337
|
+
"secondary",
|
|
338
|
+
"success",
|
|
339
|
+
"danger",
|
|
340
|
+
"warning",
|
|
341
|
+
"information",
|
|
342
|
+
"neutral",
|
|
343
|
+
"gray"
|
|
344
|
+
])
|
|
345
|
+
};
|
|
346
|
+
export {
|
|
347
|
+
F as default
|
|
348
|
+
};
|
package/dist/Chip.cjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),V=require("react"),r=require("./index-DXnSjbfJ.cjs"),j=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),n=require("./utils-hdRGTsQ7.cjs"),O=require("./Avatar.cjs"),q=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),m=e=>{var o="fas";return`${o} fa-${e} fa-fw`},S=(e,o,l,a)=>e?`padding-right: ${a=="small"?"0.75rem":"0.625rem"}; padding-left: ${a=="small"?"0.25rem":"0.125rem"};`:o?`padding-right: ${a=="small"?"0.5rem":"0.375rem"}; padding-left: ${a=="small"?"0.5rem":"0.375rem"};`:l?`padding-right: ${a=="small"?"0.5rem":"0.375rem"}; padding-left: ${a=="small"?"0.75rem":"0.625rem"};`:`padding-right: ${a=="small"?"1rem":"0.75rem"}; padding-left: ${a=="small"?"1rem":"0.75rem"};`,N=j.newStyled.span`
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
|
|
5
|
+
${e=>e.disabled===!0&&n.getDisabledStateCss(e.theme)};
|
|
6
|
+
background-color: ${e=>!e.disabled&&n.getColorRgbaValue(e.theme,"Chip",e.color,"enabled","background","backgroundOpacity")};
|
|
7
|
+
color: ${e=>!e.disabled&&n.getColorRgbaValue(e.theme,"Chip",e.color,"enabled","text")};
|
|
8
|
+
font-weight: ${e=>e.theme.typography.fontWeightBold};
|
|
9
|
+
${e=>S(e.avatar,e.leadingIcon,e.trailingIcon,e.size)}
|
|
10
|
+
gap: 0.375rem;
|
|
11
|
+
border-radius: ${e=>n.getBorderRadiusValueWithUnits(e.theme,e.borderRadius)};
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
${e=>n.getComponentTypographyCss(e.theme,"Chip",e.size,"enabled")};
|
|
15
|
+
backdrop-filter: ${e=>n.getComponentPropValue(e.theme,"Chip",e.color,"enabled","backDropFilter")};
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
background-color: ${e=>!e.disabled&&n.getColorRgbaValue(e.theme,"Chip",e.color,"hover","background","backgroundOpacity")};
|
|
19
|
+
}
|
|
20
|
+
&:focus {
|
|
21
|
+
background-color: ${e=>!e.disabled&&n.getColorRgbaValue(e.theme,"Chip",e.color,"focus","background","backgroundOpacity")};
|
|
22
|
+
${e=>!e.disabled&&n.getOutlineCss(e.theme)};
|
|
23
|
+
}
|
|
24
|
+
&:active {
|
|
25
|
+
background-color: ${e=>!e.disabled&&n.getColorRgbaValue(e.theme,"Chip",e.color,"active","background","backgroundOpacity")};
|
|
26
|
+
}
|
|
27
|
+
`,B=(e,o)=>`calc(${n.getSizeValueWithUnits(e,o)} - 8px)`,b=V.forwardRef((e,o)=>{const{label:l,leadingIcon:a,trailingIcon:i,avatar:s=!1,size:c="small",borderRadius:h="regular",disabled:d=!1,tabIndex:p=0,onFocus:y=()=>{},onBlur:f=()=>{},onClick:C=()=>{},onKeyDown:$=()=>{},onLeadingIconClick:P=()=>{},onTrailingIconClick:T=()=>{},className:k="",style:I={},color:v="primary",avatarProps:x,children:R,...w}=e,g=q.useTheme(),u={theme:g,color:v,style:I,className:"lnc-ui-chip "+k};return t.jsxs(N,{ref:o,size:c,...u,trailingIcon:i,leadingIcon:a,avatar:s,borderRadius:h,disabled:d,tabIndex:p,onClick:C,onKeyDown:$,onBlur:f,onFocus:y,...w,children:[s&&t.jsx(O,{...u,disabled:d,sizeInUnits:B(g,c),...x}),a&&t.jsx("i",{className:m(a),onClick:P}),t.jsxs(t.Fragment,{children:[l,R]}),i&&t.jsx("i",{className:m(i),onClick:T})]})});b.propTypes={label:r.PropTypes.string,leadingIcon:r.PropTypes.string,trailingIcon:r.PropTypes.string,avatar:r.PropTypes.bool,borderRadius:r.PropTypes.oneOf(["slight","regular","edged","curved","none"]),disabled:r.PropTypes.bool,tabIndex:r.PropTypes.number,onBlur:r.PropTypes.func,onFocus:r.PropTypes.func,onClick:r.PropTypes.func,onKeyDown:r.PropTypes.func,onLeadingIconClick:r.PropTypes.func,onTrailingIconClick: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"]),avatarProps:r.PropTypes.any};module.exports=b;
|
package/dist/Chip.js
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { jsxs as u, jsx as i, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import S from "react";
|
|
3
|
+
import { P as a } from "./index-Ds9PUTwb.js";
|
|
4
|
+
import { n as j } from "./emotion-styled.browser.esm-BZSYYThs.js";
|
|
5
|
+
import { f as b, g as B, b as t, c as D, a as F, d as V, h as U } from "./utils-DEke8iwo.js";
|
|
6
|
+
import W from "./Avatar.js";
|
|
7
|
+
import { u as A } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
|
|
8
|
+
const h = (e) => {
|
|
9
|
+
var n = "fas";
|
|
10
|
+
return `${n} fa-${e} fa-fw`;
|
|
11
|
+
}, K = (e, n, l, r) => e ? `padding-right: ${r == "small" ? "0.75rem" : "0.625rem"}; padding-left: ${r == "small" ? "0.25rem" : "0.125rem"};` : n ? `padding-right: ${r == "small" ? "0.5rem" : "0.375rem"}; padding-left: ${r == "small" ? "0.5rem" : "0.375rem"};` : l ? `padding-right: ${r == "small" ? "0.5rem" : "0.375rem"}; padding-left: ${r == "small" ? "0.75rem" : "0.625rem"};` : `padding-right: ${r == "small" ? "1rem" : "0.75rem"}; padding-left: ${r == "small" ? "1rem" : "0.75rem"};`, L = j.span`
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
height: ${(e) => b(e.theme, e.size)};
|
|
15
|
+
${(e) => e.disabled === !0 && B(e.theme)};
|
|
16
|
+
background-color: ${(e) => !e.disabled && t(
|
|
17
|
+
e.theme,
|
|
18
|
+
"Chip",
|
|
19
|
+
e.color,
|
|
20
|
+
"enabled",
|
|
21
|
+
"background",
|
|
22
|
+
"backgroundOpacity"
|
|
23
|
+
)};
|
|
24
|
+
color: ${(e) => !e.disabled && t(e.theme, "Chip", e.color, "enabled", "text")};
|
|
25
|
+
font-weight: ${(e) => e.theme.typography.fontWeightBold};
|
|
26
|
+
${(e) => K(e.avatar, e.leadingIcon, e.trailingIcon, e.size)}
|
|
27
|
+
gap: 0.375rem;
|
|
28
|
+
border-radius: ${(e) => D(e.theme, e.borderRadius)};
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
${(e) => F(e.theme, "Chip", e.size, "enabled")};
|
|
32
|
+
backdrop-filter: ${(e) => V(
|
|
33
|
+
e.theme,
|
|
34
|
+
"Chip",
|
|
35
|
+
e.color,
|
|
36
|
+
"enabled",
|
|
37
|
+
"backDropFilter"
|
|
38
|
+
)};
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
background-color: ${(e) => !e.disabled && t(
|
|
42
|
+
e.theme,
|
|
43
|
+
"Chip",
|
|
44
|
+
e.color,
|
|
45
|
+
"hover",
|
|
46
|
+
"background",
|
|
47
|
+
"backgroundOpacity"
|
|
48
|
+
)};
|
|
49
|
+
}
|
|
50
|
+
&:focus {
|
|
51
|
+
background-color: ${(e) => !e.disabled && t(
|
|
52
|
+
e.theme,
|
|
53
|
+
"Chip",
|
|
54
|
+
e.color,
|
|
55
|
+
"focus",
|
|
56
|
+
"background",
|
|
57
|
+
"backgroundOpacity"
|
|
58
|
+
)};
|
|
59
|
+
${(e) => !e.disabled && U(e.theme)};
|
|
60
|
+
}
|
|
61
|
+
&:active {
|
|
62
|
+
background-color: ${(e) => !e.disabled && t(
|
|
63
|
+
e.theme,
|
|
64
|
+
"Chip",
|
|
65
|
+
e.color,
|
|
66
|
+
"active",
|
|
67
|
+
"background",
|
|
68
|
+
"backgroundOpacity"
|
|
69
|
+
)};
|
|
70
|
+
}
|
|
71
|
+
`, _ = (e, n) => `calc(${b(e, n)} - 8px)`, z = S.forwardRef((e, n) => {
|
|
72
|
+
const {
|
|
73
|
+
label: l,
|
|
74
|
+
leadingIcon: r,
|
|
75
|
+
trailingIcon: o,
|
|
76
|
+
avatar: c = !1,
|
|
77
|
+
size: d = "small",
|
|
78
|
+
borderRadius: f = "regular",
|
|
79
|
+
disabled: s = !1,
|
|
80
|
+
tabIndex: y = 0,
|
|
81
|
+
//----------------
|
|
82
|
+
onFocus: C = () => {
|
|
83
|
+
},
|
|
84
|
+
onBlur: $ = () => {
|
|
85
|
+
},
|
|
86
|
+
onClick: k = () => {
|
|
87
|
+
},
|
|
88
|
+
onKeyDown: p = () => {
|
|
89
|
+
},
|
|
90
|
+
onLeadingIconClick: I = () => {
|
|
91
|
+
},
|
|
92
|
+
onTrailingIconClick: v = () => {
|
|
93
|
+
},
|
|
94
|
+
//----------------
|
|
95
|
+
className: x = "",
|
|
96
|
+
style: O = {},
|
|
97
|
+
color: w = "primary",
|
|
98
|
+
avatarProps: P,
|
|
99
|
+
children: R,
|
|
100
|
+
...T
|
|
101
|
+
} = e, m = A(), g = {
|
|
102
|
+
theme: m,
|
|
103
|
+
color: w,
|
|
104
|
+
style: O,
|
|
105
|
+
className: "lnc-ui-chip " + x
|
|
106
|
+
};
|
|
107
|
+
return /* @__PURE__ */ u(
|
|
108
|
+
L,
|
|
109
|
+
{
|
|
110
|
+
ref: n,
|
|
111
|
+
size: d,
|
|
112
|
+
...g,
|
|
113
|
+
trailingIcon: o,
|
|
114
|
+
leadingIcon: r,
|
|
115
|
+
avatar: c,
|
|
116
|
+
borderRadius: f,
|
|
117
|
+
disabled: s,
|
|
118
|
+
tabIndex: y,
|
|
119
|
+
onClick: k,
|
|
120
|
+
onKeyDown: p,
|
|
121
|
+
onBlur: $,
|
|
122
|
+
onFocus: C,
|
|
123
|
+
...T,
|
|
124
|
+
children: [
|
|
125
|
+
c && /* @__PURE__ */ i(
|
|
126
|
+
W,
|
|
127
|
+
{
|
|
128
|
+
...g,
|
|
129
|
+
disabled: s,
|
|
130
|
+
sizeInUnits: _(m, d),
|
|
131
|
+
...P
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
r && /* @__PURE__ */ i("i", { className: h(r), onClick: I }),
|
|
135
|
+
/* @__PURE__ */ u(N, { children: [
|
|
136
|
+
l,
|
|
137
|
+
R
|
|
138
|
+
] }),
|
|
139
|
+
o && /* @__PURE__ */ i(
|
|
140
|
+
"i",
|
|
141
|
+
{
|
|
142
|
+
className: h(o),
|
|
143
|
+
onClick: v
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
});
|
|
150
|
+
z.propTypes = {
|
|
151
|
+
label: a.string,
|
|
152
|
+
leadingIcon: a.string,
|
|
153
|
+
trailingIcon: a.string,
|
|
154
|
+
avatar: a.bool,
|
|
155
|
+
borderRadius: a.oneOf([
|
|
156
|
+
"slight",
|
|
157
|
+
"regular",
|
|
158
|
+
"edged",
|
|
159
|
+
"curved",
|
|
160
|
+
"none"
|
|
161
|
+
]),
|
|
162
|
+
disabled: a.bool,
|
|
163
|
+
tabIndex: a.number,
|
|
164
|
+
//---------------------------------------------------------------
|
|
165
|
+
onBlur: a.func,
|
|
166
|
+
onFocus: a.func,
|
|
167
|
+
onClick: a.func,
|
|
168
|
+
onKeyDown: a.func,
|
|
169
|
+
onLeadingIconClick: a.func,
|
|
170
|
+
onTrailingIconClick: a.func,
|
|
171
|
+
//---------------------------------------------------------------
|
|
172
|
+
className: a.string,
|
|
173
|
+
style: a.object,
|
|
174
|
+
color: a.oneOf([
|
|
175
|
+
"primary",
|
|
176
|
+
"secondary",
|
|
177
|
+
"success",
|
|
178
|
+
"warning",
|
|
179
|
+
"danger",
|
|
180
|
+
"information",
|
|
181
|
+
"neutral",
|
|
182
|
+
"gray"
|
|
183
|
+
]),
|
|
184
|
+
size: a.oneOf(["small", "medium", "large"]),
|
|
185
|
+
avatarProps: a.any
|
|
186
|
+
};
|
|
187
|
+
export {
|
|
188
|
+
z as default
|
|
189
|
+
};
|