@salesforce/design-system-react 11.0.0-alpha.8 → 11.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/accordion/index.cjs +1 -1
- package/dist/cjs/components/accordion/index.cjs.map +1 -1
- package/dist/cjs/components/alert/container.cjs +1 -1
- package/dist/cjs/components/alert/container.cjs.map +1 -1
- package/dist/cjs/components/avatar/index.cjs +1 -1
- package/dist/cjs/components/avatar/index.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/check-props.cjs +2 -0
- package/dist/cjs/components/button-stateful/check-props.cjs.map +1 -0
- package/dist/cjs/components/button-stateful/component.cjs +2 -0
- package/dist/cjs/components/button-stateful/component.cjs.map +1 -0
- package/dist/cjs/components/button-stateful/index.cjs +1 -1
- package/dist/cjs/components/button-stateful/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/index.cjs +1 -1
- package/dist/cjs/components/carousel/index.cjs.map +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs.map +1 -1
- package/dist/cjs/components/checkbox/index.cjs +1 -1
- package/dist/cjs/components/checkbox/index.cjs.map +1 -1
- package/dist/cjs/components/color-picker/check-props.cjs +1 -1
- package/dist/cjs/components/color-picker/check-props.cjs.map +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/color-picker-tabs.cjs +2 -0
- package/dist/cjs/components/color-picker/private/color-picker-tabs.cjs.map +1 -0
- package/dist/cjs/components/color-picker/private/hsv-color.cjs +1 -1
- package/dist/cjs/components/color-picker/private/hsv-color.cjs.map +1 -1
- package/dist/cjs/components/combobox/check-props.cjs +1 -1
- package/dist/cjs/components/combobox/check-props.cjs.map +1 -1
- package/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/combobox/index.cjs +1 -1
- package/dist/cjs/components/date-picker/check-props.cjs +1 -1
- package/dist/cjs/components/date-picker/check-props.cjs.map +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/cjs/components/date-picker/index.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/calendar-wrapper.cjs.map +1 -1
- package/dist/cjs/components/expandable-section/index.cjs +1 -1
- package/dist/cjs/components/expandable-section/index.cjs.map +1 -1
- package/dist/cjs/components/icon/input-icon/index.cjs +1 -1
- package/dist/cjs/components/icon/input-icon/index.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/input/check-props.cjs +1 -1
- package/dist/cjs/components/input/check-props.cjs.map +1 -1
- package/dist/cjs/components/input/index.cjs +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/index.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/popover/index.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/radio/check-props.cjs +1 -1
- package/dist/cjs/components/radio/check-props.cjs.map +1 -1
- package/dist/cjs/components/radio/index.cjs +1 -1
- package/dist/cjs/components/radio/index.cjs.map +1 -1
- package/dist/cjs/components/radio-button-group/index.cjs.map +1 -1
- package/dist/cjs/components/radio-button-group/radio.cjs.map +1 -1
- package/dist/cjs/components/radio-group/check-props.cjs +2 -0
- package/dist/cjs/components/radio-group/check-props.cjs.map +1 -0
- package/dist/cjs/components/radio-group/component.cjs +2 -0
- package/dist/cjs/components/radio-group/component.cjs.map +1 -0
- package/dist/cjs/components/radio-group/index.cjs +1 -1
- package/dist/cjs/components/radio-group/index.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/column.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -1
- package/dist/cjs/components/slider/check-props.cjs +1 -1
- package/dist/cjs/components/slider/check-props.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/index.cjs +1 -1
- package/dist/cjs/components/split-view/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox-check-props.cjs +1 -1
- package/dist/cjs/components/split-view/listbox-check-props.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox.cjs +1 -1
- package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
- package/dist/cjs/components/tabs/check-props.cjs +2 -0
- package/dist/cjs/components/tabs/check-props.cjs.map +1 -0
- package/dist/cjs/components/tabs/component.cjs +2 -0
- package/dist/cjs/components/tabs/component.cjs.map +1 -0
- package/dist/cjs/components/tabs/index.cjs +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/panel.cjs.map +1 -1
- package/dist/cjs/components/textarea/check-props.cjs +1 -1
- package/dist/cjs/components/textarea/check-props.cjs.map +1 -1
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/toast/container.cjs +1 -1
- package/dist/cjs/components/toast/container.cjs.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs +2 -2
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/check-props.cjs +1 -1
- package/dist/cjs/components/tree/check-props.cjs.map +1 -1
- package/dist/cjs/components/tree/private/branch.cjs +1 -1
- package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs +1 -1
- package/dist/cjs/components/tree/private/item.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/check-props.cjs +2 -0
- package/dist/cjs/components/vertical-navigation/check-props.cjs.map +1 -0
- package/dist/cjs/components/vertical-navigation/component.cjs +2 -0
- package/dist/cjs/components/vertical-navigation/component.cjs.map +1 -0
- package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/info-badge.cjs +1 -1
- package/dist/cjs/components/welcome-mat/info-badge.cjs.map +1 -1
- package/dist/cjs/utilities/hooks/index.cjs +1 -1
- package/dist/cjs/utilities/hooks/use-controllable-state.cjs +2 -0
- package/dist/cjs/utilities/hooks/use-controllable-state.cjs.map +1 -0
- package/dist/cjs/utilities/warning/required-property.cjs +2 -0
- package/dist/cjs/utilities/warning/required-property.cjs.map +1 -0
- package/dist/es/components/accordion/index.js +10 -8
- package/dist/es/components/accordion/index.js.map +1 -1
- package/dist/es/components/alert/container.js +1 -1
- package/dist/es/components/alert/container.js.map +1 -1
- package/dist/es/components/avatar/index.js +2 -1
- package/dist/es/components/avatar/index.js.map +1 -1
- package/dist/es/components/button-stateful/check-props.js +14 -0
- package/dist/es/components/button-stateful/check-props.js.map +1 -0
- package/dist/es/components/button-stateful/component.js +20 -0
- package/dist/es/components/button-stateful/component.js.map +1 -0
- package/dist/es/components/button-stateful/index.js +102 -94
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/carousel/index.js +112 -130
- package/dist/es/components/carousel/index.js.map +1 -1
- package/dist/es/components/checkbox/check-props.js +14 -8
- package/dist/es/components/checkbox/check-props.js.map +1 -1
- package/dist/es/components/checkbox/index.js +40 -33
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/check-props.js +16 -11
- package/dist/es/components/color-picker/check-props.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +185 -169
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/color-picker/private/color-picker-tabs.js +17 -0
- package/dist/es/components/color-picker/private/color-picker-tabs.js.map +1 -0
- package/dist/es/components/color-picker/private/hsv-color.js +1 -0
- package/dist/es/components/color-picker/private/hsv-color.js.map +1 -1
- package/dist/es/components/combobox/check-props.js +15 -14
- package/dist/es/components/combobox/check-props.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +399 -399
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/index.js +4 -4
- package/dist/es/components/date-picker/check-props.js +15 -9
- package/dist/es/components/date-picker/check-props.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +144 -138
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/date-picker/private/calendar-wrapper.js.map +1 -1
- package/dist/es/components/expandable-section/index.js +32 -26
- package/dist/es/components/expandable-section/index.js.map +1 -1
- package/dist/es/components/icon/input-icon/index.js +7 -2
- package/dist/es/components/icon/input-icon/index.js.map +1 -1
- package/dist/es/components/index.js +3 -3
- package/dist/es/components/input/check-props.js +19 -17
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/index.js +153 -156
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/private/inner-input.js +18 -18
- package/dist/es/components/input/private/inner-input.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js +7 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/index.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +294 -269
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js +1 -1
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/popover/index.js.map +1 -1
- package/dist/es/components/popover/popover.js +209 -205
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/radio/check-props.js +8 -8
- package/dist/es/components/radio/check-props.js.map +1 -1
- package/dist/es/components/radio/index.js +15 -13
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/radio-button-group/index.js.map +1 -1
- package/dist/es/components/radio-button-group/radio.js.map +1 -1
- package/dist/es/components/radio-group/check-props.js +14 -0
- package/dist/es/components/radio-group/check-props.js.map +1 -0
- package/dist/es/components/radio-group/component.js +21 -0
- package/dist/es/components/radio-group/component.js.map +1 -0
- package/dist/es/components/radio-group/index.js +62 -38
- package/dist/es/components/radio-group/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js +5 -4
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/check-props.js +7 -6
- package/dist/es/components/simple-data-table/check-props.js.map +1 -1
- package/dist/es/components/simple-data-table/column.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +67 -49
- package/dist/es/components/simple-data-table/index.js.map +1 -1
- package/dist/es/components/simple-data-table/private/head.js +1 -1
- package/dist/es/components/simple-data-table/private/head.js.map +1 -1
- package/dist/es/components/simple-data-table/private/header-cell.js +50 -52
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -1
- package/dist/es/components/simple-data-table/private/row.js +43 -57
- package/dist/es/components/simple-data-table/private/row.js.map +1 -1
- package/dist/es/components/slider/check-props.js +14 -12
- package/dist/es/components/slider/check-props.js.map +1 -1
- package/dist/es/components/slider/index.js +54 -48
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/split-view/index.js +23 -22
- package/dist/es/components/split-view/index.js.map +1 -1
- package/dist/es/components/split-view/listbox-check-props.js +10 -2
- package/dist/es/components/split-view/listbox-check-props.js.map +1 -1
- package/dist/es/components/split-view/listbox.js +67 -50
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/tabs/check-props.js +15 -0
- package/dist/es/components/tabs/check-props.js.map +1 -0
- package/dist/es/components/tabs/component.js +28 -0
- package/dist/es/components/tabs/component.js.map +1 -0
- package/dist/es/components/tabs/index.js +84 -69
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/tabs/panel.js.map +1 -1
- package/dist/es/components/textarea/check-props.js +1 -1
- package/dist/es/components/textarea/check-props.js.map +1 -1
- package/dist/es/components/textarea/index.js +3 -2
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/container.js +1 -1
- package/dist/es/components/toast/container.js.map +1 -1
- package/dist/es/components/tooltip/index.js +120 -109
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +14 -9
- package/dist/es/components/tree/check-props.js.map +1 -1
- package/dist/es/components/tree/private/branch.js +38 -35
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js +6 -8
- package/dist/es/components/tree/private/item.js.map +1 -1
- package/dist/es/components/tree/private/render-branch.js +9 -10
- package/dist/es/components/tree/private/render-branch.js.map +1 -1
- package/dist/es/components/tree/tree.js +126 -97
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/vertical-navigation/check-props.js +13 -0
- package/dist/es/components/vertical-navigation/check-props.js.map +1 -0
- package/dist/es/components/vertical-navigation/component.js +27 -0
- package/dist/es/components/vertical-navigation/component.js.map +1 -0
- package/dist/es/components/vertical-navigation/index.js +27 -26
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/welcome-mat/info-badge.js +14 -4
- package/dist/es/components/welcome-mat/info-badge.js.map +1 -1
- package/dist/es/utilities/hooks/index.js +2 -1
- package/dist/es/utilities/hooks/use-controllable-state.js +20 -0
- package/dist/es/utilities/hooks/use-controllable-state.js.map +1 -0
- package/dist/es/utilities/warning/required-property.js +15 -0
- package/dist/es/utilities/warning/required-property.js.map +1 -0
- package/dist/types/components/accordion/index.d.ts.map +1 -1
- package/dist/types/components/avatar/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/check-props.d.ts +3 -0
- package/dist/types/components/button-stateful/check-props.d.ts.map +1 -0
- package/dist/types/components/button-stateful/index.d.ts +34 -6
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/carousel/index.d.ts +26 -7
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/checkbox/check-props.d.ts +1 -0
- package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +38 -9
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/check-props.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +50 -11
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/color-picker/index.d.ts +2 -2
- package/dist/types/components/color-picker/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/private/color-picker-tabs.d.ts +14 -0
- package/dist/types/components/color-picker/private/color-picker-tabs.d.ts.map +1 -0
- package/dist/types/components/color-picker/private/hsv-color.d.ts.map +1 -1
- package/dist/types/components/color-picker/types.d.ts +9 -5
- package/dist/types/components/color-picker/types.d.ts.map +1 -1
- package/dist/types/components/combobox/check-props.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts +41 -6
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/date-picker/check-props.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +52 -17
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +1 -1
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/date-picker/private/calendar-wrapper.d.ts +3 -1
- package/dist/types/components/date-picker/private/calendar-wrapper.d.ts.map +1 -1
- package/dist/types/components/expandable-section/index.d.ts +15 -3
- package/dist/types/components/expandable-section/index.d.ts.map +1 -1
- package/dist/types/components/icon/input-icon/index.d.ts.map +1 -1
- package/dist/types/components/input/check-props.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +10 -4
- package/dist/types/components/input/index.d.ts.map +1 -1
- package/dist/types/components/input/private/inner-input.d.ts +2 -4
- package/dist/types/components/input/private/inner-input.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/index.d.ts +1 -1
- package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +78 -15
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/popover/index.d.ts +1 -1
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +30 -3
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/radio/check-props.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +42 -9
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/radio-button-group/index.d.ts +20 -10
- package/dist/types/components/radio-button-group/index.d.ts.map +1 -1
- package/dist/types/components/radio-button-group/radio.d.ts +7 -2
- package/dist/types/components/radio-button-group/radio.d.ts.map +1 -1
- package/dist/types/components/radio-group/check-props.d.ts +3 -0
- package/dist/types/components/radio-group/check-props.d.ts.map +1 -0
- package/dist/types/components/radio-group/index.d.ts +51 -8
- package/dist/types/components/radio-group/index.d.ts.map +1 -1
- package/dist/types/components/radio-group/radio.d.ts +7 -2
- package/dist/types/components/radio-group/radio.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +10 -2
- package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/column.d.ts +4 -1
- package/dist/types/components/simple-data-table/column.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/index.d.ts +10 -2
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/header-cell.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/row.d.ts +4 -2
- package/dist/types/components/simple-data-table/private/row.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +40 -13
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/slider/check-props.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +23 -10
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/split-view/index.d.ts +12 -3
- package/dist/types/components/split-view/index.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox-check-props.d.ts +1 -0
- package/dist/types/components/split-view/listbox-check-props.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox.d.ts +41 -10
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/tabs/check-props.d.ts +3 -0
- package/dist/types/components/tabs/check-props.d.ts.map +1 -0
- package/dist/types/components/tabs/index.d.ts +46 -12
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/panel.d.ts +4 -0
- package/dist/types/components/tabs/panel.d.ts.map +1 -1
- package/dist/types/components/textarea/check-props.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +14 -6
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/container.d.ts +1 -1
- package/dist/types/components/tooltip/index.d.ts +49 -3
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/check-props.d.ts +1 -0
- package/dist/types/components/tree/check-props.d.ts.map +1 -1
- package/dist/types/components/tree/private/branch.d.ts +6 -1
- package/dist/types/components/tree/private/branch.d.ts.map +1 -1
- package/dist/types/components/tree/private/item.d.ts +3 -1
- package/dist/types/components/tree/private/item.d.ts.map +1 -1
- package/dist/types/components/tree/private/render-branch.d.ts +3 -1
- package/dist/types/components/tree/private/render-branch.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +33 -6
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/tree/types.d.ts +23 -4
- package/dist/types/components/tree/types.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/check-props.d.ts +1 -0
- package/dist/types/components/vertical-navigation/check-props.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +9 -4
- package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/info-badge.d.ts.map +1 -1
- package/dist/types/types/components.d.ts +0 -2
- package/dist/types/types/components.d.ts.map +1 -1
- package/dist/types/utilities/hooks/index.d.ts +1 -0
- package/dist/types/utilities/hooks/index.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-controllable-state.d.ts +23 -0
- package/dist/types/utilities/hooks/use-controllable-state.d.ts.map +1 -0
- package/dist/types/utilities/warning/required-property.d.ts +3 -0
- package/dist/types/utilities/warning/required-property.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -5,122 +5,120 @@ import r from "../utilities/label/index.js";
|
|
|
5
5
|
import i from "../tooltip/private/field-level-help-tooltip.js";
|
|
6
6
|
import a from "./check-props.js";
|
|
7
7
|
import ee from "./component.js";
|
|
8
|
-
import o, { forwardRef as s, useCallback as c,
|
|
8
|
+
import o, { forwardRef as s, useCallback as c, useEffect as te, useId as l, useRef as u } from "react";
|
|
9
9
|
import d from "classnames";
|
|
10
10
|
import { jsx as f, jsxs as ne } from "react/jsx-runtime";
|
|
11
11
|
//#region components/input/index.tsx
|
|
12
12
|
var p = "counter", m = "Decrement", h = "Increment", re = {
|
|
13
13
|
decrement: `${m} ${p}`,
|
|
14
14
|
increment: `${h} ${p}`
|
|
15
|
-
}, g = s(({ "aria-activedescendant": s, "aria-autocomplete": g, "aria-controls":
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
].filter((e) => !!e).join(" ") || void 0,
|
|
15
|
+
}, g = s(({ "aria-activedescendant": s, "aria-autocomplete": g, "aria-controls": ie, "aria-describedby": ae, "aria-expanded": _, "aria-haspopup": v, "aria-labelledby": y, "aria-owns": b, "aria-required": x, assistiveText: oe, autoComplete: se, children: ce, className: le, defaultValue: ue, disabled: S = !1, errorText: C, fieldLevelHelpTooltip: w, fixedTextLeft: de, fixedTextRight: fe, hasSpinner: pe = !1, iconLeft: T, iconRight: E, id: me, inlineHelpText: D, inlineEditTrigger: O, inputRef: k, isStatic: A = !1, label: j, maxLength: M, maxValue: N, minLength: P, minValue: F, name: I, onBlur: L, onChange: R, onClick: z, onFocus: B, onInput: he, onInvalid: ge, onKeyDown: _e, onKeyPress: ve, onKeyUp: ye, onSelect: be, onSubmit: xe, placeholder: Se, readOnly: V = !1, required: H = !1, role: Ce, step: U, tabIndex: we, styleContainer: Te, styleInput: Ee, type: De = "text", value: W, variant: G = "base" }, Oe) => {
|
|
16
|
+
let ke = l(), Ae = l(), je = l(), K = me || ke, Me = C ? Ae : void 0, Ne = D ? je : void 0, Pe = [
|
|
17
|
+
ae,
|
|
18
|
+
Ne,
|
|
19
|
+
Me
|
|
20
|
+
].filter((e) => !!e).join(" ") || void 0, q = u({
|
|
21
21
|
currentDelay: 500,
|
|
22
22
|
initialDelay: 500,
|
|
23
23
|
speedDelay: 75,
|
|
24
24
|
timeout: null
|
|
25
|
-
}),
|
|
25
|
+
}), J = u(null), Fe = u(W);
|
|
26
|
+
te(() => {
|
|
27
|
+
Fe.current = W;
|
|
28
|
+
}, [W]);
|
|
29
|
+
let Y = {
|
|
26
30
|
...re,
|
|
27
|
-
...
|
|
31
|
+
...oe
|
|
28
32
|
};
|
|
29
33
|
a(e, {
|
|
30
34
|
"aria-activedescendant": s,
|
|
31
35
|
"aria-autocomplete": g,
|
|
32
|
-
"aria-controls":
|
|
33
|
-
"aria-describedby":
|
|
34
|
-
"aria-expanded":
|
|
35
|
-
"aria-haspopup":
|
|
36
|
-
"aria-labelledby":
|
|
37
|
-
"aria-owns":
|
|
38
|
-
"aria-required":
|
|
39
|
-
assistiveText:
|
|
40
|
-
autoComplete:
|
|
41
|
-
children:
|
|
42
|
-
className:
|
|
43
|
-
defaultValue:
|
|
44
|
-
disabled:
|
|
45
|
-
errorText:
|
|
46
|
-
fieldLevelHelpTooltip:
|
|
47
|
-
fixedTextLeft:
|
|
48
|
-
fixedTextRight:
|
|
49
|
-
hasSpinner:
|
|
50
|
-
iconLeft:
|
|
51
|
-
iconRight:
|
|
52
|
-
id:
|
|
53
|
-
inlineHelpText:
|
|
54
|
-
inlineEditTrigger:
|
|
55
|
-
inputRef:
|
|
56
|
-
isStatic:
|
|
57
|
-
label:
|
|
58
|
-
maxLength:
|
|
59
|
-
maxValue:
|
|
60
|
-
minLength:
|
|
61
|
-
minValue:
|
|
62
|
-
name:
|
|
63
|
-
onBlur:
|
|
64
|
-
onChange:
|
|
65
|
-
onClick:
|
|
66
|
-
onFocus:
|
|
67
|
-
onInput:
|
|
68
|
-
onInvalid:
|
|
69
|
-
onKeyDown:
|
|
70
|
-
onKeyPress:
|
|
71
|
-
onKeyUp:
|
|
72
|
-
onSelect:
|
|
73
|
-
onSubmit:
|
|
74
|
-
placeholder:
|
|
75
|
-
readOnly:
|
|
76
|
-
required:
|
|
77
|
-
role:
|
|
78
|
-
step:
|
|
79
|
-
tabIndex:
|
|
80
|
-
styleContainer:
|
|
81
|
-
styleInput:
|
|
82
|
-
type:
|
|
83
|
-
value:
|
|
84
|
-
variant:
|
|
36
|
+
"aria-controls": ie,
|
|
37
|
+
"aria-describedby": ae,
|
|
38
|
+
"aria-expanded": _,
|
|
39
|
+
"aria-haspopup": v,
|
|
40
|
+
"aria-labelledby": y,
|
|
41
|
+
"aria-owns": b,
|
|
42
|
+
"aria-required": x,
|
|
43
|
+
assistiveText: Y,
|
|
44
|
+
autoComplete: se,
|
|
45
|
+
children: ce,
|
|
46
|
+
className: le,
|
|
47
|
+
defaultValue: ue,
|
|
48
|
+
disabled: S,
|
|
49
|
+
errorText: C,
|
|
50
|
+
fieldLevelHelpTooltip: w,
|
|
51
|
+
fixedTextLeft: de,
|
|
52
|
+
fixedTextRight: fe,
|
|
53
|
+
hasSpinner: pe,
|
|
54
|
+
iconLeft: T,
|
|
55
|
+
iconRight: E,
|
|
56
|
+
id: K,
|
|
57
|
+
inlineHelpText: D,
|
|
58
|
+
inlineEditTrigger: O,
|
|
59
|
+
inputRef: k,
|
|
60
|
+
isStatic: A,
|
|
61
|
+
label: j,
|
|
62
|
+
maxLength: M,
|
|
63
|
+
maxValue: N,
|
|
64
|
+
minLength: P,
|
|
65
|
+
minValue: F,
|
|
66
|
+
name: I,
|
|
67
|
+
onBlur: L,
|
|
68
|
+
onChange: R,
|
|
69
|
+
onClick: z,
|
|
70
|
+
onFocus: B,
|
|
71
|
+
onInput: he,
|
|
72
|
+
onInvalid: ge,
|
|
73
|
+
onKeyDown: _e,
|
|
74
|
+
onKeyPress: ve,
|
|
75
|
+
onKeyUp: ye,
|
|
76
|
+
onSelect: be,
|
|
77
|
+
onSubmit: xe,
|
|
78
|
+
placeholder: Se,
|
|
79
|
+
readOnly: V,
|
|
80
|
+
required: H,
|
|
81
|
+
role: Ce,
|
|
82
|
+
step: U,
|
|
83
|
+
tabIndex: we,
|
|
84
|
+
styleContainer: Te,
|
|
85
|
+
styleInput: Ee,
|
|
86
|
+
type: De,
|
|
87
|
+
value: W,
|
|
88
|
+
variant: G
|
|
85
89
|
}, ee);
|
|
86
|
-
let
|
|
87
|
-
|
|
90
|
+
let Ie = (e) => e === void 0 || e === "" ? 0 : Number(e), X = c(() => {
|
|
91
|
+
q.current.timeout && clearTimeout(q.current.timeout), q.current.currentDelay = q.current.initialDelay, J.current = null;
|
|
88
92
|
}, []), Z = c((e, t) => {
|
|
89
|
-
|
|
90
|
-
let n = t ??
|
|
91
|
-
if (e === m &&
|
|
92
|
-
else if (e === h &&
|
|
93
|
+
q.current.timeout && clearTimeout(q.current.timeout), t && (J.current = t);
|
|
94
|
+
let n = t ?? J.current ?? void 0, r = U === void 0 ? 1 : Number(U), i = Ie(Fe.current), a = !1;
|
|
95
|
+
if (e === m && N !== void 0 && i > N) i = Number(N), a = !0;
|
|
96
|
+
else if (e === h && F !== void 0 && i < F) i = Number(F), a = !0;
|
|
93
97
|
else {
|
|
94
98
|
let t = String(r).search(/\./) >= 0 ? String(r).split(".")[1].length : 0, n = 0;
|
|
95
|
-
|
|
99
|
+
F !== void 0 && (n = (i - F) % r), i = n > 0 ? e === m ? i - n : i + (r - n) : e === m ? i - r : i + r, i = Number(i.toFixed(t)), !(N !== void 0 && i > N) && !(F !== void 0 && i < F) && (a = !0);
|
|
96
100
|
}
|
|
97
|
-
a &&
|
|
101
|
+
a && R && n && R(n, {
|
|
98
102
|
number: i,
|
|
99
103
|
value: String(i)
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
},
|
|
104
|
+
}), e === h && N !== void 0 && i >= N || e === m && F !== void 0 && i <= F ? X() : q.current.timeout = setTimeout(() => {
|
|
105
|
+
q.current.currentDelay = q.current.speedDelay, Z(e);
|
|
106
|
+
}, q.current.currentDelay);
|
|
103
107
|
}, [
|
|
104
|
-
Y,
|
|
105
|
-
j,
|
|
106
108
|
N,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
])
|
|
112
|
-
|
|
113
|
-
let ze = c((e) => {
|
|
114
|
-
G.current = e, D && D(e);
|
|
115
|
-
}, [D]), Be = c((e) => {
|
|
116
|
-
if (I) {
|
|
109
|
+
F,
|
|
110
|
+
R,
|
|
111
|
+
U,
|
|
112
|
+
X
|
|
113
|
+
]), Le = c((e) => {
|
|
114
|
+
if (R) {
|
|
117
115
|
let t = { value: e.target.value };
|
|
118
|
-
|
|
116
|
+
G === p && (t.number = Number(t.value)), R(e, t);
|
|
119
117
|
}
|
|
120
|
-
}, [
|
|
121
|
-
let n =
|
|
122
|
-
return (
|
|
123
|
-
assistiveText: { icon:
|
|
118
|
+
}, [R, G]), Re = (e) => {
|
|
119
|
+
let n = Ie(W), r = !1;
|
|
120
|
+
return (S || e === h && N !== void 0 && n >= N || e === m && F !== void 0 && n <= F) && (r = !0), /* @__PURE__ */ f(t, {
|
|
121
|
+
assistiveText: { icon: Y[e.toLowerCase()] },
|
|
124
122
|
className: d("slds-button_icon-small", `slds-input__button_${e.toLowerCase()}`),
|
|
125
123
|
disabled: r,
|
|
126
124
|
iconCategory: "utility",
|
|
@@ -137,90 +135,89 @@ var p = "counter", m = "Decrement", h = "Increment", re = {
|
|
|
137
135
|
variant: "icon"
|
|
138
136
|
});
|
|
139
137
|
}, Q = null, $ = null;
|
|
140
|
-
|
|
141
|
-
let
|
|
138
|
+
T ? Q = o.isValidElement(T) ? o.cloneElement(T, { iconPosition: "left" }) : T : G === p && !A && !V && (Q = Re(m)), E ? $ = o.isValidElement(E) ? o.cloneElement(E, { iconPosition: "right" }) : E : G === p && !A && !V && ($ = Re(h));
|
|
139
|
+
let ze = j || Y?.label;
|
|
142
140
|
return /* @__PURE__ */ ne("div", {
|
|
143
|
-
className: d("slds-form-element", { "slds-has-error":
|
|
144
|
-
style:
|
|
145
|
-
ref:
|
|
141
|
+
className: d("slds-form-element", { "slds-has-error": C }, le),
|
|
142
|
+
style: Te,
|
|
143
|
+
ref: Oe,
|
|
146
144
|
children: [
|
|
147
145
|
/* @__PURE__ */ f(r, {
|
|
148
|
-
assistiveText:
|
|
149
|
-
htmlFor:
|
|
150
|
-
label:
|
|
151
|
-
required:
|
|
152
|
-
variant:
|
|
146
|
+
assistiveText: Y,
|
|
147
|
+
htmlFor: A ? void 0 : K,
|
|
148
|
+
label: j,
|
|
149
|
+
required: H,
|
|
150
|
+
variant: A ? "static" : "base"
|
|
153
151
|
}),
|
|
154
|
-
|
|
155
|
-
assistiveText: { triggerLearnMoreIcon:
|
|
156
|
-
fieldLevelHelpTooltip:
|
|
152
|
+
w && ze ? /* @__PURE__ */ f(i, {
|
|
153
|
+
assistiveText: { triggerLearnMoreIcon: Y.fieldLevelHelpButton },
|
|
154
|
+
fieldLevelHelpTooltip: w
|
|
157
155
|
}) : null,
|
|
158
156
|
/* @__PURE__ */ f(n, {
|
|
159
157
|
"aria-activedescendant": s,
|
|
160
158
|
"aria-autocomplete": g,
|
|
161
|
-
"aria-controls":
|
|
162
|
-
"aria-labelledby":
|
|
163
|
-
"aria-describedby":
|
|
164
|
-
"aria-expanded":
|
|
165
|
-
"aria-haspopup":
|
|
166
|
-
"aria-owns":
|
|
167
|
-
"aria-required":
|
|
168
|
-
autoComplete:
|
|
159
|
+
"aria-controls": ie,
|
|
160
|
+
"aria-labelledby": y,
|
|
161
|
+
"aria-describedby": Pe,
|
|
162
|
+
"aria-expanded": _,
|
|
163
|
+
"aria-haspopup": v,
|
|
164
|
+
"aria-owns": b,
|
|
165
|
+
"aria-required": x,
|
|
166
|
+
autoComplete: se,
|
|
169
167
|
className: d({
|
|
170
|
-
"slds-input_counter":
|
|
171
|
-
"slds-p-horizontal_none":
|
|
168
|
+
"slds-input_counter": G === p,
|
|
169
|
+
"slds-p-horizontal_none": G === p && V
|
|
172
170
|
}),
|
|
173
171
|
containerProps: { className: "slds-form-element__control" },
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
id: W,
|
|
172
|
+
disabled: S,
|
|
173
|
+
fixedTextLeft: de,
|
|
174
|
+
fixedTextRight: fe,
|
|
175
|
+
hasSpinner: pe,
|
|
176
|
+
id: K,
|
|
180
177
|
iconLeft: Q,
|
|
181
178
|
iconRight: $,
|
|
182
|
-
inlineEditTrigger:
|
|
183
|
-
isStatic:
|
|
184
|
-
minLength:
|
|
185
|
-
minValue:
|
|
186
|
-
maxLength:
|
|
187
|
-
maxValue:
|
|
188
|
-
name:
|
|
189
|
-
onBlur:
|
|
190
|
-
onChange:
|
|
191
|
-
onClick:
|
|
192
|
-
onFocus:
|
|
193
|
-
onInput:
|
|
194
|
-
onInvalid:
|
|
195
|
-
onKeyDown:
|
|
196
|
-
onKeyPress:
|
|
197
|
-
onKeyUp:
|
|
198
|
-
onSelect:
|
|
199
|
-
onSubmit:
|
|
200
|
-
placeholder:
|
|
201
|
-
inputRef:
|
|
202
|
-
readOnly:
|
|
203
|
-
required:
|
|
204
|
-
role:
|
|
205
|
-
assistiveText:
|
|
206
|
-
type:
|
|
207
|
-
value:
|
|
208
|
-
variant:
|
|
209
|
-
step:
|
|
210
|
-
tabIndex:
|
|
211
|
-
style:
|
|
179
|
+
inlineEditTrigger: O,
|
|
180
|
+
isStatic: A,
|
|
181
|
+
minLength: P,
|
|
182
|
+
minValue: F,
|
|
183
|
+
maxLength: M,
|
|
184
|
+
maxValue: N,
|
|
185
|
+
name: I,
|
|
186
|
+
onBlur: L,
|
|
187
|
+
onChange: Le,
|
|
188
|
+
onClick: z,
|
|
189
|
+
onFocus: B,
|
|
190
|
+
onInput: he,
|
|
191
|
+
onInvalid: ge,
|
|
192
|
+
onKeyDown: _e,
|
|
193
|
+
onKeyPress: ve,
|
|
194
|
+
onKeyUp: ye,
|
|
195
|
+
onSelect: be,
|
|
196
|
+
onSubmit: xe,
|
|
197
|
+
placeholder: Se,
|
|
198
|
+
inputRef: k,
|
|
199
|
+
readOnly: V,
|
|
200
|
+
required: H,
|
|
201
|
+
role: Ce,
|
|
202
|
+
assistiveText: Y,
|
|
203
|
+
type: G === p ? "number" : De,
|
|
204
|
+
value: W,
|
|
205
|
+
variant: G,
|
|
206
|
+
step: U,
|
|
207
|
+
tabIndex: we,
|
|
208
|
+
style: Ee
|
|
212
209
|
}),
|
|
213
|
-
|
|
214
|
-
id:
|
|
210
|
+
D && /* @__PURE__ */ f("div", {
|
|
211
|
+
id: Ne,
|
|
215
212
|
className: "slds-form-element__help",
|
|
216
|
-
children:
|
|
213
|
+
children: D
|
|
217
214
|
}),
|
|
218
|
-
|
|
219
|
-
id:
|
|
215
|
+
C && /* @__PURE__ */ f("div", {
|
|
216
|
+
id: Me,
|
|
220
217
|
className: "slds-form-element__help",
|
|
221
|
-
children:
|
|
218
|
+
children: C
|
|
222
219
|
}),
|
|
223
|
-
|
|
220
|
+
ce
|
|
224
221
|
]
|
|
225
222
|
});
|
|
226
223
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/input/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseId,\n\tuseRef,\n\tuseReducer,\n\tuseCallback,\n\tforwardRef,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype ChangeEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\ttype MouseEvent,\n\ttype FormEvent,\n\ttype CSSProperties,\n\ttype AriaAttributes,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport InnerInput from './private/inner-input';\nimport Label from '../utilities/label/index';\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport type { TooltipProps } from '../tooltip/index';\n\nimport checkProps from './check-props';\nimport { INPUT } from '../../utilities/constants';\nimport componentDoc from './component.json';\n\nconst COUNTER = 'counter';\nconst DECREMENT = 'Decrement';\nconst INCREMENT = 'Increment';\n\n/**\n * Input type options\n */\nexport type InputType =\n\t| 'text'\n\t| 'password'\n\t| 'datetime'\n\t| 'datetime-local'\n\t| 'date'\n\t| 'month'\n\t| 'time'\n\t| 'week'\n\t| 'number'\n\t| 'email'\n\t| 'url'\n\t| 'search'\n\t| 'tel'\n\t| 'color';\n\n/**\n * Input variant options\n */\nexport type InputVariant = 'base' | 'counter';\n\n/**\n * Assistive text for Input accessibility\n */\nexport interface InputAssistiveText {\n\t/** Visually hidden label for screen readers */\n\tlabel?: string;\n\t/** Text for loading spinner icon */\n\tspinner?: string;\n\t/** Text for decrement button in counter variant */\n\tdecrement?: string;\n\t/** Text for increment button in counter variant */\n\tincrement?: string;\n\t/** Text for field level help button */\n\tfieldLevelHelpButton?: string;\n}\n\n/**\n * Data passed to onChange callback\n */\nexport interface InputChangeData {\n\t/** The input value as string */\n\tvalue: string;\n\t/** The input value as number (only for counter variant) */\n\tnumber?: number;\n}\n\n/**\n * Props for the Input component\n */\nexport interface InputProps {\n\t/** ID of the currently active child in a composite widget */\n\t'aria-activedescendant'?: string;\n\t/** Indicates if suggestions complete the textbox input */\n\t'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both';\n\t/** ID of element controlled by this input */\n\t'aria-controls'?: string;\n\t/** ID of element(s) that describe this input */\n\t'aria-describedby'?: string;\n\t/** Whether a collapsible region is expanded */\n\t'aria-expanded'?: boolean;\n\t/** Indicates the input has a popup */\n\t'aria-haspopup'?: AriaAttributes['aria-haspopup'];\n\t/** ID of element(s) that label this input */\n\t'aria-labelledby'?: string;\n\t/** ID of element(s) owned by this input */\n\t'aria-owns'?: string;\n\t/** Whether input is required */\n\t'aria-required'?: boolean;\n\t/** Assistive text for accessibility */\n\tassistiveText?: InputAssistiveText;\n\t/** Browser autocomplete attribute */\n\tautoComplete?: string;\n\t/** Elements added after the input */\n\tchildren?: ReactNode;\n\t/** CSS classes for the outer container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Initial value for uncontrolled usage */\n\tdefaultValue?: string | number;\n\t/** Disables the input */\n\tdisabled?: boolean;\n\t/** Error message (highlights input as error) */\n\terrorText?: ReactNode;\n\t/** Tooltip component for field-level help */\n\tfieldLevelHelpTooltip?: ReactElement<TooltipProps> | null;\n\t/** Fixed text/node on the left */\n\tfixedTextLeft?: ReactNode;\n\t/** Fixed text/node on the right */\n\tfixedTextRight?: ReactNode;\n\t/** Shows loading spinner inside input */\n\thasSpinner?: boolean;\n\t/** Left-aligned icon (InputIcon instance) */\n\ticonLeft?: ReactNode;\n\t/** Right-aligned icon (InputIcon instance) */\n\ticonRight?: ReactNode;\n\t/** HTML id attribute */\n\tid?: string;\n\t/** Help text below the input */\n\tinlineHelpText?: ReactNode;\n\t/** Inline edit trigger element */\n\tinlineEditTrigger?: ReactNode;\n\t/** Ref callback for the input element */\n\tinputRef?: (element: HTMLInputElement | null) => void;\n\t/** Displays value statically (static input pattern) */\n\tisStatic?: boolean;\n\t/** Label text above input */\n\tlabel?: string;\n\t/** Maximum character length */\n\tmaxLength?: string | number;\n\t/** Maximum value for counter variant */\n\tmaxValue?: number;\n\t/** Minimum character length */\n\tminLength?: string | number;\n\t/** Minimum value for counter variant */\n\tminValue?: number;\n\t/** Form parameter name */\n\tname?: string;\n\t/** Blur event handler */\n\tonBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/** Change event handler */\n\tonChange?: (\n\t\tevent: ChangeEvent<HTMLInputElement> | MouseEvent | KeyboardEvent,\n\t\tdata: InputChangeData\n\t) => void;\n\t/** Click event handler */\n\tonClick?: (event: MouseEvent<HTMLInputElement>) => void;\n\t/** Focus event handler */\n\tonFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/** Input event handler */\n\tonInput?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Invalid event handler */\n\tonInvalid?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Key down event handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key press event handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key up event handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Select event handler */\n\tonSelect?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Submit event handler */\n\tonSubmit?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Placeholder text */\n\tplaceholder?: string;\n\t/** Makes input read-only */\n\treadOnly?: boolean;\n\t/** Highlights as required field */\n\trequired?: boolean;\n\t/** ARIA role */\n\trole?: string;\n\t/** Step size for counter variant */\n\tstep?: number;\n\t/** Tab index */\n\ttabIndex?: string | number;\n\t/** Custom styles for container */\n\tstyleContainer?: CSSProperties;\n\t/** Custom styles for input element */\n\tstyleInput?: CSSProperties;\n\t/** Input type */\n\ttype?: InputType;\n\t/** Controlled value */\n\tvalue?: string | number;\n\t/** Input variant */\n\tvariant?: InputVariant;\n}\n\nconst defaultAssistiveText: InputAssistiveText = {\n\tdecrement: `${DECREMENT} ${COUNTER}`,\n\tincrement: `${INCREMENT} ${COUNTER}`,\n};\n\n/**\n * The HTML `input` with a label and error messaging.\n *\n * @see https://lightningdesignsystem.com/components/input/\n */\nconst Input = forwardRef<HTMLDivElement, InputProps>(\n\t(\n\t\t{\n\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t'aria-controls': ariaControls,\n\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t'aria-owns': ariaOwns,\n\t\t\t'aria-required': ariaRequired,\n\t\t\tassistiveText: propAssistiveText,\n\t\t\tautoComplete,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdefaultValue,\n\t\t\tdisabled = false,\n\t\t\terrorText,\n\t\t\tfieldLevelHelpTooltip,\n\t\t\tfixedTextLeft,\n\t\t\tfixedTextRight,\n\t\t\thasSpinner = false,\n\t\t\ticonLeft: propIconLeft,\n\t\t\ticonRight: propIconRight,\n\t\t\tid: propId,\n\t\t\tinlineHelpText,\n\t\t\tinlineEditTrigger,\n\t\t\tinputRef: propInputRef,\n\t\t\tisStatic = false,\n\t\t\tlabel,\n\t\t\tmaxLength,\n\t\t\tmaxValue,\n\t\t\tminLength,\n\t\t\tminValue,\n\t\t\tname,\n\t\t\tonBlur,\n\t\t\tonChange,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonInput,\n\t\t\tonInvalid,\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonKeyUp,\n\t\t\tonSelect,\n\t\t\tonSubmit,\n\t\t\tplaceholder,\n\t\t\treadOnly = false,\n\t\t\trequired = false,\n\t\t\trole,\n\t\t\tstep,\n\t\t\ttabIndex,\n\t\t\tstyleContainer,\n\t\t\tstyleInput,\n\t\t\ttype = 'text',\n\t\t\tvalue,\n\t\t\tvariant = 'base',\n\t\t},\n\t\tref\n\t) => {\n\t\tconst generatedId = useId();\n\t\tconst generatedErrorId = useId();\n\t\tconst generatedInlineHelpId = useId();\n\t\tconst id = propId || generatedId;\n\t\tconst errorId = errorText ? generatedErrorId : undefined;\n\t\tconst inlineHelpId = inlineHelpText ? generatedInlineHelpId : undefined;\n\t\tconst describedby =\n\t\t\t[ariaDescribedby, inlineHelpId, errorId]\n\t\t\t\t.filter((v): v is string => Boolean(v))\n\t\t\t\t.join(' ') || undefined;\n\n\t\tconst inputElementRef = useRef<HTMLInputElement | null>(null);\n\t\tconst steppingRef = useRef({\n\t\t\tcurrentDelay: 500,\n\t\t\tinitialDelay: 500,\n\t\t\tspeedDelay: 75,\n\t\t\ttimeout: null as ReturnType<typeof setTimeout> | null,\n\t\t});\n\t\tconst lastStepEventRef = useRef<MouseEvent | KeyboardEvent | null>(null);\n\t\t// Latest `performStep`, so the repeat timer of a held counter button\n\t\t// reads current props (such as a controlled `value`) on every step.\n\t\tconst performStepRef = useRef<\n\t\t\t(\n\t\t\t\tdirection: typeof INCREMENT | typeof DECREMENT,\n\t\t\t\tevent?: MouseEvent | KeyboardEvent\n\t\t\t) => void\n\t\t>(() => {});\n\t\t// Re-renders after an uncontrolled step, so the counter buttons' disabled\n\t\t// state reflects the value written directly to the input element.\n\t\tconst [, forceRender] = useReducer((count: number) => count + 1, 0);\n\n\t\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\n\t\t// Check props in development\n\t\tcheckProps(\n\t\t\tINPUT,\n\t\t\t{\n\t\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t\t'aria-controls': ariaControls,\n\t\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t\t'aria-owns': ariaOwns,\n\t\t\t\t'aria-required': ariaRequired,\n\t\t\t\tassistiveText,\n\t\t\t\tautoComplete,\n\t\t\t\tchildren,\n\t\t\t\tclassName,\n\t\t\t\tdefaultValue,\n\t\t\t\tdisabled,\n\t\t\t\terrorText,\n\t\t\t\tfieldLevelHelpTooltip,\n\t\t\t\tfixedTextLeft,\n\t\t\t\tfixedTextRight,\n\t\t\t\thasSpinner,\n\t\t\t\ticonLeft: propIconLeft,\n\t\t\t\ticonRight: propIconRight,\n\t\t\t\tid,\n\t\t\t\tinlineHelpText,\n\t\t\t\tinlineEditTrigger,\n\t\t\t\tinputRef: propInputRef,\n\t\t\t\tisStatic,\n\t\t\t\tlabel,\n\t\t\t\tmaxLength,\n\t\t\t\tmaxValue,\n\t\t\t\tminLength,\n\t\t\t\tminValue,\n\t\t\t\tname,\n\t\t\t\tonBlur,\n\t\t\t\tonChange,\n\t\t\t\tonClick,\n\t\t\t\tonFocus,\n\t\t\t\tonInput,\n\t\t\t\tonInvalid,\n\t\t\t\tonKeyDown,\n\t\t\t\tonKeyPress,\n\t\t\t\tonKeyUp,\n\t\t\t\tonSelect,\n\t\t\t\tonSubmit,\n\t\t\t\tplaceholder,\n\t\t\t\treadOnly,\n\t\t\t\trequired,\n\t\t\t\trole,\n\t\t\t\tstep,\n\t\t\t\ttabIndex,\n\t\t\t\tstyleContainer,\n\t\t\t\tstyleInput,\n\t\t\t\ttype,\n\t\t\t\tvalue,\n\t\t\t\tvariant,\n\t\t\t},\n\t\t\tcomponentDoc\n\t\t);\n\n\t\tconst getValueAsNumber = useCallback((): number => {\n\t\t\tif (value !== undefined) {\n\t\t\t\treturn Number(value);\n\t\t\t}\n\t\t\tif (inputElementRef.current) {\n\t\t\t\treturn Number(inputElementRef.current.value);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}, [value]);\n\n\t\tconst stopStepping = useCallback(() => {\n\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t}\n\t\t\tsteppingRef.current.currentDelay = steppingRef.current.initialDelay;\n\t\t\tlastStepEventRef.current = null;\n\t\t}, []);\n\n\t\tconst performStep = useCallback(\n\t\t\t(\n\t\t\t\tdirection: typeof INCREMENT | typeof DECREMENT,\n\t\t\t\tevent?: MouseEvent | KeyboardEvent\n\t\t\t) => {\n\t\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t\t}\n\n\t\t\t\tif (event) {\n\t\t\t\t\tlastStepEventRef.current = event;\n\t\t\t\t}\n\t\t\t\tconst stepEvent = event ?? lastStepEventRef.current ?? undefined;\n\n\t\t\t\tconst stepSize = step !== undefined ? Number(step) : 1;\n\t\t\t\tlet currentValue = getValueAsNumber();\n\t\t\t\tlet valueChanged = false;\n\n\t\t\t\tif (\n\t\t\t\t\tdirection === DECREMENT &&\n\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\tcurrentValue > maxValue\n\t\t\t\t) {\n\t\t\t\t\tcurrentValue = Number(maxValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else if (\n\t\t\t\t\tdirection === INCREMENT &&\n\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\tcurrentValue < minValue\n\t\t\t\t) {\n\t\t\t\t\tcurrentValue = Number(minValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else {\n\t\t\t\t\tconst decimalPlaces =\n\t\t\t\t\t\tString(stepSize).search(/\\./) >= 0\n\t\t\t\t\t\t\t? String(stepSize).split('.')[1].length\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\tlet minOverflow = 0;\n\n\t\t\t\t\tif (minValue !== undefined) {\n\t\t\t\t\t\tminOverflow = (currentValue - minValue) % stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (minOverflow > 0) {\n\t\t\t\t\t\tcurrentValue =\n\t\t\t\t\t\t\tdirection === DECREMENT\n\t\t\t\t\t\t\t\t? currentValue - minOverflow\n\t\t\t\t\t\t\t\t: currentValue + (stepSize - minOverflow);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentValue =\n\t\t\t\t\t\t\tdirection === DECREMENT\n\t\t\t\t\t\t\t\t? currentValue - stepSize\n\t\t\t\t\t\t\t\t: currentValue + stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentValue = Number(currentValue.toFixed(decimalPlaces));\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!(maxValue !== undefined && currentValue > maxValue) &&\n\t\t\t\t\t\t!(minValue !== undefined && currentValue < minValue)\n\t\t\t\t\t) {\n\t\t\t\t\t\tvalueChanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (valueChanged) {\n\t\t\t\t\tif (value === undefined && inputElementRef.current) {\n\t\t\t\t\t\t// Uncontrolled mode\n\t\t\t\t\t\tinputElementRef.current.value = String(currentValue);\n\t\t\t\t\t\tforceRender();\n\t\t\t\t\t}\n\t\t\t\t\tif (onChange && stepEvent) {\n\t\t\t\t\t\tonChange(stepEvent, {\n\t\t\t\t\t\t\tnumber: currentValue,\n\t\t\t\t\t\t\tvalue: String(currentValue),\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(direction === INCREMENT &&\n\t\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\t\tcurrentValue >= maxValue) ||\n\t\t\t\t\t(direction === DECREMENT &&\n\t\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\t\tcurrentValue <= minValue)\n\t\t\t\t) {\n\t\t\t\t\tstopStepping();\n\t\t\t\t} else {\n\t\t\t\t\tsteppingRef.current.timeout = setTimeout(() => {\n\t\t\t\t\t\tsteppingRef.current.currentDelay = steppingRef.current.speedDelay;\n\t\t\t\t\t\tperformStepRef.current(direction);\n\t\t\t\t\t}, steppingRef.current.currentDelay);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[\n\t\t\t\tgetValueAsNumber,\n\t\t\t\tmaxValue,\n\t\t\t\tminValue,\n\t\t\t\tonChange,\n\t\t\t\tstep,\n\t\t\t\tstopStepping,\n\t\t\t\tvalue,\n\t\t\t]\n\t\t);\n\t\tperformStepRef.current = performStep;\n\n\t\tconst setInputRef = useCallback(\n\t\t\t(element: HTMLInputElement | null) => {\n\t\t\t\tinputElementRef.current = element;\n\t\t\t\tif (propInputRef) {\n\t\t\t\t\tpropInputRef(element);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[propInputRef]\n\t\t);\n\n\t\tconst handleChange = useCallback(\n\t\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\t\tif (onChange) {\n\t\t\t\t\tconst data: InputChangeData = {\n\t\t\t\t\t\tvalue: event.target.value,\n\t\t\t\t\t};\n\n\t\t\t\t\tif (variant === COUNTER) {\n\t\t\t\t\t\tdata.number = Number(data.value);\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange(event, data);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onChange, variant]\n\t\t);\n\n\t\tconst getCounterButtonIcon = (\n\t\t\tdirection: typeof INCREMENT | typeof DECREMENT\n\t\t) => {\n\t\t\tconst currentValue = getValueAsNumber();\n\t\t\tlet isDisabled = false;\n\n\t\t\tif (\n\t\t\t\tdisabled ||\n\t\t\t\t(direction === INCREMENT &&\n\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\tcurrentValue >= maxValue) ||\n\t\t\t\t(direction === DECREMENT &&\n\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\tcurrentValue <= minValue)\n\t\t\t) {\n\t\t\t\tisDisabled = true;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\ticon: assistiveText[\n\t\t\t\t\t\t\tdirection.toLowerCase() as 'decrement' | 'increment'\n\t\t\t\t\t\t],\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-button_icon-small',\n\t\t\t\t\t\t`slds-input__button_${direction.toLowerCase()}`\n\t\t\t\t\t)}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName={direction === DECREMENT ? 'ban' : 'new'}\n\t\t\t\t\tonKeyDown={(event: KeyboardEvent) => {\n\t\t\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonKeyUp={stopStepping}\n\t\t\t\t\tonMouseDown={(event: MouseEvent) => {\n\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t}}\n\t\t\t\t\tonMouseLeave={stopStepping}\n\t\t\t\t\tonMouseUp={stopStepping}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t);\n\t\t};\n\n\t\t// Compute icon rendering\n\t\tlet iconLeft: ReactNode = null;\n\t\tlet iconRight: ReactNode = null;\n\n\t\tif (propIconLeft) {\n\t\t\ticonLeft = React.isValidElement(propIconLeft)\n\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\tpropIconLeft as React.ReactElement<{ iconPosition?: string }>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ticonPosition: 'left',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t: propIconLeft;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonLeft = getCounterButtonIcon(DECREMENT);\n\t\t}\n\n\t\tif (propIconRight) {\n\t\t\ticonRight = React.isValidElement(propIconRight)\n\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\tpropIconRight as React.ReactElement<{ iconPosition?: string }>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ticonPosition: 'right',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t: propIconRight;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonRight = getCounterButtonIcon(INCREMENT);\n\t\t}\n\n\t\tconst hasRenderedLabel = label || assistiveText?.label;\n\t\tconst inputRefToUse = variant === COUNTER ? setInputRef : propInputRef;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-form-element',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t},\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tstyle={styleContainer}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\thtmlFor={isStatic ? undefined : id}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tvariant={isStatic ? 'static' : 'base'}\n\t\t\t\t/>\n\t\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\ttriggerLearnMoreIcon: assistiveText.fieldLevelHelpButton,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<InnerInput\n\t\t\t\t\taria-activedescendant={ariaActivedescendant}\n\t\t\t\t\taria-autocomplete={ariaAutocomplete}\n\t\t\t\t\taria-controls={ariaControls}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\taria-describedby={describedby}\n\t\t\t\t\taria-expanded={ariaExpanded}\n\t\t\t\t\taria-haspopup={ariaHaspopup}\n\t\t\t\t\taria-owns={ariaOwns}\n\t\t\t\t\taria-required={ariaRequired}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t'slds-input_counter': variant === COUNTER,\n\t\t\t\t\t\t'slds-p-horizontal_none': variant === COUNTER && readOnly,\n\t\t\t\t\t})}\n\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\tclassName: 'slds-form-element__control',\n\t\t\t\t\t}}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tfixedTextLeft={fixedTextLeft}\n\t\t\t\t\tfixedTextRight={fixedTextRight}\n\t\t\t\t\thasSpinner={hasSpinner}\n\t\t\t\t\tid={id}\n\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\ticonRight={iconRight}\n\t\t\t\t\tinlineEditTrigger={inlineEditTrigger}\n\t\t\t\t\tisStatic={isStatic}\n\t\t\t\t\tminLength={minLength}\n\t\t\t\t\tminValue={minValue}\n\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\tmaxValue={maxValue}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonClick={onClick}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonInput={onInput}\n\t\t\t\t\tonInvalid={onInvalid}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonSelect={onSelect}\n\t\t\t\t\tonSubmit={onSubmit}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tinputRef={inputRefToUse}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\trequired={required}\n\t\t\t\t\trole={role}\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\ttype={variant === COUNTER ? 'number' : type}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tstep={step}\n\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t\tstyle={styleInput}\n\t\t\t\t/>\n\t\t\t\t{inlineHelpText && (\n\t\t\t\t\t<div id={inlineHelpId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{inlineHelpText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div id={errorId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nInput.displayName = INPUT;\n\nexport default Input;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/input/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseId,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tforwardRef,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype ChangeEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\ttype MouseEvent,\n\ttype FormEvent,\n\ttype CSSProperties,\n\ttype AriaAttributes,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport InnerInput from './private/inner-input';\nimport Label from '../utilities/label/index';\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport type { TooltipProps } from '../tooltip/index';\n\nimport checkProps from './check-props';\nimport { INPUT } from '../../utilities/constants';\nimport componentDoc from './component.json';\n\nconst COUNTER = 'counter';\nconst DECREMENT = 'Decrement';\nconst INCREMENT = 'Increment';\n\n/**\n * Input type options\n */\nexport type InputType =\n\t| 'text'\n\t| 'password'\n\t| 'datetime'\n\t| 'datetime-local'\n\t| 'date'\n\t| 'month'\n\t| 'time'\n\t| 'week'\n\t| 'number'\n\t| 'email'\n\t| 'url'\n\t| 'search'\n\t| 'tel'\n\t| 'color';\n\n/**\n * Input variant options\n */\nexport type InputVariant = 'base' | 'counter';\n\n/**\n * Assistive text for Input accessibility\n */\nexport interface InputAssistiveText {\n\t/** Visually hidden label for screen readers */\n\tlabel?: string;\n\t/** Text for loading spinner icon */\n\tspinner?: string;\n\t/** Text for decrement button in counter variant */\n\tdecrement?: string;\n\t/** Text for increment button in counter variant */\n\tincrement?: string;\n\t/** Text for field level help button */\n\tfieldLevelHelpButton?: string;\n}\n\n/**\n * Data passed to onChange callback\n */\nexport interface InputChangeData {\n\t/** The input value as string */\n\tvalue: string;\n\t/** The input value as number (only for counter variant) */\n\tnumber?: number;\n}\n\n/**\n * Props for the Input component\n */\nexport interface InputProps {\n\t/** ID of the currently active child in a composite widget */\n\t'aria-activedescendant'?: string;\n\t/** Indicates if suggestions complete the textbox input */\n\t'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both';\n\t/** ID of element controlled by this input */\n\t'aria-controls'?: string;\n\t/** ID of element(s) that describe this input */\n\t'aria-describedby'?: string;\n\t/** Whether a collapsible region is expanded */\n\t'aria-expanded'?: boolean;\n\t/** Indicates the input has a popup */\n\t'aria-haspopup'?: AriaAttributes['aria-haspopup'];\n\t/** ID of element(s) that label this input */\n\t'aria-labelledby'?: string;\n\t/** ID of element(s) owned by this input */\n\t'aria-owns'?: string;\n\t/** Whether input is required */\n\t'aria-required'?: boolean;\n\t/** Assistive text for accessibility */\n\tassistiveText?: InputAssistiveText;\n\t/** Browser autocomplete attribute */\n\tautoComplete?: string;\n\t/** Elements added after the input */\n\tchildren?: ReactNode;\n\t/** CSS classes for the outer container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Disables the input */\n\tdisabled?: boolean;\n\t/** Error message (highlights input as error) */\n\terrorText?: ReactNode;\n\t/** Tooltip component for field-level help */\n\tfieldLevelHelpTooltip?: ReactElement<TooltipProps> | null;\n\t/** Fixed text/node on the left */\n\tfixedTextLeft?: ReactNode;\n\t/** Fixed text/node on the right */\n\tfixedTextRight?: ReactNode;\n\t/** Shows loading spinner inside input */\n\thasSpinner?: boolean;\n\t/** Left-aligned icon (InputIcon instance) */\n\ticonLeft?: ReactNode;\n\t/** Right-aligned icon (InputIcon instance) */\n\ticonRight?: ReactNode;\n\t/** HTML id attribute */\n\tid?: string;\n\t/** Help text below the input */\n\tinlineHelpText?: ReactNode;\n\t/** Inline edit trigger element */\n\tinlineEditTrigger?: ReactNode;\n\t/** Ref callback for the input element */\n\tinputRef?: (element: HTMLInputElement | null) => void;\n\t/** Displays value statically (static input pattern) */\n\tisStatic?: boolean;\n\t/** Label text above input */\n\tlabel?: string;\n\t/** Maximum character length */\n\tmaxLength?: string | number;\n\t/** Maximum value for counter variant */\n\tmaxValue?: number;\n\t/** Minimum character length */\n\tminLength?: string | number;\n\t/** Minimum value for counter variant */\n\tminValue?: number;\n\t/** Form parameter name */\n\tname?: string;\n\t/** Blur event handler */\n\tonBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/**\n\t * Called with the requested value when the user types or, for the counter\n\t * variant, presses the increment/decrement buttons. Input is controlled: set\n\t * `value` from `data.value` (or `data.number`) to accept the change.\n\t */\n\tonChange?: (\n\t\tevent: ChangeEvent<HTMLInputElement> | MouseEvent | KeyboardEvent,\n\t\tdata: InputChangeData\n\t) => void;\n\t/** Click event handler */\n\tonClick?: (event: MouseEvent<HTMLInputElement>) => void;\n\t/** Focus event handler */\n\tonFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/** Input event handler */\n\tonInput?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Invalid event handler */\n\tonInvalid?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Key down event handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key press event handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key up event handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Select event handler */\n\tonSelect?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Submit event handler */\n\tonSubmit?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Placeholder text */\n\tplaceholder?: string;\n\t/** Makes input read-only */\n\treadOnly?: boolean;\n\t/** Highlights as required field */\n\trequired?: boolean;\n\t/** ARIA role */\n\trole?: string;\n\t/** Step size for counter variant */\n\tstep?: number;\n\t/** Tab index */\n\ttabIndex?: string | number;\n\t/** Custom styles for container */\n\tstyleContainer?: CSSProperties;\n\t/** Custom styles for input element */\n\tstyleInput?: CSSProperties;\n\t/** Input type */\n\ttype?: InputType;\n\t/**\n\t * The input's value. Input is controlled: update `value` in `onChange`.\n\t * The counter variant steps from this value. (`defaultValue` was removed\n\t * in v11.)\n\t */\n\tvalue?: string | number;\n\t/** Input variant */\n\tvariant?: InputVariant;\n}\n\n/**\n * Props removed from the public API. Still destructured so they never reach\n * the DOM, and reported by `checkProps`.\n */\ninterface InputRemovedProps {\n\tdefaultValue?: unknown;\n}\n\nconst defaultAssistiveText: InputAssistiveText = {\n\tdecrement: `${DECREMENT} ${COUNTER}`,\n\tincrement: `${INCREMENT} ${COUNTER}`,\n};\n\n/**\n * The HTML `input` with a label and error messaging.\n *\n * @see https://lightningdesignsystem.com/components/input/\n */\nconst Input = forwardRef<HTMLDivElement, InputProps>(\n\t(\n\t\t{\n\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t'aria-controls': ariaControls,\n\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t'aria-owns': ariaOwns,\n\t\t\t'aria-required': ariaRequired,\n\t\t\tassistiveText: propAssistiveText,\n\t\t\tautoComplete,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdefaultValue,\n\t\t\tdisabled = false,\n\t\t\terrorText,\n\t\t\tfieldLevelHelpTooltip,\n\t\t\tfixedTextLeft,\n\t\t\tfixedTextRight,\n\t\t\thasSpinner = false,\n\t\t\ticonLeft: propIconLeft,\n\t\t\ticonRight: propIconRight,\n\t\t\tid: propId,\n\t\t\tinlineHelpText,\n\t\t\tinlineEditTrigger,\n\t\t\tinputRef: propInputRef,\n\t\t\tisStatic = false,\n\t\t\tlabel,\n\t\t\tmaxLength,\n\t\t\tmaxValue,\n\t\t\tminLength,\n\t\t\tminValue,\n\t\t\tname,\n\t\t\tonBlur,\n\t\t\tonChange,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonInput,\n\t\t\tonInvalid,\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonKeyUp,\n\t\t\tonSelect,\n\t\t\tonSubmit,\n\t\t\tplaceholder,\n\t\t\treadOnly = false,\n\t\t\trequired = false,\n\t\t\trole,\n\t\t\tstep,\n\t\t\ttabIndex,\n\t\t\tstyleContainer,\n\t\t\tstyleInput,\n\t\t\ttype = 'text',\n\t\t\tvalue,\n\t\t\tvariant = 'base',\n\t\t}: InputProps & InputRemovedProps,\n\t\tref\n\t) => {\n\t\tconst generatedId = useId();\n\t\tconst generatedErrorId = useId();\n\t\tconst generatedInlineHelpId = useId();\n\t\tconst id = propId || generatedId;\n\t\tconst errorId = errorText ? generatedErrorId : undefined;\n\t\tconst inlineHelpId = inlineHelpText ? generatedInlineHelpId : undefined;\n\t\tconst describedby =\n\t\t\t[ariaDescribedby, inlineHelpId, errorId]\n\t\t\t\t.filter((v): v is string => Boolean(v))\n\t\t\t\t.join(' ') || undefined;\n\n\t\tconst steppingRef = useRef({\n\t\t\tcurrentDelay: 500,\n\t\t\tinitialDelay: 500,\n\t\t\tspeedDelay: 75,\n\t\t\ttimeout: null as ReturnType<typeof setTimeout> | null,\n\t\t});\n\t\tconst lastStepEventRef = useRef<MouseEvent | KeyboardEvent | null>(null);\n\t\t// Latest `value`, so a held-down counter button steps from the value the\n\t\t// parent rendered after the previous step rather than a stale closure.\n\t\tconst valueRef = useRef(value);\n\t\tuseEffect(() => {\n\t\t\tvalueRef.current = value;\n\t\t}, [value]);\n\n\t\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\n\t\t// Check props in development\n\t\tcheckProps(\n\t\t\tINPUT,\n\t\t\t{\n\t\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t\t'aria-controls': ariaControls,\n\t\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t\t'aria-owns': ariaOwns,\n\t\t\t\t'aria-required': ariaRequired,\n\t\t\t\tassistiveText,\n\t\t\t\tautoComplete,\n\t\t\t\tchildren,\n\t\t\t\tclassName,\n\t\t\t\tdefaultValue,\n\t\t\t\tdisabled,\n\t\t\t\terrorText,\n\t\t\t\tfieldLevelHelpTooltip,\n\t\t\t\tfixedTextLeft,\n\t\t\t\tfixedTextRight,\n\t\t\t\thasSpinner,\n\t\t\t\ticonLeft: propIconLeft,\n\t\t\t\ticonRight: propIconRight,\n\t\t\t\tid,\n\t\t\t\tinlineHelpText,\n\t\t\t\tinlineEditTrigger,\n\t\t\t\tinputRef: propInputRef,\n\t\t\t\tisStatic,\n\t\t\t\tlabel,\n\t\t\t\tmaxLength,\n\t\t\t\tmaxValue,\n\t\t\t\tminLength,\n\t\t\t\tminValue,\n\t\t\t\tname,\n\t\t\t\tonBlur,\n\t\t\t\tonChange,\n\t\t\t\tonClick,\n\t\t\t\tonFocus,\n\t\t\t\tonInput,\n\t\t\t\tonInvalid,\n\t\t\t\tonKeyDown,\n\t\t\t\tonKeyPress,\n\t\t\t\tonKeyUp,\n\t\t\t\tonSelect,\n\t\t\t\tonSubmit,\n\t\t\t\tplaceholder,\n\t\t\t\treadOnly,\n\t\t\t\trequired,\n\t\t\t\trole,\n\t\t\t\tstep,\n\t\t\t\ttabIndex,\n\t\t\t\tstyleContainer,\n\t\t\t\tstyleInput,\n\t\t\t\ttype,\n\t\t\t\tvalue,\n\t\t\t\tvariant,\n\t\t\t},\n\t\t\tcomponentDoc\n\t\t);\n\n\t\t// The counter steps from the `value` prop only; it never reads or writes\n\t\t// the DOM value.\n\t\tconst toNumber = (currentValue: string | number | undefined): number =>\n\t\t\tcurrentValue === undefined || currentValue === ''\n\t\t\t\t? 0\n\t\t\t\t: Number(currentValue);\n\n\t\tconst stopStepping = useCallback(() => {\n\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t}\n\t\t\tsteppingRef.current.currentDelay = steppingRef.current.initialDelay;\n\t\t\tlastStepEventRef.current = null;\n\t\t}, []);\n\n\t\tconst performStep = useCallback(\n\t\t\t(\n\t\t\t\tdirection: typeof INCREMENT | typeof DECREMENT,\n\t\t\t\tevent?: MouseEvent | KeyboardEvent\n\t\t\t) => {\n\t\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t\t}\n\n\t\t\t\tif (event) {\n\t\t\t\t\tlastStepEventRef.current = event;\n\t\t\t\t}\n\t\t\t\tconst stepEvent = event ?? lastStepEventRef.current ?? undefined;\n\n\t\t\t\tconst stepSize = step !== undefined ? Number(step) : 1;\n\t\t\t\tlet currentValue = toNumber(valueRef.current);\n\t\t\t\tlet valueChanged = false;\n\n\t\t\t\tif (\n\t\t\t\t\tdirection === DECREMENT &&\n\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\tcurrentValue > maxValue\n\t\t\t\t) {\n\t\t\t\t\tcurrentValue = Number(maxValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else if (\n\t\t\t\t\tdirection === INCREMENT &&\n\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\tcurrentValue < minValue\n\t\t\t\t) {\n\t\t\t\t\tcurrentValue = Number(minValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else {\n\t\t\t\t\tconst decimalPlaces =\n\t\t\t\t\t\tString(stepSize).search(/\\./) >= 0\n\t\t\t\t\t\t\t? String(stepSize).split('.')[1].length\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\tlet minOverflow = 0;\n\n\t\t\t\t\tif (minValue !== undefined) {\n\t\t\t\t\t\tminOverflow = (currentValue - minValue) % stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (minOverflow > 0) {\n\t\t\t\t\t\tcurrentValue =\n\t\t\t\t\t\t\tdirection === DECREMENT\n\t\t\t\t\t\t\t\t? currentValue - minOverflow\n\t\t\t\t\t\t\t\t: currentValue + (stepSize - minOverflow);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentValue =\n\t\t\t\t\t\t\tdirection === DECREMENT\n\t\t\t\t\t\t\t\t? currentValue - stepSize\n\t\t\t\t\t\t\t\t: currentValue + stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentValue = Number(currentValue.toFixed(decimalPlaces));\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!(maxValue !== undefined && currentValue > maxValue) &&\n\t\t\t\t\t\t!(minValue !== undefined && currentValue < minValue)\n\t\t\t\t\t) {\n\t\t\t\t\t\tvalueChanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (valueChanged) {\n\t\t\t\t\tif (onChange && stepEvent) {\n\t\t\t\t\t\tonChange(stepEvent, {\n\t\t\t\t\t\t\tnumber: currentValue,\n\t\t\t\t\t\t\tvalue: String(currentValue),\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(direction === INCREMENT &&\n\t\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\t\tcurrentValue >= maxValue) ||\n\t\t\t\t\t(direction === DECREMENT &&\n\t\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\t\tcurrentValue <= minValue)\n\t\t\t\t) {\n\t\t\t\t\tstopStepping();\n\t\t\t\t} else {\n\t\t\t\t\tsteppingRef.current.timeout = setTimeout(() => {\n\t\t\t\t\t\tsteppingRef.current.currentDelay = steppingRef.current.speedDelay;\n\t\t\t\t\t\tperformStep(direction);\n\t\t\t\t\t}, steppingRef.current.currentDelay);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[maxValue, minValue, onChange, step, stopStepping]\n\t\t);\n\n\t\tconst handleChange = useCallback(\n\t\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\t\tif (onChange) {\n\t\t\t\t\tconst data: InputChangeData = {\n\t\t\t\t\t\tvalue: event.target.value,\n\t\t\t\t\t};\n\n\t\t\t\t\tif (variant === COUNTER) {\n\t\t\t\t\t\tdata.number = Number(data.value);\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange(event, data);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onChange, variant]\n\t\t);\n\n\t\tconst getCounterButtonIcon = (\n\t\t\tdirection: typeof INCREMENT | typeof DECREMENT\n\t\t) => {\n\t\t\tconst currentValue = toNumber(value);\n\t\t\tlet isDisabled = false;\n\n\t\t\tif (\n\t\t\t\tdisabled ||\n\t\t\t\t(direction === INCREMENT &&\n\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\tcurrentValue >= maxValue) ||\n\t\t\t\t(direction === DECREMENT &&\n\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\tcurrentValue <= minValue)\n\t\t\t) {\n\t\t\t\tisDisabled = true;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\ticon: assistiveText[\n\t\t\t\t\t\t\tdirection.toLowerCase() as 'decrement' | 'increment'\n\t\t\t\t\t\t],\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-button_icon-small',\n\t\t\t\t\t\t`slds-input__button_${direction.toLowerCase()}`\n\t\t\t\t\t)}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName={direction === DECREMENT ? 'ban' : 'new'}\n\t\t\t\t\tonKeyDown={(event: KeyboardEvent) => {\n\t\t\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonKeyUp={stopStepping}\n\t\t\t\t\tonMouseDown={(event: MouseEvent) => {\n\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t}}\n\t\t\t\t\tonMouseLeave={stopStepping}\n\t\t\t\t\tonMouseUp={stopStepping}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t);\n\t\t};\n\n\t\t// Compute icon rendering\n\t\tlet iconLeft: ReactNode = null;\n\t\tlet iconRight: ReactNode = null;\n\n\t\tif (propIconLeft) {\n\t\t\ticonLeft = React.isValidElement(propIconLeft)\n\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\tpropIconLeft as React.ReactElement<{ iconPosition?: string }>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ticonPosition: 'left',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t: propIconLeft;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonLeft = getCounterButtonIcon(DECREMENT);\n\t\t}\n\n\t\tif (propIconRight) {\n\t\t\ticonRight = React.isValidElement(propIconRight)\n\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\tpropIconRight as React.ReactElement<{ iconPosition?: string }>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ticonPosition: 'right',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t: propIconRight;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonRight = getCounterButtonIcon(INCREMENT);\n\t\t}\n\n\t\tconst hasRenderedLabel = label || assistiveText?.label;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-form-element',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t},\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tstyle={styleContainer}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\thtmlFor={isStatic ? undefined : id}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tvariant={isStatic ? 'static' : 'base'}\n\t\t\t\t/>\n\t\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\ttriggerLearnMoreIcon: assistiveText.fieldLevelHelpButton,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<InnerInput\n\t\t\t\t\taria-activedescendant={ariaActivedescendant}\n\t\t\t\t\taria-autocomplete={ariaAutocomplete}\n\t\t\t\t\taria-controls={ariaControls}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\taria-describedby={describedby}\n\t\t\t\t\taria-expanded={ariaExpanded}\n\t\t\t\t\taria-haspopup={ariaHaspopup}\n\t\t\t\t\taria-owns={ariaOwns}\n\t\t\t\t\taria-required={ariaRequired}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t'slds-input_counter': variant === COUNTER,\n\t\t\t\t\t\t'slds-p-horizontal_none': variant === COUNTER && readOnly,\n\t\t\t\t\t})}\n\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\tclassName: 'slds-form-element__control',\n\t\t\t\t\t}}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tfixedTextLeft={fixedTextLeft}\n\t\t\t\t\tfixedTextRight={fixedTextRight}\n\t\t\t\t\thasSpinner={hasSpinner}\n\t\t\t\t\tid={id}\n\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\ticonRight={iconRight}\n\t\t\t\t\tinlineEditTrigger={inlineEditTrigger}\n\t\t\t\t\tisStatic={isStatic}\n\t\t\t\t\tminLength={minLength}\n\t\t\t\t\tminValue={minValue}\n\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\tmaxValue={maxValue}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonClick={onClick}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonInput={onInput}\n\t\t\t\t\tonInvalid={onInvalid}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonSelect={onSelect}\n\t\t\t\t\tonSubmit={onSubmit}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tinputRef={propInputRef}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\trequired={required}\n\t\t\t\t\trole={role}\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\ttype={variant === COUNTER ? 'number' : type}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tstep={step}\n\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t\tstyle={styleInput}\n\t\t\t\t/>\n\t\t\t\t{inlineHelpText && (\n\t\t\t\t\t<div id={inlineHelpId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{inlineHelpText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div id={errorId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nInput.displayName = INPUT;\n\nexport default Input;\n"],"mappings":"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AAW,EACV,qBACA,EACC,kBAAkB,EACnB,GACA,EACD;EACA,OAAO;EACF;EATN,UAAA;GAWC,kBAAC,GAAD;IACgB;IACf,SAAS,IAAW,KAAA,IAAY;IACzB;IACG;IACV,SAAS,IAAW,WAAW;GAC/B,CAAA;GACA,KAAyB,KACzB,kBAAC,GAAD;IACC,eAAe,EACd,sBAAsB,EAAc,qBACrC;IACuB;GACvB,CAAA,IACE;GACJ,kBAAC,GAAD;IACC,yBAAuB;IACvB,qBAAmB;IACnB,iBAAe;IACf,mBAAiB;IACjB,oBAAkB;IAClB,iBAAe;IACf,iBAAe;IACf,aAAW;IACX,iBAAe;IACD;IACd,WAAW,EAAW;KACrB,sBAAsB,MAAY;KAClC,0BAA0B,MAAY,KAAW;IAClD,CAAC;IACD,gBAAgB,EACf,WAAW,6BACZ;IACU;IACK;IACC;IACJ;IACR;IACM;IACC;IACQ;IACT;IACC;IACD;IACC;IACD;IACJ;IACE;IACR,UAAU;IACD;IACA;IACA;IACE;IACA;IACC;IACH;IACC;IACA;IACG;IACb,UAAU;IACA;IACA;IACJ;IACS;IACf,MAAM,MAAY,IAAU,WAAW;IAChC;IACE;IACH;IACI;IACV,OAAO;GACP,CAAA;GACA,KACA,kBAAC,OAAD;IAAK,IAAI;IAAc,WAAU;IAC/B,UAAA;GACG,CAAA;GAEL,KACA,kBAAC,OAAD;IAAK,IAAI;IAAS,WAAU;IAC1B,UAAA;GACG,CAAA;GAEL;EACG;;AAEP,CACD;AAEA,EAAM,cAAc"}
|
|
@@ -3,27 +3,27 @@ import t from "../../spinner/index.js";
|
|
|
3
3
|
import n from "classnames";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region components/input/private/inner-input.tsx
|
|
6
|
-
var a = "counter", ee = { spinner: "Loading ..." }, o = ({ "aria-activedescendant": o, "aria-autocomplete": te, "aria-controls":
|
|
6
|
+
var a = "counter", ee = { spinner: "Loading ..." }, o = ({ "aria-activedescendant": o, "aria-autocomplete": te, "aria-controls": ne, "aria-describedby": s, "aria-expanded": c, "aria-haspopup": l, "aria-labelledby": u, "aria-owns": d, "aria-required": f, assistiveText: p, autoComplete: m, className: h, containerClassName: g, containerProps: re = {}, disabled: ie, fixedTextLeft: _, fixedTextRight: v, hasSpinner: y, iconLeft: b, iconRight: x, id: S, inlineEditTrigger: C, inputRef: w, isStatic: T, maxLength: E, maxValue: D, minLength: O, minValue: k, name: A, onBlur: j, onChange: M, onClick: N, onFocus: P, onInput: ae, onInvalid: F, onKeyDown: I, onKeyPress: L, onKeyUp: R, onSelect: z, onSubmit: B, placeholder: V, readOnly: H, required: U, role: W, step: G, style: K, tabIndex: q, type: J = "text", value: Y, variant: X }) => {
|
|
7
7
|
let Z = {
|
|
8
8
|
...ee,
|
|
9
|
-
...
|
|
9
|
+
...p
|
|
10
10
|
}, Q = e({
|
|
11
11
|
"aria-activedescendant": o,
|
|
12
12
|
"aria-autocomplete": te,
|
|
13
|
-
"aria-controls":
|
|
14
|
-
"aria-describedby":
|
|
15
|
-
"aria-expanded":
|
|
16
|
-
"aria-haspopup":
|
|
17
|
-
"aria-labelledby":
|
|
18
|
-
"aria-owns":
|
|
19
|
-
"aria-required":
|
|
13
|
+
"aria-controls": ne,
|
|
14
|
+
"aria-describedby": s,
|
|
15
|
+
"aria-expanded": c,
|
|
16
|
+
"aria-haspopup": l,
|
|
17
|
+
"aria-labelledby": u,
|
|
18
|
+
"aria-owns": d,
|
|
19
|
+
"aria-required": f,
|
|
20
20
|
assistiveText: Z,
|
|
21
21
|
type: J
|
|
22
22
|
}), $ = `${S}-loading-status-icon`;
|
|
23
23
|
y && Q["aria-describedby"] ? Q["aria-describedby"] = `${$} ${Q["aria-describedby"]}` : y && (Q["aria-describedby"] = $);
|
|
24
|
-
let { className:
|
|
24
|
+
let { className: oe, ...se } = re;
|
|
25
25
|
return /* @__PURE__ */ i("div", {
|
|
26
|
-
className: n(
|
|
26
|
+
className: n(oe, g, {
|
|
27
27
|
"slds-input-has-icon": X !== a && (b || x),
|
|
28
28
|
"slds-input-has-icon_left": b && !x,
|
|
29
29
|
"slds-input-has-icon_right": !b && x,
|
|
@@ -31,7 +31,7 @@ var a = "counter", ee = { spinner: "Loading ..." }, o = ({ "aria-activedescendan
|
|
|
31
31
|
"slds-input-has-fixed-addon": _ || v,
|
|
32
32
|
"slds-has-divider_bottom": T
|
|
33
33
|
}),
|
|
34
|
-
...
|
|
34
|
+
...se,
|
|
35
35
|
children: [
|
|
36
36
|
b,
|
|
37
37
|
_ && /* @__PURE__ */ r("span", {
|
|
@@ -39,9 +39,9 @@ var a = "counter", ee = { spinner: "Loading ..." }, o = ({ "aria-activedescendan
|
|
|
39
39
|
children: _
|
|
40
40
|
}),
|
|
41
41
|
!T && /* @__PURE__ */ r("input", {
|
|
42
|
-
autoComplete:
|
|
43
|
-
className: n("slds-input", { "slds-text-align_left": X === a && H },
|
|
44
|
-
disabled:
|
|
42
|
+
autoComplete: m,
|
|
43
|
+
className: n("slds-input", { "slds-text-align_left": X === a && H }, h),
|
|
44
|
+
disabled: ie,
|
|
45
45
|
id: S,
|
|
46
46
|
min: k,
|
|
47
47
|
minLength: O === void 0 ? void 0 : Number(O),
|
|
@@ -51,8 +51,8 @@ var a = "counter", ee = { spinner: "Loading ..." }, o = ({ "aria-activedescendan
|
|
|
51
51
|
onBlur: j,
|
|
52
52
|
onChange: M,
|
|
53
53
|
onClick: N,
|
|
54
|
-
onFocus:
|
|
55
|
-
onInput:
|
|
54
|
+
onFocus: P,
|
|
55
|
+
onInput: ae,
|
|
56
56
|
onInvalid: F,
|
|
57
57
|
onKeyDown: I,
|
|
58
58
|
onKeyPress: L,
|
|
@@ -69,7 +69,7 @@ var a = "counter", ee = { spinner: "Loading ..." }, o = ({ "aria-activedescendan
|
|
|
69
69
|
tabIndex: q === void 0 ? void 0 : Number(q),
|
|
70
70
|
type: J,
|
|
71
71
|
...Q,
|
|
72
|
-
|
|
72
|
+
value: Y
|
|
73
73
|
}),
|
|
74
74
|
y ? /* @__PURE__ */ i("div", {
|
|
75
75
|
className: "slds-input__icon-group slds-input__icon-group_right",
|