ods-ant 0.2.0 → 0.4.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/README.md +28 -2
- package/dist-lib/AutoComplete-cpf8hCnK.js +93 -0
- package/dist-lib/AutoComplete-cpf8hCnK.js.map +1 -0
- package/dist-lib/AutoComplete-gOMQxLvY.cjs +38 -0
- package/dist-lib/AutoComplete-gOMQxLvY.cjs.map +1 -0
- package/dist-lib/DatePicker-BpjYibJF.js +599 -0
- package/dist-lib/DatePicker-BpjYibJF.js.map +1 -0
- package/dist-lib/DatePicker-DTVtamsX.cjs +518 -0
- package/dist-lib/DatePicker-DTVtamsX.cjs.map +1 -0
- package/dist-lib/Dropdown-BU7v5Q4i.cjs +88 -0
- package/dist-lib/Dropdown-BU7v5Q4i.cjs.map +1 -0
- package/dist-lib/Dropdown-C2t8AOdz.js +113 -0
- package/dist-lib/Dropdown-C2t8AOdz.js.map +1 -0
- package/dist-lib/InputNumber-55VASjK4.js +253 -0
- package/dist-lib/InputNumber-55VASjK4.js.map +1 -0
- package/dist-lib/InputNumber-X-VvOKNc.cjs +202 -0
- package/dist-lib/InputNumber-X-VvOKNc.cjs.map +1 -0
- package/dist-lib/Steps-DT5AKuMX.js +214 -0
- package/dist-lib/Steps-DT5AKuMX.js.map +1 -0
- package/dist-lib/Steps-Dhq_inin.cjs +191 -0
- package/dist-lib/Steps-Dhq_inin.cjs.map +1 -0
- package/dist-lib/TimePicker-BgaELcl_.js +277 -0
- package/dist-lib/TimePicker-BgaELcl_.js.map +1 -0
- package/dist-lib/TimePicker-D4iKsUck.cjs +217 -0
- package/dist-lib/TimePicker-D4iKsUck.cjs.map +1 -0
- package/dist-lib/chunk-Bmb41Sf3.cjs +1 -0
- package/dist-lib/core-C-tv3mqr.js +57 -0
- package/dist-lib/core-C-tv3mqr.js.map +1 -0
- package/dist-lib/core-bPY3ouxp.cjs +2 -0
- package/dist-lib/core-bPY3ouxp.cjs.map +1 -0
- package/dist-lib/display/Avatar.cjs +84 -0
- package/dist-lib/display/Avatar.cjs.map +1 -0
- package/dist-lib/display/Avatar.js +176 -0
- package/dist-lib/display/Avatar.js.map +1 -0
- package/dist-lib/display/Badge.cjs +89 -0
- package/dist-lib/display/Badge.cjs.map +1 -0
- package/dist-lib/display/Badge.js +184 -0
- package/dist-lib/display/Badge.js.map +1 -0
- package/dist-lib/display/Calendar.cjs +194 -0
- package/dist-lib/display/Calendar.cjs.map +1 -0
- package/dist-lib/display/Calendar.js +378 -0
- package/dist-lib/display/Calendar.js.map +1 -0
- package/dist-lib/display/Card.cjs +177 -0
- package/dist-lib/display/Card.cjs.map +1 -0
- package/dist-lib/display/Card.js +209 -0
- package/dist-lib/display/Card.js.map +1 -0
- package/dist-lib/display/Collapse.cjs +346 -0
- package/dist-lib/display/Collapse.cjs.map +1 -0
- package/dist-lib/display/Collapse.js +449 -0
- package/dist-lib/display/Collapse.js.map +1 -0
- package/dist-lib/display/Descriptions.cjs +145 -0
- package/dist-lib/display/Descriptions.cjs.map +1 -0
- package/dist-lib/display/Descriptions.js +186 -0
- package/dist-lib/display/Descriptions.js.map +1 -0
- package/dist-lib/display/Empty.cjs +170 -0
- package/dist-lib/display/Empty.cjs.map +1 -0
- package/dist-lib/display/Empty.js +295 -0
- package/dist-lib/display/Empty.js.map +1 -0
- package/dist-lib/display/Icon.cjs +48 -0
- package/dist-lib/display/Icon.cjs.map +1 -0
- package/dist-lib/display/Icon.js +165 -0
- package/dist-lib/display/Icon.js.map +1 -0
- package/dist-lib/display/Image.cjs +69 -0
- package/dist-lib/display/Image.cjs.map +1 -0
- package/dist-lib/display/Image.js +163 -0
- package/dist-lib/display/Image.js.map +1 -0
- package/dist-lib/display/List.cjs +142 -0
- package/dist-lib/display/List.cjs.map +1 -0
- package/dist-lib/display/List.js +178 -0
- package/dist-lib/display/List.js.map +1 -0
- package/dist-lib/display/Popover.cjs +62 -0
- package/dist-lib/display/Popover.cjs.map +1 -0
- package/dist-lib/display/Popover.js +130 -0
- package/dist-lib/display/Popover.js.map +1 -0
- package/dist-lib/display/Segmented.cjs +115 -0
- package/dist-lib/display/Segmented.cjs.map +1 -0
- package/dist-lib/display/Segmented.js +202 -0
- package/dist-lib/display/Segmented.js.map +1 -0
- package/dist-lib/display/Statistic.cjs +133 -0
- package/dist-lib/display/Statistic.cjs.map +1 -0
- package/dist-lib/display/Statistic.js +165 -0
- package/dist-lib/display/Statistic.js.map +1 -0
- package/dist-lib/display/Table.cjs +510 -0
- package/dist-lib/display/Table.cjs.map +1 -0
- package/dist-lib/display/Table.js +979 -0
- package/dist-lib/display/Table.js.map +1 -0
- package/dist-lib/display/Tag.cjs +35 -0
- package/dist-lib/display/Tag.cjs.map +1 -0
- package/dist-lib/display/Tag.js +95 -0
- package/dist-lib/display/Tag.js.map +1 -0
- package/dist-lib/display/Timeline.cjs +138 -0
- package/dist-lib/display/Timeline.cjs.map +1 -0
- package/dist-lib/display/Timeline.js +275 -0
- package/dist-lib/display/Timeline.js.map +1 -0
- package/dist-lib/display/Tooltip.cjs +70 -0
- package/dist-lib/display/Tooltip.cjs.map +1 -0
- package/dist-lib/display/Tooltip.js +141 -0
- package/dist-lib/display/Tooltip.js.map +1 -0
- package/dist-lib/display/Tree.cjs +199 -0
- package/dist-lib/display/Tree.cjs.map +1 -0
- package/dist-lib/display/Tree.js +349 -0
- package/dist-lib/display/Tree.js.map +1 -0
- package/dist-lib/display/Typography.cjs +102 -0
- package/dist-lib/display/Typography.cjs.map +1 -0
- package/dist-lib/display/Typography.js +159 -0
- package/dist-lib/display/Typography.js.map +1 -0
- package/dist-lib/display/index.cjs +1 -0
- package/dist-lib/display/index.js +20 -0
- package/dist-lib/feedback/Drawer.cjs +169 -0
- package/dist-lib/feedback/Drawer.cjs.map +1 -0
- package/dist-lib/feedback/Drawer.js +255 -0
- package/dist-lib/feedback/Drawer.js.map +1 -0
- package/dist-lib/feedback/FloatButton.cjs +2 -0
- package/dist-lib/feedback/FloatButton.cjs.map +1 -0
- package/dist-lib/feedback/FloatButton.js +19 -0
- package/dist-lib/feedback/FloatButton.js.map +1 -0
- package/dist-lib/feedback/Message.cjs +2 -0
- package/dist-lib/feedback/Message.cjs.map +1 -0
- package/dist-lib/feedback/Message.js +47 -0
- package/dist-lib/feedback/Message.js.map +1 -0
- package/dist-lib/feedback/Modal.cjs +170 -0
- package/dist-lib/feedback/Modal.cjs.map +1 -0
- package/dist-lib/feedback/Modal.js +297 -0
- package/dist-lib/feedback/Modal.js.map +1 -0
- package/dist-lib/feedback/Notification.cjs +20 -0
- package/dist-lib/feedback/Notification.cjs.map +1 -0
- package/dist-lib/feedback/Notification.js +60 -0
- package/dist-lib/feedback/Notification.js.map +1 -0
- package/dist-lib/feedback/Popconfirm.cjs +2 -0
- package/dist-lib/feedback/Popconfirm.cjs.map +1 -0
- package/dist-lib/feedback/Popconfirm.js +15 -0
- package/dist-lib/feedback/Popconfirm.js.map +1 -0
- package/dist-lib/feedback/Progress.cjs +78 -0
- package/dist-lib/feedback/Progress.cjs.map +1 -0
- package/dist-lib/feedback/Progress.js +199 -0
- package/dist-lib/feedback/Progress.js.map +1 -0
- package/dist-lib/feedback/Result.cjs +95 -0
- package/dist-lib/feedback/Result.cjs.map +1 -0
- package/dist-lib/feedback/Result.js +174 -0
- package/dist-lib/feedback/Result.js.map +1 -0
- package/dist-lib/feedback/Skeleton.cjs +214 -0
- package/dist-lib/feedback/Skeleton.cjs.map +1 -0
- package/dist-lib/feedback/Skeleton.js +408 -0
- package/dist-lib/feedback/Skeleton.js.map +1 -0
- package/dist-lib/feedback/Spin.cjs +65 -0
- package/dist-lib/feedback/Spin.cjs.map +1 -0
- package/dist-lib/feedback/Spin.js +115 -0
- package/dist-lib/feedback/Spin.js.map +1 -0
- package/dist-lib/feedback/Tour.cjs +154 -0
- package/dist-lib/feedback/Tour.cjs.map +1 -0
- package/dist-lib/feedback/Tour.js +211 -0
- package/dist-lib/feedback/Tour.js.map +1 -0
- package/dist-lib/feedback/index.cjs +1 -0
- package/dist-lib/feedback/index.js +12 -0
- package/dist-lib/feedbackIcons-DBoCD6Dk.js +37 -0
- package/dist-lib/feedbackIcons-DBoCD6Dk.js.map +1 -0
- package/dist-lib/feedbackIcons-DXxPnA5r.cjs +2 -0
- package/dist-lib/feedbackIcons-DXxPnA5r.cjs.map +1 -0
- package/dist-lib/fieldProps-CuWfEbFx.cjs +2 -0
- package/dist-lib/fieldProps-CuWfEbFx.cjs.map +1 -0
- package/dist-lib/fieldProps-EeYy2kXb.js +9 -0
- package/dist-lib/fieldProps-EeYy2kXb.js.map +1 -0
- package/dist-lib/forms/AccessibleCheckboxGroup.cjs +2 -0
- package/dist-lib/forms/AccessibleCheckboxGroup.cjs.map +1 -0
- package/dist-lib/forms/AccessibleCheckboxGroup.js +16 -0
- package/dist-lib/forms/AccessibleCheckboxGroup.js.map +1 -0
- package/dist-lib/forms/AccessibleDatePicker.cjs +2 -0
- package/dist-lib/forms/AccessibleDatePicker.cjs.map +1 -0
- package/dist-lib/forms/AccessibleDatePicker.js +22 -0
- package/dist-lib/forms/AccessibleDatePicker.js.map +1 -0
- package/dist-lib/forms/AccessiblePasswordInput.cjs +2 -0
- package/dist-lib/forms/AccessiblePasswordInput.cjs.map +1 -0
- package/dist-lib/forms/AccessiblePasswordInput.js +14 -0
- package/dist-lib/forms/AccessiblePasswordInput.js.map +1 -0
- package/dist-lib/forms/AccessibleRadioGroup.cjs +2 -0
- package/dist-lib/forms/AccessibleRadioGroup.cjs.map +1 -0
- package/dist-lib/forms/AccessibleRadioGroup.js +16 -0
- package/dist-lib/forms/AccessibleRadioGroup.js.map +1 -0
- package/dist-lib/forms/AccessibleSelect.cjs +2 -0
- package/dist-lib/forms/AccessibleSelect.cjs.map +1 -0
- package/dist-lib/forms/AccessibleSelect.js +20 -0
- package/dist-lib/forms/AccessibleSelect.js.map +1 -0
- package/dist-lib/forms/AccessibleSwitch.cjs +2 -0
- package/dist-lib/forms/AccessibleSwitch.cjs.map +1 -0
- package/dist-lib/forms/AccessibleSwitch.js +20 -0
- package/dist-lib/forms/AccessibleSwitch.js.map +1 -0
- package/dist-lib/forms/AutoComplete.cjs +1 -0
- package/dist-lib/forms/AutoComplete.js +2 -0
- package/dist-lib/forms/Button.cjs +243 -0
- package/dist-lib/forms/Button.cjs.map +1 -0
- package/dist-lib/forms/Button.js +299 -0
- package/dist-lib/forms/Button.js.map +1 -0
- package/dist-lib/forms/Cascader.cjs +37 -0
- package/dist-lib/forms/Cascader.cjs.map +1 -0
- package/dist-lib/forms/Cascader.js +88 -0
- package/dist-lib/forms/Cascader.js.map +1 -0
- package/dist-lib/forms/Checkbox.cjs +275 -0
- package/dist-lib/forms/Checkbox.cjs.map +1 -0
- package/dist-lib/forms/Checkbox.js +327 -0
- package/dist-lib/forms/Checkbox.js.map +1 -0
- package/dist-lib/forms/CheckboxGroup.cjs +2 -0
- package/dist-lib/forms/CheckboxGroup.cjs.map +1 -0
- package/dist-lib/forms/CheckboxGroup.js +42 -0
- package/dist-lib/forms/CheckboxGroup.js.map +1 -0
- package/dist-lib/forms/ClearableAutoComplete.cjs +2 -0
- package/dist-lib/forms/ClearableAutoComplete.cjs.map +1 -0
- package/dist-lib/forms/ClearableAutoComplete.js +27 -0
- package/dist-lib/forms/ClearableAutoComplete.js.map +1 -0
- package/dist-lib/forms/ClearableCascader.cjs +2 -0
- package/dist-lib/forms/ClearableCascader.cjs.map +1 -0
- package/dist-lib/forms/ClearableCascader.js +27 -0
- package/dist-lib/forms/ClearableCascader.js.map +1 -0
- package/dist-lib/forms/ClearableCheckbox.cjs +2 -0
- package/dist-lib/forms/ClearableCheckbox.cjs.map +1 -0
- package/dist-lib/forms/ClearableCheckbox.js +23 -0
- package/dist-lib/forms/ClearableCheckbox.js.map +1 -0
- package/dist-lib/forms/ClearableColorPicker.cjs +2 -0
- package/dist-lib/forms/ClearableColorPicker.cjs.map +1 -0
- package/dist-lib/forms/ClearableColorPicker.js +22 -0
- package/dist-lib/forms/ClearableColorPicker.js.map +1 -0
- package/dist-lib/forms/ClearableDatePicker.cjs +2 -0
- package/dist-lib/forms/ClearableDatePicker.cjs.map +1 -0
- package/dist-lib/forms/ClearableDatePicker.js +27 -0
- package/dist-lib/forms/ClearableDatePicker.js.map +1 -0
- package/dist-lib/forms/ClearableInput.cjs +2 -0
- package/dist-lib/forms/ClearableInput.cjs.map +1 -0
- package/dist-lib/forms/ClearableInput.js +22 -0
- package/dist-lib/forms/ClearableInput.js.map +1 -0
- package/dist-lib/forms/ClearableInputNumber.cjs +2 -0
- package/dist-lib/forms/ClearableInputNumber.cjs.map +1 -0
- package/dist-lib/forms/ClearableInputNumber.js +27 -0
- package/dist-lib/forms/ClearableInputNumber.js.map +1 -0
- package/dist-lib/forms/ClearableMentions.cjs +2 -0
- package/dist-lib/forms/ClearableMentions.cjs.map +1 -0
- package/dist-lib/forms/ClearableMentions.js +27 -0
- package/dist-lib/forms/ClearableMentions.js.map +1 -0
- package/dist-lib/forms/ClearableRadio.cjs +2 -0
- package/dist-lib/forms/ClearableRadio.cjs.map +1 -0
- package/dist-lib/forms/ClearableRadio.js +23 -0
- package/dist-lib/forms/ClearableRadio.js.map +1 -0
- package/dist-lib/forms/ClearableRadioGroup.cjs +2 -0
- package/dist-lib/forms/ClearableRadioGroup.cjs.map +1 -0
- package/dist-lib/forms/ClearableRadioGroup.js +22 -0
- package/dist-lib/forms/ClearableRadioGroup.js.map +1 -0
- package/dist-lib/forms/ClearableRate.cjs +2 -0
- package/dist-lib/forms/ClearableRate.cjs.map +1 -0
- package/dist-lib/forms/ClearableRate.js +22 -0
- package/dist-lib/forms/ClearableRate.js.map +1 -0
- package/dist-lib/forms/ClearableSelect.cjs +2 -0
- package/dist-lib/forms/ClearableSelect.cjs.map +1 -0
- package/dist-lib/forms/ClearableSelect.js +27 -0
- package/dist-lib/forms/ClearableSelect.js.map +1 -0
- package/dist-lib/forms/ClearableSlider.cjs +2 -0
- package/dist-lib/forms/ClearableSlider.cjs.map +1 -0
- package/dist-lib/forms/ClearableSlider.js +23 -0
- package/dist-lib/forms/ClearableSlider.js.map +1 -0
- package/dist-lib/forms/ClearableSwitch.cjs +2 -0
- package/dist-lib/forms/ClearableSwitch.cjs.map +1 -0
- package/dist-lib/forms/ClearableSwitch.js +23 -0
- package/dist-lib/forms/ClearableSwitch.js.map +1 -0
- package/dist-lib/forms/ClearableTimePicker.cjs +2 -0
- package/dist-lib/forms/ClearableTimePicker.cjs.map +1 -0
- package/dist-lib/forms/ClearableTimePicker.js +27 -0
- package/dist-lib/forms/ClearableTimePicker.js.map +1 -0
- package/dist-lib/forms/ClearableTransfer.cjs +200 -0
- package/dist-lib/forms/ClearableTransfer.cjs.map +1 -0
- package/dist-lib/forms/ClearableTransfer.js +337 -0
- package/dist-lib/forms/ClearableTransfer.js.map +1 -0
- package/dist-lib/forms/ClearableTreeSelect.cjs +2 -0
- package/dist-lib/forms/ClearableTreeSelect.cjs.map +1 -0
- package/dist-lib/forms/ClearableTreeSelect.js +27 -0
- package/dist-lib/forms/ClearableTreeSelect.js.map +1 -0
- package/dist-lib/forms/ClearableUpload.cjs +111 -0
- package/dist-lib/forms/ClearableUpload.cjs.map +1 -0
- package/dist-lib/forms/ClearableUpload.js +187 -0
- package/dist-lib/forms/ClearableUpload.js.map +1 -0
- package/dist-lib/forms/ColorPicker.cjs +2 -0
- package/dist-lib/forms/ColorPicker.cjs.map +1 -0
- package/dist-lib/forms/ColorPicker.js +42 -0
- package/dist-lib/forms/ColorPicker.js.map +1 -0
- package/dist-lib/forms/DatePicker.cjs +1 -0
- package/dist-lib/forms/DatePicker.js +2 -0
- package/dist-lib/forms/FieldSetShell.cjs +2 -0
- package/dist-lib/forms/FieldSetShell.cjs.map +1 -0
- package/dist-lib/forms/FieldSetShell.js +87 -0
- package/dist-lib/forms/FieldSetShell.js.map +1 -0
- package/dist-lib/forms/FieldShell.cjs +2 -0
- package/dist-lib/forms/FieldShell.cjs.map +1 -0
- package/dist-lib/forms/FieldShell.js +93 -0
- package/dist-lib/forms/FieldShell.js.map +1 -0
- package/dist-lib/forms/Form.cjs +244 -0
- package/dist-lib/forms/Form.cjs.map +1 -0
- package/dist-lib/forms/Form.js +357 -0
- package/dist-lib/forms/Form.js.map +1 -0
- package/dist-lib/forms/FormError.cjs +2 -0
- package/dist-lib/forms/FormError.cjs.map +1 -0
- package/dist-lib/forms/FormError.js +41 -0
- package/dist-lib/forms/FormError.js.map +1 -0
- package/dist-lib/forms/FormSuccess.cjs +2 -0
- package/dist-lib/forms/FormSuccess.cjs.map +1 -0
- package/dist-lib/forms/FormSuccess.js +42 -0
- package/dist-lib/forms/FormSuccess.js.map +1 -0
- package/dist-lib/forms/FormWarning.cjs +2 -0
- package/dist-lib/forms/FormWarning.cjs.map +1 -0
- package/dist-lib/forms/FormWarning.js +42 -0
- package/dist-lib/forms/FormWarning.js.map +1 -0
- package/dist-lib/forms/Input.cjs +295 -0
- package/dist-lib/forms/Input.cjs.map +1 -0
- package/dist-lib/forms/Input.js +358 -0
- package/dist-lib/forms/Input.js.map +1 -0
- package/dist-lib/forms/InputNumber.cjs +1 -0
- package/dist-lib/forms/InputNumber.js +2 -0
- package/dist-lib/forms/Mentions.cjs +40 -0
- package/dist-lib/forms/Mentions.cjs.map +1 -0
- package/dist-lib/forms/Mentions.js +126 -0
- package/dist-lib/forms/Mentions.js.map +1 -0
- package/dist-lib/forms/PasswordInput.cjs +2 -0
- package/dist-lib/forms/PasswordInput.cjs.map +1 -0
- package/dist-lib/forms/PasswordInput.js +56 -0
- package/dist-lib/forms/PasswordInput.js.map +1 -0
- package/dist-lib/forms/Radio.cjs +2 -0
- package/dist-lib/forms/Radio.cjs.map +1 -0
- package/dist-lib/forms/Radio.js +43 -0
- package/dist-lib/forms/Radio.js.map +1 -0
- package/dist-lib/forms/RadioGroup.cjs +2 -0
- package/dist-lib/forms/RadioGroup.cjs.map +1 -0
- package/dist-lib/forms/RadioGroup.js +42 -0
- package/dist-lib/forms/RadioGroup.js.map +1 -0
- package/dist-lib/forms/Rate.cjs +2 -0
- package/dist-lib/forms/Rate.cjs.map +1 -0
- package/dist-lib/forms/Rate.js +42 -0
- package/dist-lib/forms/Rate.js.map +1 -0
- package/dist-lib/forms/Select.cjs +2 -0
- package/dist-lib/forms/Select.cjs.map +1 -0
- package/dist-lib/forms/Select.js +72 -0
- package/dist-lib/forms/Select.js.map +1 -0
- package/dist-lib/forms/Slider.cjs +2 -0
- package/dist-lib/forms/Slider.cjs.map +1 -0
- package/dist-lib/forms/Slider.js +43 -0
- package/dist-lib/forms/Slider.js.map +1 -0
- package/dist-lib/forms/Switch.cjs +117 -0
- package/dist-lib/forms/Switch.cjs.map +1 -0
- package/dist-lib/forms/Switch.js +209 -0
- package/dist-lib/forms/Switch.js.map +1 -0
- package/dist-lib/forms/TimePicker.cjs +1 -0
- package/dist-lib/forms/TimePicker.js +2 -0
- package/dist-lib/forms/TreeSelect.cjs +2 -0
- package/dist-lib/forms/TreeSelect.cjs.map +1 -0
- package/dist-lib/forms/TreeSelect.js +45 -0
- package/dist-lib/forms/TreeSelect.js.map +1 -0
- package/dist-lib/forms/clearUtils.cjs +2 -0
- package/dist-lib/forms/clearUtils.cjs.map +1 -0
- package/dist-lib/forms/clearUtils.js +16 -0
- package/dist-lib/forms/clearUtils.js.map +1 -0
- package/dist-lib/forms/index.cjs +1 -0
- package/dist-lib/forms/index.js +52 -0
- package/dist-lib/forms/validation.cjs +2 -0
- package/dist-lib/forms/validation.cjs.map +1 -0
- package/dist-lib/forms/validation.js +68 -0
- package/dist-lib/forms/validation.js.map +1 -0
- package/dist-lib/index.cjs +1 -7307
- package/dist-lib/index.js +91 -9807
- package/dist-lib/navigation/Anchor.cjs +10 -0
- package/dist-lib/navigation/Anchor.cjs.map +1 -0
- package/dist-lib/navigation/Anchor.js +32 -0
- package/dist-lib/navigation/Anchor.js.map +1 -0
- package/dist-lib/navigation/Breadcrumb.cjs +130 -0
- package/dist-lib/navigation/Breadcrumb.cjs.map +1 -0
- package/dist-lib/navigation/Breadcrumb.js +217 -0
- package/dist-lib/navigation/Breadcrumb.js.map +1 -0
- package/dist-lib/navigation/Dropdown.cjs +1 -0
- package/dist-lib/navigation/Dropdown.js +2 -0
- package/dist-lib/navigation/Menu.cjs +177 -0
- package/dist-lib/navigation/Menu.cjs.map +1 -0
- package/dist-lib/navigation/Menu.js +258 -0
- package/dist-lib/navigation/Menu.js.map +1 -0
- package/dist-lib/navigation/Pagination.cjs +370 -0
- package/dist-lib/navigation/Pagination.cjs.map +1 -0
- package/dist-lib/navigation/Pagination.js +505 -0
- package/dist-lib/navigation/Pagination.js.map +1 -0
- package/dist-lib/navigation/Steps.cjs +1 -0
- package/dist-lib/navigation/Steps.js +2 -0
- package/dist-lib/navigation/Tabs.cjs +162 -0
- package/dist-lib/navigation/Tabs.cjs.map +1 -0
- package/dist-lib/navigation/Tabs.js +249 -0
- package/dist-lib/navigation/Tabs.js.map +1 -0
- package/dist-lib/navigation/index.cjs +1 -0
- package/dist-lib/navigation/index.js +8 -0
- package/dist-lib/selectStyles-BFeXUMpO.cjs +1027 -0
- package/dist-lib/selectStyles-BFeXUMpO.cjs.map +1 -0
- package/dist-lib/selectStyles-C8j5Vvgp.js +1037 -0
- package/dist-lib/selectStyles-C8j5Vvgp.js.map +1 -0
- package/dist-lib/theme.cjs +2 -1
- package/dist-lib/theme.cjs.map +1 -0
- package/dist-lib/theme.js +1656 -2
- package/dist-lib/theme.js.map +1 -0
- package/dist-lib/types/ds/display/Avatar.d.ts +37 -0
- package/dist-lib/types/ds/display/Avatar.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Avatar.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Avatar.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Badge.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Badge.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Calendar.d.ts +38 -0
- package/dist-lib/types/ds/display/Calendar.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Calendar.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Calendar.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Card.d.ts +20 -0
- package/dist-lib/types/ds/display/Card.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Card.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Card.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Collapse.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Collapse.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Descriptions.d.ts +16 -0
- package/dist-lib/types/ds/display/Descriptions.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Descriptions.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Descriptions.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Empty.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Empty.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Icon.d.ts +43 -0
- package/dist-lib/types/ds/display/Icon.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Icon.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Icon.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Image.d.ts +20 -0
- package/dist-lib/types/ds/display/Image.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Image.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Image.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/List.d.ts +14 -0
- package/dist-lib/types/ds/display/List.d.ts.map +1 -0
- package/dist-lib/types/ds/display/List.test.d.ts +2 -0
- package/dist-lib/types/ds/display/List.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Popover.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Popover.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Segmented.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Segmented.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Statistic.d.ts +25 -0
- package/dist-lib/types/ds/display/Statistic.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Statistic.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Statistic.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Table.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Table.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Tag.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Tag.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Timeline.d.ts +32 -0
- package/dist-lib/types/ds/display/Timeline.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Timeline.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Timeline.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Tooltip.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Tooltip.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Tree.d.ts +59 -0
- package/dist-lib/types/ds/display/Tree.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Tree.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Tree.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Typography.d.ts +26 -0
- package/dist-lib/types/ds/display/Typography.d.ts.map +1 -0
- package/dist-lib/types/ds/display/Typography.test.d.ts +2 -0
- package/dist-lib/types/ds/display/Typography.test.d.ts.map +1 -0
- package/dist-lib/types/ds/display/index.d.ts +11 -0
- package/dist-lib/types/ds/display/index.d.ts.map +1 -1
- package/dist-lib/types/ds/feedback/Drawer.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Drawer.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/FloatButton.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/FloatButton.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Message.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Message.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Modal.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Modal.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Notification.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Notification.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Popconfirm.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Popconfirm.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Progress.d.ts +30 -0
- package/dist-lib/types/ds/feedback/Progress.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Progress.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Progress.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Result.d.ts +20 -0
- package/dist-lib/types/ds/feedback/Result.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Result.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Result.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Skeleton.d.ts +25 -0
- package/dist-lib/types/ds/feedback/Skeleton.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Skeleton.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Skeleton.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Spin.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Spin.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Tour.d.ts +14 -0
- package/dist-lib/types/ds/feedback/Tour.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/Tour.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/Tour.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/feedbackIcons.test.d.ts +2 -0
- package/dist-lib/types/ds/feedback/feedbackIcons.test.d.ts.map +1 -0
- package/dist-lib/types/ds/feedback/index.d.ts +4 -0
- package/dist-lib/types/ds/feedback/index.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AccessibleCheckboxGroup.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AccessibleCheckboxGroup.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/AccessibleCheckboxGroup.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/AccessibleDatePicker.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AccessibleDatePicker.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/AccessibleDatePicker.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/AccessiblePasswordInput.d.ts +4 -12
- package/dist-lib/types/ds/forms/AccessiblePasswordInput.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AccessiblePasswordInput.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/AccessiblePasswordInput.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/AccessibleRadioGroup.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AccessibleRadioGroup.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/AccessibleRadioGroup.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/AccessibleSelect.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AccessibleSelect.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/AccessibleSelect.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/AccessibleSwitch.d.ts +1 -1
- package/dist-lib/types/ds/forms/AccessibleSwitch.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AccessibleSwitch.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/AccessibleSwitch.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/AutoComplete.d.ts +5 -1
- package/dist-lib/types/ds/forms/AutoComplete.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/AutoComplete.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/AutoComplete.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Button.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Button.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Cascader.d.ts +6 -2
- package/dist-lib/types/ds/forms/Cascader.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/Cascader.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Cascader.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Checkbox.d.ts +7 -1
- package/dist-lib/types/ds/forms/Checkbox.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/Checkbox.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Checkbox.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/CheckboxGroup.d.ts +13 -0
- package/dist-lib/types/ds/forms/CheckboxGroup.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/CheckboxGroup.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/CheckboxGroup.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableAutoComplete.d.ts +1 -1
- package/dist-lib/types/ds/forms/ClearableAutoComplete.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableAutoComplete.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableAutoComplete.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableCascader.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableCascader.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableCascader.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableCheckbox.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableCheckbox.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableCheckbox.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableColorPicker.d.ts +2 -3
- package/dist-lib/types/ds/forms/ClearableColorPicker.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableColorPicker.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableColorPicker.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableDatePicker.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableDatePicker.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableDatePicker.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableInput.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableInput.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableInput.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableInputNumber.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableInputNumber.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableInputNumber.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableMentions.d.ts +2 -4
- package/dist-lib/types/ds/forms/ClearableMentions.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableMentions.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableMentions.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableRadio.d.ts +1 -1
- package/dist-lib/types/ds/forms/ClearableRadio.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableRadio.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableRadio.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableRadioGroup.d.ts +2 -2
- package/dist-lib/types/ds/forms/ClearableRadioGroup.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableRadioGroup.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableRadioGroup.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableRate.d.ts +2 -4
- package/dist-lib/types/ds/forms/ClearableRate.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableRate.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableRate.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableSelect.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableSelect.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableSelect.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableSlider.d.ts +1 -2
- package/dist-lib/types/ds/forms/ClearableSlider.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableSlider.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableSlider.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableSwitch.d.ts +1 -1
- package/dist-lib/types/ds/forms/ClearableSwitch.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableSwitch.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableSwitch.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableTimePicker.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableTimePicker.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableTimePicker.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableTransfer.d.ts +13 -7
- package/dist-lib/types/ds/forms/ClearableTransfer.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableTransfer.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableTransfer.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableTreeSelect.d.ts +2 -2
- package/dist-lib/types/ds/forms/ClearableTreeSelect.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableTreeSelect.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableTreeSelect.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ClearableUpload.d.ts +13 -7
- package/dist-lib/types/ds/forms/ClearableUpload.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/ClearableUpload.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ClearableUpload.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ColorPicker.d.ts +11 -0
- package/dist-lib/types/ds/forms/ColorPicker.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/ColorPicker.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/ColorPicker.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/DatePicker.d.ts +5 -2
- package/dist-lib/types/ds/forms/DatePicker.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/DatePicker.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/DatePicker.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/FieldSetShell.d.ts +6 -1
- package/dist-lib/types/ds/forms/FieldSetShell.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/FieldSetShell.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/FieldSetShell.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/FieldShell.d.ts +6 -2
- package/dist-lib/types/ds/forms/FieldShell.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/FieldShell.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/FieldShell.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Form.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Form.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/FormError.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/FormError.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/FormSuccess.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/FormSuccess.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/FormWarning.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/FormWarning.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Input.d.ts +6 -2
- package/dist-lib/types/ds/forms/Input.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/Input.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Input.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/InputNumber.d.ts +6 -1
- package/dist-lib/types/ds/forms/InputNumber.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/InputNumber.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/InputNumber.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Mentions.d.ts +11 -0
- package/dist-lib/types/ds/forms/Mentions.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Mentions.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Mentions.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/PasswordInput.d.ts +13 -0
- package/dist-lib/types/ds/forms/PasswordInput.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/PasswordInput.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/PasswordInput.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Radio.d.ts +10 -0
- package/dist-lib/types/ds/forms/Radio.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Radio.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Radio.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/RadioGroup.d.ts +11 -0
- package/dist-lib/types/ds/forms/RadioGroup.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/RadioGroup.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/RadioGroup.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Rate.d.ts +10 -0
- package/dist-lib/types/ds/forms/Rate.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Rate.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Rate.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Select.d.ts +6 -1
- package/dist-lib/types/ds/forms/Select.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/Select.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Select.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Slider.d.ts +11 -0
- package/dist-lib/types/ds/forms/Slider.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Slider.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Slider.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Switch.d.ts +5 -1
- package/dist-lib/types/ds/forms/Switch.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/Switch.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Switch.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/TimePicker.d.ts +4 -1
- package/dist-lib/types/ds/forms/TimePicker.d.ts.map +1 -1
- package/dist-lib/types/ds/forms/TimePicker.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/TimePicker.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Transfer.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Transfer.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/TreeSelect.d.ts +11 -0
- package/dist-lib/types/ds/forms/TreeSelect.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/TreeSelect.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/TreeSelect.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/Upload.test.d.ts +2 -0
- package/dist-lib/types/ds/forms/Upload.test.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/fieldProps.d.ts +17 -0
- package/dist-lib/types/ds/forms/fieldProps.d.ts.map +1 -0
- package/dist-lib/types/ds/forms/index.d.ts +9 -0
- package/dist-lib/types/ds/forms/index.d.ts.map +1 -1
- package/dist-lib/types/ds/navigation/Anchor.test.d.ts +2 -0
- package/dist-lib/types/ds/navigation/Anchor.test.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/Breadcrumb.test.d.ts +2 -0
- package/dist-lib/types/ds/navigation/Breadcrumb.test.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/Dropdown.test.d.ts +2 -0
- package/dist-lib/types/ds/navigation/Dropdown.test.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/Menu.d.ts +13 -0
- package/dist-lib/types/ds/navigation/Menu.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/Menu.test.d.ts +2 -0
- package/dist-lib/types/ds/navigation/Menu.test.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/Pagination.test.d.ts +2 -0
- package/dist-lib/types/ds/navigation/Pagination.test.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/Steps.test.d.ts +2 -0
- package/dist-lib/types/ds/navigation/Steps.test.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/Tabs.test.d.ts +2 -0
- package/dist-lib/types/ds/navigation/Tabs.test.d.ts.map +1 -0
- package/dist-lib/types/ds/navigation/index.d.ts +1 -0
- package/dist-lib/types/ds/navigation/index.d.ts.map +1 -1
- package/dist-lib/types/test/contracts/componentContracts.d.ts +3 -0
- package/dist-lib/types/test/contracts/componentContracts.d.ts.map +1 -0
- package/dist-lib/types/test/contracts/formControlContracts.d.ts +5 -0
- package/dist-lib/types/test/contracts/formControlContracts.d.ts.map +1 -0
- package/dist-lib/types/test/renderWithProviders.d.ts +3 -0
- package/dist-lib/types/test/renderWithProviders.d.ts.map +1 -0
- package/dist-lib/types/theme/ontadaTheme.d.ts +694 -0
- package/dist-lib/types/theme/ontadaTheme.d.ts.map +1 -1
- package/dist-lib/types/utils/useCustomIcon.d.ts.map +1 -1
- package/dist-lib/useCustomIcon-B-VUK-84.js +541 -0
- package/dist-lib/useCustomIcon-B-VUK-84.js.map +1 -0
- package/dist-lib/useCustomIcon-DbSB56Pd.cjs +1364 -0
- package/dist-lib/useCustomIcon-DbSB56Pd.cjs.map +1 -0
- package/package.json +90 -10
- package/dist-lib/index.cjs.map +0 -1
- package/dist-lib/index.js.map +0 -1
- package/dist-lib/ontadaTheme-DEEJ31G9.cjs +0 -2
- package/dist-lib/ontadaTheme-DEEJ31G9.cjs.map +0 -1
- package/dist-lib/ontadaTheme-DoyP_6uO.js +0 -1022
- package/dist-lib/ontadaTheme-DoyP_6uO.js.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { t as e } from "../useCustomIcon-B-VUK-84.js";
|
|
2
|
+
import { Input as t } from "./Input.js";
|
|
3
|
+
import { Button as n } from "antd";
|
|
4
|
+
import { useId as r, useState as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ds/forms/PasswordInput.tsx
|
|
7
|
+
var s = {
|
|
8
|
+
display: "inline-flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
gap: 8
|
|
11
|
+
}, c = ({ showPasswordLabel: c = "Show password", hidePasswordLabel: l = "Hide password", passwordVisible: u, defaultPasswordVisible: d = !1, onPasswordVisibleChange: f, id: p, suffix: m, disabled: h, onValueChange: g, ..._ }) => {
|
|
12
|
+
let v = r(), y = p ?? v, [b, x] = i(d), S = u ?? b, C = S ? l : c, w = (e) => {
|
|
13
|
+
u ?? x(e), f?.(e);
|
|
14
|
+
}, T = /* @__PURE__ */ a(n, {
|
|
15
|
+
type: "text",
|
|
16
|
+
htmlType: "button",
|
|
17
|
+
"aria-label": C,
|
|
18
|
+
"aria-controls": y,
|
|
19
|
+
"aria-pressed": S,
|
|
20
|
+
title: C,
|
|
21
|
+
disabled: h,
|
|
22
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
23
|
+
onClick: () => w(!S),
|
|
24
|
+
style: {
|
|
25
|
+
paddingInline: 4,
|
|
26
|
+
height: 24,
|
|
27
|
+
minWidth: 24
|
|
28
|
+
},
|
|
29
|
+
icon: /* @__PURE__ */ a("span", {
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
style: {
|
|
32
|
+
display: "inline-flex",
|
|
33
|
+
alignItems: "center"
|
|
34
|
+
},
|
|
35
|
+
children: /* @__PURE__ */ a(e, {
|
|
36
|
+
name: S ? "eyeOff" : "eye",
|
|
37
|
+
size: 16
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ a(t, {
|
|
42
|
+
id: y,
|
|
43
|
+
type: S ? "text" : "password",
|
|
44
|
+
disabled: h,
|
|
45
|
+
suffix: m ? /* @__PURE__ */ o("span", {
|
|
46
|
+
style: s,
|
|
47
|
+
children: [m, T]
|
|
48
|
+
}) : T,
|
|
49
|
+
onValueChange: g,
|
|
50
|
+
..._
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { c as PasswordInput };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","names":[],"sources":["../../src/ds/forms/PasswordInput.tsx"],"sourcesContent":["import { Button } from 'antd';\nimport { useId, useState } from 'react';\nimport type { CSSProperties, ComponentProps, ReactNode } from 'react';\nimport { Icon } from '../../utils/icons';\nimport { Input } from './Input';\n\ntype InputProps = ComponentProps<typeof Input>;\n\nexport type PasswordInputProps = Omit<InputProps, 'onChange' | 'type'> & {\n showPasswordLabel?: string;\n hidePasswordLabel?: string;\n passwordVisible?: boolean;\n defaultPasswordVisible?: boolean;\n onPasswordVisibleChange?: (visible: boolean) => void;\n};\n\nconst suffixStyle: CSSProperties = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: 8,\n};\n\nexport const PasswordInput = ({\n showPasswordLabel = 'Show password',\n hidePasswordLabel = 'Hide password',\n passwordVisible,\n defaultPasswordVisible = false,\n onPasswordVisibleChange,\n id,\n suffix,\n disabled,\n onValueChange,\n ...inputProps\n}: PasswordInputProps) => {\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const [internalPasswordVisible, setInternalPasswordVisible] = useState(defaultPasswordVisible);\n const isPasswordVisible = passwordVisible ?? internalPasswordVisible;\n const visibilityLabel = isPasswordVisible ? hidePasswordLabel : showPasswordLabel;\n\n const setPasswordVisibility = (nextVisible: boolean) => {\n if (passwordVisible == null) {\n setInternalPasswordVisible(nextVisible);\n }\n\n onPasswordVisibleChange?.(nextVisible);\n };\n\n const passwordToggle = (\n <Button\n type=\"text\"\n htmlType=\"button\"\n aria-label={visibilityLabel}\n aria-controls={inputId}\n aria-pressed={isPasswordVisible}\n title={visibilityLabel}\n disabled={disabled}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => setPasswordVisibility(!isPasswordVisible)}\n style={{ paddingInline: 4, height: 24, minWidth: 24 }}\n icon={\n <span aria-hidden=\"true\" style={{ display: 'inline-flex', alignItems: 'center' }}>\n <Icon name={isPasswordVisible ? 'eyeOff' : 'eye'} size={16} />\n </span>\n }\n />\n );\n\n return (\n <Input\n id={inputId}\n type={isPasswordVisible ? 'text' : 'password'}\n disabled={disabled}\n suffix={suffix ? <span style={suffixStyle}>{suffix}{passwordToggle}</span> : passwordToggle}\n onValueChange={onValueChange}\n {...inputProps}\n />\n );\n};\n"],"mappings":";;;;;;AAgBA,IAAM,IAA6B;CACjC,SAAS;CACT,YAAY;CACZ,KAAK;CACN,EAEY,KAAiB,EAC5B,uBAAoB,iBACpB,uBAAoB,iBACpB,oBACA,4BAAyB,IACzB,4BACA,OACA,WACA,aACA,kBACA,GAAG,QACqB;CACxB,IAAM,IAAc,GAAO,EACrB,IAAU,KAAM,GAChB,CAAC,GAAyB,KAA8B,EAAS,EAAuB,EACxF,IAAoB,KAAmB,GACvC,IAAkB,IAAoB,IAAoB,GAE1D,KAAyB,MAAyB;AAKtD,EAJI,KACF,EAA2B,EAAY,EAGzC,IAA0B,EAAY;IAGlC,IACJ,kBAAC,GAAD;EACE,MAAK;EACL,UAAS;EACT,cAAY;EACZ,iBAAe;EACf,gBAAc;EACd,OAAO;EACG;EACV,cAAc,MAAU,EAAM,gBAAgB;EAC9C,eAAe,EAAsB,CAAC,EAAkB;EACxD,OAAO;GAAE,eAAe;GAAG,QAAQ;GAAI,UAAU;GAAI;EACrD,MACE,kBAAC,QAAD;GAAM,eAAY;GAAO,OAAO;IAAE,SAAS;IAAe,YAAY;IAAU;aAC9E,kBAAC,GAAD;IAAM,MAAM,IAAoB,WAAW;IAAO,MAAM;IAAM,CAAA;GACzD,CAAA;EAET,CAAA;AAGJ,QACE,kBAAC,GAAD;EACE,IAAI;EACJ,MAAM,IAAoB,SAAS;EACzB;EACV,QAAQ,IAAS,kBAAC,QAAD;GAAM,OAAO;aAAb,CAA2B,GAAQ,EAAsB;OAAG;EAC9D;EACf,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`./FieldShell.cjs`),t=require(`../fieldProps-CuWfEbFx.cjs`);let n=require(`antd`),r=require(`react`),i=require(`react/jsx-runtime`);var a=({fieldLabel:a,fieldRequired:o,fieldDescription:s,fieldError:c,fieldActions:l,containerStyle:u,clear:d,clearable:f=!1,clearLabel:p,clearVisibility:m=`always`,onClear:h,onValueChange:g,clearToValue:_=!1,id:v,checked:y,children:b,...x})=>{let S=(0,r.useId)(),C=!!(a||o||s||c||l||f||d||h),w=v??(C?S:void 0),T=w?`${w}-description`:void 0,E=w?`${w}-error`:void 0,D=d?.onClear??h,O=(0,i.jsx)(n.Radio,{id:w,checked:y,"aria-describedby":t.t(s?T:void 0,c?E:void 0),onChange:e=>{x.onChange?.(e),g?.(e.target.checked)},...x,children:b});return C?(0,i.jsx)(e.FieldShell,{label:a,required:o,description:s,descriptionId:T,error:c,errorId:E,htmlFor:w,clear:{enabled:d?.enabled??f,label:d?.label??p,visibility:d?.visibility??m,onClear:()=>{D?.(),g?.(_)}},clearValue:y,extraActions:l,style:u,children:O}):O};exports.Radio=a;
|
|
2
|
+
//# sourceMappingURL=Radio.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.cjs","names":[],"sources":["../../src/ds/forms/Radio.tsx"],"sourcesContent":["import { Radio as AntRadio } from 'antd';\nimport type { RadioProps as AntRadioProps } from 'antd';\nimport type { ReactNode } from 'react';\nimport { useId } from 'react';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\n\nexport type RadioProps = AntRadioProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: boolean) => void;\n clearToValue?: boolean;\n fieldDescription?: ReactNode;\n };\n\nexport const Radio = ({\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue = false,\n id,\n checked,\n children,\n ...props\n}: RadioProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const radioId = id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = radioId ? `${radioId}-description` : undefined;\n const errorId = radioId ? `${radioId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n\n const control = (\n <AntRadio\n id={radioId}\n checked={checked}\n aria-describedby={joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n )}\n onChange={(event) => {\n props.onChange?.(event);\n onValueChange?.(event.target.checked);\n }}\n {...props}\n >\n {children}\n </AntRadio>\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n htmlFor={radioId}\n clear={{\n enabled: clear?.enabled ?? clearable,\n label: clear?.label ?? clearLabel,\n visibility: clear?.visibility ?? clearVisibility,\n onClear: () => {\n clearAction?.();\n onValueChange?.(clearToValue);\n },\n }}\n clearValue={checked}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n"],"mappings":"wPAeA,IAAa,GAAS,CACpB,aACA,gBACA,mBACA,aACA,eACA,iBACA,QACA,YAAY,GACZ,aACA,kBAAkB,SAClB,UACA,gBACA,eAAe,GACf,KACA,UACA,WACA,GAAG,KACa,CAChB,IAAM,GAAA,EAAA,EAAA,QAAqB,CACrB,EAAyB,GAC7B,GACE,GACA,GACA,GACA,GACA,GACA,GACA,GAEE,EAAU,IAAO,EAAyB,EAAc,IAAA,IACxD,EAAgB,EAAU,GAAG,EAAQ,cAAgB,IAAA,GACrD,EAAU,EAAU,GAAG,EAAQ,QAAU,IAAA,GACzC,EAAc,GAAO,SAAW,EAEhC,GACJ,EAAA,EAAA,KAAC,EAAA,MAAD,CACE,GAAI,EACK,UACT,mBAAkB,EAAA,EAChB,EAAmB,EAAgB,IAAA,GACnC,EAAa,EAAU,IAAA,GACxB,CACD,SAAW,GAAU,CACnB,EAAM,WAAW,EAAM,CACvB,IAAgB,EAAM,OAAO,QAAQ,EAEvC,GAAI,EAEH,WACQ,CAAA,CAOb,OAJK,GAKH,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,MAAO,EACP,SAAU,EACV,YAAa,EACE,gBACf,MAAO,EACE,UACT,QAAS,EACT,MAAO,CACL,QAAS,GAAO,SAAW,EAC3B,MAAO,GAAO,OAAS,EACvB,WAAY,GAAO,YAAc,EACjC,YAAe,CACb,KAAe,CACf,IAAgB,EAAa,EAEhC,CACD,WAAY,EACZ,aAAc,EACd,MAAO,WAEN,EACU,CAAA,CA1BN"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FieldShell as e } from "./FieldShell.js";
|
|
2
|
+
import { t } from "../fieldProps-EeYy2kXb.js";
|
|
3
|
+
import { Radio as n } from "antd";
|
|
4
|
+
import { useId as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ds/forms/Radio.tsx
|
|
7
|
+
var a = ({ fieldLabel: a, fieldRequired: o, fieldDescription: s, fieldError: c, fieldActions: l, containerStyle: u, clear: d, clearable: f = !1, clearLabel: p, clearVisibility: m = "always", onClear: h, onValueChange: g, clearToValue: _ = !1, id: v, checked: y, children: b, ...x }) => {
|
|
8
|
+
let S = r(), C = !!(a || o || s || c || l || f || d || h), w = v ?? (C ? S : void 0), T = w ? `${w}-description` : void 0, E = w ? `${w}-error` : void 0, D = d?.onClear ?? h, O = /* @__PURE__ */ i(n, {
|
|
9
|
+
id: w,
|
|
10
|
+
checked: y,
|
|
11
|
+
"aria-describedby": t(s ? T : void 0, c ? E : void 0),
|
|
12
|
+
onChange: (e) => {
|
|
13
|
+
x.onChange?.(e), g?.(e.target.checked);
|
|
14
|
+
},
|
|
15
|
+
...x,
|
|
16
|
+
children: b
|
|
17
|
+
});
|
|
18
|
+
return C ? /* @__PURE__ */ i(e, {
|
|
19
|
+
label: a,
|
|
20
|
+
required: o,
|
|
21
|
+
description: s,
|
|
22
|
+
descriptionId: T,
|
|
23
|
+
error: c,
|
|
24
|
+
errorId: E,
|
|
25
|
+
htmlFor: w,
|
|
26
|
+
clear: {
|
|
27
|
+
enabled: d?.enabled ?? f,
|
|
28
|
+
label: d?.label ?? p,
|
|
29
|
+
visibility: d?.visibility ?? m,
|
|
30
|
+
onClear: () => {
|
|
31
|
+
D?.(), g?.(_);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
clearValue: y,
|
|
35
|
+
extraActions: l,
|
|
36
|
+
style: u,
|
|
37
|
+
children: O
|
|
38
|
+
}) : O;
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { a as Radio };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=Radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.js","names":[],"sources":["../../src/ds/forms/Radio.tsx"],"sourcesContent":["import { Radio as AntRadio } from 'antd';\nimport type { RadioProps as AntRadioProps } from 'antd';\nimport type { ReactNode } from 'react';\nimport { useId } from 'react';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\n\nexport type RadioProps = AntRadioProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: boolean) => void;\n clearToValue?: boolean;\n fieldDescription?: ReactNode;\n };\n\nexport const Radio = ({\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue = false,\n id,\n checked,\n children,\n ...props\n}: RadioProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const radioId = id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = radioId ? `${radioId}-description` : undefined;\n const errorId = radioId ? `${radioId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n\n const control = (\n <AntRadio\n id={radioId}\n checked={checked}\n aria-describedby={joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n )}\n onChange={(event) => {\n props.onChange?.(event);\n onValueChange?.(event.target.checked);\n }}\n {...props}\n >\n {children}\n </AntRadio>\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n htmlFor={radioId}\n clear={{\n enabled: clear?.enabled ?? clearable,\n label: clear?.label ?? clearLabel,\n visibility: clear?.visibility ?? clearVisibility,\n onClear: () => {\n clearAction?.();\n onValueChange?.(clearToValue);\n },\n }}\n clearValue={checked}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n"],"mappings":";;;;;;AAeA,IAAa,KAAS,EACpB,eACA,kBACA,qBACA,eACA,iBACA,mBACA,UACA,eAAY,IACZ,eACA,qBAAkB,UAClB,YACA,kBACA,kBAAe,IACf,OACA,YACA,aACA,GAAG,QACa;CAChB,IAAM,IAAc,GAAO,EACrB,IAAyB,GAC7B,KACE,KACA,KACA,KACA,KACA,KACA,KACA,IAEE,IAAU,MAAO,IAAyB,IAAc,KAAA,IACxD,IAAgB,IAAU,GAAG,EAAQ,gBAAgB,KAAA,GACrD,IAAU,IAAU,GAAG,EAAQ,UAAU,KAAA,GACzC,IAAc,GAAO,WAAW,GAEhC,IACJ,kBAAC,GAAD;EACE,IAAI;EACK;EACT,oBAAkB,EAChB,IAAmB,IAAgB,KAAA,GACnC,IAAa,IAAU,KAAA,EACxB;EACD,WAAW,MAAU;AAEnB,GADA,EAAM,WAAW,EAAM,EACvB,IAAgB,EAAM,OAAO,QAAQ;;EAEvC,GAAI;EAEH;EACQ,CAAA;AAOb,QAJK,IAKH,kBAAC,GAAD;EACE,OAAO;EACP,UAAU;EACV,aAAa;EACE;EACf,OAAO;EACE;EACT,SAAS;EACT,OAAO;GACL,SAAS,GAAO,WAAW;GAC3B,OAAO,GAAO,SAAS;GACvB,YAAY,GAAO,cAAc;GACjC,eAAe;AAEb,IADA,KAAe,EACf,IAAgB,EAAa;;GAEhC;EACD,YAAY;EACZ,cAAc;EACd,OAAO;YAEN;EACU,CAAA,GA1BN"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`./FieldSetShell.cjs`);let t=require(`antd`),n=require(`react`),r=require(`react/jsx-runtime`);var i=({fieldLabel:i,fieldLabelStyle:a,fieldRequired:o,fieldDescription:s,fieldError:c,fieldActions:l,containerStyle:u,clear:d,clearable:f=!1,clearLabel:p,clearVisibility:m=`always`,onClear:h,onValueChange:g,clearToValue:_,value:v,...y})=>{let b=(0,n.useId)(),x=!!(i||o||s||c||l||f||d||h),S=x?`${b}-legend`:void 0,C=x&&s?`${b}-description`:void 0,w=x&&c?`${b}-error`:void 0,T=d?.onClear??h,E=(0,r.jsx)(t.Radio.Group,{"aria-labelledby":S,"aria-describedby":[C,w].filter(Boolean).join(` `)||void 0,value:v,onChange:e=>{y.onChange?.(e),g?.(e.target.value)},...y});return x?(0,r.jsx)(e.FieldSetShell,{title:i,titleId:S,titleStyle:a,required:o,description:s,descriptionId:C,error:c,errorId:w,clear:{enabled:d?.enabled??f,label:d?.label??p,visibility:d?.visibility??m,onClear:()=>{T?.(),g?.(_)}},clearValue:v,actions:l,style:u,children:E}):E};exports.RadioGroup=i;
|
|
2
|
+
//# sourceMappingURL=RadioGroup.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.cjs","names":[],"sources":["../../src/ds/forms/RadioGroup.tsx"],"sourcesContent":["import { Radio as AntRadio } from 'antd';\nimport type { CSSProperties, ReactNode } from 'react';\nimport type { RadioGroupProps as AntRadioGroupProps } from 'antd';\nimport { useId } from 'react';\nimport { FieldSetShell } from './FieldSetShell';\nimport type { DSFieldShellProps } from './fieldProps';\n\nexport type RadioGroupProps = AntRadioGroupProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: AntRadioGroupProps['value']) => void;\n clearToValue?: AntRadioGroupProps['value'];\n fieldLabelStyle?: CSSProperties;\n fieldDescription?: ReactNode;\n };\n\nexport const RadioGroup = ({\n fieldLabel,\n fieldLabelStyle,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue,\n value,\n ...props\n}: RadioGroupProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const titleId = shouldWrapInFieldShell ? `${generatedId}-legend` : undefined;\n const descriptionId = shouldWrapInFieldShell && fieldDescription ? `${generatedId}-description` : undefined;\n const errorId = shouldWrapInFieldShell && fieldError ? `${generatedId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n\n const control = (\n <AntRadio.Group\n aria-labelledby={titleId}\n aria-describedby={[descriptionId, errorId].filter(Boolean).join(' ') || undefined}\n value={value}\n onChange={(event) => {\n props.onChange?.(event);\n onValueChange?.(event.target.value);\n }}\n {...props}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldSetShell\n title={fieldLabel}\n titleId={titleId}\n titleStyle={fieldLabelStyle}\n required={fieldRequired}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={{\n enabled: clear?.enabled ?? clearable,\n label: clear?.label ?? clearLabel,\n visibility: clear?.visibility ?? clearVisibility,\n onClear: () => {\n clearAction?.();\n onValueChange?.(clearToValue);\n },\n }}\n clearValue={value}\n actions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldSetShell>\n );\n};\n"],"mappings":"mNAeA,IAAa,GAAc,CACzB,aACA,kBACA,gBACA,mBACA,aACA,eACA,iBACA,QACA,YAAY,GACZ,aACA,kBAAkB,SAClB,UACA,gBACA,eACA,QACA,GAAG,KACkB,CACrB,IAAM,GAAA,EAAA,EAAA,QAAqB,CACrB,EAAyB,GAC7B,GACE,GACA,GACA,GACA,GACA,GACA,GACA,GAEE,EAAU,EAAyB,GAAG,EAAY,SAAW,IAAA,GAC7D,EAAgB,GAA0B,EAAmB,GAAG,EAAY,cAAgB,IAAA,GAC5F,EAAU,GAA0B,EAAa,GAAG,EAAY,QAAU,IAAA,GAC1E,EAAc,GAAO,SAAW,EAEhC,GACJ,EAAA,EAAA,KAAC,EAAA,MAAS,MAAV,CACE,kBAAiB,EACjB,mBAAkB,CAAC,EAAe,EAAQ,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,EAAI,IAAA,GACjE,QACP,SAAW,GAAU,CACnB,EAAM,WAAW,EAAM,CACvB,IAAgB,EAAM,OAAO,MAAM,EAErC,GAAI,EACJ,CAAA,CAOJ,OAJK,GAKH,EAAA,EAAA,KAAC,EAAA,cAAD,CACE,MAAO,EACE,UACT,WAAY,EACZ,SAAU,EACV,YAAa,EACE,gBACf,MAAO,EACE,UACT,MAAO,CACL,QAAS,GAAO,SAAW,EAC3B,MAAO,GAAO,OAAS,EACvB,WAAY,GAAO,YAAc,EACjC,YAAe,CACb,KAAe,CACf,IAAgB,EAAa,EAEhC,CACD,WAAY,EACZ,QAAS,EACT,MAAO,WAEN,EACa,CAAA,CA3BT"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FieldSetShell as e } from "./FieldSetShell.js";
|
|
2
|
+
import { Radio as t } from "antd";
|
|
3
|
+
import { useId as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/ds/forms/RadioGroup.tsx
|
|
6
|
+
var i = ({ fieldLabel: i, fieldLabelStyle: a, fieldRequired: o, fieldDescription: s, fieldError: c, fieldActions: l, containerStyle: u, clear: d, clearable: f = !1, clearLabel: p, clearVisibility: m = "always", onClear: h, onValueChange: g, clearToValue: _, value: v, ...y }) => {
|
|
7
|
+
let b = n(), x = !!(i || o || s || c || l || f || d || h), S = x ? `${b}-legend` : void 0, C = x && s ? `${b}-description` : void 0, w = x && c ? `${b}-error` : void 0, T = d?.onClear ?? h, E = /* @__PURE__ */ r(t.Group, {
|
|
8
|
+
"aria-labelledby": S,
|
|
9
|
+
"aria-describedby": [C, w].filter(Boolean).join(" ") || void 0,
|
|
10
|
+
value: v,
|
|
11
|
+
onChange: (e) => {
|
|
12
|
+
y.onChange?.(e), g?.(e.target.value);
|
|
13
|
+
},
|
|
14
|
+
...y
|
|
15
|
+
});
|
|
16
|
+
return x ? /* @__PURE__ */ r(e, {
|
|
17
|
+
title: i,
|
|
18
|
+
titleId: S,
|
|
19
|
+
titleStyle: a,
|
|
20
|
+
required: o,
|
|
21
|
+
description: s,
|
|
22
|
+
descriptionId: C,
|
|
23
|
+
error: c,
|
|
24
|
+
errorId: w,
|
|
25
|
+
clear: {
|
|
26
|
+
enabled: d?.enabled ?? f,
|
|
27
|
+
label: d?.label ?? p,
|
|
28
|
+
visibility: d?.visibility ?? m,
|
|
29
|
+
onClear: () => {
|
|
30
|
+
T?.(), g?.(_);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
clearValue: v,
|
|
34
|
+
actions: l,
|
|
35
|
+
style: u,
|
|
36
|
+
children: E
|
|
37
|
+
}) : E;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { i as RadioGroup };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":[],"sources":["../../src/ds/forms/RadioGroup.tsx"],"sourcesContent":["import { Radio as AntRadio } from 'antd';\nimport type { CSSProperties, ReactNode } from 'react';\nimport type { RadioGroupProps as AntRadioGroupProps } from 'antd';\nimport { useId } from 'react';\nimport { FieldSetShell } from './FieldSetShell';\nimport type { DSFieldShellProps } from './fieldProps';\n\nexport type RadioGroupProps = AntRadioGroupProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: AntRadioGroupProps['value']) => void;\n clearToValue?: AntRadioGroupProps['value'];\n fieldLabelStyle?: CSSProperties;\n fieldDescription?: ReactNode;\n };\n\nexport const RadioGroup = ({\n fieldLabel,\n fieldLabelStyle,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue,\n value,\n ...props\n}: RadioGroupProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const titleId = shouldWrapInFieldShell ? `${generatedId}-legend` : undefined;\n const descriptionId = shouldWrapInFieldShell && fieldDescription ? `${generatedId}-description` : undefined;\n const errorId = shouldWrapInFieldShell && fieldError ? `${generatedId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n\n const control = (\n <AntRadio.Group\n aria-labelledby={titleId}\n aria-describedby={[descriptionId, errorId].filter(Boolean).join(' ') || undefined}\n value={value}\n onChange={(event) => {\n props.onChange?.(event);\n onValueChange?.(event.target.value);\n }}\n {...props}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldSetShell\n title={fieldLabel}\n titleId={titleId}\n titleStyle={fieldLabelStyle}\n required={fieldRequired}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={{\n enabled: clear?.enabled ?? clearable,\n label: clear?.label ?? clearLabel,\n visibility: clear?.visibility ?? clearVisibility,\n onClear: () => {\n clearAction?.();\n onValueChange?.(clearToValue);\n },\n }}\n clearValue={value}\n actions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldSetShell>\n );\n};\n"],"mappings":";;;;;AAeA,IAAa,KAAc,EACzB,eACA,oBACA,kBACA,qBACA,eACA,iBACA,mBACA,UACA,eAAY,IACZ,eACA,qBAAkB,UAClB,YACA,kBACA,iBACA,UACA,GAAG,QACkB;CACrB,IAAM,IAAc,GAAO,EACrB,IAAyB,GAC7B,KACE,KACA,KACA,KACA,KACA,KACA,KACA,IAEE,IAAU,IAAyB,GAAG,EAAY,WAAW,KAAA,GAC7D,IAAgB,KAA0B,IAAmB,GAAG,EAAY,gBAAgB,KAAA,GAC5F,IAAU,KAA0B,IAAa,GAAG,EAAY,UAAU,KAAA,GAC1E,IAAc,GAAO,WAAW,GAEhC,IACJ,kBAAC,EAAS,OAAV;EACE,mBAAiB;EACjB,oBAAkB,CAAC,GAAe,EAAQ,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,IAAI,KAAA;EACjE;EACP,WAAW,MAAU;AAEnB,GADA,EAAM,WAAW,EAAM,EACvB,IAAgB,EAAM,OAAO,MAAM;;EAErC,GAAI;EACJ,CAAA;AAOJ,QAJK,IAKH,kBAAC,GAAD;EACE,OAAO;EACE;EACT,YAAY;EACZ,UAAU;EACV,aAAa;EACE;EACf,OAAO;EACE;EACT,OAAO;GACL,SAAS,GAAO,WAAW;GAC3B,OAAO,GAAO,SAAS;GACvB,YAAY,GAAO,cAAc;GACjC,eAAe;AAEb,IADA,KAAe,EACf,IAAgB,EAAa;;GAEhC;EACD,YAAY;EACZ,SAAS;EACT,OAAO;YAEN;EACa,CAAA,GA3BT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`./FieldShell.cjs`),t=require(`../fieldProps-CuWfEbFx.cjs`);let n=require(`antd`),r=require(`react`),i=require(`react/jsx-runtime`);var a=({fieldLabel:a,fieldRequired:o,fieldDescription:s,fieldError:c,fieldActions:l,containerStyle:u,clear:d,clearable:f=!1,clearLabel:p,clearVisibility:m=`always`,onClear:h,onValueChange:g,clearToValue:_=0,value:v,...y})=>{let b=(0,r.useId)(),x=!!(a||o||s||c||l||f||d||h),S=y.id??(x?b:void 0),C=S?`${S}-description`:void 0,w=S?`${S}-error`:void 0,T=d?.onClear??h,E=t.t(s?C:void 0,c?w:void 0),D=(0,i.jsx)(n.Rate,{...y,id:S,value:v,"aria-describedby":E,"aria-invalid":c?!0:void 0,onChange:e=>{y.onChange?.(e),g?.(e)}});return x?(0,i.jsx)(e.FieldShell,{label:a,required:o,htmlFor:S,description:s,descriptionId:C,error:c,errorId:w,clear:d,clearable:f,clearLabel:p,clearVisibility:m,clearValue:v,onClear:()=>{T?.(),g?.(_)},extraActions:l,style:u,children:D}):D};exports.Rate=a;
|
|
2
|
+
//# sourceMappingURL=Rate.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rate.cjs","names":[],"sources":["../../src/ds/forms/Rate.tsx"],"sourcesContent":["import { Rate as AntRate } from 'antd';\nimport { useId } from 'react';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\n\ntype AntRateProps = React.ComponentProps<typeof AntRate>;\n\nexport type RateProps = AntRateProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: number) => void;\n clearToValue?: number;\n };\n\nexport const Rate = ({\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue = 0,\n value,\n ...props\n}: RateProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const controlId = props.id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = controlId ? `${controlId}-description` : undefined;\n const errorId = controlId ? `${controlId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n const describedBy = joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n );\n\n const control = (\n <AntRate\n {...props}\n id={controlId}\n value={value}\n aria-describedby={describedBy}\n aria-invalid={fieldError ? true : undefined}\n onChange={(nextValue) => {\n props.onChange?.(nextValue);\n onValueChange?.(nextValue);\n }}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n htmlFor={controlId}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={clear}\n clearable={clearable}\n clearLabel={clearLabel}\n clearVisibility={clearVisibility}\n clearValue={value}\n onClear={() => {\n clearAction?.();\n onValueChange?.(clearToValue);\n }}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n"],"mappings":"wPAcA,IAAa,GAAQ,CACnB,aACA,gBACA,mBACA,aACA,eACA,iBACA,QACA,YAAY,GACZ,aACA,kBAAkB,SAClB,UACA,gBACA,eAAe,EACf,QACA,GAAG,KACY,CACf,IAAM,GAAA,EAAA,EAAA,QAAqB,CACrB,EAAyB,GAC7B,GACE,GACA,GACA,GACA,GACA,GACA,GACA,GAEE,EAAY,EAAM,KAAO,EAAyB,EAAc,IAAA,IAChE,EAAgB,EAAY,GAAG,EAAU,cAAgB,IAAA,GACzD,EAAU,EAAY,GAAG,EAAU,QAAU,IAAA,GAC7C,EAAc,GAAO,SAAW,EAChC,EAAc,EAAA,EAClB,EAAmB,EAAgB,IAAA,GACnC,EAAa,EAAU,IAAA,GACxB,CAEK,GACJ,EAAA,EAAA,KAAC,EAAA,KAAD,CACE,GAAI,EACJ,GAAI,EACG,QACP,mBAAkB,EAClB,eAAc,EAAa,GAAO,IAAA,GAClC,SAAW,GAAc,CACvB,EAAM,WAAW,EAAU,CAC3B,IAAgB,EAAU,EAE5B,CAAA,CAOJ,OAJK,GAKH,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,MAAO,EACP,SAAU,EACV,QAAS,EACT,YAAa,EACE,gBACf,MAAO,EACE,UACF,QACI,YACC,aACK,kBACjB,WAAY,EACZ,YAAe,CACb,KAAe,CACf,IAAgB,EAAa,EAE/B,aAAc,EACd,MAAO,WAEN,EACU,CAAA,CAzBN"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FieldShell as e } from "./FieldShell.js";
|
|
2
|
+
import { t } from "../fieldProps-EeYy2kXb.js";
|
|
3
|
+
import { Rate as n } from "antd";
|
|
4
|
+
import { useId as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ds/forms/Rate.tsx
|
|
7
|
+
var a = ({ fieldLabel: a, fieldRequired: o, fieldDescription: s, fieldError: c, fieldActions: l, containerStyle: u, clear: d, clearable: f = !1, clearLabel: p, clearVisibility: m = "always", onClear: h, onValueChange: g, clearToValue: _ = 0, value: v, ...y }) => {
|
|
8
|
+
let b = r(), x = !!(a || o || s || c || l || f || d || h), S = y.id ?? (x ? b : void 0), C = S ? `${S}-description` : void 0, w = S ? `${S}-error` : void 0, T = d?.onClear ?? h, E = t(s ? C : void 0, c ? w : void 0), D = /* @__PURE__ */ i(n, {
|
|
9
|
+
...y,
|
|
10
|
+
id: S,
|
|
11
|
+
value: v,
|
|
12
|
+
"aria-describedby": E,
|
|
13
|
+
"aria-invalid": c ? !0 : void 0,
|
|
14
|
+
onChange: (e) => {
|
|
15
|
+
y.onChange?.(e), g?.(e);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return x ? /* @__PURE__ */ i(e, {
|
|
19
|
+
label: a,
|
|
20
|
+
required: o,
|
|
21
|
+
htmlFor: S,
|
|
22
|
+
description: s,
|
|
23
|
+
descriptionId: C,
|
|
24
|
+
error: c,
|
|
25
|
+
errorId: w,
|
|
26
|
+
clear: d,
|
|
27
|
+
clearable: f,
|
|
28
|
+
clearLabel: p,
|
|
29
|
+
clearVisibility: m,
|
|
30
|
+
clearValue: v,
|
|
31
|
+
onClear: () => {
|
|
32
|
+
T?.(), g?.(_);
|
|
33
|
+
},
|
|
34
|
+
extraActions: l,
|
|
35
|
+
style: u,
|
|
36
|
+
children: D
|
|
37
|
+
}) : D;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { a as Rate };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=Rate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rate.js","names":[],"sources":["../../src/ds/forms/Rate.tsx"],"sourcesContent":["import { Rate as AntRate } from 'antd';\nimport { useId } from 'react';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\n\ntype AntRateProps = React.ComponentProps<typeof AntRate>;\n\nexport type RateProps = AntRateProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: number) => void;\n clearToValue?: number;\n };\n\nexport const Rate = ({\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue = 0,\n value,\n ...props\n}: RateProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const controlId = props.id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = controlId ? `${controlId}-description` : undefined;\n const errorId = controlId ? `${controlId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n const describedBy = joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n );\n\n const control = (\n <AntRate\n {...props}\n id={controlId}\n value={value}\n aria-describedby={describedBy}\n aria-invalid={fieldError ? true : undefined}\n onChange={(nextValue) => {\n props.onChange?.(nextValue);\n onValueChange?.(nextValue);\n }}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n htmlFor={controlId}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={clear}\n clearable={clearable}\n clearLabel={clearLabel}\n clearVisibility={clearVisibility}\n clearValue={value}\n onClear={() => {\n clearAction?.();\n onValueChange?.(clearToValue);\n }}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n"],"mappings":";;;;;;AAcA,IAAa,KAAQ,EACnB,eACA,kBACA,qBACA,eACA,iBACA,mBACA,UACA,eAAY,IACZ,eACA,qBAAkB,UAClB,YACA,kBACA,kBAAe,GACf,UACA,GAAG,QACY;CACf,IAAM,IAAc,GAAO,EACrB,IAAyB,GAC7B,KACE,KACA,KACA,KACA,KACA,KACA,KACA,IAEE,IAAY,EAAM,OAAO,IAAyB,IAAc,KAAA,IAChE,IAAgB,IAAY,GAAG,EAAU,gBAAgB,KAAA,GACzD,IAAU,IAAY,GAAG,EAAU,UAAU,KAAA,GAC7C,IAAc,GAAO,WAAW,GAChC,IAAc,EAClB,IAAmB,IAAgB,KAAA,GACnC,IAAa,IAAU,KAAA,EACxB,EAEK,IACJ,kBAAC,GAAD;EACE,GAAI;EACJ,IAAI;EACG;EACP,oBAAkB;EAClB,gBAAc,IAAa,KAAO,KAAA;EAClC,WAAW,MAAc;AAEvB,GADA,EAAM,WAAW,EAAU,EAC3B,IAAgB,EAAU;;EAE5B,CAAA;AAOJ,QAJK,IAKH,kBAAC,GAAD;EACE,OAAO;EACP,UAAU;EACV,SAAS;EACT,aAAa;EACE;EACf,OAAO;EACE;EACF;EACI;EACC;EACK;EACjB,YAAY;EACZ,eAAe;AAEb,GADA,KAAe,EACf,IAAgB,EAAa;;EAE/B,cAAc;EACd,OAAO;YAEN;EACU,CAAA,GAzBN"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`../theme.cjs`),t=require(`../useCustomIcon-DbSB56Pd.cjs`),n=require(`./FieldShell.cjs`),r=require(`../fieldProps-CuWfEbFx.cjs`),i=require(`../selectStyles-BFeXUMpO.cjs`);let a=require(`antd`),o=require(`react`),s=require(`react/jsx-runtime`);var c=({className:c,popupClassName:l,classNames:u,suffixIcon:d,readOnly:f=!1,interactionState:p=`rest`,open:m,onOpenChange:h,onDropdownVisibleChange:g,fieldLabel:_,fieldRequired:v,fieldDescription:y,fieldError:b,fieldActions:x,containerStyle:S,clear:C,clearable:w=!1,clearLabel:T,clearVisibility:E=`always`,onClear:D,onValueChange:O,clearToValue:k,...A})=>{let j=(0,o.useId)(),[M,N]=(0,o.useState)(!!m);(0,o.useEffect)(()=>{i.s()},[]),(0,o.useEffect)(()=>{typeof m==`boolean`&&N(m)},[m]);let P=A.mode===`multiple`||A.mode===`tags`,F=i.c(i.t,p===`hover`?i.a:void 0,p===`focus`?i.i:void 0,f?i.o:void 0,c),I=i.c(i.n,P?i.r:void 0,u?.popup?.root,l),L=f?!1:m,R=!!(_||v||y||b||x||w||C||D),z=A.id??(R?j:void 0),B=z?`${z}-description`:void 0,V=z?`${z}-error`:void 0,H=k===void 0?void 0:k,U=C?.onClear??D,W={...u??{},popup:{...u?.popup??{},root:I}},G=d??(0,s.jsx)(t.t,{name:M?`arrowButtonUp`:`arrowButtonDown`,size:10,style:{color:e.dsSemanticTokens.input.text.focus}}),K=(e,t)=>{A.onChange?.(e,t),O?.(e)},q=()=>{U?.(),O?.(H),A.onChange?.(H,void 0)},J=r.t(y?B:void 0,b?V:void 0),Y=(0,s.jsx)(a.Select,{...A,id:z,open:L,suffixIcon:G,className:F,classNames:W,"aria-describedby":J,"aria-invalid":b?!0:void 0,onOpenChange:e=>{if(f&&e){N(!1);return}N(e),h?.(e),g?.(e)},onChange:K});return R?(0,s.jsx)(n.FieldShell,{label:_,required:v,htmlFor:z,description:y,descriptionId:B,error:b,errorId:V,clear:C,clearable:w,clearLabel:T,clearVisibility:E,clearValue:A.value,onClear:q,extraActions:x,style:S,children:Y}):Y};c.displayName=`Select`,exports.Select=c;
|
|
2
|
+
//# sourceMappingURL=Select.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.cjs","names":[],"sources":["../../src/ds/forms/Select.tsx"],"sourcesContent":["import { Select as AntSelect } from 'antd';\nimport type { SelectProps } from 'antd';\nimport { useEffect, useId, useState } from 'react';\nimport { Icon } from '../../utils/icons';\nimport { dsSemanticTokens } from '../../theme/ontadaTheme';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\nimport {\n DS_SELECT_CLASS,\n DS_SELECT_FORCE_FOCUS_CLASS,\n DS_SELECT_FORCE_HOVER_CLASS,\n DS_SELECT_READONLY_CLASS,\n DS_SELECT_DROPDOWN_CLASS,\n DS_SELECT_DROPDOWN_MULTI_CLASS,\n ensureSelectStyles,\n mergeClassNames,\n} from './selectStyles';\n\nexport type DSSelectInteractionState = 'rest' | 'hover' | 'focus';\n\nexport type DSSelectProps = SelectProps & {\n readOnly?: boolean;\n interactionState?: DSSelectInteractionState;\n};\n\nexport type SelectFieldProps = DSFieldShellProps & {\n onValueChange?: (nextValue: SelectProps['value']) => void;\n clearToValue?: SelectProps['value'];\n};\n\nexport const Select = ({\n className: providedClassName,\n popupClassName: providedPopupClassName,\n classNames: providedClassNames,\n suffixIcon,\n readOnly = false,\n interactionState = 'rest',\n open,\n onOpenChange,\n onDropdownVisibleChange,\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue,\n ...props\n}: DSSelectProps & SelectFieldProps) => {\n const generatedId = useId();\n const [isOpen, setIsOpen] = useState<boolean>(Boolean(open));\n\n useEffect(() => {\n ensureSelectStyles();\n }, []);\n\n useEffect(() => {\n if (typeof open === 'boolean') {\n setIsOpen(open);\n }\n }, [open]);\n\n const isMultiMode = props.mode === 'multiple' || props.mode === 'tags';\n const mergedSelectClassName = mergeClassNames(\n DS_SELECT_CLASS,\n interactionState === 'hover' ? DS_SELECT_FORCE_HOVER_CLASS : undefined,\n interactionState === 'focus' ? DS_SELECT_FORCE_FOCUS_CLASS : undefined,\n readOnly ? DS_SELECT_READONLY_CLASS : undefined,\n providedClassName,\n );\n const mergedPopupRootClass = mergeClassNames(\n DS_SELECT_DROPDOWN_CLASS,\n isMultiMode ? DS_SELECT_DROPDOWN_MULTI_CLASS : undefined,\n (providedClassNames as any)?.popup?.root,\n providedPopupClassName,\n );\n const resolvedOpen = readOnly ? false : open;\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const controlId = props.id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = controlId ? `${controlId}-description` : undefined;\n const errorId = controlId ? `${controlId}-error` : undefined;\n const clearValue = clearToValue === undefined ? undefined : clearToValue;\n const clearAction = clear?.onClear ?? onClear;\n\n const mergedClassNames = {\n ...(providedClassNames ?? {}),\n popup: {\n ...((providedClassNames as any)?.popup ?? {}),\n root: mergedPopupRootClass,\n },\n } as SelectProps['classNames'];\n\n const resolvedSuffixIcon = suffixIcon ?? (\n <Icon\n name={isOpen ? 'arrowButtonUp' : 'arrowButtonDown'}\n size={10}\n style={{ color: dsSemanticTokens.input.text.focus }}\n />\n );\n\n const handleChange = (nextValue: SelectProps['value'], option: Parameters<NonNullable<SelectProps['onChange']>>[1]) => {\n props.onChange?.(nextValue, option);\n onValueChange?.(nextValue);\n };\n\n const handleClear = () => {\n clearAction?.();\n onValueChange?.(clearValue);\n props.onChange?.(clearValue, undefined as never);\n };\n\n const describedBy = joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n );\n\n const control = (\n <AntSelect\n {...props}\n id={controlId}\n open={resolvedOpen}\n suffixIcon={resolvedSuffixIcon}\n className={mergedSelectClassName}\n classNames={mergedClassNames}\n aria-describedby={describedBy}\n aria-invalid={fieldError ? true : undefined}\n onOpenChange={(nextOpen) => {\n if (readOnly && nextOpen) {\n setIsOpen(false);\n return;\n }\n setIsOpen(nextOpen);\n onOpenChange?.(nextOpen);\n onDropdownVisibleChange?.(nextOpen);\n }}\n onChange={handleChange}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n htmlFor={controlId}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={clear}\n clearable={clearable}\n clearLabel={clearLabel}\n clearVisibility={clearVisibility}\n clearValue={props.value}\n onClear={handleClear}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n\nSelect.displayName = 'Select';\n"],"mappings":"uWA+BA,IAAa,GAAU,CACrB,UAAW,EACX,eAAgB,EAChB,WAAY,EACZ,aACA,WAAW,GACX,mBAAmB,OACnB,OACA,eACA,0BACA,aACA,gBACA,mBACA,aACA,eACA,iBACA,QACA,YAAY,GACZ,aACA,kBAAkB,SAClB,UACA,gBACA,eACA,GAAG,KACmC,CACtC,IAAM,GAAA,EAAA,EAAA,QAAqB,CACrB,CAAC,EAAQ,IAAA,EAAA,EAAA,UAA+B,EAAQ,EAAM,EAE5D,EAAA,EAAA,eAAgB,CACd,EAAA,GAAoB,EACnB,EAAE,CAAC,EAEN,EAAA,EAAA,eAAgB,CACV,OAAO,GAAS,WAClB,EAAU,EAAK,EAEhB,CAAC,EAAK,CAAC,CAEV,IAAM,EAAc,EAAM,OAAS,YAAc,EAAM,OAAS,OAC1D,EAAwB,EAAA,EAC5B,EAAA,EACA,IAAqB,QAAU,EAAA,EAA8B,IAAA,GAC7D,IAAqB,QAAU,EAAA,EAA8B,IAAA,GAC7D,EAAW,EAAA,EAA2B,IAAA,GACtC,EACD,CACK,EAAuB,EAAA,EAC3B,EAAA,EACA,EAAc,EAAA,EAAiC,IAAA,GAC9C,GAA4B,OAAO,KACpC,EACD,CACK,EAAe,EAAW,GAAQ,EAClC,EAAyB,GAC7B,GACE,GACA,GACA,GACA,GACA,GACA,GACA,GAEE,EAAY,EAAM,KAAO,EAAyB,EAAc,IAAA,IAChE,EAAgB,EAAY,GAAG,EAAU,cAAgB,IAAA,GACzD,EAAU,EAAY,GAAG,EAAU,QAAU,IAAA,GAC7C,EAAa,IAAiB,IAAA,GAAY,IAAA,GAAY,EACtD,EAAc,GAAO,SAAW,EAEhC,EAAmB,CACvB,GAAI,GAAsB,EAAE,CAC5B,MAAO,CACL,GAAK,GAA4B,OAAS,EAAE,CAC5C,KAAM,EACP,CACF,CAEK,EAAqB,IACzB,EAAA,EAAA,KAAC,EAAA,EAAD,CACE,KAAM,EAAS,gBAAkB,kBACjC,KAAM,GACN,MAAO,CAAE,MAAO,EAAA,iBAAiB,MAAM,KAAK,MAAO,CACnD,CAAA,CAGE,GAAgB,EAAiC,IAAgE,CACrH,EAAM,WAAW,EAAW,EAAO,CACnC,IAAgB,EAAU,EAGtB,MAAoB,CACxB,KAAe,CACf,IAAgB,EAAW,CAC3B,EAAM,WAAW,EAAY,IAAA,GAAmB,EAG5C,EAAc,EAAA,EAClB,EAAmB,EAAgB,IAAA,GACnC,EAAa,EAAU,IAAA,GACxB,CAEK,GACJ,EAAA,EAAA,KAAC,EAAA,OAAD,CACE,GAAI,EACJ,GAAI,EACJ,KAAM,EACN,WAAY,EACZ,UAAW,EACX,WAAY,EACZ,mBAAkB,EAClB,eAAc,EAAa,GAAO,IAAA,GAClC,aAAe,GAAa,CAC1B,GAAI,GAAY,EAAU,CACxB,EAAU,GAAM,CAChB,OAEF,EAAU,EAAS,CACnB,IAAe,EAAS,CACxB,IAA0B,EAAS,EAErC,SAAU,EACV,CAAA,CAOJ,OAJK,GAKH,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,MAAO,EACP,SAAU,EACV,QAAS,EACT,YAAa,EACE,gBACf,MAAO,EACE,UACF,QACI,YACC,aACK,kBACjB,WAAY,EAAM,MAClB,QAAS,EACT,aAAc,EACd,MAAO,WAEN,EACU,CAAA,CAtBN,GA0BX,EAAO,YAAc"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { dsSemanticTokens as e } from "../theme.js";
|
|
2
|
+
import { t } from "../useCustomIcon-B-VUK-84.js";
|
|
3
|
+
import { FieldShell as n } from "./FieldShell.js";
|
|
4
|
+
import { t as r } from "../fieldProps-EeYy2kXb.js";
|
|
5
|
+
import { a as ee, c as i, i as a, n as o, o as s, r as c, s as l, t as u } from "../selectStyles-C8j5Vvgp.js";
|
|
6
|
+
import { Select as d } from "antd";
|
|
7
|
+
import { useEffect as f, useId as p, useState as m } from "react";
|
|
8
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
9
|
+
//#region src/ds/forms/Select.tsx
|
|
10
|
+
var g = ({ className: g, popupClassName: _, classNames: v, suffixIcon: y, readOnly: b = !1, interactionState: x = "rest", open: S, onOpenChange: C, onDropdownVisibleChange: w, fieldLabel: T, fieldRequired: E, fieldDescription: D, fieldError: O, fieldActions: k, containerStyle: A, clear: j, clearable: M = !1, clearLabel: N, clearVisibility: P = "always", onClear: F, onValueChange: I, clearToValue: L, ...R }) => {
|
|
11
|
+
let z = p(), [B, V] = m(!!S);
|
|
12
|
+
f(() => {
|
|
13
|
+
l();
|
|
14
|
+
}, []), f(() => {
|
|
15
|
+
typeof S == "boolean" && V(S);
|
|
16
|
+
}, [S]);
|
|
17
|
+
let H = R.mode === "multiple" || R.mode === "tags", U = i(u, x === "hover" ? ee : void 0, x === "focus" ? a : void 0, b ? s : void 0, g), W = i(o, H ? c : void 0, v?.popup?.root, _), G = b ? !1 : S, K = !!(T || E || D || O || k || M || j || F), q = R.id ?? (K ? z : void 0), J = q ? `${q}-description` : void 0, Y = q ? `${q}-error` : void 0, X = L === void 0 ? void 0 : L, Z = j?.onClear ?? F, Q = {
|
|
18
|
+
...v ?? {},
|
|
19
|
+
popup: {
|
|
20
|
+
...v?.popup ?? {},
|
|
21
|
+
root: W
|
|
22
|
+
}
|
|
23
|
+
}, te = y ?? /* @__PURE__ */ h(t, {
|
|
24
|
+
name: B ? "arrowButtonUp" : "arrowButtonDown",
|
|
25
|
+
size: 10,
|
|
26
|
+
style: { color: e.input.text.focus }
|
|
27
|
+
}), ne = (e, t) => {
|
|
28
|
+
R.onChange?.(e, t), I?.(e);
|
|
29
|
+
}, re = () => {
|
|
30
|
+
Z?.(), I?.(X), R.onChange?.(X, void 0);
|
|
31
|
+
}, ie = r(D ? J : void 0, O ? Y : void 0), $ = /* @__PURE__ */ h(d, {
|
|
32
|
+
...R,
|
|
33
|
+
id: q,
|
|
34
|
+
open: G,
|
|
35
|
+
suffixIcon: te,
|
|
36
|
+
className: U,
|
|
37
|
+
classNames: Q,
|
|
38
|
+
"aria-describedby": ie,
|
|
39
|
+
"aria-invalid": O ? !0 : void 0,
|
|
40
|
+
onOpenChange: (e) => {
|
|
41
|
+
if (b && e) {
|
|
42
|
+
V(!1);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
V(e), C?.(e), w?.(e);
|
|
46
|
+
},
|
|
47
|
+
onChange: ne
|
|
48
|
+
});
|
|
49
|
+
return K ? /* @__PURE__ */ h(n, {
|
|
50
|
+
label: T,
|
|
51
|
+
required: E,
|
|
52
|
+
htmlFor: q,
|
|
53
|
+
description: D,
|
|
54
|
+
descriptionId: J,
|
|
55
|
+
error: O,
|
|
56
|
+
errorId: Y,
|
|
57
|
+
clear: j,
|
|
58
|
+
clearable: M,
|
|
59
|
+
clearLabel: N,
|
|
60
|
+
clearVisibility: P,
|
|
61
|
+
clearValue: R.value,
|
|
62
|
+
onClear: re,
|
|
63
|
+
extraActions: k,
|
|
64
|
+
style: A,
|
|
65
|
+
children: $
|
|
66
|
+
}) : $;
|
|
67
|
+
};
|
|
68
|
+
g.displayName = "Select";
|
|
69
|
+
//#endregion
|
|
70
|
+
export { g as Select };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.js","names":[],"sources":["../../src/ds/forms/Select.tsx"],"sourcesContent":["import { Select as AntSelect } from 'antd';\nimport type { SelectProps } from 'antd';\nimport { useEffect, useId, useState } from 'react';\nimport { Icon } from '../../utils/icons';\nimport { dsSemanticTokens } from '../../theme/ontadaTheme';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\nimport {\n DS_SELECT_CLASS,\n DS_SELECT_FORCE_FOCUS_CLASS,\n DS_SELECT_FORCE_HOVER_CLASS,\n DS_SELECT_READONLY_CLASS,\n DS_SELECT_DROPDOWN_CLASS,\n DS_SELECT_DROPDOWN_MULTI_CLASS,\n ensureSelectStyles,\n mergeClassNames,\n} from './selectStyles';\n\nexport type DSSelectInteractionState = 'rest' | 'hover' | 'focus';\n\nexport type DSSelectProps = SelectProps & {\n readOnly?: boolean;\n interactionState?: DSSelectInteractionState;\n};\n\nexport type SelectFieldProps = DSFieldShellProps & {\n onValueChange?: (nextValue: SelectProps['value']) => void;\n clearToValue?: SelectProps['value'];\n};\n\nexport const Select = ({\n className: providedClassName,\n popupClassName: providedPopupClassName,\n classNames: providedClassNames,\n suffixIcon,\n readOnly = false,\n interactionState = 'rest',\n open,\n onOpenChange,\n onDropdownVisibleChange,\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue,\n ...props\n}: DSSelectProps & SelectFieldProps) => {\n const generatedId = useId();\n const [isOpen, setIsOpen] = useState<boolean>(Boolean(open));\n\n useEffect(() => {\n ensureSelectStyles();\n }, []);\n\n useEffect(() => {\n if (typeof open === 'boolean') {\n setIsOpen(open);\n }\n }, [open]);\n\n const isMultiMode = props.mode === 'multiple' || props.mode === 'tags';\n const mergedSelectClassName = mergeClassNames(\n DS_SELECT_CLASS,\n interactionState === 'hover' ? DS_SELECT_FORCE_HOVER_CLASS : undefined,\n interactionState === 'focus' ? DS_SELECT_FORCE_FOCUS_CLASS : undefined,\n readOnly ? DS_SELECT_READONLY_CLASS : undefined,\n providedClassName,\n );\n const mergedPopupRootClass = mergeClassNames(\n DS_SELECT_DROPDOWN_CLASS,\n isMultiMode ? DS_SELECT_DROPDOWN_MULTI_CLASS : undefined,\n (providedClassNames as any)?.popup?.root,\n providedPopupClassName,\n );\n const resolvedOpen = readOnly ? false : open;\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const controlId = props.id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = controlId ? `${controlId}-description` : undefined;\n const errorId = controlId ? `${controlId}-error` : undefined;\n const clearValue = clearToValue === undefined ? undefined : clearToValue;\n const clearAction = clear?.onClear ?? onClear;\n\n const mergedClassNames = {\n ...(providedClassNames ?? {}),\n popup: {\n ...((providedClassNames as any)?.popup ?? {}),\n root: mergedPopupRootClass,\n },\n } as SelectProps['classNames'];\n\n const resolvedSuffixIcon = suffixIcon ?? (\n <Icon\n name={isOpen ? 'arrowButtonUp' : 'arrowButtonDown'}\n size={10}\n style={{ color: dsSemanticTokens.input.text.focus }}\n />\n );\n\n const handleChange = (nextValue: SelectProps['value'], option: Parameters<NonNullable<SelectProps['onChange']>>[1]) => {\n props.onChange?.(nextValue, option);\n onValueChange?.(nextValue);\n };\n\n const handleClear = () => {\n clearAction?.();\n onValueChange?.(clearValue);\n props.onChange?.(clearValue, undefined as never);\n };\n\n const describedBy = joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n );\n\n const control = (\n <AntSelect\n {...props}\n id={controlId}\n open={resolvedOpen}\n suffixIcon={resolvedSuffixIcon}\n className={mergedSelectClassName}\n classNames={mergedClassNames}\n aria-describedby={describedBy}\n aria-invalid={fieldError ? true : undefined}\n onOpenChange={(nextOpen) => {\n if (readOnly && nextOpen) {\n setIsOpen(false);\n return;\n }\n setIsOpen(nextOpen);\n onOpenChange?.(nextOpen);\n onDropdownVisibleChange?.(nextOpen);\n }}\n onChange={handleChange}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n htmlFor={controlId}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={clear}\n clearable={clearable}\n clearLabel={clearLabel}\n clearVisibility={clearVisibility}\n clearValue={props.value}\n onClear={handleClear}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n\nSelect.displayName = 'Select';\n"],"mappings":";;;;;;;;;AA+BA,IAAa,KAAU,EACrB,WAAW,GACX,gBAAgB,GAChB,YAAY,GACZ,eACA,cAAW,IACX,sBAAmB,QACnB,SACA,iBACA,4BACA,eACA,kBACA,qBACA,eACA,iBACA,mBACA,UACA,eAAY,IACZ,eACA,qBAAkB,UAClB,YACA,kBACA,iBACA,GAAG,QACmC;CACtC,IAAM,IAAc,GAAO,EACrB,CAAC,GAAQ,KAAa,EAAkB,EAAQ,EAAM;AAM5D,CAJA,QAAgB;AACd,KAAoB;IACnB,EAAE,CAAC,EAEN,QAAgB;AACd,EAAI,OAAO,KAAS,aAClB,EAAU,EAAK;IAEhB,CAAC,EAAK,CAAC;CAEV,IAAM,IAAc,EAAM,SAAS,cAAc,EAAM,SAAS,QAC1D,IAAwB,EAC5B,GACA,MAAqB,UAAU,KAA8B,KAAA,GAC7D,MAAqB,UAAU,IAA8B,KAAA,GAC7D,IAAW,IAA2B,KAAA,GACtC,EACD,EACK,IAAuB,EAC3B,GACA,IAAc,IAAiC,KAAA,GAC9C,GAA4B,OAAO,MACpC,EACD,EACK,IAAe,IAAW,KAAQ,GAClC,IAAyB,GAC7B,KACE,KACA,KACA,KACA,KACA,KACA,KACA,IAEE,IAAY,EAAM,OAAO,IAAyB,IAAc,KAAA,IAChE,IAAgB,IAAY,GAAG,EAAU,gBAAgB,KAAA,GACzD,IAAU,IAAY,GAAG,EAAU,UAAU,KAAA,GAC7C,IAAa,MAAiB,KAAA,IAAY,KAAA,IAAY,GACtD,IAAc,GAAO,WAAW,GAEhC,IAAmB;EACvB,GAAI,KAAsB,EAAE;EAC5B,OAAO;GACL,GAAK,GAA4B,SAAS,EAAE;GAC5C,MAAM;GACP;EACF,EAEK,KAAqB,KACzB,kBAAC,GAAD;EACE,MAAM,IAAS,kBAAkB;EACjC,MAAM;EACN,OAAO,EAAE,OAAO,EAAiB,MAAM,KAAK,OAAO;EACnD,CAAA,EAGE,MAAgB,GAAiC,MAAgE;AAErH,EADA,EAAM,WAAW,GAAW,EAAO,EACnC,IAAgB,EAAU;IAGtB,WAAoB;AAGxB,EAFA,KAAe,EACf,IAAgB,EAAW,EAC3B,EAAM,WAAW,GAAY,KAAA,EAAmB;IAG5C,KAAc,EAClB,IAAmB,IAAgB,KAAA,GACnC,IAAa,IAAU,KAAA,EACxB,EAEK,IACJ,kBAAC,GAAD;EACE,GAAI;EACJ,IAAI;EACJ,MAAM;EACN,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,oBAAkB;EAClB,gBAAc,IAAa,KAAO,KAAA;EAClC,eAAe,MAAa;AAC1B,OAAI,KAAY,GAAU;AACxB,MAAU,GAAM;AAChB;;AAIF,GAFA,EAAU,EAAS,EACnB,IAAe,EAAS,EACxB,IAA0B,EAAS;;EAErC,UAAU;EACV,CAAA;AAOJ,QAJK,IAKH,kBAAC,GAAD;EACE,OAAO;EACP,UAAU;EACV,SAAS;EACT,aAAa;EACE;EACf,OAAO;EACE;EACF;EACI;EACC;EACK;EACjB,YAAY,EAAM;EAClB,SAAS;EACT,cAAc;EACd,OAAO;YAEN;EACU,CAAA,GAtBN;;AA0BX,EAAO,cAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`./FieldShell.cjs`),t=require(`../fieldProps-CuWfEbFx.cjs`);let n=require(`antd`),r=require(`react`),i=require(`react/jsx-runtime`);var a=({fieldLabel:a,fieldRequired:o,fieldDescription:s,fieldError:c,fieldActions:l,containerStyle:u,clear:d,clearable:f=!1,clearLabel:p,clearVisibility:m=`always`,onClear:h,onValueChange:g,clearToValue:_,value:v,min:y,...b})=>{let x=(0,r.useId)(),S=!!(a||o||s||c||l||f||d||h),C=b.id??(S?x:void 0),w=C?`${C}-description`:void 0,T=C?`${C}-error`:void 0,E=d?.onClear??h,D=_??y??0,O=t.t(s?w:void 0,c?T:void 0),k=(0,i.jsx)(n.Slider,{...b,id:C,value:v,min:y,"aria-describedby":O,"aria-invalid":c?!0:void 0,onChange:e=>{b.onChange?.(e),g?.(e)}});return S?(0,i.jsx)(e.FieldShell,{label:a,required:o,htmlFor:C,description:s,descriptionId:w,error:c,errorId:T,clear:d,clearable:f,clearLabel:p,clearVisibility:m,clearValue:v,onClear:()=>{E?.(),g?.(D)},extraActions:l,style:u,children:k}):k};exports.Slider=a;
|
|
2
|
+
//# sourceMappingURL=Slider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.cjs","names":[],"sources":["../../src/ds/forms/Slider.tsx"],"sourcesContent":["import { Slider as AntSlider } from 'antd';\nimport { useId } from 'react';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\n\ntype AntSliderProps = React.ComponentProps<typeof AntSlider>;\ntype SliderValue = AntSliderProps['value'];\n\nexport type SliderProps = AntSliderProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: SliderValue) => void;\n clearToValue?: SliderValue;\n };\n\nexport const Slider = ({\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue,\n value,\n min,\n ...props\n}: SliderProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const controlId = props.id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = controlId ? `${controlId}-description` : undefined;\n const errorId = controlId ? `${controlId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n const fallbackClear = clearToValue ?? min ?? 0;\n const describedBy = joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n );\n\n const control = (\n <AntSlider\n {...props}\n id={controlId}\n value={value}\n min={min}\n aria-describedby={describedBy}\n aria-invalid={fieldError ? true : undefined}\n onChange={(nextValue) => {\n props.onChange?.(nextValue);\n onValueChange?.(nextValue);\n }}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n htmlFor={controlId}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={clear}\n clearable={clearable}\n clearLabel={clearLabel}\n clearVisibility={clearVisibility}\n clearValue={value}\n onClear={() => {\n clearAction?.();\n onValueChange?.(fallbackClear);\n }}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n"],"mappings":"wPAeA,IAAa,GAAU,CACrB,aACA,gBACA,mBACA,aACA,eACA,iBACA,QACA,YAAY,GACZ,aACA,kBAAkB,SAClB,UACA,gBACA,eACA,QACA,MACA,GAAG,KACc,CACjB,IAAM,GAAA,EAAA,EAAA,QAAqB,CACrB,EAAyB,GAC7B,GACE,GACA,GACA,GACA,GACA,GACA,GACA,GAEE,EAAY,EAAM,KAAO,EAAyB,EAAc,IAAA,IAChE,EAAgB,EAAY,GAAG,EAAU,cAAgB,IAAA,GACzD,EAAU,EAAY,GAAG,EAAU,QAAU,IAAA,GAC7C,EAAc,GAAO,SAAW,EAChC,EAAgB,GAAgB,GAAO,EACvC,EAAc,EAAA,EAClB,EAAmB,EAAgB,IAAA,GACnC,EAAa,EAAU,IAAA,GACxB,CAEK,GACJ,EAAA,EAAA,KAAC,EAAA,OAAD,CACE,GAAI,EACJ,GAAI,EACG,QACF,MACL,mBAAkB,EAClB,eAAc,EAAa,GAAO,IAAA,GAClC,SAAW,GAAc,CACvB,EAAM,WAAW,EAAU,CAC3B,IAAgB,EAAU,EAE5B,CAAA,CAOJ,OAJK,GAKH,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,MAAO,EACP,SAAU,EACV,QAAS,EACT,YAAa,EACE,gBACf,MAAO,EACE,UACF,QACI,YACC,aACK,kBACjB,WAAY,EACZ,YAAe,CACb,KAAe,CACf,IAAgB,EAAc,EAEhC,aAAc,EACd,MAAO,WAEN,EACU,CAAA,CAzBN"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FieldShell as e } from "./FieldShell.js";
|
|
2
|
+
import { t } from "../fieldProps-EeYy2kXb.js";
|
|
3
|
+
import { Slider as n } from "antd";
|
|
4
|
+
import { useId as r } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ds/forms/Slider.tsx
|
|
7
|
+
var a = ({ fieldLabel: a, fieldRequired: o, fieldDescription: s, fieldError: c, fieldActions: l, containerStyle: u, clear: d, clearable: f = !1, clearLabel: p, clearVisibility: m = "always", onClear: h, onValueChange: g, clearToValue: _, value: v, min: y, ...b }) => {
|
|
8
|
+
let x = r(), S = !!(a || o || s || c || l || f || d || h), C = b.id ?? (S ? x : void 0), w = C ? `${C}-description` : void 0, T = C ? `${C}-error` : void 0, E = d?.onClear ?? h, D = _ ?? y ?? 0, O = t(s ? w : void 0, c ? T : void 0), k = /* @__PURE__ */ i(n, {
|
|
9
|
+
...b,
|
|
10
|
+
id: C,
|
|
11
|
+
value: v,
|
|
12
|
+
min: y,
|
|
13
|
+
"aria-describedby": O,
|
|
14
|
+
"aria-invalid": c ? !0 : void 0,
|
|
15
|
+
onChange: (e) => {
|
|
16
|
+
b.onChange?.(e), g?.(e);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return S ? /* @__PURE__ */ i(e, {
|
|
20
|
+
label: a,
|
|
21
|
+
required: o,
|
|
22
|
+
htmlFor: C,
|
|
23
|
+
description: s,
|
|
24
|
+
descriptionId: w,
|
|
25
|
+
error: c,
|
|
26
|
+
errorId: T,
|
|
27
|
+
clear: d,
|
|
28
|
+
clearable: f,
|
|
29
|
+
clearLabel: p,
|
|
30
|
+
clearVisibility: m,
|
|
31
|
+
clearValue: v,
|
|
32
|
+
onClear: () => {
|
|
33
|
+
E?.(), g?.(D);
|
|
34
|
+
},
|
|
35
|
+
extraActions: l,
|
|
36
|
+
style: u,
|
|
37
|
+
children: k
|
|
38
|
+
}) : k;
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { a as Slider };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=Slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.js","names":[],"sources":["../../src/ds/forms/Slider.tsx"],"sourcesContent":["import { Slider as AntSlider } from 'antd';\nimport { useId } from 'react';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\n\ntype AntSliderProps = React.ComponentProps<typeof AntSlider>;\ntype SliderValue = AntSliderProps['value'];\n\nexport type SliderProps = AntSliderProps &\n DSFieldShellProps & {\n onValueChange?: (nextValue: SliderValue) => void;\n clearToValue?: SliderValue;\n };\n\nexport const Slider = ({\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue,\n value,\n min,\n ...props\n}: SliderProps) => {\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const controlId = props.id ?? (shouldWrapInFieldShell ? generatedId : undefined);\n const descriptionId = controlId ? `${controlId}-description` : undefined;\n const errorId = controlId ? `${controlId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n const fallbackClear = clearToValue ?? min ?? 0;\n const describedBy = joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n );\n\n const control = (\n <AntSlider\n {...props}\n id={controlId}\n value={value}\n min={min}\n aria-describedby={describedBy}\n aria-invalid={fieldError ? true : undefined}\n onChange={(nextValue) => {\n props.onChange?.(nextValue);\n onValueChange?.(nextValue);\n }}\n />\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n htmlFor={controlId}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={clear}\n clearable={clearable}\n clearLabel={clearLabel}\n clearVisibility={clearVisibility}\n clearValue={value}\n onClear={() => {\n clearAction?.();\n onValueChange?.(fallbackClear);\n }}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n"],"mappings":";;;;;;AAeA,IAAa,KAAU,EACrB,eACA,kBACA,qBACA,eACA,iBACA,mBACA,UACA,eAAY,IACZ,eACA,qBAAkB,UAClB,YACA,kBACA,iBACA,UACA,QACA,GAAG,QACc;CACjB,IAAM,IAAc,GAAO,EACrB,IAAyB,GAC7B,KACE,KACA,KACA,KACA,KACA,KACA,KACA,IAEE,IAAY,EAAM,OAAO,IAAyB,IAAc,KAAA,IAChE,IAAgB,IAAY,GAAG,EAAU,gBAAgB,KAAA,GACzD,IAAU,IAAY,GAAG,EAAU,UAAU,KAAA,GAC7C,IAAc,GAAO,WAAW,GAChC,IAAgB,KAAgB,KAAO,GACvC,IAAc,EAClB,IAAmB,IAAgB,KAAA,GACnC,IAAa,IAAU,KAAA,EACxB,EAEK,IACJ,kBAAC,GAAD;EACE,GAAI;EACJ,IAAI;EACG;EACF;EACL,oBAAkB;EAClB,gBAAc,IAAa,KAAO,KAAA;EAClC,WAAW,MAAc;AAEvB,GADA,EAAM,WAAW,EAAU,EAC3B,IAAgB,EAAU;;EAE5B,CAAA;AAOJ,QAJK,IAKH,kBAAC,GAAD;EACE,OAAO;EACP,UAAU;EACV,SAAS;EACT,aAAa;EACE;EACf,OAAO;EACE;EACF;EACI;EACC;EACK;EACjB,YAAY;EACZ,eAAe;AAEb,GADA,KAAe,EACf,IAAgB,EAAc;;EAEhC,cAAc;EACd,OAAO;YAEN;EACU,CAAA,GAzBN"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`../theme.cjs`),t=require(`./FieldShell.cjs`),n=require(`../fieldProps-CuWfEbFx.cjs`);let r=require(`antd`),i=require(`react`),a=require(`react/jsx-runtime`);var o=`ds-switch-styles`;function s(){if(typeof document>`u`)return;let t=document.getElementById(o);t||(t=document.createElement(`style`),t.id=o,document.head.appendChild(t));let n=e.dsSemanticTokens.button.primary.default,r=e.dsSemanticTokens.button.primary.hover,i=e.dsSemanticTokens.button.primary.pressed,a=e.dsSemanticTokens.button.primary.disabledBg,s=e.dsSemanticTokens.table.text.body,c=e.dsSemanticTokens.table.text.header,l=e.dsSemanticTokens.pagination.text.hover,u=e.dsSemanticTokens.checkbox.background.disabled,d=e.dsSemanticTokens.checkbox.background.default,f=e.dsSemanticTokens.modal.closeButton.focusOutline,p=e.dsSemanticTokens.button.primary.text,m=e.dsSemanticTokens.button.primary.default,h=e.dsSemanticTokens.button.primary.disabledText;t.textContent=`
|
|
2
|
+
.ant-switch.ds-switch {
|
|
3
|
+
background: ${s};
|
|
4
|
+
box-shadow: none;
|
|
5
|
+
transition: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ant-switch.ds-switch.ant-switch-checked {
|
|
9
|
+
background: ${n};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ant-switch.ds-switch.ds-switch-size-sm {
|
|
13
|
+
min-width: 28px;
|
|
14
|
+
height: 16px;
|
|
15
|
+
line-height: 16px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ant-switch.ds-switch.ds-switch-size-sm .ant-switch-handle {
|
|
19
|
+
width: 12px;
|
|
20
|
+
height: 12px;
|
|
21
|
+
top: 2px;
|
|
22
|
+
inset-inline-start: 2px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ant-switch.ds-switch.ds-switch-size-sm.ant-switch-checked .ant-switch-handle {
|
|
26
|
+
inset-inline-start: calc(100% - 14px);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ant-switch.ds-switch.ds-switch-size-md {
|
|
30
|
+
min-width: 36px;
|
|
31
|
+
height: 20px;
|
|
32
|
+
line-height: 20px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ant-switch.ds-switch.ds-switch-size-md .ant-switch-handle {
|
|
36
|
+
width: 16px;
|
|
37
|
+
height: 16px;
|
|
38
|
+
top: 2px;
|
|
39
|
+
inset-inline-start: 2px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ant-switch.ds-switch.ds-switch-size-md.ant-switch-checked .ant-switch-handle {
|
|
43
|
+
inset-inline-start: calc(100% - 18px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ant-switch.ds-switch.ds-switch-size-lg {
|
|
47
|
+
min-width: 44px;
|
|
48
|
+
height: 24px;
|
|
49
|
+
line-height: 24px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ant-switch.ds-switch.ds-switch-size-lg .ant-switch-handle {
|
|
53
|
+
width: 20px;
|
|
54
|
+
height: 20px;
|
|
55
|
+
top: 2px;
|
|
56
|
+
inset-inline-start: 2px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ant-switch.ds-switch.ds-switch-size-lg.ant-switch-checked .ant-switch-handle {
|
|
60
|
+
inset-inline-start: calc(100% - 22px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ant-switch.ds-switch .ant-switch-handle::before {
|
|
64
|
+
background: ${d};
|
|
65
|
+
box-shadow: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ant-switch.ds-switch.ds-switch-state-hover:not(.ant-switch-checked):not(.ant-switch-disabled) {
|
|
69
|
+
background: ${c};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ant-switch.ds-switch.ds-switch-state-hover.ant-switch-checked:not(.ant-switch-disabled) {
|
|
73
|
+
background: ${r};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ant-switch.ds-switch.ds-switch-state-pressed:not(.ant-switch-checked):not(.ant-switch-disabled) {
|
|
77
|
+
background: ${l};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ant-switch.ds-switch.ds-switch-state-pressed.ant-switch-checked:not(.ant-switch-disabled) {
|
|
81
|
+
background: ${i};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ant-switch.ds-switch.ds-switch-state-focus:not(.ant-switch-disabled),
|
|
85
|
+
.ant-switch.ds-switch:focus-visible:not(.ant-switch-disabled) {
|
|
86
|
+
outline: 2px solid ${f};
|
|
87
|
+
outline-offset: 2px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ant-switch.ds-switch.ant-switch-disabled:not(.ant-switch-checked) {
|
|
91
|
+
background: ${u};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ant-switch.ds-switch.ant-switch-checked.ant-switch-disabled {
|
|
95
|
+
background: ${a};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-checked,
|
|
99
|
+
.ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-unchecked {
|
|
100
|
+
font-size: 10px;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-checked {
|
|
105
|
+
color: ${p};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-unchecked {
|
|
109
|
+
color: ${m};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ant-switch.ds-switch.ant-switch-disabled .ant-switch-inner .ant-switch-inner-checked,
|
|
113
|
+
.ant-switch.ds-switch.ant-switch-disabled .ant-switch-inner .ant-switch-inner-unchecked {
|
|
114
|
+
color: ${h};
|
|
115
|
+
}
|
|
116
|
+
`}function c(...e){return e.filter(Boolean).join(` `)}var l={display:`inline-flex`,flexDirection:`column`,gap:2},u={fontFamily:`Nunito, sans-serif`,fontSize:e.dsSemanticTokens.button.typography.small.fontSize,lineHeight:e.dsSemanticTokens.button.typography.small.lineHeight,fontWeight:600,color:e.dsSemanticTokens.table.text.body},d={fontFamily:`Nunito, sans-serif`,fontSize:12,lineHeight:`16px`,fontWeight:600,color:e.dsSemanticTokens.table.text.sorterMuted},f=({dsLabel:e,dsLabelPosition:o=`right`,dsSize:f=`md`,dsState:p=`normal`,dsShowIcon:m=!1,dsShowSubLabel:h=!1,dsDescription:g,fieldLabel:_,fieldRequired:v,fieldDescription:y,fieldError:b,fieldActions:x,containerStyle:S,clear:C,clearable:w=!1,clearLabel:T,clearVisibility:E=`always`,onClear:D,onValueChange:O,clearToValue:k=!1,id:A,className:j,checkedChildren:M,unCheckedChildren:N,checked:P,...F})=>{(0,i.useEffect)(()=>{s()},[]);let I=(0,i.useId)(),L=!!(_||v||y||b||x||w||C||D),R=A??(L||e||g?I:void 0),z=m?M??`+`:M,B=m?N??`-`:N,V=h?g:void 0,H=R?`${R}-description`:void 0,U=R?`${R}-error`:void 0,W=C?.onClear??D,G=n.t(y?H:void 0,b?U:void 0,V?`${R}-inline-description`:void 0),K=e?(0,a.jsxs)(`div`,{style:l,children:[(0,a.jsx)(`label`,{htmlFor:R,style:u,children:e}),V?(0,a.jsx)(`span`,{id:`${R}-inline-description`,style:d,children:V}):null]}):null,q=(0,a.jsxs)(`span`,{style:S,children:[o===`left`?K:null,(0,a.jsx)(r.Switch,{id:R,checked:P,checkedChildren:z,unCheckedChildren:B,className:c(`ds-switch`,`ds-switch-size-${f}`,`ds-switch-state-${p}`,j),"aria-describedby":G,"aria-invalid":b?!0:void 0,onChange:(e,t)=>{F.onChange?.(e,t),O?.(e)},...F}),o===`right`?K:null]});return L?(0,a.jsx)(t.FieldShell,{label:_,required:v,htmlFor:R,description:y,descriptionId:H,error:b,errorId:U,clear:C,clearable:w,clearLabel:T,clearVisibility:E,clearValue:P,onClear:()=>{W?.(),O?.(k)},extraActions:x,style:S,children:q}):q};exports.Switch=f;
|
|
117
|
+
//# sourceMappingURL=Switch.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.cjs","names":[],"sources":["../../src/ds/forms/Switch.tsx"],"sourcesContent":["import { Switch as AntSwitch } from 'antd';\nimport type { SwitchProps as AntSwitchProps } from 'antd';\nimport { useId } from 'react';\nimport { useEffect } from 'react';\nimport type { CSSProperties, ReactNode } from 'react';\nimport { dsSemanticTokens } from '../../theme/ontadaTheme';\nimport { FieldShell } from './FieldShell';\nimport type { DSFieldShellProps } from './fieldProps';\nimport { joinDescribedByIds } from './fieldProps';\n\nexport type DSSwitchLabelPosition = 'left' | 'right';\nexport type DSSwitchSize = 'sm' | 'md' | 'lg';\nexport type DSSwitchState = 'normal' | 'hover' | 'focus' | 'pressed';\n\nexport type SwitchProps = AntSwitchProps & {\n /** Optional DS label rendered alongside the switch control. */\n dsLabel?: ReactNode;\n /** DS label placement around the switch control. */\n dsLabelPosition?: DSSwitchLabelPosition;\n /** DS switch size variant from Figma. */\n dsSize?: DSSwitchSize;\n /** DS visual state variant from Figma. */\n dsState?: DSSwitchState;\n /** Show icon labels inside the switch track. */\n dsShowIcon?: boolean;\n /** Optional helper description rendered below the label. */\n dsShowSubLabel?: boolean;\n dsDescription?: ReactNode;\n} & DSFieldShellProps & {\n onValueChange?: (nextValue: boolean) => void;\n clearToValue?: boolean;\n};\n\nconst STYLE_ID = 'ds-switch-styles';\n\nfunction injectStyles() {\n if (typeof document === 'undefined') return;\n let style = document.getElementById(STYLE_ID) as HTMLStyleElement | null;\n if (!style) {\n style = document.createElement('style');\n style.id = STYLE_ID;\n document.head.appendChild(style);\n }\n\n const switchOn = dsSemanticTokens.button.primary.default;\n const switchOnHover = dsSemanticTokens.button.primary.hover;\n const switchOnPressed = dsSemanticTokens.button.primary.pressed;\n const switchOnDisabled = dsSemanticTokens.button.primary.disabledBg;\n const switchOff = dsSemanticTokens.table.text.body;\n const switchOffHover = dsSemanticTokens.table.text.header;\n const switchOffPressed = dsSemanticTokens.pagination.text.hover;\n const switchOffDisabled = dsSemanticTokens.checkbox.background.disabled;\n const thumb = dsSemanticTokens.checkbox.background.default;\n const focusOutline = dsSemanticTokens.modal.closeButton.focusOutline;\n const iconOn = dsSemanticTokens.button.primary.text;\n const iconOff = dsSemanticTokens.button.primary.default;\n const iconDisabled = dsSemanticTokens.button.primary.disabledText;\n\n style.textContent = `\n .ant-switch.ds-switch {\n background: ${switchOff};\n box-shadow: none;\n transition: none;\n }\n\n .ant-switch.ds-switch.ant-switch-checked {\n background: ${switchOn};\n }\n\n .ant-switch.ds-switch.ds-switch-size-sm {\n min-width: 28px;\n height: 16px;\n line-height: 16px;\n }\n\n .ant-switch.ds-switch.ds-switch-size-sm .ant-switch-handle {\n width: 12px;\n height: 12px;\n top: 2px;\n inset-inline-start: 2px;\n }\n\n .ant-switch.ds-switch.ds-switch-size-sm.ant-switch-checked .ant-switch-handle {\n inset-inline-start: calc(100% - 14px);\n }\n\n .ant-switch.ds-switch.ds-switch-size-md {\n min-width: 36px;\n height: 20px;\n line-height: 20px;\n }\n\n .ant-switch.ds-switch.ds-switch-size-md .ant-switch-handle {\n width: 16px;\n height: 16px;\n top: 2px;\n inset-inline-start: 2px;\n }\n\n .ant-switch.ds-switch.ds-switch-size-md.ant-switch-checked .ant-switch-handle {\n inset-inline-start: calc(100% - 18px);\n }\n\n .ant-switch.ds-switch.ds-switch-size-lg {\n min-width: 44px;\n height: 24px;\n line-height: 24px;\n }\n\n .ant-switch.ds-switch.ds-switch-size-lg .ant-switch-handle {\n width: 20px;\n height: 20px;\n top: 2px;\n inset-inline-start: 2px;\n }\n\n .ant-switch.ds-switch.ds-switch-size-lg.ant-switch-checked .ant-switch-handle {\n inset-inline-start: calc(100% - 22px);\n }\n\n .ant-switch.ds-switch .ant-switch-handle::before {\n background: ${thumb};\n box-shadow: none;\n }\n\n .ant-switch.ds-switch.ds-switch-state-hover:not(.ant-switch-checked):not(.ant-switch-disabled) {\n background: ${switchOffHover};\n }\n\n .ant-switch.ds-switch.ds-switch-state-hover.ant-switch-checked:not(.ant-switch-disabled) {\n background: ${switchOnHover};\n }\n\n .ant-switch.ds-switch.ds-switch-state-pressed:not(.ant-switch-checked):not(.ant-switch-disabled) {\n background: ${switchOffPressed};\n }\n\n .ant-switch.ds-switch.ds-switch-state-pressed.ant-switch-checked:not(.ant-switch-disabled) {\n background: ${switchOnPressed};\n }\n\n .ant-switch.ds-switch.ds-switch-state-focus:not(.ant-switch-disabled),\n .ant-switch.ds-switch:focus-visible:not(.ant-switch-disabled) {\n outline: 2px solid ${focusOutline};\n outline-offset: 2px;\n }\n\n .ant-switch.ds-switch.ant-switch-disabled:not(.ant-switch-checked) {\n background: ${switchOffDisabled};\n }\n\n .ant-switch.ds-switch.ant-switch-checked.ant-switch-disabled {\n background: ${switchOnDisabled};\n }\n\n .ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-checked,\n .ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-unchecked {\n font-size: 10px;\n font-weight: 700;\n }\n\n .ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-checked {\n color: ${iconOn};\n }\n\n .ant-switch.ds-switch .ant-switch-inner .ant-switch-inner-unchecked {\n color: ${iconOff};\n }\n\n .ant-switch.ds-switch.ant-switch-disabled .ant-switch-inner .ant-switch-inner-checked,\n .ant-switch.ds-switch.ant-switch-disabled .ant-switch-inner .ant-switch-inner-unchecked {\n color: ${iconDisabled};\n }\n `;\n}\n\nfunction mergeClassNames(...names: Array<string | undefined>) {\n return names.filter(Boolean).join(' ');\n}\n\nconst containerStyle: CSSProperties = {\n display: 'inline-flex',\n alignItems: 'center',\n gap: 8,\n};\n\nconst labelStackStyle: CSSProperties = {\n display: 'inline-flex',\n flexDirection: 'column',\n gap: 2,\n};\n\nconst labelStyle: CSSProperties = {\n fontFamily: 'Nunito, sans-serif',\n fontSize: dsSemanticTokens.button.typography.small.fontSize,\n lineHeight: dsSemanticTokens.button.typography.small.lineHeight,\n fontWeight: 600,\n color: dsSemanticTokens.table.text.body,\n};\n\nconst descriptionStyle: CSSProperties = {\n fontFamily: 'Nunito, sans-serif',\n fontSize: 12,\n lineHeight: '16px',\n fontWeight: 600,\n color: dsSemanticTokens.table.text.sorterMuted,\n};\n\nexport const Switch = ({\n dsLabel,\n dsLabelPosition = 'right',\n dsSize = 'md',\n dsState = 'normal',\n dsShowIcon = false,\n dsShowSubLabel = false,\n dsDescription,\n fieldLabel,\n fieldRequired,\n fieldDescription,\n fieldError,\n fieldActions,\n containerStyle,\n clear,\n clearable = false,\n clearLabel,\n clearVisibility = 'always',\n onClear,\n onValueChange,\n clearToValue = false,\n id,\n className,\n checkedChildren,\n unCheckedChildren,\n checked,\n ...props\n}: SwitchProps) => {\n useEffect(() => {\n injectStyles();\n }, []);\n\n const generatedId = useId();\n const shouldWrapInFieldShell = Boolean(\n fieldLabel ||\n fieldRequired ||\n fieldDescription ||\n fieldError ||\n fieldActions ||\n clearable ||\n clear ||\n onClear,\n );\n const switchId = id ?? (shouldWrapInFieldShell || dsLabel || dsDescription ? generatedId : undefined);\n const resolvedCheckedChildren = dsShowIcon ? (checkedChildren ?? '+') : checkedChildren;\n const resolvedUncheckedChildren = dsShowIcon ? (unCheckedChildren ?? '-') : unCheckedChildren;\n const resolvedDescription = dsShowSubLabel ? dsDescription : undefined;\n const descriptionId = switchId ? `${switchId}-description` : undefined;\n const errorId = switchId ? `${switchId}-error` : undefined;\n const clearAction = clear?.onClear ?? onClear;\n const describedBy = joinDescribedByIds(\n fieldDescription ? descriptionId : undefined,\n fieldError ? errorId : undefined,\n resolvedDescription ? `${switchId}-inline-description` : undefined,\n );\n\n const labelNode = dsLabel ? (\n <div style={labelStackStyle}>\n <label htmlFor={switchId} style={labelStyle}>\n {dsLabel}\n </label>\n {resolvedDescription ? <span id={`${switchId}-inline-description`} style={descriptionStyle}>{resolvedDescription}</span> : null}\n </div>\n ) : null;\n\n const control = (\n <span style={containerStyle}>\n {dsLabelPosition === 'left' ? labelNode : null}\n <AntSwitch\n id={switchId}\n checked={checked}\n checkedChildren={resolvedCheckedChildren}\n unCheckedChildren={resolvedUncheckedChildren}\n className={mergeClassNames('ds-switch', `ds-switch-size-${dsSize}`, `ds-switch-state-${dsState}`, className)}\n aria-describedby={describedBy}\n aria-invalid={fieldError ? true : undefined}\n onChange={(nextChecked, event) => {\n props.onChange?.(nextChecked, event);\n onValueChange?.(nextChecked);\n }}\n {...props}\n />\n {dsLabelPosition === 'right' ? labelNode : null}\n </span>\n );\n\n if (!shouldWrapInFieldShell) {\n return control;\n }\n\n return (\n <FieldShell\n label={fieldLabel}\n required={fieldRequired}\n htmlFor={switchId}\n description={fieldDescription}\n descriptionId={descriptionId}\n error={fieldError}\n errorId={errorId}\n clear={clear}\n clearable={clearable}\n clearLabel={clearLabel}\n clearVisibility={clearVisibility}\n clearValue={checked}\n onClear={() => {\n clearAction?.();\n onValueChange?.(clearToValue);\n }}\n extraActions={fieldActions}\n style={containerStyle}\n >\n {control}\n </FieldShell>\n );\n};\n"],"mappings":"kRAiCA,IAAM,EAAW,mBAEjB,SAAS,GAAe,CACtB,GAAI,OAAO,SAAa,IAAa,OACrC,IAAI,EAAQ,SAAS,eAAe,EAAS,CACxC,IACH,EAAQ,SAAS,cAAc,QAAQ,CACvC,EAAM,GAAK,EACX,SAAS,KAAK,YAAY,EAAM,EAGlC,IAAM,EAAW,EAAA,iBAAiB,OAAO,QAAQ,QAC3C,EAAgB,EAAA,iBAAiB,OAAO,QAAQ,MAChD,EAAkB,EAAA,iBAAiB,OAAO,QAAQ,QAClD,EAAmB,EAAA,iBAAiB,OAAO,QAAQ,WACnD,EAAY,EAAA,iBAAiB,MAAM,KAAK,KACxC,EAAiB,EAAA,iBAAiB,MAAM,KAAK,OAC7C,EAAmB,EAAA,iBAAiB,WAAW,KAAK,MACpD,EAAoB,EAAA,iBAAiB,SAAS,WAAW,SACzD,EAAQ,EAAA,iBAAiB,SAAS,WAAW,QAC7C,EAAe,EAAA,iBAAiB,MAAM,YAAY,aAClD,EAAS,EAAA,iBAAiB,OAAO,QAAQ,KACzC,EAAU,EAAA,iBAAiB,OAAO,QAAQ,QAC1C,EAAe,EAAA,iBAAiB,OAAO,QAAQ,aAErD,EAAM,YAAc;;oBAEF,EAAU;;;;;;oBAMV,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAuDT,EAAM;;;;;oBAKN,EAAe;;;;oBAIf,EAAc;;;;oBAId,EAAiB;;;;oBAIjB,EAAgB;;;;;2BAKT,EAAa;;;;;oBAKpB,EAAkB;;;;oBAIlB,EAAiB;;;;;;;;;;eAUtB,EAAO;;;;eAIP,EAAQ;;;;;eAKR,EAAa;;IAK5B,SAAS,EAAgB,GAAG,EAAkC,CAC5D,OAAO,EAAM,OAAO,QAAQ,CAAC,KAAK,IAAI,CASxC,IAAM,EAAiC,CACrC,QAAS,cACT,cAAe,SACf,IAAK,EACN,CAEK,EAA4B,CAChC,WAAY,qBACZ,SAAU,EAAA,iBAAiB,OAAO,WAAW,MAAM,SACnD,WAAY,EAAA,iBAAiB,OAAO,WAAW,MAAM,WACrD,WAAY,IACZ,MAAO,EAAA,iBAAiB,MAAM,KAAK,KACpC,CAEK,EAAkC,CACtC,WAAY,qBACZ,SAAU,GACV,WAAY,OACZ,WAAY,IACZ,MAAO,EAAA,iBAAiB,MAAM,KAAK,YACpC,CAEY,GAAU,CACrB,UACA,kBAAkB,QAClB,SAAS,KACT,UAAU,SACV,aAAa,GACb,iBAAiB,GACjB,gBACA,aACA,gBACA,mBACA,aACA,eACA,iBACA,QACA,YAAY,GACZ,aACA,kBAAkB,SAClB,UACA,gBACA,eAAe,GACf,KACA,YACA,kBACA,oBACA,UACA,GAAG,KACc,EACjB,EAAA,EAAA,eAAgB,CACd,GAAc,EACb,EAAE,CAAC,CAEN,IAAM,GAAA,EAAA,EAAA,QAAqB,CACrB,EAAyB,GAC7B,GACE,GACA,GACA,GACA,GACA,GACA,GACA,GAEE,EAAW,IAAO,GAA0B,GAAW,EAAgB,EAAc,IAAA,IACrF,EAA0B,EAAc,GAAmB,IAAO,EAClE,EAA4B,EAAc,GAAqB,IAAO,EACtE,EAAsB,EAAiB,EAAgB,IAAA,GACvD,EAAgB,EAAW,GAAG,EAAS,cAAgB,IAAA,GACvD,EAAU,EAAW,GAAG,EAAS,QAAU,IAAA,GAC3C,EAAc,GAAO,SAAW,EAChC,EAAc,EAAA,EAClB,EAAmB,EAAgB,IAAA,GACnC,EAAa,EAAU,IAAA,GACvB,EAAsB,GAAG,EAAS,qBAAuB,IAAA,GAC1D,CAEK,EAAY,GAChB,EAAA,EAAA,MAAC,MAAD,CAAK,MAAO,WAAZ,EACE,EAAA,EAAA,KAAC,QAAD,CAAO,QAAS,EAAU,MAAO,WAC9B,EACK,CAAA,CACP,GAAsB,EAAA,EAAA,KAAC,OAAD,CAAM,GAAI,GAAG,EAAS,qBAAsB,MAAO,WAAmB,EAA2B,CAAA,CAAG,KACvH,GACJ,KAEE,GACJ,EAAA,EAAA,MAAC,OAAD,CAAM,MAAO,WAAb,CACG,IAAoB,OAAS,EAAY,MAC1C,EAAA,EAAA,KAAC,EAAA,OAAD,CACE,GAAI,EACK,UACT,gBAAiB,EACjB,kBAAmB,EACnB,UAAW,EAAgB,YAAa,kBAAkB,IAAU,mBAAmB,IAAW,EAAU,CAC5G,mBAAkB,EAClB,eAAc,EAAa,GAAO,IAAA,GAClC,UAAW,EAAa,IAAU,CAChC,EAAM,WAAW,EAAa,EAAM,CACpC,IAAgB,EAAY,EAE9B,GAAI,EACJ,CAAA,CACD,IAAoB,QAAU,EAAY,KACtC,GAOT,OAJK,GAKH,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,MAAO,EACP,SAAU,EACV,QAAS,EACT,YAAa,EACE,gBACf,MAAO,EACE,UACF,QACI,YACC,aACK,kBACjB,WAAY,EACZ,YAAe,CACb,KAAe,CACf,IAAgB,EAAa,EAE/B,aAAc,EACd,MAAO,WAEN,EACU,CAAA,CAzBN"}
|