@taikai/rocket-kit 3.0.4 → 3.0.6
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/atoms/checkbox/index.d.ts +2 -2
- package/dist/atoms/error-field/index.d.ts +1 -1
- package/dist/atoms/spinner/index.d.ts +1 -1
- package/dist/atoms/text-field/index.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/molecules/actions-menu/index.d.ts +2 -2
- package/dist/molecules/field-with-button/index.d.ts +1 -1
- package/dist/molecules/note-card/index.d.ts +1 -1
- package/dist/rocket-kit.cjs.development.js +22 -18
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +148 -148
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +22 -19
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +13 -13
package/dist/rocket-kit.esm.js
CHANGED
|
@@ -448,7 +448,7 @@ const CheckboxLabel = /*#__PURE__*/_styled.span.withConfig({
|
|
|
448
448
|
const CheckboxInput = /*#__PURE__*/_styled.input.withConfig({
|
|
449
449
|
displayName: "styles__CheckboxInput",
|
|
450
450
|
componentId: "sc-w5t014-2"
|
|
451
|
-
})(["position:absolute;left:0;opacity:0;cursor:pointer
|
|
451
|
+
})(["position:absolute;left:0;opacity:0;cursor:pointer;"]);
|
|
452
452
|
const Checkmark = /*#__PURE__*/_styled.span.withConfig({
|
|
453
453
|
displayName: "styles__Checkmark",
|
|
454
454
|
componentId: "sc-w5t014-3"
|
|
@@ -5327,24 +5327,23 @@ const Field = _styled.div`
|
|
|
5327
5327
|
}
|
|
5328
5328
|
`;
|
|
5329
5329
|
|
|
5330
|
-
const FieldWidthButton =
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
} = props;
|
|
5330
|
+
const FieldWidthButton = ({
|
|
5331
|
+
label,
|
|
5332
|
+
type = 'text',
|
|
5333
|
+
name,
|
|
5334
|
+
placeholder,
|
|
5335
|
+
value,
|
|
5336
|
+
onChange,
|
|
5337
|
+
dataTestId,
|
|
5338
|
+
buttonIcon,
|
|
5339
|
+
buttonValue,
|
|
5340
|
+
buttonAction,
|
|
5341
|
+
buttonDisabled,
|
|
5342
|
+
disabled = true,
|
|
5343
|
+
clearFieldAfterSubmit = false
|
|
5344
|
+
}) => {
|
|
5346
5345
|
const [loading, setLoading] = useState(false);
|
|
5347
|
-
const [fieldValue, setFieldValue] = useState(value ??
|
|
5346
|
+
const [fieldValue, setFieldValue] = useState(value ?? '');
|
|
5348
5347
|
const handleOnClickAction = async () => {
|
|
5349
5348
|
if ((buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction.constructor.name) !== 'AsyncFunction') {
|
|
5350
5349
|
buttonAction === null || buttonAction === void 0 ? void 0 : buttonAction(fieldValue);
|
|
@@ -5355,6 +5354,10 @@ const FieldWidthButton = props => {
|
|
|
5355
5354
|
}
|
|
5356
5355
|
clearFieldAfterSubmit && setFieldValue('');
|
|
5357
5356
|
};
|
|
5357
|
+
useEffect(() => {
|
|
5358
|
+
if (!value) return;
|
|
5359
|
+
setFieldValue(value);
|
|
5360
|
+
}, [value]);
|
|
5358
5361
|
return /*#__PURE__*/React.createElement(Wrapper$e, null, label && /*#__PURE__*/React.createElement(Label, {
|
|
5359
5362
|
value: label
|
|
5360
5363
|
}), /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(TextField, {
|
|
@@ -6012,5 +6015,5 @@ const GridCol$1 = props => {
|
|
|
6012
6015
|
}, children);
|
|
6013
6016
|
};
|
|
6014
6017
|
|
|
6015
|
-
export { ActionsMenu, AvatarImage, Button, ButtonDropdown, ButtonLink, CardValue, Checkbox, CheckboxButton, CheckboxGroup, DataWarning, EmptyTable, Error, ErrorField, FieldWidthButton, FilePicker, FormGroup, GridCol$1 as GridCol, TabsPanel$1 as GridContainer, GridRow$1 as GridRow, HorizontalNav, Icon, Label, LoadingState, Modal, ModalDrawer, ModalFooter, NoteCard, NumberInputSpinner, PaginationControl, ProgressBar, RadioGroup, Select, SelectInteractive, Slideshow, Spinner, Table$1 as Table, TableDnD, TabsPanel, Tag, TagNumber, TextArea, TextField, TextFieldAppendix, Toggle, TruncateLine, VideoPlayer, WizardSteps };
|
|
6018
|
+
export { ActionMenuList, ActionsMenu, AvatarImage, Button, ButtonDropdown, ButtonLink, CardValue, Checkbox, CheckboxButton, CheckboxGroup, DataWarning, EmptyTable, Error, ErrorField, FieldWidthButton, FilePicker, FormGroup, GridCol$1 as GridCol, TabsPanel$1 as GridContainer, GridRow$1 as GridRow, HorizontalNav, Icon, Label, LoadingState, Modal, ModalDrawer, ModalFooter, NoteCard, NumberInputSpinner, PaginationControl, ProgressBar, RadioGroup, Select, SelectInteractive, Slideshow, Spinner, Table$1 as Table, TableDnD, TabsPanel, Tag, TagNumber, TextArea, TextField, TextFieldAppendix, Toggle, TruncateLine, VideoPlayer, WizardSteps };
|
|
6016
6019
|
//# sourceMappingURL=rocket-kit.esm.js.map
|