@hexure/ui 1.14.11 → 1.14.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +23 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/cjs/types/components/Radio/Radio.d.ts +2 -0
- package/dist/esm/index.js +23 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/esm/types/components/Radio/Radio.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3563,7 +3563,9 @@ const Wrapper$c = styled.label `
|
|
|
3563
3563
|
margin-left: -6px;
|
|
3564
3564
|
cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
|
|
3565
3565
|
display: flex;
|
|
3566
|
-
|
|
3566
|
+
flex-direction: ${props => (props.$labelLoc === 'Bottom' ? 'column' : 'row')};
|
|
3567
|
+
align-items: ${props => (props.$labelLoc === 'Bottom' ? 'center' : 'center')};
|
|
3568
|
+
justify-content: ${props => (props.$labelLoc === 'Bottom' ? 'center' : 'flex-start')};
|
|
3567
3569
|
font-size: ${FontSizes.DEFAULT};
|
|
3568
3570
|
line-height: 1.6em;
|
|
3569
3571
|
box-sizing: border-box;
|
|
@@ -3655,16 +3657,19 @@ const Label$3 = styled.span `
|
|
|
3655
3657
|
font-weight: ${props => (props.$isLabelBold ? 'bold' : '400')};
|
|
3656
3658
|
line-height: 1.6em;
|
|
3657
3659
|
color: ${props => props.color || Colors.BLACK.Hex};
|
|
3658
|
-
margin-left: 6px;
|
|
3660
|
+
margin-left: ${props => (props.$labelLoc === 'Bottom' ? '0' : '6px')};
|
|
3661
|
+
margin-top: ${props => (props.$labelLoc === 'Bottom' ? '6px' : '0')};
|
|
3659
3662
|
box-sizing: border-box;
|
|
3663
|
+
width: 100%;
|
|
3664
|
+
text-align: ${props => (props.$labelLoc === 'Bottom' ? 'center' : 'left')};
|
|
3660
3665
|
`;
|
|
3661
3666
|
const Checkbox = (_a) => {
|
|
3662
|
-
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, dataSectionName, isLabelBold = false } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "dataSectionName", "isLabelBold"]);
|
|
3667
|
+
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, dataSectionName, isLabelBold = false, labelLoc = 'Right' } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "dataSectionName", "isLabelBold", "labelLoc"]);
|
|
3663
3668
|
const baseId = dataItemid || 'checkbox';
|
|
3664
|
-
return (React.createElement(Wrapper$c, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
3669
|
+
return (React.createElement(Wrapper$c, Object.assign({ "$disabled": disabled, "$labelLoc": labelLoc }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
3665
3670
|
React.createElement(Input$2, { "$invalid": invalid, checked: checked, "data-itemid": `${baseId}-input`, "data-section-name": dataSectionName, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
|
|
3666
3671
|
React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
|
|
3667
|
-
children ? (React.createElement(Label$3, { "$isLabelBold": isLabelBold, color: color, "data-itemid": `${baseId}-label` },
|
|
3672
|
+
children ? (React.createElement(Label$3, { "$isLabelBold": isLabelBold, "$labelLoc": labelLoc, color: color, "data-itemid": `${baseId}-label` },
|
|
3668
3673
|
children,
|
|
3669
3674
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
|
|
3670
3675
|
};
|
|
@@ -6202,7 +6207,9 @@ const Wrapper$2 = styled.label `
|
|
|
6202
6207
|
margin-left: -6px;
|
|
6203
6208
|
cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
|
|
6204
6209
|
display: flex;
|
|
6205
|
-
|
|
6210
|
+
flex-direction: ${props => (props.$labelLoc === 'Bottom' ? 'column' : 'row')};
|
|
6211
|
+
align-items: ${props => (props.$labelLoc === 'Bottom' ? 'center' : 'center')};
|
|
6212
|
+
justify-content: ${props => (props.$labelLoc === 'Bottom' ? 'center' : 'flex-start')};
|
|
6206
6213
|
font-size: ${FontSizes.DEFAULT};
|
|
6207
6214
|
line-height: 1.6em;
|
|
6208
6215
|
box-sizing: border-box;
|
|
@@ -6274,11 +6281,11 @@ const Check = styled.span `
|
|
|
6274
6281
|
background-color: ${props => getBackgroundColor(props)};
|
|
6275
6282
|
box-sizing: border-box;
|
|
6276
6283
|
position: relative;
|
|
6284
|
+
display: flex;
|
|
6285
|
+
align-items: center;
|
|
6286
|
+
justify-content: center;
|
|
6277
6287
|
&:after {
|
|
6278
6288
|
content: '';
|
|
6279
|
-
position: absolute;
|
|
6280
|
-
top: 2px;
|
|
6281
|
-
left: 2px;
|
|
6282
6289
|
width: 9px;
|
|
6283
6290
|
height: 9px;
|
|
6284
6291
|
border-radius: 50%;
|
|
@@ -6292,15 +6299,18 @@ const Label = styled.span `
|
|
|
6292
6299
|
font-weight: ${props => (props.$isLabelBold ? 'bold' : '400')};
|
|
6293
6300
|
color: ${Colors.BLACK.Hex};
|
|
6294
6301
|
line-height: 1.6em;
|
|
6295
|
-
margin-left: 6px;
|
|
6302
|
+
margin-left: ${props => (props.$labelLoc === 'Bottom' ? '0' : '6px')};
|
|
6303
|
+
margin-top: ${props => (props.$labelLoc === 'Bottom' ? '6px' : '0')};
|
|
6304
|
+
width: 100%;
|
|
6305
|
+
text-align: ${props => (props.$labelLoc === 'Bottom' ? 'center' : 'left')};
|
|
6296
6306
|
`;
|
|
6297
6307
|
const Radio = (_a) => {
|
|
6298
|
-
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, isLabelBold = false } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "isLabelBold"]);
|
|
6308
|
+
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false, isLabelBold = false, labelLoc = 'Right' } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError", "isLabelBold", "labelLoc"]);
|
|
6299
6309
|
const baseId = dataItemid || 'radio';
|
|
6300
|
-
return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
6310
|
+
return (React.createElement(Wrapper$2, Object.assign({ "$disabled": disabled, "$labelLoc": labelLoc }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
6301
6311
|
React.createElement(Input, { "$invalid": invalid, checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'radio', value: value }),
|
|
6302
6312
|
React.createElement(Check, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
|
|
6303
|
-
React.createElement(Label, { "$isLabelBold": isLabelBold, "data-itemid": `${baseId}-label` },
|
|
6313
|
+
React.createElement(Label, { "$isLabelBold": isLabelBold, "$labelLoc": labelLoc, "data-itemid": `${baseId}-label` },
|
|
6304
6314
|
children,
|
|
6305
6315
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
|
|
6306
6316
|
};
|