@govtechsg/sgds-web-component 3.0.0-rc.0 → 3.0.0-rc.2
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/Masthead/index.js +1 -1
- package/README.md +5 -5
- package/base/button.js +1 -1
- package/base/form-control-element.d.ts +4 -11
- package/base/form-control-element.js +13 -23
- package/base/form-control-element.js.map +1 -1
- package/components/Accordion/accordion-item.js +1 -1
- package/components/Accordion/index.umd.js +7 -19
- package/components/Accordion/index.umd.js.map +1 -1
- package/components/Accordion/sgds-accordion-item.d.ts +3 -7
- package/components/Accordion/sgds-accordion-item.js +6 -18
- package/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/components/ActionCard/index.umd.js +407 -329
- package/components/ActionCard/index.umd.js.map +1 -1
- package/components/Alert/alert.js +1 -1
- package/components/Alert/index.umd.js +553 -485
- package/components/Alert/index.umd.js.map +1 -1
- package/components/Alert/sgds-alert.d.ts +2 -2
- package/components/Alert/sgds-alert.js +6 -13
- package/components/Alert/sgds-alert.js.map +1 -1
- package/components/Badge/badge.js +1 -1
- package/components/Badge/index.umd.js +9 -10
- package/components/Badge/index.umd.js.map +1 -1
- package/components/Badge/sgds-badge.d.ts +4 -5
- package/components/Badge/sgds-badge.js +6 -7
- package/components/Badge/sgds-badge.js.map +1 -1
- package/components/Button/index.umd.js +8 -81
- package/components/Button/index.umd.js.map +1 -1
- package/components/Button/sgds-button.js +1 -1
- package/components/Button/sgds-button.js.map +1 -1
- package/components/Checkbox/checkbox.js +1 -1
- package/components/Checkbox/index.umd.js +541 -475
- package/components/Checkbox/index.umd.js.map +1 -1
- package/components/Checkbox/sgds-checkbox-group.d.ts +7 -1
- package/components/Checkbox/sgds-checkbox-group.js +15 -4
- package/components/Checkbox/sgds-checkbox-group.js.map +1 -1
- package/components/Checkbox/sgds-checkbox.d.ts +30 -21
- package/components/Checkbox/sgds-checkbox.js +77 -60
- package/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/components/ComboBox/index.umd.js +385 -216
- package/components/ComboBox/index.umd.js.map +1 -1
- package/components/Datepicker/datepicker-input.d.ts +4 -2
- package/components/Datepicker/datepicker-input.js +24 -7
- package/components/Datepicker/datepicker-input.js.map +1 -1
- package/components/Datepicker/index.umd.js +433 -244
- package/components/Datepicker/index.umd.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.d.ts +1 -1
- package/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/components/Drawer/index.umd.js +2 -2
- package/components/Drawer/index.umd.js.map +1 -1
- package/components/Dropdown/index.umd.js +8 -81
- package/components/Dropdown/index.umd.js.map +1 -1
- package/components/FileUpload/file-upload.js +1 -1
- package/components/FileUpload/index.umd.js +579 -272
- package/components/FileUpload/index.umd.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.d.ts +42 -30
- package/components/FileUpload/sgds-file-upload.js +147 -103
- package/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/components/Footer/footer-item.js +6 -0
- package/components/Footer/footer-item.js.map +1 -0
- package/components/Footer/footer.js +1 -1
- package/components/Footer/index.d.ts +2 -0
- package/components/Footer/index.js +2 -0
- package/components/Footer/index.js.map +1 -1
- package/components/Footer/index.umd.js +93 -94
- package/components/Footer/index.umd.js.map +1 -1
- package/components/Footer/sgds-footer-item.d.ts +13 -0
- package/components/Footer/sgds-footer-item.js +27 -0
- package/components/Footer/sgds-footer-item.js.map +1 -0
- package/components/Footer/sgds-footer.d.ts +9 -30
- package/components/Footer/sgds-footer.js +65 -90
- package/components/Footer/sgds-footer.js.map +1 -1
- package/components/Icon/icon.js +6 -0
- package/components/Icon/icon.js.map +1 -0
- package/components/Icon/index.d.ts +6 -0
- package/components/Icon/index.js +4 -0
- package/components/Icon/index.js.map +1 -0
- package/components/Icon/index.umd.js +4389 -0
- package/components/Icon/index.umd.js.map +1 -0
- package/components/Icon/sgds-icon.d.ts +21 -0
- package/components/Icon/sgds-icon.js +64 -0
- package/components/Icon/sgds-icon.js.map +1 -0
- package/components/IconButton/icon-button.js +1 -1
- package/components/IconButton/index.umd.js +6 -9
- package/components/IconButton/index.umd.js.map +1 -1
- package/components/IconButton/sgds-icon-button.d.ts +2 -2
- package/components/IconButton/sgds-icon-button.js +4 -9
- package/components/IconButton/sgds-icon-button.js.map +1 -1
- package/components/Input/index.umd.js +1734 -1376
- package/components/Input/index.umd.js.map +1 -1
- package/components/Input/sgds-input.d.ts +41 -21
- package/components/Input/sgds-input.js +103 -66
- package/components/Input/sgds-input.js.map +1 -1
- package/components/Masthead/index.umd.js +1 -1
- package/components/Masthead/masthead.js +1 -1
- package/components/Modal/index.umd.js +2 -2
- package/components/Modal/index.umd.js.map +1 -1
- package/components/QuantityToggle/index.umd.js +894 -316
- package/components/QuantityToggle/index.umd.js.map +1 -1
- package/components/QuantityToggle/sgds-quantity-toggle.d.ts +42 -15
- package/components/QuantityToggle/sgds-quantity-toggle.js +129 -62
- package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/components/Radio/index.umd.js +516 -203
- package/components/Radio/index.umd.js.map +1 -1
- package/components/Radio/sgds-radio-group.d.ts +38 -27
- package/components/Radio/sgds-radio-group.js +100 -84
- package/components/Radio/sgds-radio-group.js.map +1 -1
- package/components/Radio/sgds-radio.js +1 -1
- package/components/Radio/sgds-radio.js.map +1 -1
- package/components/Stepper/index.umd.js +2 -1
- package/components/Stepper/index.umd.js.map +1 -1
- package/components/Stepper/sgds-stepper.d.ts +1 -0
- package/components/Stepper/sgds-stepper.js +1 -0
- package/components/Stepper/sgds-stepper.js.map +1 -1
- package/components/Stepper/stepper.js +1 -1
- package/components/Switch/index.umd.js +21 -321
- package/components/Switch/index.umd.js.map +1 -1
- package/components/Switch/sgds-switch.js +1 -2
- package/components/Switch/sgds-switch.js.map +1 -1
- package/components/Textarea/index.umd.js +1554 -1336
- package/components/Textarea/index.umd.js.map +1 -1
- package/components/Textarea/sgds-textarea.d.ts +33 -22
- package/components/Textarea/sgds-textarea.js +78 -75
- package/components/Textarea/sgds-textarea.js.map +1 -1
- package/components/Textarea/textarea.js +1 -1
- package/components/Toast/index.umd.js +9 -21
- package/components/Toast/index.umd.js.map +1 -1
- package/components/Toast/sgds-toast.d.ts +2 -1
- package/components/Toast/sgds-toast.js +6 -18
- package/components/Toast/sgds-toast.js.map +1 -1
- package/components/Toast/toast.js +1 -1
- package/components/Tooltip/index.umd.js +14 -14
- package/components/Tooltip/index.umd.js.map +1 -1
- package/components/Tooltip/sgds-tooltip.d.ts +4 -7
- package/components/Tooltip/sgds-tooltip.js +14 -14
- package/components/Tooltip/sgds-tooltip.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/components/index.umd.js +1320 -1126
- package/components/index.umd.js.map +1 -1
- package/css/reboot.css +39 -6
- package/css/sgds.css +0 -2
- package/icons/arrow-bar-down.svg +3 -0
- package/icons/arrow-bar-left.svg +3 -0
- package/icons/arrow-bar-right.svg +3 -0
- package/icons/arrow-bar-up.svg +3 -0
- package/icons/arrow-clockwise.svg +3 -0
- package/icons/arrow-down.svg +3 -0
- package/icons/arrow-left.svg +3 -0
- package/icons/arrow-repeat.svg +3 -0
- package/icons/arrow-right.svg +3 -0
- package/icons/arrow-up.svg +3 -0
- package/icons/bank-fill.svg +3 -0
- package/icons/bell-slash.svg +3 -0
- package/icons/bell.svg +3 -0
- package/icons/bi-funnel.svg +3 -0
- package/icons/bookmark-fill.svg +3 -0
- package/icons/bookmark.svg +3 -0
- package/icons/box-arrow-up-right.svg +3 -0
- package/icons/box-seam.svg +3 -0
- package/icons/building.svg +3 -0
- package/icons/calculator.svg +3 -0
- package/icons/calendar-check.svg +4 -0
- package/icons/calendar-x.svg +4 -0
- package/icons/calendar.svg +3 -0
- package/icons/camera.svg +3 -0
- package/icons/chat-left-text.svg +3 -0
- package/icons/check-circle-fill.svg +3 -0
- package/icons/check-circle.svg +3 -0
- package/icons/check.svg +3 -0
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up .svg +3 -0
- package/icons/clock.svg +4 -0
- package/icons/cloud-check.svg +4 -0
- package/icons/cloud-download.svg +3 -0
- package/icons/cloud-upload.svg +3 -0
- package/icons/cloud.svg +3 -0
- package/icons/compass.svg +4 -0
- package/icons/cross.svg +3 -0
- package/icons/cursor-fill.svg +3 -0
- package/icons/cursor.svg +3 -0
- package/icons/dash-circle.svg +3 -0
- package/icons/dash-square.svg +3 -0
- package/icons/dash.svg +3 -0
- package/icons/download.svg +3 -0
- package/icons/exclamation-circle-fill.svg +3 -0
- package/icons/exclamation-circle.svg +4 -0
- package/icons/exclamation-triangle-fill.svg +3 -0
- package/icons/exclamation-triangle.svg +4 -0
- package/icons/exclamation.svg +4 -0
- package/icons/eye-fill.svg +3 -0
- package/icons/eye-slash-fill.svg +4 -0
- package/icons/eye-slash.svg +3 -0
- package/icons/eye.svg +3 -0
- package/icons/facebook.svg +3 -0
- package/icons/file-earmark-text.svg +3 -0
- package/icons/file-pdf.svg +4 -0
- package/icons/file-plus.svg +4 -0
- package/icons/file-text.svg +3 -0
- package/icons/file.svg +3 -0
- package/icons/files.svg +4 -0
- package/icons/folder-check.svg +4 -0
- package/icons/folder-minus.svg +4 -0
- package/icons/folder-plus.svg +4 -0
- package/icons/folder.svg +3 -0
- package/icons/gear.svg +3 -0
- package/icons/geo-alt.svg +4 -0
- package/icons/geo-fill.svg +4 -0
- package/icons/geo.svg +4 -0
- package/icons/google.svg +3 -0
- package/icons/grid-fill.svg +3 -0
- package/icons/hand-thumbs-down.svg +3 -0
- package/icons/hand-thumbs-up.svg +3 -0
- package/icons/hdd.svg +3 -0
- package/icons/house-door.svg +3 -0
- package/icons/house.svg +3 -0
- package/icons/image.svg +3 -0
- package/icons/inbox.svg +3 -0
- package/icons/info-circle-fill.svg +3 -0
- package/icons/info-circle.svg +4 -0
- package/icons/instagram.svg +3 -0
- package/icons/layers.svg +3 -0
- package/icons/layout-text-window-reverse.svg +3 -0
- package/icons/layout-text-window.svg +3 -0
- package/icons/layout.svg +3 -0
- package/icons/link.svg +3 -0
- package/icons/linkedin.svg +3 -0
- package/icons/list.svg +3 -0
- package/icons/lock-fill.svg +3 -0
- package/icons/lock.svg +3 -0
- package/icons/mail.svg +3 -0
- package/icons/map.svg +3 -0
- package/icons/paperclip.svg +3 -0
- package/icons/pencil.svg +3 -0
- package/icons/pending-circle.svg +3 -0
- package/icons/person-dash.svg +3 -0
- package/icons/person-plus.svg +3 -0
- package/icons/person-x.svg +3 -0
- package/icons/person.svg +3 -0
- package/icons/pin-map-fill.svg +3 -0
- package/icons/pin.svg +3 -0
- package/icons/placeholder.svg +3 -0
- package/icons/plus-circle.svg +3 -0
- package/icons/plus-square.svg +3 -0
- package/icons/plus.svg +3 -0
- package/icons/printer.svg +3 -0
- package/icons/question-circle.svg +4 -0
- package/icons/save.svg +3 -0
- package/icons/search.svg +3 -0
- package/icons/share.svg +3 -0
- package/icons/slash-circle.svg +3 -0
- package/icons/sliders.svg +3 -0
- package/icons/speedometer.svg +3 -0
- package/icons/star-fill.svg +3 -0
- package/icons/star.svg +3 -0
- package/icons/stoplights.svg +4 -0
- package/icons/telephone.svg +3 -0
- package/icons/three-dots-vertical.svg +3 -0
- package/icons/three-dots.svg +3 -0
- package/icons/toggle-off.svg +3 -0
- package/icons/toggle-on.svg +3 -0
- package/icons/trash.svg +3 -0
- package/icons/twitter-x.svg +3 -0
- package/icons/unlock.svg +3 -0
- package/icons/upload.svg +3 -0
- package/icons/window-dash.svg +4 -0
- package/icons/window-desktop.svg +4 -0
- package/icons/window-dock.svg +4 -0
- package/icons/window-fullscreen.svg +3 -0
- package/icons/window-plus.svg +4 -0
- package/icons/window-sidebar.svg +3 -0
- package/icons/window-split.svg +3 -0
- package/icons/window-stack.svg +3 -0
- package/icons/window-x.svg +4 -0
- package/icons/window.svg +3 -0
- package/icons/x-circle-fill.svg +3 -0
- package/icons/x-circle.svg +3 -0
- package/icons/youtube.svg +3 -0
- package/icons/zoom-in.svg +3 -0
- package/icons/zoom-out.svg +3 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/index.umd.js +1340 -1121
- package/index.umd.js.map +1 -1
- package/internals/CloseButton/close-button.js +1 -1
- package/internals/CloseButton/sgds-close-button.js +1 -1
- package/internals/CloseButton/sgds-close-button.js.map +1 -1
- package/package.json +1 -1
- package/react/base/button.cjs.js +1 -1
- package/react/base/button.js +1 -1
- package/react/base/form-control-element.cjs.js +13 -23
- package/react/base/form-control-element.cjs.js.map +1 -1
- package/react/base/form-control-element.js +13 -23
- package/react/base/form-control-element.js.map +1 -1
- package/react/checkbox/index.cjs.js +2 -0
- package/react/checkbox/index.cjs.js.map +1 -1
- package/react/checkbox/index.d.ts +2 -0
- package/react/checkbox/index.js +2 -0
- package/react/checkbox/index.js.map +1 -1
- package/react/components/Accordion/accordion-item.cjs.js +1 -1
- package/react/components/Accordion/accordion-item.js +1 -1
- package/react/components/Accordion/sgds-accordion-item.cjs.js +6 -18
- package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
- package/react/components/Accordion/sgds-accordion-item.js +6 -18
- package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
- package/react/components/Alert/alert.cjs.js +1 -1
- package/react/components/Alert/alert.js +1 -1
- package/react/components/Alert/sgds-alert.cjs.js +5 -12
- package/react/components/Alert/sgds-alert.cjs.js.map +1 -1
- package/react/components/Alert/sgds-alert.js +6 -13
- package/react/components/Alert/sgds-alert.js.map +1 -1
- package/react/components/Badge/badge.cjs.js +1 -1
- package/react/components/Badge/badge.js +1 -1
- package/react/components/Badge/sgds-badge.cjs.js +6 -7
- package/react/components/Badge/sgds-badge.cjs.js.map +1 -1
- package/react/components/Badge/sgds-badge.js +6 -7
- package/react/components/Badge/sgds-badge.js.map +1 -1
- package/react/components/Button/sgds-button.cjs.js +2 -2
- package/react/components/Button/sgds-button.cjs.js.map +1 -1
- package/react/components/Button/sgds-button.js +1 -1
- package/react/components/Button/sgds-button.js.map +1 -1
- package/react/components/Checkbox/checkbox.cjs.js +1 -1
- package/react/components/Checkbox/checkbox.js +1 -1
- package/react/components/Checkbox/sgds-checkbox-group.cjs.js +15 -4
- package/react/components/Checkbox/sgds-checkbox-group.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox-group.js +15 -4
- package/react/components/Checkbox/sgds-checkbox-group.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js +77 -60
- package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.js +77 -60
- package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/react/components/Datepicker/datepicker-input.cjs.js +24 -7
- package/react/components/Datepicker/datepicker-input.cjs.js.map +1 -1
- package/react/components/Datepicker/datepicker-input.js +24 -7
- package/react/components/Datepicker/datepicker-input.js.map +1 -1
- package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
- package/react/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/react/components/FileUpload/file-upload.cjs.js +1 -1
- package/react/components/FileUpload/file-upload.js +1 -1
- package/react/components/FileUpload/sgds-file-upload.cjs.js +145 -101
- package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
- package/react/components/FileUpload/sgds-file-upload.js +147 -103
- package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/react/components/Footer/footer-item.cjs.js +11 -0
- package/react/components/Footer/footer-item.cjs.js.map +1 -0
- package/react/components/Footer/footer-item.js +7 -0
- package/react/components/Footer/footer-item.js.map +1 -0
- package/react/components/Footer/footer.cjs.js +1 -1
- package/react/components/Footer/footer.js +1 -1
- package/react/components/Footer/sgds-footer-item.cjs.js +33 -0
- package/react/components/Footer/sgds-footer-item.cjs.js.map +1 -0
- package/react/components/Footer/sgds-footer-item.js +28 -0
- package/react/components/Footer/sgds-footer-item.js.map +1 -0
- package/react/components/Footer/sgds-footer.cjs.js +65 -90
- package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
- package/react/components/Footer/sgds-footer.js +65 -90
- package/react/components/Footer/sgds-footer.js.map +1 -1
- package/react/components/Icon/icon.cjs.js +11 -0
- package/react/components/Icon/icon.cjs.js.map +1 -0
- package/react/components/Icon/icon.js +7 -0
- package/react/components/Icon/icon.js.map +1 -0
- package/react/components/Icon/sgds-icon.cjs.js +70 -0
- package/react/components/Icon/sgds-icon.cjs.js.map +1 -0
- package/react/components/Icon/sgds-icon.js +65 -0
- package/react/components/Icon/sgds-icon.js.map +1 -0
- package/react/components/IconButton/icon-button.cjs.js +1 -1
- package/react/components/IconButton/icon-button.js +1 -1
- package/react/components/IconButton/sgds-icon-button.cjs.js +4 -9
- package/react/components/IconButton/sgds-icon-button.cjs.js.map +1 -1
- package/react/components/IconButton/sgds-icon-button.js +4 -9
- package/react/components/IconButton/sgds-icon-button.js.map +1 -1
- package/react/components/Input/sgds-input.cjs.js +101 -64
- package/react/components/Input/sgds-input.cjs.js.map +1 -1
- package/react/components/Input/sgds-input.js +103 -66
- package/react/components/Input/sgds-input.js.map +1 -1
- package/react/components/Masthead/masthead.cjs.js +1 -1
- package/react/components/Masthead/masthead.js +1 -1
- package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js +128 -61
- package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
- package/react/components/QuantityToggle/sgds-quantity-toggle.js +129 -62
- package/react/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
- package/react/components/Radio/sgds-radio-group.cjs.js +99 -83
- package/react/components/Radio/sgds-radio-group.cjs.js.map +1 -1
- package/react/components/Radio/sgds-radio-group.js +100 -84
- package/react/components/Radio/sgds-radio-group.js.map +1 -1
- package/react/components/Radio/sgds-radio.cjs.js +1 -1
- package/react/components/Radio/sgds-radio.cjs.js.map +1 -1
- package/react/components/Radio/sgds-radio.js +1 -1
- package/react/components/Radio/sgds-radio.js.map +1 -1
- package/react/components/Stepper/sgds-stepper.cjs.js +1 -0
- package/react/components/Stepper/sgds-stepper.cjs.js.map +1 -1
- package/react/components/Stepper/sgds-stepper.js +1 -0
- package/react/components/Stepper/sgds-stepper.js.map +1 -1
- package/react/components/Stepper/stepper.cjs.js +1 -1
- package/react/components/Stepper/stepper.js +1 -1
- package/react/components/Switch/sgds-switch.cjs.js +1 -2
- package/react/components/Switch/sgds-switch.cjs.js.map +1 -1
- package/react/components/Switch/sgds-switch.js +1 -2
- package/react/components/Switch/sgds-switch.js.map +1 -1
- package/react/components/Textarea/sgds-textarea.cjs.js +76 -73
- package/react/components/Textarea/sgds-textarea.cjs.js.map +1 -1
- package/react/components/Textarea/sgds-textarea.js +78 -75
- package/react/components/Textarea/sgds-textarea.js.map +1 -1
- package/react/components/Textarea/textarea.cjs.js +1 -1
- package/react/components/Textarea/textarea.js +1 -1
- package/react/components/Toast/sgds-toast.cjs.js +6 -18
- package/react/components/Toast/sgds-toast.cjs.js.map +1 -1
- package/react/components/Toast/sgds-toast.js +6 -18
- package/react/components/Toast/sgds-toast.js.map +1 -1
- package/react/components/Toast/toast.cjs.js +1 -1
- package/react/components/Toast/toast.js +1 -1
- package/react/components/Tooltip/sgds-tooltip.cjs.js +14 -14
- package/react/components/Tooltip/sgds-tooltip.cjs.js.map +1 -1
- package/react/components/Tooltip/sgds-tooltip.js +14 -14
- package/react/components/Tooltip/sgds-tooltip.js.map +1 -1
- package/react/footer-item/index.cjs.js +39 -0
- package/react/footer-item/index.cjs.js.map +1 -0
- package/react/footer-item/index.d.ts +3 -0
- package/react/footer-item/index.js +15 -0
- package/react/footer-item/index.js.map +1 -0
- package/react/icon/index.cjs.js +42 -0
- package/react/icon/index.cjs.js.map +1 -0
- package/react/icon/index.d.ts +6 -0
- package/react/icon/index.js +18 -0
- package/react/icon/index.js.map +1 -0
- package/react/index.cjs.js +64 -60
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +2 -0
- package/react/index.js +2 -0
- package/react/index.js.map +1 -1
- package/react/input/index.cjs.js +3 -1
- package/react/input/index.cjs.js.map +1 -1
- package/react/input/index.d.ts +2 -0
- package/react/input/index.js +3 -1
- package/react/input/index.js.map +1 -1
- package/react/internals/CloseButton/close-button.cjs.js +1 -1
- package/react/internals/CloseButton/close-button.js +1 -1
- package/react/internals/CloseButton/sgds-close-button.cjs.js +1 -1
- package/react/internals/CloseButton/sgds-close-button.cjs.js.map +1 -1
- package/react/internals/CloseButton/sgds-close-button.js +1 -1
- package/react/internals/CloseButton/sgds-close-button.js.map +1 -1
- package/react/styles/form-hint.cjs.js +1 -1
- package/react/styles/form-hint.js +1 -1
- package/react/styles/form-label.cjs.js +1 -1
- package/react/styles/form-label.js +1 -1
- package/react/utils/formSubmitController.cjs.js +64 -0
- package/react/utils/formSubmitController.cjs.js.map +1 -0
- package/react/utils/formSubmitController.js +60 -0
- package/react/utils/formSubmitController.js.map +1 -0
- package/react/utils/inputValidationController.cjs.js +130 -0
- package/react/utils/inputValidationController.cjs.js.map +1 -0
- package/react/utils/inputValidationController.js +126 -0
- package/react/utils/inputValidationController.js.map +1 -0
- package/react/utils/validatorMixin.cjs.js +108 -0
- package/react/utils/validatorMixin.cjs.js.map +1 -0
- package/react/utils/validatorMixin.js +104 -0
- package/react/utils/validatorMixin.js.map +1 -0
- package/styles/form-hint.js +1 -1
- package/styles/form-label.js +1 -1
- package/themes/day.css +1 -1
- package/themes/night.css +3 -2
- package/themes/root.css +2 -0
- package/utils/{form.d.ts → formSubmitController.d.ts} +10 -20
- package/utils/formSubmitController.js +59 -0
- package/utils/formSubmitController.js.map +1 -0
- package/utils/inputValidationController.d.ts +70 -0
- package/utils/inputValidationController.js +125 -0
- package/utils/inputValidationController.js.map +1 -0
- package/utils/validatorMixin.d.ts +24 -0
- package/utils/validatorMixin.js +103 -0
- package/utils/validatorMixin.js.map +1 -0
- package/base/form-check-element.d.ts +0 -50
- package/base/form-check-element.js +0 -169
- package/base/form-check-element.js.map +0 -1
- package/css/body.css +0 -28
- package/css/caption.css +0 -7
- package/css/label.css +0 -28
- package/react/base/form-check-element.cjs.js +0 -175
- package/react/base/form-check-element.cjs.js.map +0 -1
- package/react/base/form-check-element.js +0 -170
- package/react/base/form-check-element.js.map +0 -1
- package/react/utils/form.cjs.js +0 -137
- package/react/utils/form.cjs.js.map +0 -1
- package/react/utils/form.js +0 -133
- package/react/utils/form.js.map +0 -1
- package/utils/form.js +0 -132
- package/utils/form.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import FormControlElement from "../../base/form-control-element";
|
|
2
|
+
import type { SgdsFormControl } from "../../utils/formSubmitController";
|
|
2
3
|
import { SgdsSpinner } from "../Spinner/sgds-spinner";
|
|
3
|
-
|
|
4
|
-
import { FormSubmitController } from "../../utils/form";
|
|
4
|
+
declare const SgdsInput_base: (new (...args: any[]) => import("../../utils/validatorMixin").ToBeValidatedElementInterface) & typeof FormControlElement & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
5
5
|
/**
|
|
6
6
|
* @summary Text inputs allow your users to enter letters, numbers and symbols on a single line.
|
|
7
7
|
*
|
|
@@ -9,19 +9,16 @@ import { FormSubmitController } from "../../utils/form";
|
|
|
9
9
|
* @event sgds-input - Emitted when the control receives input and its value changes.
|
|
10
10
|
* @event sgds-focus - Emitted when input is in focus.
|
|
11
11
|
* @event sgds-blur - Emitted when input is not in focus.
|
|
12
|
+
* @event sgds-invalid - Emitted when input is invalid
|
|
13
|
+
* @event sgds-valid - Emitted when input is valid
|
|
12
14
|
*
|
|
13
15
|
*/
|
|
14
|
-
export declare class SgdsInput extends
|
|
16
|
+
export declare class SgdsInput extends SgdsInput_base implements SgdsFormControl {
|
|
15
17
|
static styles: import("lit").CSSResult[];
|
|
16
18
|
/**@internal */
|
|
17
19
|
static get scopedElements(): {
|
|
18
20
|
"sgds-spinner": typeof SgdsSpinner;
|
|
19
21
|
};
|
|
20
|
-
/**@internal */
|
|
21
|
-
input: HTMLInputElement;
|
|
22
|
-
/**@internal */
|
|
23
|
-
protected readonly formSubmitController: FormSubmitController;
|
|
24
|
-
/** The type of input which works the same as HTMLInputElement */
|
|
25
22
|
type: "email" | "number" | "password" | "search" | "tel" | "text" | "time" | "url";
|
|
26
23
|
/** The prefix of the input */
|
|
27
24
|
prefix: string;
|
|
@@ -33,6 +30,10 @@ export declare class SgdsInput extends FormControlElement implements SgdsFormCon
|
|
|
33
30
|
minlength: number;
|
|
34
31
|
/** Sets the maximum length of the input */
|
|
35
32
|
maxlength: number;
|
|
33
|
+
/** The input's minimum value. Only applies number input types. */
|
|
34
|
+
min: number;
|
|
35
|
+
/** The input's maximum value. Only applies number input types. */
|
|
36
|
+
max: number;
|
|
36
37
|
/** The input's placeholder text. */
|
|
37
38
|
placeholder: string;
|
|
38
39
|
/** A pattern to validate input against. */
|
|
@@ -46,33 +47,52 @@ export declare class SgdsInput extends FormControlElement implements SgdsFormCon
|
|
|
46
47
|
* implied, allowing any numeric value. Only applies to number input types.
|
|
47
48
|
*/
|
|
48
49
|
step: number | "any";
|
|
49
|
-
/**
|
|
50
|
-
|
|
50
|
+
/** Allows invalidFeedback, invalid and valid styles to be visible with the input */
|
|
51
|
+
hasFeedback: "style" | "text" | "both";
|
|
52
|
+
/**Feedback text for error state when validated */
|
|
53
|
+
invalidFeedback: string;
|
|
51
54
|
/**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
|
|
52
55
|
defaultValue: string;
|
|
53
56
|
/** Marks the component as valid. */
|
|
54
57
|
valid: boolean;
|
|
55
58
|
/** Marks the component as loading. */
|
|
56
59
|
loading: boolean;
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
/** Makes the input a required field. */
|
|
61
|
+
required: boolean;
|
|
62
|
+
/**The input's value attribute. */
|
|
63
|
+
value: string;
|
|
64
|
+
protected _isTouched: boolean;
|
|
59
65
|
/** Sets focus on the input. */
|
|
60
66
|
focus(options?: FocusOptions): void;
|
|
61
67
|
/** Sets blur on the input. */
|
|
62
68
|
blur(): void;
|
|
63
|
-
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
64
|
-
reportValidity(): boolean;
|
|
65
|
-
/** Sets a custom validation message. Pass an empty string to restore validity */
|
|
66
|
-
setCustomValidity(err: string): void;
|
|
67
69
|
/** Programatically sets the invalid state of the input. Pass in boolean value in the argument */
|
|
68
70
|
setInvalid(bool: boolean): void;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state
|
|
73
|
+
* Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput
|
|
74
|
+
*/
|
|
75
|
+
reportValidity(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Checks for validity without any native error popup message
|
|
78
|
+
*/
|
|
79
|
+
checkValidity(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the ValidityState object
|
|
82
|
+
*/
|
|
83
|
+
get validity(): ValidityState;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the validation message based on the ValidityState
|
|
86
|
+
*/
|
|
87
|
+
get validationMessage(): string;
|
|
71
88
|
protected _handleFocus(): void;
|
|
72
|
-
|
|
73
|
-
|
|
89
|
+
private _handleBlur;
|
|
90
|
+
private _handleClick;
|
|
91
|
+
protected _handleChange(e: Event): void;
|
|
92
|
+
protected _handleInputChange(e: Event): void;
|
|
93
|
+
/** @internal */
|
|
94
|
+
_handleIsTouched(): void;
|
|
74
95
|
_handleDisabledChange(): void;
|
|
75
|
-
_handleValueChange(): void;
|
|
76
96
|
protected _renderInput(): import("lit-html").TemplateResult;
|
|
77
97
|
protected _renderFeedback(): import("lit-html").TemplateResult;
|
|
78
98
|
protected _renderLabel(): import("lit-html").TemplateResult;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
-
import {
|
|
2
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
3
|
+
import { nothing } from 'lit';
|
|
4
|
+
import { property, state } from 'lit/decorators.js';
|
|
3
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
7
|
import { live } from 'lit/directives/live.js';
|
|
6
8
|
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
7
9
|
import { html } from 'lit/static-html.js';
|
|
8
10
|
import FormControlElement from '../../base/form-control-element.js';
|
|
9
|
-
import
|
|
11
|
+
import css_248z from '../../styles/form-placeholder.js';
|
|
10
12
|
import { defaultValue } from '../../utils/defaultvalue.js';
|
|
11
|
-
import {
|
|
12
|
-
import genId from '../../utils/generateId.js';
|
|
13
|
+
import { SgdsFormValidatorMixin } from '../../utils/validatorMixin.js';
|
|
13
14
|
import { watch } from '../../utils/watch.js';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
15
|
+
import { SgdsSpinner } from '../Spinner/sgds-spinner.js';
|
|
16
|
+
import css_248z$1 from './input.js';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* @summary Text inputs allow your users to enter letters, numbers and symbols on a single line.
|
|
@@ -21,14 +22,13 @@ import { nothing } from 'lit';
|
|
|
21
22
|
* @event sgds-input - Emitted when the control receives input and its value changes.
|
|
22
23
|
* @event sgds-focus - Emitted when input is in focus.
|
|
23
24
|
* @event sgds-blur - Emitted when input is not in focus.
|
|
25
|
+
* @event sgds-invalid - Emitted when input is invalid
|
|
26
|
+
* @event sgds-valid - Emitted when input is valid
|
|
24
27
|
*
|
|
25
28
|
*/
|
|
26
|
-
class SgdsInput extends FormControlElement {
|
|
29
|
+
class SgdsInput extends SgdsFormValidatorMixin(ScopedElementsMixin(FormControlElement)) {
|
|
27
30
|
constructor() {
|
|
28
31
|
super(...arguments);
|
|
29
|
-
/**@internal */
|
|
30
|
-
this.formSubmitController = new FormSubmitController(this);
|
|
31
|
-
/** The type of input which works the same as HTMLInputElement */
|
|
32
32
|
this.type = "text";
|
|
33
33
|
/** The input's placeholder text. */
|
|
34
34
|
this.placeholder = "placeholder";
|
|
@@ -36,16 +36,17 @@ class SgdsInput extends FormControlElement {
|
|
|
36
36
|
this.autofocus = false;
|
|
37
37
|
/** Makes the input readonly. */
|
|
38
38
|
this.readonly = false;
|
|
39
|
-
/**The input's value attribute. */
|
|
40
|
-
this.value = "";
|
|
41
39
|
/**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */
|
|
42
40
|
this.defaultValue = "";
|
|
43
41
|
/** Marks the component as valid. */
|
|
44
42
|
this.valid = false;
|
|
45
43
|
/** Marks the component as loading. */
|
|
46
44
|
this.loading = false;
|
|
47
|
-
|
|
48
|
-
this.
|
|
45
|
+
/** Makes the input a required field. */
|
|
46
|
+
this.required = false;
|
|
47
|
+
/**The input's value attribute. */
|
|
48
|
+
this.value = "";
|
|
49
|
+
this._isTouched = false;
|
|
49
50
|
}
|
|
50
51
|
/**@internal */
|
|
51
52
|
static get scopedElements() {
|
|
@@ -61,60 +62,79 @@ class SgdsInput extends FormControlElement {
|
|
|
61
62
|
blur() {
|
|
62
63
|
this.input.blur();
|
|
63
64
|
}
|
|
64
|
-
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
65
|
-
reportValidity() {
|
|
66
|
-
return this.input.reportValidity();
|
|
67
|
-
}
|
|
68
|
-
/** Sets a custom validation message. Pass an empty string to restore validity */
|
|
69
|
-
setCustomValidity(err) {
|
|
70
|
-
return this.input.setCustomValidity(err);
|
|
71
|
-
}
|
|
72
65
|
/** Programatically sets the invalid state of the input. Pass in boolean value in the argument */
|
|
73
66
|
setInvalid(bool) {
|
|
74
67
|
this.invalid = bool;
|
|
68
|
+
if (bool) {
|
|
69
|
+
this.emit("sgds-invalid");
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.emit("sgds-valid");
|
|
73
|
+
}
|
|
75
74
|
}
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state
|
|
77
|
+
* Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput
|
|
78
|
+
*/
|
|
79
|
+
reportValidity() {
|
|
80
|
+
return this._mixinReportValidity();
|
|
78
81
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Checks for validity without any native error popup message
|
|
84
|
+
*/
|
|
85
|
+
checkValidity() {
|
|
86
|
+
return this._mixinCheckValidity();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Returns the ValidityState object
|
|
90
|
+
*/
|
|
91
|
+
get validity() {
|
|
92
|
+
return this._mixinGetValidity();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Returns the validation message based on the ValidityState
|
|
96
|
+
*/
|
|
97
|
+
get validationMessage() {
|
|
98
|
+
return this._mixinGetValidationMessage();
|
|
82
99
|
}
|
|
83
100
|
_handleFocus() {
|
|
84
101
|
this.emit("sgds-focus");
|
|
85
102
|
}
|
|
86
103
|
_handleBlur() {
|
|
104
|
+
this._isTouched = true;
|
|
87
105
|
this.emit("sgds-blur");
|
|
88
106
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
_handleClick() {
|
|
108
|
+
this.focus();
|
|
109
|
+
}
|
|
110
|
+
_handleChange(e) {
|
|
111
|
+
this.value = this.input.value;
|
|
112
|
+
this.emit("sgds-change");
|
|
113
|
+
super._mixinHandleChange(e);
|
|
114
|
+
}
|
|
115
|
+
_handleInputChange(e) {
|
|
116
|
+
this.value = this.input.value;
|
|
117
|
+
this.emit("sgds-input");
|
|
118
|
+
super._mixinHandleInputChange(e);
|
|
119
|
+
}
|
|
120
|
+
/** @internal */
|
|
121
|
+
_handleIsTouched() {
|
|
122
|
+
if (this._isTouched) {
|
|
123
|
+
this.setInvalid(!this._mixinCheckValidity());
|
|
100
124
|
}
|
|
101
125
|
}
|
|
102
126
|
_handleDisabledChange() {
|
|
103
127
|
// Disabled form controls are always valid, so we need to recheck validity when the state changes
|
|
104
|
-
this.
|
|
105
|
-
this.invalid = !this.input.checkValidity();
|
|
106
|
-
}
|
|
107
|
-
_handleValueChange() {
|
|
108
|
-
this.invalid = !this.input.checkValidity();
|
|
128
|
+
this.setInvalid(false);
|
|
109
129
|
}
|
|
110
130
|
_renderInput() {
|
|
131
|
+
const wantFeedbackStyle = this.hasFeedback === "both" || this.hasFeedback === "style";
|
|
111
132
|
return html `
|
|
112
133
|
<div
|
|
113
134
|
class="form-control-group ${classMap({
|
|
114
135
|
disabled: this.disabled,
|
|
115
136
|
readonly: this.readonly,
|
|
116
|
-
"is-invalid": this.invalid &&
|
|
117
|
-
"quantity-toggle": this.classList.contains("quantity-toggle")
|
|
137
|
+
"is-invalid": this.invalid && wantFeedbackStyle
|
|
118
138
|
})}"
|
|
119
139
|
@click=${this._handleClick}
|
|
120
140
|
>
|
|
@@ -123,7 +143,7 @@ class SgdsInput extends FormControlElement {
|
|
|
123
143
|
<input
|
|
124
144
|
class="form-control"
|
|
125
145
|
type=${this.type}
|
|
126
|
-
id=${this.
|
|
146
|
+
id=${this._controlId}
|
|
127
147
|
name=${ifDefined(this.name)}
|
|
128
148
|
placeholder=${ifDefined(this.placeholder)}
|
|
129
149
|
aria-invalid=${this.invalid ? "true" : "false"}
|
|
@@ -138,15 +158,14 @@ class SgdsInput extends FormControlElement {
|
|
|
138
158
|
min=${ifDefined(this.min)}
|
|
139
159
|
max=${ifDefined(this.max)}
|
|
140
160
|
step=${ifDefined(this.step)}
|
|
141
|
-
@input=${() => this.
|
|
142
|
-
@change=${() => this._handleChange(
|
|
143
|
-
@keydown=${this._handleKeyDown}
|
|
161
|
+
@input=${(e) => this._handleInputChange(e)}
|
|
162
|
+
@change=${(e) => this._handleChange(e)}
|
|
144
163
|
@invalid=${() => this.setInvalid(true)}
|
|
145
164
|
@focus=${this._handleFocus}
|
|
146
165
|
@blur=${this._handleBlur}
|
|
147
|
-
aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this.
|
|
148
|
-
aria-labelledby="${this.
|
|
149
|
-
? `${this.
|
|
166
|
+
aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this._controlId}-invalid` : undefined)}
|
|
167
|
+
aria-labelledby="${this._labelId} ${this._controlId}Help ${this.invalid && this.hasFeedback
|
|
168
|
+
? `${this._controlId}-invalid`
|
|
150
169
|
: ""}"
|
|
151
170
|
/>
|
|
152
171
|
${this.loading ? html `<sgds-spinner size="sm"></sgds-spinner>` : nothing}
|
|
@@ -163,7 +182,8 @@ class SgdsInput extends FormControlElement {
|
|
|
163
182
|
`;
|
|
164
183
|
}
|
|
165
184
|
_renderFeedback() {
|
|
166
|
-
|
|
185
|
+
const wantFeedbackText = this.hasFeedback === "both" || this.hasFeedback === "text";
|
|
186
|
+
return this.invalid && wantFeedbackText
|
|
167
187
|
? html ` <div class="invalid-feedback-container">
|
|
168
188
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
169
189
|
<path
|
|
@@ -171,15 +191,17 @@ class SgdsInput extends FormControlElement {
|
|
|
171
191
|
fill="#B90000"
|
|
172
192
|
/>
|
|
173
193
|
</svg>
|
|
174
|
-
<div id="${this.
|
|
194
|
+
<div id="${this._controlId}-invalid" class="invalid-feedback">
|
|
195
|
+
${this.invalidFeedback ? this.invalidFeedback : this.input.validationMessage}
|
|
196
|
+
</div>
|
|
175
197
|
</div>`
|
|
176
198
|
: html `${this._renderHintText()}`;
|
|
177
199
|
}
|
|
178
200
|
_renderLabel() {
|
|
179
201
|
const labelTemplate = html `
|
|
180
202
|
<label
|
|
181
|
-
for=${this.
|
|
182
|
-
id=${this.
|
|
203
|
+
for=${this._controlId}
|
|
204
|
+
id=${this._labelId}
|
|
183
205
|
class=${classMap({
|
|
184
206
|
"form-label": true,
|
|
185
207
|
required: this.required
|
|
@@ -190,7 +212,7 @@ class SgdsInput extends FormControlElement {
|
|
|
190
212
|
return this.label && labelTemplate;
|
|
191
213
|
}
|
|
192
214
|
_renderHintText() {
|
|
193
|
-
const hintTextTemplate = html ` <div id="${this.
|
|
215
|
+
const hintTextTemplate = html ` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;
|
|
194
216
|
return this.hintText && hintTextTemplate;
|
|
195
217
|
}
|
|
196
218
|
render() {
|
|
@@ -205,10 +227,7 @@ class SgdsInput extends FormControlElement {
|
|
|
205
227
|
`;
|
|
206
228
|
}
|
|
207
229
|
}
|
|
208
|
-
SgdsInput.styles = [...FormControlElement.styles, css_248z];
|
|
209
|
-
__decorate([
|
|
210
|
-
query("input.form-control")
|
|
211
|
-
], SgdsInput.prototype, "input", void 0);
|
|
230
|
+
SgdsInput.styles = [...FormControlElement.styles, css_248z, css_248z$1];
|
|
212
231
|
__decorate([
|
|
213
232
|
property({ reflect: true })
|
|
214
233
|
], SgdsInput.prototype, "type", void 0);
|
|
@@ -227,6 +246,12 @@ __decorate([
|
|
|
227
246
|
__decorate([
|
|
228
247
|
property({ type: Number, reflect: true })
|
|
229
248
|
], SgdsInput.prototype, "maxlength", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
property()
|
|
251
|
+
], SgdsInput.prototype, "min", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
property()
|
|
254
|
+
], SgdsInput.prototype, "max", void 0);
|
|
230
255
|
__decorate([
|
|
231
256
|
property({ type: String, reflect: true })
|
|
232
257
|
], SgdsInput.prototype, "placeholder", void 0);
|
|
@@ -243,8 +268,11 @@ __decorate([
|
|
|
243
268
|
property()
|
|
244
269
|
], SgdsInput.prototype, "step", void 0);
|
|
245
270
|
__decorate([
|
|
246
|
-
property({ reflect: true })
|
|
247
|
-
], SgdsInput.prototype, "
|
|
271
|
+
property({ type: String, reflect: true })
|
|
272
|
+
], SgdsInput.prototype, "hasFeedback", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
property({ type: String, reflect: true })
|
|
275
|
+
], SgdsInput.prototype, "invalidFeedback", void 0);
|
|
248
276
|
__decorate([
|
|
249
277
|
defaultValue()
|
|
250
278
|
], SgdsInput.prototype, "defaultValue", void 0);
|
|
@@ -254,12 +282,21 @@ __decorate([
|
|
|
254
282
|
__decorate([
|
|
255
283
|
property({ type: Boolean, reflect: true })
|
|
256
284
|
], SgdsInput.prototype, "loading", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
property({ type: Boolean, reflect: true })
|
|
287
|
+
], SgdsInput.prototype, "required", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
property({ reflect: true })
|
|
290
|
+
], SgdsInput.prototype, "value", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
state()
|
|
293
|
+
], SgdsInput.prototype, "_isTouched", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
watch("_isTouched", { waitUntilFirstUpdate: true })
|
|
296
|
+
], SgdsInput.prototype, "_handleIsTouched", null);
|
|
257
297
|
__decorate([
|
|
258
298
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
259
299
|
], SgdsInput.prototype, "_handleDisabledChange", null);
|
|
260
|
-
__decorate([
|
|
261
|
-
watch("value", { waitUntilFirstUpdate: true })
|
|
262
|
-
], SgdsInput.prototype, "_handleValueChange", null);
|
|
263
300
|
|
|
264
301
|
export { SgdsInput, SgdsInput as default };
|
|
265
302
|
//# sourceMappingURL=sgds-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-input.js","sources":["../../../src/components/Input/sgds-input.ts"],"sourcesContent":["import { property, query } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { unsafeSVG } from \"lit/directives/unsafe-svg.js\";\nimport { html } from \"lit/static-html.js\";\nimport FormControlElement from \"../../base/form-control-element\";\nimport { SgdsSpinner } from \"../Spinner/sgds-spinner\";\nimport { defaultValue } from \"../../utils/defaultvalue\";\nimport type { SgdsFormControl } from \"../../utils/form\";\nimport { FormSubmitController } from \"../../utils/form\";\nimport genId from \"../../utils/generateId\";\nimport { watch } from \"../../utils/watch\";\nimport inputStyle from \"./input.css\";\nimport { nothing } from \"lit\";\n/**\n * @summary Text inputs allow your users to enter letters, numbers and symbols on a single line.\n *\n * @event sgds-change - Emitted when an alteration to the control's value is committed by the user.\n * @event sgds-input - Emitted when the control receives input and its value changes.\n * @event sgds-focus - Emitted when input is in focus.\n * @event sgds-blur - Emitted when input is not in focus.\n *\n */\nexport class SgdsInput extends FormControlElement implements SgdsFormControl {\n static styles = [...FormControlElement.styles, inputStyle];\n /**@internal */\n static get scopedElements() {\n return {\n \"sgds-spinner\": SgdsSpinner\n };\n }\n /**@internal */\n @query(\"input.form-control\") input: HTMLInputElement;\n /**@internal */\n protected readonly formSubmitController = new FormSubmitController(this);\n /** The type of input which works the same as HTMLInputElement */\n @property({ reflect: true }) type: \"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"time\" | \"url\" =\n \"text\";\n\n /** The prefix of the input */\n @property({ type: String }) prefix: string;\n\n /** The suffix of the input */\n @property({ type: String }) suffix: string;\n\n /** Optional. Pass svg html of icons in string form*/\n @property({ type: String }) icon: string;\n\n /** Sets the minimum length of the input */\n @property({ type: Number, reflect: true }) minlength: number;\n\n /** Sets the maximum length of the input */\n @property({ type: Number, reflect: true }) maxlength: number;\n\n /** The input's placeholder text. */\n @property({ type: String, reflect: true }) placeholder = \"placeholder\";\n\n /** A pattern to validate input against. */\n @property({ type: String }) pattern: string;\n\n /** Autofocus the input */\n @property({ type: Boolean, reflect: true }) autofocus = false;\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to number input types.\n */\n @property() step: number | \"any\";\n\n /**The input's value attribute. */\n @property({ reflect: true }) value = \"\";\n /**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */\n @defaultValue()\n defaultValue = \"\";\n\n /** Marks the component as valid. */\n @property({ type: Boolean, reflect: true }) valid = false;\n\n /** Marks the component as loading. */\n @property({ type: Boolean, reflect: true }) loading = false;\n\n /**@internal */\n protected inputId: string = genId(\"input\", this.type);\n\n /** Sets focus on the input. */\n public focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n /** Sets blur on the input. */\n public blur() {\n this.input.blur();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n public reportValidity() {\n return this.input.reportValidity();\n }\n /** Sets a custom validation message. Pass an empty string to restore validity */\n public setCustomValidity(err: string) {\n return this.input.setCustomValidity(err);\n }\n /** Programatically sets the invalid state of the input. Pass in boolean value in the argument */\n public setInvalid(bool: boolean) {\n this.invalid = bool;\n }\n\n protected _handleClick() {\n this.focus();\n }\n\n protected _handleChange(event: string) {\n this.value = this.input.value;\n this.emit(event);\n }\n\n protected _handleFocus() {\n this.emit(\"sgds-focus\");\n }\n\n protected _handleBlur() {\n this.emit(\"sgds-blur\");\n }\n\n protected _handleKeyDown(event: KeyboardEvent) {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === \"Enter\" && !hasModifier) {\n setTimeout(() => {\n // Prevent submission when enter is click on a submission in an Input Method Editor with isComposing\n if (!event.defaultPrevented && !event.isComposing) {\n this.formSubmitController.submit();\n }\n });\n }\n }\n\n @watch(\"disabled\", { waitUntilFirstUpdate: true })\n _handleDisabledChange() {\n // Disabled form controls are always valid, so we need to recheck validity when the state changes\n this.input.disabled = this.disabled;\n this.invalid = !this.input.checkValidity();\n }\n\n @watch(\"value\", { waitUntilFirstUpdate: true })\n _handleValueChange() {\n this.invalid = !this.input.checkValidity();\n }\n protected _renderInput() {\n return html`\n <div\n class=\"form-control-group ${classMap({\n disabled: this.disabled,\n readonly: this.readonly,\n \"is-invalid\": this.invalid && this.hasFeedback,\n \"quantity-toggle\": this.classList.contains(\"quantity-toggle\")\n })}\"\n @click=${this._handleClick}\n >\n ${this.icon ? html`<span class=\"form-control-icon\">${unsafeSVG(this.icon)}</span>` : nothing}\n ${this.prefix ? html`<span class=\"form-control-prefix\">${this.prefix}</span>` : nothing}\n <input\n class=\"form-control\"\n type=${this.type}\n id=${this.inputId}\n name=${ifDefined(this.name)}\n placeholder=${ifDefined(this.placeholder)}\n aria-invalid=${this.invalid ? \"true\" : \"false\"}\n pattern=${ifDefined(this.pattern)}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n .value=${live(this.value)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n @input=${() => this._handleChange(\"sgds-input\")}\n @change=${() => this._handleChange(\"sgds-change\")}\n @keydown=${this._handleKeyDown}\n @invalid=${() => this.setInvalid(true)}\n @focus=${this._handleFocus}\n @blur=${this._handleBlur}\n aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this.inputId}-invalid` : undefined)}\n aria-labelledby=\"${this.labelId} ${this.inputId}Help ${this.invalid && this.hasFeedback\n ? `${this.inputId}-invalid`\n : \"\"}\"\n />\n ${this.loading ? html`<sgds-spinner size=\"sm\"></sgds-spinner>` : nothing}\n ${this.valid\n ? html`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <path\n d=\"M21 12.5C21 17.4706 16.9706 21.5 12 21.5C7.02944 21.5 3 17.4706 3 12.5C3 7.52944 7.02944 3.5 12 3.5C16.9706 3.5 21 7.52944 21 12.5ZM16.5341 9.09088C16.2046 8.76137 15.6704 8.76137 15.3409 9.09088C15.3329 9.09884 15.3254 9.10726 15.3185 9.11612L11.4121 14.0938L9.05686 11.7386C8.72736 11.4091 8.19312 11.4091 7.86362 11.7386C7.53411 12.0681 7.53411 12.6024 7.86362 12.9319L10.8409 15.9091C11.1704 16.2386 11.7046 16.2386 12.0341 15.9091C12.0415 15.9018 12.0484 15.894 12.0549 15.8859L16.5461 10.2719C16.8636 9.94154 16.8596 9.41634 16.5341 9.09088Z\"\n fill=\"#006B00\"\n />\n </svg>`\n : nothing}\n ${this.suffix ? html`<span class=\"form-control-suffix\">${this.suffix}</span>` : nothing}\n </div>\n `;\n }\n protected _renderFeedback() {\n return this.invalid && this.hasFeedback\n ? html` <div class=\"invalid-feedback-container\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10ZM10 6.25C9.49805 6.25 9.10584 6.68339 9.15578 7.18285L9.48461 10.4711C9.51109 10.7359 9.7339 10.9375 10 10.9375C10.2661 10.9375 10.4889 10.7359 10.5154 10.4711L10.8442 7.18285C10.8942 6.68339 10.5019 6.25 10 6.25ZM10.0014 11.875C9.48368 11.875 9.06394 12.2947 9.06394 12.8125C9.06394 13.3303 9.48368 13.75 10.0014 13.75C10.5192 13.75 10.9389 13.3303 10.9389 12.8125C10.9389 12.2947 10.5192 11.875 10.0014 11.875Z\"\n fill=\"#B90000\"\n />\n </svg>\n <div id=\"${this.inputId}-invalid\" class=\"invalid-feedback\">${this.invalidFeedback}</div>\n </div>`\n : html`${this._renderHintText()}`;\n }\n protected _renderLabel() {\n const labelTemplate = html`\n <label\n for=${this.inputId}\n id=${this.labelId}\n class=${classMap({\n \"form-label\": true,\n required: this.required\n })}\n >${this.label}</label\n >\n `;\n return this.label && labelTemplate;\n }\n protected _renderHintText() {\n const hintTextTemplate = html` <div id=\"${this.inputId}Help\" class=\"form-text\">${this.hintText}</div> `;\n return this.hintText && hintTextTemplate;\n }\n render() {\n return html`\n <div\n class=\"form-control-container ${classMap({\n disabled: this.disabled\n })}\"\n >\n ${this._renderLabel()} ${this._renderInput()} ${this._renderFeedback()}\n </div>\n `;\n }\n}\n\nexport default SgdsInput;\n"],"names":["inputStyle"],"mappings":";;;;;;;;;;;;;;;;AAeA;;;;;;;;AAQG;AACG,MAAO,SAAU,SAAQ,kBAAkB,CAAA;AAAjD,IAAA,WAAA,GAAA;;;AAWqB,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;;QAE5C,IAAI,CAAA,IAAA,GAC/B,MAAM,CAAC;;QAkBkC,IAAW,CAAA,WAAA,GAAG,aAAa,CAAC;;QAM3B,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;;QAGlB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAShC,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;;QAGxC,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;;QAG0B,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;;QAGd,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;QAGlD,IAAO,CAAA,OAAA,GAAW,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAoKvD;;AA/NC,IAAA,WAAW,cAAc,GAAA;QACvB,OAAO;AACL,YAAA,cAAc,EAAE,WAAW;SAC5B,CAAC;KACH;;AA0DM,IAAA,KAAK,CAAC,OAAsB,EAAA;AACjC,QAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAC3B;;IAEM,IAAI,GAAA;AACT,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;KACnB;;IAGM,c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AAG0B,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAe,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGd,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAiB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AA4D5D,UAAA,CAAA;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAKjD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,uBAAA,EAAA,IAAA,CAAA,CAAA;AAGD,UAAA,CAAA;IADC,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAG9C,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,oBAAA,EAAA,IAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"sgds-input.js","sources":["../../../src/components/Input/sgds-input.ts"],"sourcesContent":["import { ScopedElementsMixin } from \"@open-wc/scoped-elements\";\nimport { nothing } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { unsafeSVG } from \"lit/directives/unsafe-svg.js\";\nimport { html } from \"lit/static-html.js\";\nimport FormControlElement from \"../../base/form-control-element\";\nimport formPlaceholderStyles from \"../../styles/form-placeholder.css\";\nimport { defaultValue } from \"../../utils/defaultvalue\";\nimport type { SgdsFormControl } from \"../../utils/formSubmitController\";\nimport { SgdsFormValidatorMixin } from \"../../utils/validatorMixin\";\nimport { watch } from \"../../utils/watch\";\nimport { SgdsSpinner } from \"../Spinner/sgds-spinner\";\nimport inputStyle from \"./input.css\";\n/**\n * @summary Text inputs allow your users to enter letters, numbers and symbols on a single line.\n *\n * @event sgds-change - Emitted when an alteration to the control's value is committed by the user.\n * @event sgds-input - Emitted when the control receives input and its value changes.\n * @event sgds-focus - Emitted when input is in focus.\n * @event sgds-blur - Emitted when input is not in focus.\n * @event sgds-invalid - Emitted when input is invalid\n * @event sgds-valid - Emitted when input is valid\n *\n */\nexport class SgdsInput\n extends SgdsFormValidatorMixin(ScopedElementsMixin(FormControlElement))\n implements SgdsFormControl\n{\n static styles = [...FormControlElement.styles, formPlaceholderStyles, inputStyle];\n\n /**@internal */\n static get scopedElements() {\n return {\n \"sgds-spinner\": SgdsSpinner\n };\n }\n @property({ reflect: true }) type: \"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"time\" | \"url\" =\n \"text\";\n\n /** The prefix of the input */\n @property({ type: String }) prefix: string;\n\n /** The suffix of the input */\n @property({ type: String }) suffix: string;\n\n /** Optional. Pass svg html of icons in string form*/\n @property({ type: String }) icon: string;\n\n /** Sets the minimum length of the input */\n @property({ type: Number, reflect: true }) minlength: number;\n\n /** Sets the maximum length of the input */\n @property({ type: Number, reflect: true }) maxlength: number;\n\n /** The input's minimum value. Only applies number input types. */\n @property() min: number;\n\n /** The input's maximum value. Only applies number input types. */\n @property() max: number;\n\n /** The input's placeholder text. */\n @property({ type: String, reflect: true }) placeholder = \"placeholder\";\n\n /** A pattern to validate input against. */\n @property({ type: String }) pattern: string;\n\n /** Autofocus the input */\n @property({ type: Boolean, reflect: true }) autofocus = false;\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to number input types.\n */\n @property() step: number | \"any\";\n\n /** Allows invalidFeedback, invalid and valid styles to be visible with the input */\n @property({ type: String, reflect: true }) hasFeedback: \"style\" | \"text\" | \"both\";\n\n /**Feedback text for error state when validated */\n @property({ type: String, reflect: true }) invalidFeedback: string;\n\n /**Gets or sets the default value used to reset this element. The initial value corresponds to the one originally specified in the HTML that created this element. */\n @defaultValue()\n defaultValue = \"\";\n\n /** Marks the component as valid. */\n @property({ type: Boolean, reflect: true }) valid = false;\n\n /** Marks the component as loading. */\n @property({ type: Boolean, reflect: true }) loading = false;\n\n /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /**The input's value attribute. */\n @property({ reflect: true }) value = \"\";\n\n @state() protected _isTouched = false;\n\n /** Sets focus on the input. */\n public focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n /** Sets blur on the input. */\n public blur() {\n this.input.blur();\n }\n\n /** Programatically sets the invalid state of the input. Pass in boolean value in the argument */\n public setInvalid(bool: boolean) {\n this.invalid = bool;\n if (bool) {\n this.emit(\"sgds-invalid\");\n } else {\n this.emit(\"sgds-valid\");\n }\n }\n /**\n * Checks for validity. Under the hood, HTMLFormElement's reportValidity method calls this method to check for component's validity state\n * Note that the native error popup is prevented for SGDS form components by default. Instead the validation message shows up in the feedback container of SgdsInput\n */\n public reportValidity(): boolean {\n return this._mixinReportValidity();\n }\n /**\n * Checks for validity without any native error popup message\n */\n public checkValidity(): boolean {\n return this._mixinCheckValidity();\n }\n\n /**\n * Returns the ValidityState object\n */\n public get validity(): ValidityState {\n return this._mixinGetValidity();\n }\n /**\n * Returns the validation message based on the ValidityState\n */\n public get validationMessage() {\n return this._mixinGetValidationMessage();\n }\n\n protected _handleFocus() {\n this.emit(\"sgds-focus\");\n }\n\n private _handleBlur() {\n this._isTouched = true;\n this.emit(\"sgds-blur\");\n }\n private _handleClick() {\n this.focus();\n }\n\n protected _handleChange(e: Event) {\n this.value = this.input.value;\n this.emit(\"sgds-change\");\n super._mixinHandleChange(e);\n }\n protected _handleInputChange(e: Event) {\n this.value = this.input.value;\n this.emit(\"sgds-input\");\n super._mixinHandleInputChange(e);\n }\n /** @internal */\n @watch(\"_isTouched\", { waitUntilFirstUpdate: true })\n _handleIsTouched() {\n if (this._isTouched) {\n this.setInvalid(!this._mixinCheckValidity());\n }\n }\n @watch(\"disabled\", { waitUntilFirstUpdate: true })\n _handleDisabledChange() {\n // Disabled form controls are always valid, so we need to recheck validity when the state changes\n this.setInvalid(false);\n }\n\n protected _renderInput() {\n const wantFeedbackStyle = this.hasFeedback === \"both\" || this.hasFeedback === \"style\";\n return html`\n <div\n class=\"form-control-group ${classMap({\n disabled: this.disabled,\n readonly: this.readonly,\n \"is-invalid\": this.invalid && wantFeedbackStyle\n })}\"\n @click=${this._handleClick}\n >\n ${this.icon ? html`<span class=\"form-control-icon\">${unsafeSVG(this.icon)}</span>` : nothing}\n ${this.prefix ? html`<span class=\"form-control-prefix\">${this.prefix}</span>` : nothing}\n <input\n class=\"form-control\"\n type=${this.type}\n id=${this._controlId}\n name=${ifDefined(this.name)}\n placeholder=${ifDefined(this.placeholder)}\n aria-invalid=${this.invalid ? \"true\" : \"false\"}\n pattern=${ifDefined(this.pattern)}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n .value=${live(this.value)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n @input=${(e: Event) => this._handleInputChange(e)}\n @change=${(e: Event) => this._handleChange(e)}\n @invalid=${() => this.setInvalid(true)}\n @focus=${this._handleFocus}\n @blur=${this._handleBlur}\n aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this._controlId}-invalid` : undefined)}\n aria-labelledby=\"${this._labelId} ${this._controlId}Help ${this.invalid && this.hasFeedback\n ? `${this._controlId}-invalid`\n : \"\"}\"\n />\n ${this.loading ? html`<sgds-spinner size=\"sm\"></sgds-spinner>` : nothing}\n ${this.valid\n ? html`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <path\n d=\"M21 12.5C21 17.4706 16.9706 21.5 12 21.5C7.02944 21.5 3 17.4706 3 12.5C3 7.52944 7.02944 3.5 12 3.5C16.9706 3.5 21 7.52944 21 12.5ZM16.5341 9.09088C16.2046 8.76137 15.6704 8.76137 15.3409 9.09088C15.3329 9.09884 15.3254 9.10726 15.3185 9.11612L11.4121 14.0938L9.05686 11.7386C8.72736 11.4091 8.19312 11.4091 7.86362 11.7386C7.53411 12.0681 7.53411 12.6024 7.86362 12.9319L10.8409 15.9091C11.1704 16.2386 11.7046 16.2386 12.0341 15.9091C12.0415 15.9018 12.0484 15.894 12.0549 15.8859L16.5461 10.2719C16.8636 9.94154 16.8596 9.41634 16.5341 9.09088Z\"\n fill=\"#006B00\"\n />\n </svg>`\n : nothing}\n ${this.suffix ? html`<span class=\"form-control-suffix\">${this.suffix}</span>` : nothing}\n </div>\n `;\n }\n protected _renderFeedback() {\n const wantFeedbackText = this.hasFeedback === \"both\" || this.hasFeedback === \"text\";\n return this.invalid && wantFeedbackText\n ? html` <div class=\"invalid-feedback-container\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10ZM10 6.25C9.49805 6.25 9.10584 6.68339 9.15578 7.18285L9.48461 10.4711C9.51109 10.7359 9.7339 10.9375 10 10.9375C10.2661 10.9375 10.4889 10.7359 10.5154 10.4711L10.8442 7.18285C10.8942 6.68339 10.5019 6.25 10 6.25ZM10.0014 11.875C9.48368 11.875 9.06394 12.2947 9.06394 12.8125C9.06394 13.3303 9.48368 13.75 10.0014 13.75C10.5192 13.75 10.9389 13.3303 10.9389 12.8125C10.9389 12.2947 10.5192 11.875 10.0014 11.875Z\"\n fill=\"#B90000\"\n />\n </svg>\n <div id=\"${this._controlId}-invalid\" class=\"invalid-feedback\">\n ${this.invalidFeedback ? this.invalidFeedback : this.input.validationMessage}\n </div>\n </div>`\n : html`${this._renderHintText()}`;\n }\n protected _renderLabel() {\n const labelTemplate = html`\n <label\n for=${this._controlId}\n id=${this._labelId}\n class=${classMap({\n \"form-label\": true,\n required: this.required\n })}\n >${this.label}</label\n >\n `;\n return this.label && labelTemplate;\n }\n protected _renderHintText() {\n const hintTextTemplate = html` <div id=\"${this._controlId}Help\" class=\"form-text\">${this.hintText}</div> `;\n return this.hintText && hintTextTemplate;\n }\n render() {\n return html`\n <div\n class=\"form-control-container ${classMap({\n disabled: this.disabled\n })}\"\n >\n ${this._renderLabel()} ${this._renderInput()} ${this._renderFeedback()}\n </div>\n `;\n }\n}\n\nexport default SgdsInput;\n"],"names":["formPlaceholderStyles","inputStyle"],"mappings":";;;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;AAUG;AACG,MAAO,SACX,SAAQ,sBAAsB,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,CAAA;AADzE,IAAA,WAAA,GAAA;;QAY+B,IAAI,CAAA,IAAA,GAC/B,MAAM,CAAC;;QAwBkC,IAAW,CAAA,WAAA,GAAG,aAAa,CAAC;;QAM3B,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;;QAGlB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAgB7D,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;;QAG0B,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;;QAGd,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;QAGhB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAGhC,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;QAErB,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;KAqLvC;;AA1PC,IAAA,WAAW,cAAc,GAAA;QACvB,OAAO;AACL,YAAA,cAAc,EAAE,WAAW;SAC5B,CAAC;KACH;;AAoEM,IAAA,KAAK,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OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAkB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGhC,UAAA,CAAA;AAA5B,IAAA,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAY,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAErB,UAAA,CAAA;AAAlB,IAAA,KAAK,EAAE;AAA8B,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,YAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAuEtC,UAAA,CAAA;IADC,KAAK,CAAC,YAAY,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAKnD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,IAAA,CAAA,CAAA;AAED,UAAA,CAAA;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAIjD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,uBAAA,EAAA,IAAA,CAAA;;;;"}
|
|
@@ -4121,7 +4121,7 @@
|
|
|
4121
4121
|
}
|
|
4122
4122
|
SgdsElement.styles = [css_248z$3];
|
|
4123
4123
|
|
|
4124
|
-
var css_248z$2 = css`:host{--masthead-max-width:1440px;--masthead-padding-x:2rem}b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc}a:hover{color:#0022b9}.sgds-masthead{color:light-dark(#252525,#eaeaea);font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#eaeaea,#252525)}.container{margin-left:auto;margin-right:auto;max-width:var(--masthead-max-width);padding:.25rem var(--masthead-padding-x);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap
|
|
4124
|
+
var css_248z$2 = css`:host{--masthead-max-width:1440px;--masthead-padding-x:2rem}b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc}a:hover{color:#0022b9}.sgds-masthead{color:light-dark(#252525,#eaeaea);font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#eaeaea,#252525)}.container{margin-left:auto;margin-right:auto;max-width:var(--masthead-max-width);padding:.25rem var(--masthead-padding-x);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .75rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0049dc,#7fb5ff);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0022b9,#5592ff)}.panel{background-color:light-dark(hsla(0,0%,5%,.05),hsla(0,0%,100%,.1))}.sgds-masthead .sgds-masthead-content{display:none;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content.show{display:block}.content-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#595959,#b2b2b2)}.banner-icon,.banner-icon-inline{height:20px;width:20px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#0e0e0e,#fff)}a.trusted-websites-link{color:light-dark(#0049dc,#7fb5ff);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0022b9,#5592ff)}@media screen and (max-width:768px){.container{--masthead-padding-x:1rem}.sgds-masthead-content .content-grid{gap:1rem;grid-template-columns:1fr}}`;
|
|
4125
4125
|
|
|
4126
4126
|
var css_248z$1 = css`svg{vertical-align:middle}`;
|
|
4127
4127
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
|
-
var css_248z = css`:host{--masthead-max-width:1440px;--masthead-padding-x:2rem}b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc}a:hover{color:#0022b9}.sgds-masthead{color:light-dark(#252525,#eaeaea);font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#eaeaea,#252525)}.container{margin-left:auto;margin-right:auto;max-width:var(--masthead-max-width);padding:.25rem var(--masthead-padding-x);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap
|
|
3
|
+
var css_248z = css`:host{--masthead-max-width:1440px;--masthead-padding-x:2rem}b{font-weight:bolder}[role=button]{cursor:pointer}a{color:#0049dc}a:hover{color:#0022b9}.sgds-masthead{color:light-dark(#252525,#eaeaea);font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem}.banner{background-color:light-dark(#eaeaea,#252525)}.container{margin-left:auto;margin-right:auto;max-width:var(--masthead-max-width);padding:.25rem var(--masthead-padding-x);width:100%}.sg-crest{flex-shrink:0;height:20px;width:20px}.sg-crest path{fill:#db0000}.masthead-layout{display:flex;gap:.25rem}.masthead-text-layout{align-items:center;display:flex;flex-wrap:wrap;gap:0 .75rem}.sgds-masthead-identify-icon{align-self:center;display:block;height:20px;transform:rotate(180deg);transition:transform .3s ease-in-out 0s;user-select:none;width:20px}.sgds-masthead-identify-icon.show{transform:rotate(0deg)}.sgds-masthead-button{align-items:center;color:light-dark(#0049dc,#7fb5ff);cursor:pointer;display:flex;gap:4px}.sgds-masthead-button:hover{color:light-dark(#0022b9,#5592ff)}.panel{background-color:light-dark(hsla(0,0%,5%,.05),hsla(0,0%,100%,.1))}.sgds-masthead .sgds-masthead-content{display:none;padding-bottom:1rem;padding-top:1rem}.sgds-masthead .sgds-masthead-content.show{display:block}.content-grid{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.icon{margin-top:-.1em}.wrapper{display:flex;gap:.5rem}.content{display:flex;flex-direction:column;gap:.25rem}.content .title{font-weight:600}.content article{color:light-dark(#595959,#b2b2b2)}.banner-icon,.banner-icon-inline{height:20px;width:20px}.banner-icon path,.banner-icon-inline path{fill:light-dark(#0e0e0e,#fff)}a.trusted-websites-link{color:light-dark(#0049dc,#7fb5ff);text-decoration:underline;width:fit-content}a.trusted-websites-link:hover{color:light-dark(#0022b9,#5592ff)}@media screen and (max-width:768px){.container{--masthead-padding-x:1rem}.sgds-masthead-content .content-grid{gap:1rem;grid-template-columns:1fr}}`;
|
|
4
4
|
|
|
5
5
|
export { css_248z as default };
|
|
6
6
|
//# sourceMappingURL=masthead.js.map
|
|
@@ -5019,7 +5019,7 @@
|
|
|
5019
5019
|
|
|
5020
5020
|
const ScopedElementsMixin = dedupeMixin(ScopedElementsMixinImplementation);
|
|
5021
5021
|
|
|
5022
|
-
var css_248z$2 = css`:host{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm);display:inline-flex}.btn-close{background-color:var(--sgds-default-bg-transparent);border:0;border:var(--sgds-border-width-1) solid var(--sgds-default-border-color-transparent);border-radius:var(--sgds-close-btn-border-radius);cursor:pointer;height:var(--sgds-dimension-32);padding:0;position:relative;width:var(--sgds-dimension-32)}.btn-close:before{background-color:currentColor;border-radius:var(--sgds-border-radius);box-sizing:content-box;color:var(--sgds-default-color);content:"";height:var(--sgds-icon-size-
|
|
5022
|
+
var css_248z$2 = css`:host{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm);display:inline-flex}.btn-close{background-color:var(--sgds-default-bg-transparent);border:0;border:var(--sgds-border-width-1) solid var(--sgds-default-border-color-transparent);border-radius:var(--sgds-close-btn-border-radius);cursor:pointer;height:var(--sgds-dimension-32);padding:0;position:relative;width:var(--sgds-dimension-32)}.btn-close:before{background-color:currentColor;border-radius:var(--sgds-border-radius);box-sizing:content-box;color:var(--sgds-default-color);content:"";height:var(--sgds-icon-size-md);left:50%;mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M5.614 5.614a.75.75 0 0 1 1.06 0l5.304 5.303 5.303-5.303a.75.75 0 0 1 1.06 1.06l-5.302 5.304 5.303 5.303a.75.75 0 0 1-1.06 1.06l-5.304-5.302-5.303 5.303a.75.75 0 0 1-1.061-1.06l5.303-5.304-5.303-5.303a.75.75 0 0 1 0-1.061Z'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M5.614 5.614a.75.75 0 0 1 1.06 0l5.304 5.303 5.303-5.303a.75.75 0 0 1 1.06 1.06l-5.302 5.304 5.303 5.303a.75.75 0 0 1-1.06 1.06l-5.304-5.302-5.303 5.303a.75.75 0 0 1-1.061-1.06l5.303-5.304-5.303-5.303a.75.75 0 0 1 0-1.061Z'/%3E%3C/svg%3E");mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--sgds-icon-size-md)}.btn-close-light:before{color:var(--sgds-default-color-on-dark)}.btn-close-dark:before{color:var(--sgds-default-color-on-light)}.btn-close:hover{background-color:var(--sgds-default-bg-translucent)}.btn-close:focus,.btn-close:focus-visible{background-color:var(--sgds-default-bg-translucent);box-shadow:var(--sgds-box-shadow-focus);outline:0}.btn-close-sm{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.btn-close.btn-close-sm:before{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}`;
|
|
5023
5023
|
|
|
5024
5024
|
/**
|
|
5025
5025
|
* @summary Close button for closing actions. Used in Modal, Drawer, Alert and Toast.
|
|
@@ -5057,7 +5057,7 @@
|
|
|
5057
5057
|
`;
|
|
5058
5058
|
}
|
|
5059
5059
|
}
|
|
5060
|
-
SgdsCloseButton.styles = [css_248z$2];
|
|
5060
|
+
SgdsCloseButton.styles = [...SgdsElement.styles, css_248z$2];
|
|
5061
5061
|
__decorate([
|
|
5062
5062
|
property({ type: String })
|
|
5063
5063
|
], SgdsCloseButton.prototype, "ariaLabel", void 0);
|