@drivenets/design-system 0.0.3 → 0.0.5
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/CHANGELOG.md +13 -0
- package/README.md +51 -0
- package/dist/components/ds-alert-banner/ds-alert-banner.cjs +157 -52
- package/dist/components/ds-alert-banner/ds-alert-banner.d.cts +5 -5
- package/dist/components/ds-alert-banner/ds-alert-banner.d.cts.map +1 -1
- package/dist/components/ds-alert-banner/ds-alert-banner.js +157 -52
- package/dist/components/ds-alert-banner/ds-alert-banner.js.map +1 -1
- package/dist/components/ds-alert-banner/ds-alert-banner.types.d.cts.map +1 -1
- package/dist/components/ds-alert-banner/ds-alert-banner.types.js.map +1 -1
- package/dist/components/ds-breadcrumb/ds-breadcrumb.cjs +59 -16
- package/dist/components/ds-breadcrumb/ds-breadcrumb.js +59 -16
- package/dist/components/ds-breadcrumb/ds-breadcrumb.js.map +1 -1
- package/dist/components/ds-button/ds-button.cjs +18 -2
- package/dist/components/ds-button/ds-button.d.cts +2 -2
- package/dist/components/ds-button/ds-button.d.cts.map +1 -1
- package/dist/components/ds-button/ds-button.d.ts +2 -2
- package/dist/components/ds-button/ds-button.js +18 -2
- package/dist/components/ds-button/ds-button.js.map +1 -1
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.cjs +79 -10
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.js +79 -10
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.js.map +1 -1
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.cjs +78 -10
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js +78 -10
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js.map +1 -1
- package/dist/components/ds-checkbox/ds-checkbox.cjs +89 -18
- package/dist/components/ds-checkbox/ds-checkbox.js +89 -18
- package/dist/components/ds-checkbox/ds-checkbox.js.map +1 -1
- package/dist/components/ds-chip/ds-chip.cjs +100 -30
- package/dist/components/ds-chip/ds-chip.js +100 -30
- package/dist/components/ds-chip/ds-chip.js.map +1 -1
- package/dist/components/ds-chip-group/ds-chip-group.cjs +6 -6
- package/dist/components/ds-chip-group/ds-chip-group.js +6 -6
- package/dist/components/ds-chip-group/ds-chip-group.js.map +1 -1
- package/dist/components/ds-chip-group/hooks/use-chip-row-calculation.js.map +1 -1
- package/dist/components/ds-confirmation/ds-confirmation.cjs +210 -56
- package/dist/components/ds-confirmation/ds-confirmation.d.cts +8 -8
- package/dist/components/ds-confirmation/ds-confirmation.d.ts +8 -8
- package/dist/components/ds-confirmation/ds-confirmation.js +210 -56
- package/dist/components/ds-confirmation/ds-confirmation.js.map +1 -1
- package/dist/components/ds-dialog/ds-dialog.js.map +1 -1
- package/dist/components/ds-drawer/ds-drawer.cjs +261 -61
- package/dist/components/ds-drawer/ds-drawer.d.cts +9 -9
- package/dist/components/ds-drawer/ds-drawer.d.ts +9 -9
- package/dist/components/ds-drawer/ds-drawer.js +261 -61
- package/dist/components/ds-drawer/ds-drawer.js.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.cjs +481 -135
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js +481 -135
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js.map +1 -1
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.cjs +146 -56
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.cts +2 -2
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.ts +2 -2
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.js +146 -56
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.js.map +1 -1
- package/dist/components/ds-file-upload/components/file-upload/file-upload.cjs +190 -69
- package/dist/components/ds-file-upload/components/file-upload/file-upload.js +190 -69
- package/dist/components/ds-file-upload/components/file-upload/file-upload.js.map +1 -1
- package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.cjs +273 -132
- package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.js +273 -132
- package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.js.map +1 -1
- package/dist/components/ds-file-upload/ds-file-upload.cjs +96 -16
- package/dist/components/ds-file-upload/ds-file-upload.js +96 -16
- package/dist/components/ds-file-upload/ds-file-upload.js.map +1 -1
- package/dist/components/ds-file-upload/errors/file-upload-errors.js.map +1 -1
- package/dist/components/ds-file-upload/hooks/use-file-upload.cjs +93 -93
- package/dist/components/ds-file-upload/hooks/use-file-upload.js +93 -93
- package/dist/components/ds-file-upload/hooks/use-file-upload.js.map +1 -1
- package/dist/components/ds-file-upload/types/accept-types.js.map +1 -1
- package/dist/components/ds-file-upload/utils/accept-utils.js.map +1 -1
- package/dist/components/ds-file-upload/utils/constants.js.map +1 -1
- package/dist/components/ds-file-upload/utils/file-factory.js.map +1 -1
- package/dist/components/ds-file-upload/utils/format-file-size.js.map +1 -1
- package/dist/components/ds-file-upload/utils/generate-helper-text.js.map +1 -1
- package/dist/components/ds-file-upload/utils/get-error-message.js.map +1 -1
- package/dist/components/ds-file-upload/utils/is-file-equal.js.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.cjs +119 -34
- package/dist/components/ds-form-control/ds-form-control.d.cts +7 -7
- package/dist/components/ds-form-control/ds-form-control.d.ts +7 -7
- package/dist/components/ds-form-control/ds-form-control.d.ts.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.js +119 -34
- package/dist/components/ds-form-control/ds-form-control.js.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.types.js.map +1 -1
- package/dist/components/ds-grid/ds-grid.js.map +1 -1
- package/dist/components/ds-icon/ds-icon.cjs +84 -13
- package/dist/components/ds-icon/ds-icon.js +84 -13
- package/dist/components/ds-icon/ds-icon.js.map +1 -1
- package/dist/components/ds-icon/ds-icon.types.d.cts.map +1 -1
- package/dist/components/ds-icon/ds-icon.types.js.map +1 -1
- package/dist/components/ds-modal/ds-modal.cjs +222 -55
- package/dist/components/ds-modal/ds-modal.d.cts +8 -8
- package/dist/components/ds-modal/ds-modal.d.ts +8 -8
- package/dist/components/ds-modal/ds-modal.d.ts.map +1 -1
- package/dist/components/ds-modal/ds-modal.js +222 -55
- package/dist/components/ds-modal/ds-modal.js.map +1 -1
- package/dist/components/ds-number-input/ds-number-input.cjs +136 -49
- package/dist/components/ds-number-input/ds-number-input.js +136 -49
- package/dist/components/ds-number-input/ds-number-input.js.map +1 -1
- package/dist/components/ds-panel/ds-panel.cjs +111 -19
- package/dist/components/ds-panel/ds-panel.d.cts +2 -2
- package/dist/components/ds-panel/ds-panel.d.cts.map +1 -1
- package/dist/components/ds-panel/ds-panel.d.ts +2 -2
- package/dist/components/ds-panel/ds-panel.js +111 -19
- package/dist/components/ds-panel/ds-panel.js.map +1 -1
- package/dist/components/ds-password-input/ds-password-input.cjs +108 -41
- package/dist/components/ds-password-input/ds-password-input.js +108 -41
- package/dist/components/ds-password-input/ds-password-input.js.map +1 -1
- package/dist/components/ds-popover/ds-popover.cjs +50 -12
- package/dist/components/ds-popover/ds-popover.js +50 -12
- package/dist/components/ds-popover/ds-popover.js.map +1 -1
- package/dist/components/ds-radio-group/ds-radio-group.cjs +209 -53
- package/dist/components/ds-radio-group/ds-radio-group.js +209 -53
- package/dist/components/ds-radio-group/ds-radio-group.js.map +1 -1
- package/dist/components/ds-segment-group/ds-segment-group.cjs +215 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.cts +26 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.cts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.ts +26 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.ts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.js +214 -0
- package/dist/components/ds-segment-group/ds-segment-group.js.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.module.cjs +12 -0
- package/dist/components/ds-segment-group/ds-segment-group.module.js +12 -0
- package/dist/components/ds-segment-group/ds-segment-group.module.js.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.cjs +2 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.cts +52 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.cts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.ts +52 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.ts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.js +2 -0
- package/dist/components/ds-segment-group/index.cjs +2 -0
- package/dist/components/ds-segment-group/index.d.ts +2 -0
- package/dist/components/ds-segment-group/index.js +2 -0
- package/dist/components/ds-select/ds-select.cjs +198 -89
- package/dist/components/ds-select/ds-select.d.cts +2 -2
- package/dist/components/ds-select/ds-select.d.cts.map +1 -1
- package/dist/components/ds-select/ds-select.d.ts +2 -2
- package/dist/components/ds-select/ds-select.js +198 -89
- package/dist/components/ds-select/ds-select.js.map +1 -1
- package/dist/components/ds-select/select-items-chips.cjs +73 -22
- package/dist/components/ds-select/select-items-chips.js +73 -22
- package/dist/components/ds-select/select-items-chips.js.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.cjs +208 -46
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.js +208 -46
- package/dist/components/ds-smart-tabs/ds-smart-tabs.js.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.types.js.map +1 -1
- package/dist/components/ds-spinner/ds-spinner.cjs +90 -20
- package/dist/components/ds-spinner/ds-spinner.js +90 -20
- package/dist/components/ds-spinner/ds-spinner.js.map +1 -1
- package/dist/components/ds-spinner/ds-spinner.types.js.map +1 -1
- package/dist/components/ds-status-badge/ds-status-badge.cjs +54 -11
- package/dist/components/ds-status-badge/ds-status-badge.js +54 -11
- package/dist/components/ds-status-badge/ds-status-badge.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-content.cjs +59 -13
- package/dist/components/ds-stepper/components/ds-step-content.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step-content.js +59 -13
- package/dist/components/ds-stepper/components/ds-step-content.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-description.cjs +14 -5
- package/dist/components/ds-stepper/components/ds-step-description.js +14 -5
- package/dist/components/ds-stepper/components/ds-step-description.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-label.cjs +14 -5
- package/dist/components/ds-stepper/components/ds-step-label.js +14 -5
- package/dist/components/ds-stepper/components/ds-step-label.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-next-button.cjs +23 -6
- package/dist/components/ds-stepper/components/ds-step-next-button.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step-next-button.js +23 -6
- package/dist/components/ds-stepper/components/ds-step-next-button.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step.cjs +106 -25
- package/dist/components/ds-stepper/components/ds-step.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step.js +106 -25
- package/dist/components/ds-stepper/components/ds-step.js.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.cjs +62 -15
- package/dist/components/ds-stepper/ds-stepper.d.cts +2 -2
- package/dist/components/ds-stepper/ds-stepper.d.cts.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.js +62 -15
- package/dist/components/ds-stepper/ds-stepper.js.map +1 -1
- package/dist/components/ds-stepper/hooks/use-stepper.js.map +1 -1
- package/dist/components/ds-stepper/hooks/use-steps.cjs +29 -9
- package/dist/components/ds-stepper/hooks/use-steps.js +29 -9
- package/dist/components/ds-stepper/hooks/use-steps.js.map +1 -1
- package/dist/components/ds-system-status/ds-system-status.cjs +37 -7
- package/dist/components/ds-system-status/ds-system-status.js +37 -7
- package/dist/components/ds-system-status/ds-system-status.js.map +1 -1
- package/dist/components/ds-system-status/ds-system-status.types.js.map +1 -1
- package/dist/components/ds-table/components/core-table/core-table.cjs +281 -48
- package/dist/components/ds-table/components/core-table/core-table.js +281 -48
- package/dist/components/ds-table/components/core-table/core-table.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.cjs +134 -50
- package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.js +134 -50
- package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.cjs +140 -43
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.js +140 -43
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-header/ds-table-header.cjs +37 -6
- package/dist/components/ds-table/components/ds-table-header/ds-table-header.js +37 -6
- package/dist/components/ds-table/components/ds-table-header/ds-table-header.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.cjs +272 -100
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.js +272 -100
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.js.map +1 -1
- package/dist/components/ds-table/context/ds-table-context.js.map +1 -1
- package/dist/components/ds-table/ds-table.cjs +15 -15
- package/dist/components/ds-table/ds-table.d.cts +2 -2
- package/dist/components/ds-table/ds-table.js +15 -15
- package/dist/components/ds-table/ds-table.js.map +1 -1
- package/dist/components/ds-table/hooks/use-drag-and-drop.cjs +126 -38
- package/dist/components/ds-table/hooks/use-drag-and-drop.js +126 -38
- package/dist/components/ds-table/hooks/use-drag-and-drop.js.map +1 -1
- package/dist/components/ds-table/utils/column-styling.js.map +1 -1
- package/dist/components/ds-table/utils/create-columns-grid-template.js.map +1 -1
- package/dist/components/ds-table/utils/merge-refs.js.map +1 -1
- package/dist/components/ds-text-input/ds-text-input.cjs +128 -43
- package/dist/components/ds-text-input/ds-text-input.js +128 -43
- package/dist/components/ds-text-input/ds-text-input.js.map +1 -1
- package/dist/components/ds-text-input/ds-text-input.types.js.map +1 -1
- package/dist/components/ds-textarea/ds-textarea.cjs +66 -22
- package/dist/components/ds-textarea/ds-textarea.js +66 -22
- package/dist/components/ds-textarea/ds-textarea.js.map +1 -1
- package/dist/components/ds-toast/ds-toast-context.cjs +62 -17
- package/dist/components/ds-toast/ds-toast-context.js +62 -17
- package/dist/components/ds-toast/ds-toast-context.js.map +1 -1
- package/dist/components/ds-toast/ds-toast.cjs +90 -26
- package/dist/components/ds-toast/ds-toast.js +90 -26
- package/dist/components/ds-toast/ds-toast.js.map +1 -1
- package/dist/components/ds-tooltip/ds-tooltip.cjs +51 -13
- package/dist/components/ds-tooltip/ds-tooltip.js +51 -13
- package/dist/components/ds-tooltip/ds-tooltip.js.map +1 -1
- package/dist/components/ds-typography/ds-typography.cjs +51 -7
- package/dist/components/ds-typography/ds-typography.config.js.map +1 -1
- package/dist/components/ds-typography/ds-typography.js +51 -7
- package/dist/components/ds-typography/ds-typography.js.map +1 -1
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.cjs +91 -30
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.cts +5 -5
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.ts +5 -5
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.js +91 -30
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.js.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/index.min.css +1 -1
- package/package.json +8 -2
- package/src/components/ds-segment-group/ds-segment-group.module.scss +99 -0
- package/src/components/ds-segment-group/ds-segment-group.tsx +76 -0
- package/src/components/ds-segment-group/ds-segment-group.types.tsx +64 -0
- package/src/components/ds-segment-group/index.tsx +2 -0
- package/src/index.ts +1 -0
|
@@ -1,55 +1,140 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_ds_text_input_module = require('./ds-text-input.module.cjs');
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
4
|
let classnames = require("classnames");
|
|
4
5
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
5
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
7
|
let react = require("react");
|
|
7
8
|
|
|
8
9
|
//#region src/components/ds-text-input/ds-text-input.tsx
|
|
9
|
-
const DsTextInput = (
|
|
10
|
+
const DsTextInput = (t0) => {
|
|
11
|
+
const $ = (0, react_compiler_runtime.c)(40);
|
|
12
|
+
const { id, ref, name, size: t1, type: t2, onBlur, onKeyDown, onChange, onValueChange, className, style: t3, value, defaultValue, min, max, minLength, maxLength, placeholder, disabled: t4, tabIndex, slots } = t0;
|
|
13
|
+
const size = t1 === void 0 ? "default" : t1;
|
|
14
|
+
const type = t2 === void 0 ? "text" : t2;
|
|
15
|
+
let t5;
|
|
16
|
+
if ($[0] !== t3) {
|
|
17
|
+
t5 = t3 === void 0 ? {} : t3;
|
|
18
|
+
$[0] = t3;
|
|
19
|
+
$[1] = t5;
|
|
20
|
+
} else t5 = $[1];
|
|
21
|
+
const style = t5;
|
|
22
|
+
const disabled = t4 === void 0 ? false : t4;
|
|
10
23
|
const InputWrapper = slots?.inputWrapper ?? react.Fragment;
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
24
|
+
const t6 = size === "small";
|
|
25
|
+
const t7 = size === "default";
|
|
26
|
+
let t8;
|
|
27
|
+
if ($[2] !== className || $[3] !== t6 || $[4] !== t7) {
|
|
28
|
+
t8 = (0, classnames.default)(require_ds_text_input_module.default.textInputContainer, {
|
|
29
|
+
[require_ds_text_input_module.default.small]: t6,
|
|
30
|
+
[require_ds_text_input_module.default.default]: t7
|
|
31
|
+
}, className);
|
|
32
|
+
$[2] = className;
|
|
33
|
+
$[3] = t6;
|
|
34
|
+
$[4] = t7;
|
|
35
|
+
$[5] = t8;
|
|
36
|
+
} else t8 = $[5];
|
|
37
|
+
const containerClass = t8;
|
|
38
|
+
let t9;
|
|
39
|
+
if ($[6] !== onChange || $[7] !== onValueChange) {
|
|
40
|
+
t9 = (event) => {
|
|
41
|
+
const newValue = event.target.value;
|
|
42
|
+
onChange?.(event);
|
|
43
|
+
onValueChange?.(newValue);
|
|
44
|
+
};
|
|
45
|
+
$[6] = onChange;
|
|
46
|
+
$[7] = onValueChange;
|
|
47
|
+
$[8] = t9;
|
|
48
|
+
} else t9 = $[8];
|
|
49
|
+
const handleChange = t9;
|
|
50
|
+
let t10;
|
|
51
|
+
if ($[9] !== slots) {
|
|
52
|
+
t10 = slots?.startAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
53
|
+
className: require_ds_text_input_module.default.adornment,
|
|
54
|
+
children: slots.startAdornment
|
|
55
|
+
});
|
|
56
|
+
$[9] = slots;
|
|
57
|
+
$[10] = t10;
|
|
58
|
+
} else t10 = $[10];
|
|
59
|
+
let t11;
|
|
60
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
61
|
+
t11 = (0, classnames.default)(require_ds_text_input_module.default.input);
|
|
62
|
+
$[11] = t11;
|
|
63
|
+
} else t11 = $[11];
|
|
64
|
+
let t12;
|
|
65
|
+
if ($[12] !== defaultValue || $[13] !== disabled || $[14] !== handleChange || $[15] !== id || $[16] !== max || $[17] !== maxLength || $[18] !== min || $[19] !== minLength || $[20] !== name || $[21] !== onBlur || $[22] !== onKeyDown || $[23] !== placeholder || $[24] !== ref || $[25] !== tabIndex || $[26] !== type || $[27] !== value) {
|
|
66
|
+
t12 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
67
|
+
id,
|
|
68
|
+
ref,
|
|
69
|
+
name,
|
|
70
|
+
className: t11,
|
|
71
|
+
type,
|
|
72
|
+
value,
|
|
73
|
+
defaultValue,
|
|
74
|
+
min,
|
|
75
|
+
max,
|
|
76
|
+
minLength,
|
|
77
|
+
maxLength,
|
|
78
|
+
placeholder,
|
|
79
|
+
disabled,
|
|
80
|
+
onBlur,
|
|
81
|
+
onKeyDown,
|
|
82
|
+
onChange: handleChange,
|
|
83
|
+
tabIndex
|
|
84
|
+
});
|
|
85
|
+
$[12] = defaultValue;
|
|
86
|
+
$[13] = disabled;
|
|
87
|
+
$[14] = handleChange;
|
|
88
|
+
$[15] = id;
|
|
89
|
+
$[16] = max;
|
|
90
|
+
$[17] = maxLength;
|
|
91
|
+
$[18] = min;
|
|
92
|
+
$[19] = minLength;
|
|
93
|
+
$[20] = name;
|
|
94
|
+
$[21] = onBlur;
|
|
95
|
+
$[22] = onKeyDown;
|
|
96
|
+
$[23] = placeholder;
|
|
97
|
+
$[24] = ref;
|
|
98
|
+
$[25] = tabIndex;
|
|
99
|
+
$[26] = type;
|
|
100
|
+
$[27] = value;
|
|
101
|
+
$[28] = t12;
|
|
102
|
+
} else t12 = $[28];
|
|
103
|
+
let t13;
|
|
104
|
+
if ($[29] !== InputWrapper || $[30] !== t12) {
|
|
105
|
+
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputWrapper, { children: t12 });
|
|
106
|
+
$[29] = InputWrapper;
|
|
107
|
+
$[30] = t12;
|
|
108
|
+
$[31] = t13;
|
|
109
|
+
} else t13 = $[31];
|
|
110
|
+
let t14;
|
|
111
|
+
if ($[32] !== slots) {
|
|
112
|
+
t14 = slots?.endAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
113
|
+
className: require_ds_text_input_module.default.adornment,
|
|
114
|
+
children: slots.endAdornment
|
|
115
|
+
});
|
|
116
|
+
$[32] = slots;
|
|
117
|
+
$[33] = t14;
|
|
118
|
+
} else t14 = $[33];
|
|
119
|
+
let t15;
|
|
120
|
+
if ($[34] !== containerClass || $[35] !== style || $[36] !== t10 || $[37] !== t13 || $[38] !== t14) {
|
|
121
|
+
t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
122
|
+
className: containerClass,
|
|
123
|
+
style,
|
|
124
|
+
children: [
|
|
125
|
+
t10,
|
|
126
|
+
t13,
|
|
127
|
+
t14
|
|
128
|
+
]
|
|
129
|
+
});
|
|
130
|
+
$[34] = containerClass;
|
|
131
|
+
$[35] = style;
|
|
132
|
+
$[36] = t10;
|
|
133
|
+
$[37] = t13;
|
|
134
|
+
$[38] = t14;
|
|
135
|
+
$[39] = t15;
|
|
136
|
+
} else t15 = $[39];
|
|
137
|
+
return t15;
|
|
53
138
|
};
|
|
54
139
|
var ds_text_input_default = DsTextInput;
|
|
55
140
|
|
|
@@ -1,53 +1,138 @@
|
|
|
1
1
|
import ds_text_input_module_default from "./ds-text-input.module.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { Fragment } from "react";
|
|
5
6
|
|
|
6
7
|
//#region src/components/ds-text-input/ds-text-input.tsx
|
|
7
|
-
const DsTextInput = (
|
|
8
|
+
const DsTextInput = (t0) => {
|
|
9
|
+
const $ = c(40);
|
|
10
|
+
const { id, ref, name, size: t1, type: t2, onBlur, onKeyDown, onChange, onValueChange, className, style: t3, value, defaultValue, min, max, minLength, maxLength, placeholder, disabled: t4, tabIndex, slots } = t0;
|
|
11
|
+
const size = t1 === void 0 ? "default" : t1;
|
|
12
|
+
const type = t2 === void 0 ? "text" : t2;
|
|
13
|
+
let t5;
|
|
14
|
+
if ($[0] !== t3) {
|
|
15
|
+
t5 = t3 === void 0 ? {} : t3;
|
|
16
|
+
$[0] = t3;
|
|
17
|
+
$[1] = t5;
|
|
18
|
+
} else t5 = $[1];
|
|
19
|
+
const style = t5;
|
|
20
|
+
const disabled = t4 === void 0 ? false : t4;
|
|
8
21
|
const InputWrapper = slots?.inputWrapper ?? Fragment;
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
22
|
+
const t6 = size === "small";
|
|
23
|
+
const t7 = size === "default";
|
|
24
|
+
let t8;
|
|
25
|
+
if ($[2] !== className || $[3] !== t6 || $[4] !== t7) {
|
|
26
|
+
t8 = classNames(ds_text_input_module_default.textInputContainer, {
|
|
27
|
+
[ds_text_input_module_default.small]: t6,
|
|
28
|
+
[ds_text_input_module_default.default]: t7
|
|
29
|
+
}, className);
|
|
30
|
+
$[2] = className;
|
|
31
|
+
$[3] = t6;
|
|
32
|
+
$[4] = t7;
|
|
33
|
+
$[5] = t8;
|
|
34
|
+
} else t8 = $[5];
|
|
35
|
+
const containerClass = t8;
|
|
36
|
+
let t9;
|
|
37
|
+
if ($[6] !== onChange || $[7] !== onValueChange) {
|
|
38
|
+
t9 = (event) => {
|
|
39
|
+
const newValue = event.target.value;
|
|
40
|
+
onChange?.(event);
|
|
41
|
+
onValueChange?.(newValue);
|
|
42
|
+
};
|
|
43
|
+
$[6] = onChange;
|
|
44
|
+
$[7] = onValueChange;
|
|
45
|
+
$[8] = t9;
|
|
46
|
+
} else t9 = $[8];
|
|
47
|
+
const handleChange = t9;
|
|
48
|
+
let t10;
|
|
49
|
+
if ($[9] !== slots) {
|
|
50
|
+
t10 = slots?.startAdornment && /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: ds_text_input_module_default.adornment,
|
|
52
|
+
children: slots.startAdornment
|
|
53
|
+
});
|
|
54
|
+
$[9] = slots;
|
|
55
|
+
$[10] = t10;
|
|
56
|
+
} else t10 = $[10];
|
|
57
|
+
let t11;
|
|
58
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
59
|
+
t11 = classNames(ds_text_input_module_default.input);
|
|
60
|
+
$[11] = t11;
|
|
61
|
+
} else t11 = $[11];
|
|
62
|
+
let t12;
|
|
63
|
+
if ($[12] !== defaultValue || $[13] !== disabled || $[14] !== handleChange || $[15] !== id || $[16] !== max || $[17] !== maxLength || $[18] !== min || $[19] !== minLength || $[20] !== name || $[21] !== onBlur || $[22] !== onKeyDown || $[23] !== placeholder || $[24] !== ref || $[25] !== tabIndex || $[26] !== type || $[27] !== value) {
|
|
64
|
+
t12 = /* @__PURE__ */ jsx("input", {
|
|
65
|
+
id,
|
|
66
|
+
ref,
|
|
67
|
+
name,
|
|
68
|
+
className: t11,
|
|
69
|
+
type,
|
|
70
|
+
value,
|
|
71
|
+
defaultValue,
|
|
72
|
+
min,
|
|
73
|
+
max,
|
|
74
|
+
minLength,
|
|
75
|
+
maxLength,
|
|
76
|
+
placeholder,
|
|
77
|
+
disabled,
|
|
78
|
+
onBlur,
|
|
79
|
+
onKeyDown,
|
|
80
|
+
onChange: handleChange,
|
|
81
|
+
tabIndex
|
|
82
|
+
});
|
|
83
|
+
$[12] = defaultValue;
|
|
84
|
+
$[13] = disabled;
|
|
85
|
+
$[14] = handleChange;
|
|
86
|
+
$[15] = id;
|
|
87
|
+
$[16] = max;
|
|
88
|
+
$[17] = maxLength;
|
|
89
|
+
$[18] = min;
|
|
90
|
+
$[19] = minLength;
|
|
91
|
+
$[20] = name;
|
|
92
|
+
$[21] = onBlur;
|
|
93
|
+
$[22] = onKeyDown;
|
|
94
|
+
$[23] = placeholder;
|
|
95
|
+
$[24] = ref;
|
|
96
|
+
$[25] = tabIndex;
|
|
97
|
+
$[26] = type;
|
|
98
|
+
$[27] = value;
|
|
99
|
+
$[28] = t12;
|
|
100
|
+
} else t12 = $[28];
|
|
101
|
+
let t13;
|
|
102
|
+
if ($[29] !== InputWrapper || $[30] !== t12) {
|
|
103
|
+
t13 = /* @__PURE__ */ jsx(InputWrapper, { children: t12 });
|
|
104
|
+
$[29] = InputWrapper;
|
|
105
|
+
$[30] = t12;
|
|
106
|
+
$[31] = t13;
|
|
107
|
+
} else t13 = $[31];
|
|
108
|
+
let t14;
|
|
109
|
+
if ($[32] !== slots) {
|
|
110
|
+
t14 = slots?.endAdornment && /* @__PURE__ */ jsx("div", {
|
|
111
|
+
className: ds_text_input_module_default.adornment,
|
|
112
|
+
children: slots.endAdornment
|
|
113
|
+
});
|
|
114
|
+
$[32] = slots;
|
|
115
|
+
$[33] = t14;
|
|
116
|
+
} else t14 = $[33];
|
|
117
|
+
let t15;
|
|
118
|
+
if ($[34] !== containerClass || $[35] !== style || $[36] !== t10 || $[37] !== t13 || $[38] !== t14) {
|
|
119
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
120
|
+
className: containerClass,
|
|
121
|
+
style,
|
|
122
|
+
children: [
|
|
123
|
+
t10,
|
|
124
|
+
t13,
|
|
125
|
+
t14
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
$[34] = containerClass;
|
|
129
|
+
$[35] = style;
|
|
130
|
+
$[36] = t10;
|
|
131
|
+
$[37] = t13;
|
|
132
|
+
$[38] = t14;
|
|
133
|
+
$[39] = t15;
|
|
134
|
+
} else t15 = $[39];
|
|
135
|
+
return t15;
|
|
51
136
|
};
|
|
52
137
|
var ds_text_input_default = DsTextInput;
|
|
53
138
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-text-input.js","names":["
|
|
1
|
+
{"version":3,"file":"ds-text-input.js","names":["ChangeEvent","FC","Fragment","classNames","styles","DsTextInputProps","DsTextInput","t0","$","_c","id","ref","name","size","t1","type","t2","onBlur","onKeyDown","onChange","onValueChange","className","style","t3","value","defaultValue","min","max","minLength","maxLength","placeholder","disabled","t4","tabIndex","slots","undefined","t5","InputWrapper","inputWrapper","t6","t7","t8","textInputContainer","small","default","containerClass","t9","event","newValue","target","handleChange","t10","startAdornment","adornment","t11","Symbol","for","input","t12","t13","t14","endAdornment","t15"],"sources":["../../../src/components/ds-text-input/ds-text-input.tsx"],"sourcesContent":["import { type ChangeEvent, type FC, Fragment } from 'react';\nimport classNames from 'classnames';\nimport styles from './ds-text-input.module.scss';\nimport type { DsTextInputProps } from './ds-text-input.types';\n\nconst DsTextInput: FC<DsTextInputProps> = ({\n\tid,\n\tref,\n\tname,\n\tsize = 'default',\n\ttype = 'text',\n\tonBlur,\n\tonKeyDown,\n\tonChange,\n\tonValueChange,\n\tclassName,\n\tstyle = {},\n\tvalue,\n\tdefaultValue,\n\tmin,\n\tmax,\n\tminLength,\n\tmaxLength,\n\tplaceholder,\n\tdisabled = false,\n\ttabIndex,\n\tslots,\n}) => {\n\tconst InputWrapper = slots?.inputWrapper ?? Fragment;\n\n\tconst containerClass = classNames(\n\t\tstyles.textInputContainer,\n\t\t{\n\t\t\t[styles.small]: size === 'small',\n\t\t\t[styles.default]: size === 'default',\n\t\t},\n\t\tclassName,\n\t);\n\n\tconst handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n\t\tconst newValue = event.target.value;\n\t\tonChange?.(event);\n\t\tonValueChange?.(newValue);\n\t};\n\n\treturn (\n\t\t<div className={containerClass} style={style}>\n\t\t\t{slots?.startAdornment && <div className={styles.adornment}>{slots.startAdornment}</div>}\n\t\t\t<InputWrapper>\n\t\t\t\t<input\n\t\t\t\t\tid={id}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tname={name}\n\t\t\t\t\tclassName={classNames(styles.input)}\n\t\t\t\t\ttype={type}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tmin={min}\n\t\t\t\t\tmax={max}\n\t\t\t\t\tminLength={minLength}\n\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t/>\n\t\t\t</InputWrapper>\n\t\t\t{slots?.endAdornment && <div className={styles.adornment}>{slots.endAdornment}</div>}\n\t\t</div>\n\t);\n};\n\nexport default DsTextInput;\n"],"mappings":";;;;;;;AAKA,MAAMM,eAAoCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAC,MAAA,EAAAC,IAAAC,KAAAC,MAAAC,MAAAC,IAAAC,MAAAC,IAAAC,QAAAC,WAAAC,UAAAC,eAAAC,WAAAC,OAAAC,IAAAC,OAAAC,cAAAC,KAAAC,KAAAC,WAAAC,WAAAC,aAAAC,UAAAC,IAAAC,UAAAC,UAAA3B;CAI1C,MAAAM,OAAAC,OAAAqB,SAAA,YAAArB;CACA,MAAAC,OAAAC,OAAAmB,SAAA,SAAAnB;CAAa,IAAAoB;AAAA,KAAA5B,EAAA,OAAAe,IAAA;AAMba,OAAAb,OAAAY,SAAA,EAAU,GAAVZ;AAAUf,IAAA,KAAAe;AAAAf,IAAA,KAAA4B;OAAAA,MAAA5B,E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AAA,IAAAsD;AAAA,KAAAtD,EAAA,QAAAqC,kBAAArC,EAAA,QAAAc,SAAAd,EAAA,QAAA2C,OAAA3C,EAAA,QAAAmD,OAAAnD,EAAA,QAAAoD,KAAA;AAvBrFE,QAAA,qBAAA;GAAgBjB,WAAAA;GAAuBvB;;IACrC6B;IACDQ;IAqBCC;;IACI;AAAApD,IAAA,MAAAqC;AAAArC,IAAA,MAAAc;AAAAd,IAAA,MAAA2C;AAAA3C,IAAA,MAAAmD;AAAAnD,IAAA,MAAAoD;AAAApD,IAAA,MAAAsD;OAAAA,OAAAtD,EAAA;AAAA,QAxBNsD;;AA4BF,4BAAexD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-text-input.types.js","names":[],"sources":["../../../src/components/ds-text-input/ds-text-input.types.tsx"],"sourcesContent":["import type { ComponentType } from 'react';\nimport type React from 'react';\n\nexport const textInputSizes = ['small', 'default'] as const;\nexport type TextInputSize = (typeof textInputSizes)[number];\n\nexport interface DsTextInputProps {\n\t/**\n\t * Unique identifier for the input field\n\t */\n\tid?: string;\n\t/**\n\t * The ref to the input field\n\t */\n\tref?: React.Ref<HTMLInputElement>;\n\t/**\n\t * The name of the input field\n\t */\n\tname?: string;\n\t/**\n\t * The size of the input field\n\t * @default default\n\t */\n\tsize?: TextInputSize;\n\t/**\n\t * The type of the input field\n\t * @default text\n\t */\n\ttype?: string;\n\t/**\n\t * Event handler called when the input field loses focus\n\t *\n\t * @param event\n\t */\n\tonBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback when a key is pressed down\n\t */\n\tonKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback when the value changes\n\t */\n\tonChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n\t/**\n\t * Value change event handler (provides just the value)\n\t */\n\tonValueChange?: (value: string) => void;\n\t/**\n\t * Additional CSS class names\n\t */\n\tclassName?: string;\n\t/**\n\t * Additional styles to apply to the component\n\t */\n\tstyle?: React.CSSProperties;\n\t/**\n\t * The placeholder text\n\t */\n\tplaceholder?: string;\n\t/**\n\t * The current value\n\t */\n\tvalue?: string;\n\t/**\n\t * The minimum value of the input\n\t */\n\tmin?: number | string;\n\t/**\n\t * The maximum value of the input\n\t */\n\tmax?: number | string;\n\t/**\n\t * The minimum number of characters\n\t */\n\tminLength?: number;\n\t/**\n\t * The maximum number of characters\n\t */\n\tmaxLength?: number;\n\t/**\n\t * The initial value of the input when rendered.\n\t * Use when you don't need to control the value of the input.\n\t */\n\tdefaultValue?: string;\n\t/**\n\t * Whether the input is disabled\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The tabIndex of the input\n\t */\n\ttabIndex?: number;\n\n\tslots?: {\n\t\t/**\n\t\t * Custom component to wrap the input element\n\t\t */\n\t\tinputWrapper?: ComponentType<{ children: React.ReactNode }>;\n\n\t\t/**\n\t\t * Adornment to display at the start of the input\n\t\t */\n\t\tstartAdornment?: React.ReactNode;\n\t\t/**\n\t\t * Adornment to display at the end of the input\n\t\t */\n\t\tendAdornment?: React.ReactNode;\n\t};\n}\n"],"mappings":";AAGA,
|
|
1
|
+
{"version":3,"file":"ds-text-input.types.js","names":["ComponentType","React","textInputSizes","const","TextInputSize","DsTextInputProps","id","ref","Ref","HTMLInputElement","name","size","type","onBlur","event","FocusEvent","onKeyDown","KeyboardEvent","onChange","ChangeEvent","onValueChange","value","className","style","CSSProperties","placeholder","min","max","minLength","maxLength","defaultValue","disabled","tabIndex","slots","inputWrapper","children","ReactNode","startAdornment","endAdornment"],"sources":["../../../src/components/ds-text-input/ds-text-input.types.tsx"],"sourcesContent":["import type { ComponentType } from 'react';\nimport type React from 'react';\n\nexport const textInputSizes = ['small', 'default'] as const;\nexport type TextInputSize = (typeof textInputSizes)[number];\n\nexport interface DsTextInputProps {\n\t/**\n\t * Unique identifier for the input field\n\t */\n\tid?: string;\n\t/**\n\t * The ref to the input field\n\t */\n\tref?: React.Ref<HTMLInputElement>;\n\t/**\n\t * The name of the input field\n\t */\n\tname?: string;\n\t/**\n\t * The size of the input field\n\t * @default default\n\t */\n\tsize?: TextInputSize;\n\t/**\n\t * The type of the input field\n\t * @default text\n\t */\n\ttype?: string;\n\t/**\n\t * Event handler called when the input field loses focus\n\t *\n\t * @param event\n\t */\n\tonBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback when a key is pressed down\n\t */\n\tonKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\n\t/**\n\t * Callback when the value changes\n\t */\n\tonChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n\t/**\n\t * Value change event handler (provides just the value)\n\t */\n\tonValueChange?: (value: string) => void;\n\t/**\n\t * Additional CSS class names\n\t */\n\tclassName?: string;\n\t/**\n\t * Additional styles to apply to the component\n\t */\n\tstyle?: React.CSSProperties;\n\t/**\n\t * The placeholder text\n\t */\n\tplaceholder?: string;\n\t/**\n\t * The current value\n\t */\n\tvalue?: string;\n\t/**\n\t * The minimum value of the input\n\t */\n\tmin?: number | string;\n\t/**\n\t * The maximum value of the input\n\t */\n\tmax?: number | string;\n\t/**\n\t * The minimum number of characters\n\t */\n\tminLength?: number;\n\t/**\n\t * The maximum number of characters\n\t */\n\tmaxLength?: number;\n\t/**\n\t * The initial value of the input when rendered.\n\t * Use when you don't need to control the value of the input.\n\t */\n\tdefaultValue?: string;\n\t/**\n\t * Whether the input is disabled\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The tabIndex of the input\n\t */\n\ttabIndex?: number;\n\n\tslots?: {\n\t\t/**\n\t\t * Custom component to wrap the input element\n\t\t */\n\t\tinputWrapper?: ComponentType<{ children: React.ReactNode }>;\n\n\t\t/**\n\t\t * Adornment to display at the start of the input\n\t\t */\n\t\tstartAdornment?: React.ReactNode;\n\t\t/**\n\t\t * Adornment to display at the end of the input\n\t\t */\n\t\tendAdornment?: React.ReactNode;\n\t};\n}\n"],"mappings":";AAGA,MAAaE,iBAAiB,CAAC,SAAS,UAAU"}
|
|
@@ -1,32 +1,76 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_ds_textarea_module = require('./ds-textarea.module.cjs');
|
|
3
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
3
4
|
let classnames = require("classnames");
|
|
4
5
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
5
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
7
|
|
|
7
8
|
//#region src/components/ds-textarea/ds-textarea.tsx
|
|
8
|
-
const DsTextarea = (
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
const DsTextarea = (t0) => {
|
|
10
|
+
const $ = (0, react_compiler_runtime.c)(22);
|
|
11
|
+
const { id, ref, name, onBlur, onChange, onValueChange, className, style: t1, value, defaultValue, disabled: t2, rows: t3, placeholder, minLength, maxLength } = t0;
|
|
12
|
+
let t4;
|
|
13
|
+
if ($[0] !== t1) {
|
|
14
|
+
t4 = t1 === void 0 ? {} : t1;
|
|
15
|
+
$[0] = t1;
|
|
16
|
+
$[1] = t4;
|
|
17
|
+
} else t4 = $[1];
|
|
18
|
+
const style = t4;
|
|
19
|
+
const disabled = t2 === void 0 ? false : t2;
|
|
20
|
+
const rows = t3 === void 0 ? 3 : t3;
|
|
21
|
+
let t5;
|
|
22
|
+
if ($[2] !== onChange || $[3] !== onValueChange) {
|
|
23
|
+
t5 = (event) => {
|
|
24
|
+
const newValue = event.target.value;
|
|
25
|
+
onChange?.(event);
|
|
26
|
+
onValueChange?.(newValue);
|
|
27
|
+
};
|
|
28
|
+
$[2] = onChange;
|
|
29
|
+
$[3] = onValueChange;
|
|
30
|
+
$[4] = t5;
|
|
31
|
+
} else t5 = $[4];
|
|
32
|
+
const handleChange = t5;
|
|
33
|
+
let t6;
|
|
34
|
+
if ($[5] !== className) {
|
|
35
|
+
t6 = (0, classnames.default)(require_ds_textarea_module.default.textarea, className);
|
|
36
|
+
$[5] = className;
|
|
37
|
+
$[6] = t6;
|
|
38
|
+
} else t6 = $[6];
|
|
39
|
+
let t7;
|
|
40
|
+
if ($[7] !== defaultValue || $[8] !== disabled || $[9] !== handleChange || $[10] !== id || $[11] !== maxLength || $[12] !== minLength || $[13] !== name || $[14] !== onBlur || $[15] !== placeholder || $[16] !== ref || $[17] !== rows || $[18] !== style || $[19] !== t6 || $[20] !== value) {
|
|
41
|
+
t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
42
|
+
id,
|
|
43
|
+
ref,
|
|
44
|
+
name,
|
|
45
|
+
className: t6,
|
|
46
|
+
style,
|
|
47
|
+
value,
|
|
48
|
+
defaultValue,
|
|
49
|
+
placeholder,
|
|
50
|
+
disabled,
|
|
51
|
+
rows,
|
|
52
|
+
onBlur,
|
|
53
|
+
onChange: handleChange,
|
|
54
|
+
minLength,
|
|
55
|
+
maxLength
|
|
56
|
+
});
|
|
57
|
+
$[7] = defaultValue;
|
|
58
|
+
$[8] = disabled;
|
|
59
|
+
$[9] = handleChange;
|
|
60
|
+
$[10] = id;
|
|
61
|
+
$[11] = maxLength;
|
|
62
|
+
$[12] = minLength;
|
|
63
|
+
$[13] = name;
|
|
64
|
+
$[14] = onBlur;
|
|
65
|
+
$[15] = placeholder;
|
|
66
|
+
$[16] = ref;
|
|
67
|
+
$[17] = rows;
|
|
68
|
+
$[18] = style;
|
|
69
|
+
$[19] = t6;
|
|
70
|
+
$[20] = value;
|
|
71
|
+
$[21] = t7;
|
|
72
|
+
} else t7 = $[21];
|
|
73
|
+
return t7;
|
|
30
74
|
};
|
|
31
75
|
var ds_textarea_default = DsTextarea;
|
|
32
76
|
|
|
@@ -1,30 +1,74 @@
|
|
|
1
1
|
import ds_textarea_module_default from "./ds-textarea.module.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import classNames from "classnames";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
//#region src/components/ds-textarea/ds-textarea.tsx
|
|
6
|
-
const DsTextarea = (
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
const DsTextarea = (t0) => {
|
|
8
|
+
const $ = c(22);
|
|
9
|
+
const { id, ref, name, onBlur, onChange, onValueChange, className, style: t1, value, defaultValue, disabled: t2, rows: t3, placeholder, minLength, maxLength } = t0;
|
|
10
|
+
let t4;
|
|
11
|
+
if ($[0] !== t1) {
|
|
12
|
+
t4 = t1 === void 0 ? {} : t1;
|
|
13
|
+
$[0] = t1;
|
|
14
|
+
$[1] = t4;
|
|
15
|
+
} else t4 = $[1];
|
|
16
|
+
const style = t4;
|
|
17
|
+
const disabled = t2 === void 0 ? false : t2;
|
|
18
|
+
const rows = t3 === void 0 ? 3 : t3;
|
|
19
|
+
let t5;
|
|
20
|
+
if ($[2] !== onChange || $[3] !== onValueChange) {
|
|
21
|
+
t5 = (event) => {
|
|
22
|
+
const newValue = event.target.value;
|
|
23
|
+
onChange?.(event);
|
|
24
|
+
onValueChange?.(newValue);
|
|
25
|
+
};
|
|
26
|
+
$[2] = onChange;
|
|
27
|
+
$[3] = onValueChange;
|
|
28
|
+
$[4] = t5;
|
|
29
|
+
} else t5 = $[4];
|
|
30
|
+
const handleChange = t5;
|
|
31
|
+
let t6;
|
|
32
|
+
if ($[5] !== className) {
|
|
33
|
+
t6 = classNames(ds_textarea_module_default.textarea, className);
|
|
34
|
+
$[5] = className;
|
|
35
|
+
$[6] = t6;
|
|
36
|
+
} else t6 = $[6];
|
|
37
|
+
let t7;
|
|
38
|
+
if ($[7] !== defaultValue || $[8] !== disabled || $[9] !== handleChange || $[10] !== id || $[11] !== maxLength || $[12] !== minLength || $[13] !== name || $[14] !== onBlur || $[15] !== placeholder || $[16] !== ref || $[17] !== rows || $[18] !== style || $[19] !== t6 || $[20] !== value) {
|
|
39
|
+
t7 = /* @__PURE__ */ jsx("textarea", {
|
|
40
|
+
id,
|
|
41
|
+
ref,
|
|
42
|
+
name,
|
|
43
|
+
className: t6,
|
|
44
|
+
style,
|
|
45
|
+
value,
|
|
46
|
+
defaultValue,
|
|
47
|
+
placeholder,
|
|
48
|
+
disabled,
|
|
49
|
+
rows,
|
|
50
|
+
onBlur,
|
|
51
|
+
onChange: handleChange,
|
|
52
|
+
minLength,
|
|
53
|
+
maxLength
|
|
54
|
+
});
|
|
55
|
+
$[7] = defaultValue;
|
|
56
|
+
$[8] = disabled;
|
|
57
|
+
$[9] = handleChange;
|
|
58
|
+
$[10] = id;
|
|
59
|
+
$[11] = maxLength;
|
|
60
|
+
$[12] = minLength;
|
|
61
|
+
$[13] = name;
|
|
62
|
+
$[14] = onBlur;
|
|
63
|
+
$[15] = placeholder;
|
|
64
|
+
$[16] = ref;
|
|
65
|
+
$[17] = rows;
|
|
66
|
+
$[18] = style;
|
|
67
|
+
$[19] = t6;
|
|
68
|
+
$[20] = value;
|
|
69
|
+
$[21] = t7;
|
|
70
|
+
} else t7 = $[21];
|
|
71
|
+
return t7;
|
|
28
72
|
};
|
|
29
73
|
var ds_textarea_default = DsTextarea;
|
|
30
74
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-textarea.js","names":["
|
|
1
|
+
{"version":3,"file":"ds-textarea.js","names":["React","classNames","styles","DsTextareaProps","DsTextarea","FC","t0","$","_c","id","ref","name","onBlur","onChange","onValueChange","className","style","t1","value","defaultValue","disabled","t2","rows","t3","placeholder","minLength","maxLength","t4","undefined","t5","event","newValue","target","handleChange","t6","textarea","t7"],"sources":["../../../src/components/ds-textarea/ds-textarea.tsx"],"sourcesContent":["import type React from 'react';\nimport classNames from 'classnames';\nimport styles from './ds-textarea.module.scss';\nimport type { DsTextareaProps } from './ds-textarea.types';\n\nconst DsTextarea: React.FC<DsTextareaProps> = ({\n\tid,\n\tref,\n\tname,\n\tonBlur,\n\tonChange,\n\tonValueChange,\n\tclassName,\n\tstyle = {},\n\tvalue,\n\tdefaultValue,\n\tdisabled = false,\n\trows = 3,\n\tplaceholder,\n\tminLength,\n\tmaxLength,\n}) => {\n\tconst handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n\t\tconst newValue = event.target.value;\n\t\tonChange?.(event);\n\t\tonValueChange?.(newValue);\n\t};\n\n\treturn (\n\t\t<textarea\n\t\t\tid={id}\n\t\t\tref={ref}\n\t\t\tname={name}\n\t\t\tclassName={classNames(styles.textarea, className)}\n\t\t\tstyle={style}\n\t\t\tvalue={value}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tplaceholder={placeholder}\n\t\t\tdisabled={disabled}\n\t\t\trows={rows}\n\t\t\tonBlur={onBlur}\n\t\t\tonChange={handleChange}\n\t\t\tminLength={minLength}\n\t\t\tmaxLength={maxLength}\n\t\t/>\n\t);\n};\n\nexport default DsTextarea;\n"],"mappings":";;;;;;AAKA,MAAMI,cAAwCE,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAC,MAAA,EAAAC,IAAAC,KAAAC,MAAAC,QAAAC,UAAAC,eAAAC,WAAAC,OAAAC,IAAAC,OAAAC,cAAAC,UAAAC,IAAAC,MAAAC,IAAAC,aAAAC,WAAAC,cAAApB;CAgB9C,IAAAqB;AAAA,KAAApB,EAAA,OAAAU,IAAA;AARAU,OAAAV,OAAAW,SA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