pixel-react 1.4.9 → 1.5.0
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/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +0 -2
- package/lib/components/MultiSelect/MultiSelect.stories.d.ts +0 -1
- package/lib/components/Select/Select.stories.d.ts +0 -1
- package/lib/index.esm.js +18 -15
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +18 -15
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Typography/Typography.scss +4 -4
- package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
- package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
- package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
- package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/lib/components/AddButton/AddButton.d.ts +0 -5
- package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
- package/lib/components/AddButton/index.d.ts +0 -1
- package/lib/components/AddButton/types.d.ts +0 -4
- package/lib/components/AttachImage/AttachImage.stories.d.ts +0 -7
- package/lib/components/Charts/BarChart/BarChart.stories.d.ts +0 -6
- package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +0 -8
- package/lib/components/Charts/LineChart/LineChart.stories.d.ts +0 -7
- package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +0 -8
- package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +0 -6
- package/lib/components/EditTextField/EditTextField.stories.d.ts +0 -10
- package/lib/components/Editor/Editor.stories.d.ts +0 -6
- package/lib/components/Excel/ContextMenu/ContextMenu.d.ts +0 -4
- package/lib/components/Excel/ExcelFile.stories.d.ts +0 -6
- package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +0 -14
- package/lib/components/ExcelFile/ImportExcelStyles.d.ts +0 -24
- package/lib/components/StatusCard/StatusCard.stories.d.ts +0 -11
- package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +0 -10
- /package/lib/components/ExcelFile/{ColorBarSelector → ColorBarselector}/ColorBarSelector.d.ts +0 -0
@@ -6,8 +6,6 @@ declare const meta: Meta<typeof LabelEditTextField>;
|
|
6
6
|
type Story = StoryObj<typeof LabelEditTextField>;
|
7
7
|
export declare const textField: Story;
|
8
8
|
export declare const textFieldWithOutLabel: Story;
|
9
|
-
export declare const openTextFieldWithOutLabel: Story;
|
10
9
|
export declare const textFieldWithDropdown: Story;
|
11
10
|
export declare const textFieldWithHighlight: Story;
|
12
|
-
export declare const openLabelEditTextField: Story;
|
13
11
|
export default meta;
|
package/lib/index.esm.js
CHANGED
@@ -802,7 +802,7 @@ const Icon = /*#__PURE__*/forwardRef(({
|
|
802
802
|
});
|
803
803
|
});
|
804
804
|
|
805
|
-
var css_248z$16 = "@font-face {\n font-family: \"Poppins\";\n font-weight: 400;\n src: local(\"Poppins-Regular\"), url(../../fonts/Poppins
|
805
|
+
var css_248z$16 = "@font-face {\n font-family: \"Poppins\";\n font-weight: 400;\n src: local(\"Poppins-Regular\"), url(../../assets/fonts/Poppins-Regular.woff2) format(\"woff2\");\n}\n@font-face {\n font-family: \"Poppins\";\n font-weight: 500;\n src: local(\"Poppins-Medium\"), url(../../assets/fonts/Poppins-Medium.woff2) format(\"woff2\");\n}\n@font-face {\n font-family: \"Poppins\";\n font-weight: 600;\n src: local(\"Poppins-SemiBold\"), url(../../assets/fonts/Poppins-SemiBold.woff2) format(\"woff2\");\n}\n@font-face {\n font-family: \"Poppins\";\n font-weight: 700;\n src: local(\"Poppins-Bold\"), url(../../assets/fonts/Poppins-Bold.woff2) format(\"woff2\");\n}\n.ff-text {\n font-family: \"Poppins\";\n font-size: 16px;\n}\n.ff-text--regular {\n font-weight: 400;\n}\n.ff-text--medium {\n font-weight: 500;\n}\n.ff-text--semi-bold {\n font-weight: 600;\n}\n.ff-text--bold {\n font-weight: 700;\n}\n.ff-text .required-asterisk {\n color: var(--input-error-text-color);\n padding-right: 4px;\n}";
|
806
806
|
styleInject(css_248z$16);
|
807
807
|
|
808
808
|
const Typography = ({
|
@@ -7421,7 +7421,7 @@ function createFormControl(props = {}) {
|
|
7421
7421
|
timer = setTimeout(callback, wait);
|
7422
7422
|
};
|
7423
7423
|
const _updateValid = async (shouldUpdateValid) => {
|
7424
|
-
if (!
|
7424
|
+
if (!_options.disabled && (_proxyFormState.isValid || shouldUpdateValid)) {
|
7425
7425
|
const isValid = _options.resolver
|
7426
7426
|
? isEmptyObject((await _executeSchema()).errors)
|
7427
7427
|
: await executeBuiltInValidation(_fields, true);
|
@@ -7433,7 +7433,7 @@ function createFormControl(props = {}) {
|
|
7433
7433
|
}
|
7434
7434
|
};
|
7435
7435
|
const _updateIsValidating = (names, isValidating) => {
|
7436
|
-
if (!
|
7436
|
+
if (!_options.disabled &&
|
7437
7437
|
(_proxyFormState.isValidating || _proxyFormState.validatingFields)) {
|
7438
7438
|
(names || Array.from(_names.mount)).forEach((name) => {
|
7439
7439
|
if (name) {
|
@@ -7449,7 +7449,7 @@ function createFormControl(props = {}) {
|
|
7449
7449
|
}
|
7450
7450
|
};
|
7451
7451
|
const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {
|
7452
|
-
if (args && method && !
|
7452
|
+
if (args && method && !_options.disabled) {
|
7453
7453
|
_state.action = true;
|
7454
7454
|
if (shouldUpdateFieldsAndState && Array.isArray(get$1(_fields, name))) {
|
7455
7455
|
const fieldValues = method(get$1(_fields, name), args.argA, args.argB);
|
@@ -7513,7 +7513,7 @@ function createFormControl(props = {}) {
|
|
7513
7513
|
const output = {
|
7514
7514
|
name,
|
7515
7515
|
};
|
7516
|
-
if (!
|
7516
|
+
if (!_options.disabled) {
|
7517
7517
|
const disabledField = !!(get$1(_fields, name) &&
|
7518
7518
|
get$1(_fields, name)._f &&
|
7519
7519
|
get$1(_fields, name)._f.disabled);
|
@@ -7649,7 +7649,7 @@ function createFormControl(props = {}) {
|
|
7649
7649
|
}
|
7650
7650
|
_names.unMount = new Set();
|
7651
7651
|
};
|
7652
|
-
const _getDirty = (name, data) => !
|
7652
|
+
const _getDirty = (name, data) => !_options.disabled &&
|
7653
7653
|
(name && data && set$1(_formValues, name, data),
|
7654
7654
|
!deepEqual(getValues(), _defaultValues));
|
7655
7655
|
const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
|
@@ -7965,7 +7965,7 @@ function createFormControl(props = {}) {
|
|
7965
7965
|
};
|
7966
7966
|
const register = (name, options = {}) => {
|
7967
7967
|
let field = get$1(_fields, name);
|
7968
|
-
const disabledIsDefined = isBoolean(options.disabled) || isBoolean(
|
7968
|
+
const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);
|
7969
7969
|
set$1(_fields, name, {
|
7970
7970
|
...(field || {}),
|
7971
7971
|
_f: {
|
@@ -7981,7 +7981,7 @@ function createFormControl(props = {}) {
|
|
7981
7981
|
field,
|
7982
7982
|
disabled: isBoolean(options.disabled)
|
7983
7983
|
? options.disabled
|
7984
|
-
:
|
7984
|
+
: _options.disabled,
|
7985
7985
|
name,
|
7986
7986
|
value: options.value,
|
7987
7987
|
});
|
@@ -7991,7 +7991,7 @@ function createFormControl(props = {}) {
|
|
7991
7991
|
}
|
7992
7992
|
return {
|
7993
7993
|
...(disabledIsDefined
|
7994
|
-
? { disabled: options.disabled ||
|
7994
|
+
? { disabled: options.disabled || _options.disabled }
|
7995
7995
|
: {}),
|
7996
7996
|
...(_options.progressive
|
7997
7997
|
? {
|
@@ -8075,6 +8075,12 @@ function createFormControl(props = {}) {
|
|
8075
8075
|
e.preventDefault && e.preventDefault();
|
8076
8076
|
e.persist && e.persist();
|
8077
8077
|
}
|
8078
|
+
if (_options.disabled) {
|
8079
|
+
if (onInvalid) {
|
8080
|
+
await onInvalid({ ..._formState.errors }, e);
|
8081
|
+
}
|
8082
|
+
return;
|
8083
|
+
}
|
8078
8084
|
let fieldValues = cloneObject(_formValues);
|
8079
8085
|
_subjects.state.next({
|
8080
8086
|
isSubmitting: true,
|
@@ -8253,7 +8259,9 @@ function createFormControl(props = {}) {
|
|
8253
8259
|
: fieldReference.ref;
|
8254
8260
|
if (fieldRef.focus) {
|
8255
8261
|
fieldRef.focus();
|
8256
|
-
options.shouldSelect &&
|
8262
|
+
options.shouldSelect &&
|
8263
|
+
isFunction$1(fieldRef.select) &&
|
8264
|
+
fieldRef.select();
|
8257
8265
|
}
|
8258
8266
|
}
|
8259
8267
|
};
|
@@ -8454,11 +8462,6 @@ function useForm(props = {}) {
|
|
8454
8462
|
values: control._getWatch(),
|
8455
8463
|
});
|
8456
8464
|
}, [props.shouldUnregister, control]);
|
8457
|
-
React__default.useEffect(() => {
|
8458
|
-
if (_formControl.current) {
|
8459
|
-
_formControl.current.watch = _formControl.current.watch.bind({});
|
8460
|
-
}
|
8461
|
-
}, [formState]);
|
8462
8465
|
_formControl.current.formState = getProxyFormState(formState, control);
|
8463
8466
|
return _formControl.current;
|
8464
8467
|
}
|