@stihl-design-system/components 1.0.0-RC.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +42 -0
- package/README.md +56 -0
- package/apple-icon.png +0 -0
- package/assets/Asterisk.582f2067.css +1 -0
- package/assets/Button.684e8bda.css +1 -0
- package/assets/ButtonRound.ca8748cf.css +1 -0
- package/assets/Checkbox.84cf6398.css +1 -0
- package/assets/CustomReactSelect.d89ccccb.css +1 -0
- package/assets/Fieldset.5297efb8.css +1 -0
- package/assets/FloatingActionButton.de295f5d.css +1 -0
- package/assets/Heading.32278621.css +1 -0
- package/assets/Icon.8890ee9a.css +1 -0
- package/assets/Input.2c508b2f.css +1 -0
- package/assets/InputPassword.a534f047.css +1 -0
- package/assets/InputSearch.8f986307.css +1 -0
- package/assets/InputStepper.52fb45ca.css +1 -0
- package/assets/Link.03deeca0.css +1 -0
- package/assets/LinkStandalone.7e23a8ac.css +1 -0
- package/assets/Logo.09e48e82.css +1 -0
- package/assets/OptionCheckbox.9c20f6f1.css +1 -0
- package/assets/Radio.be8f06f5.css +1 -0
- package/assets/RadioGroup.8b55ee38.css +1 -0
- package/assets/Select.b2423b5f.css +1 -0
- package/assets/Spinner.af45d460.css +1 -0
- package/assets/Switch.f3ab20de.css +1 -0
- package/assets/SystemFeedback.f4421d60.css +1 -0
- package/assets/Text.4756effe.css +1 -0
- package/assets/Textarea.eecf04b3.css +1 -0
- package/assets/Title.60d50d3e.css +1 -0
- package/asterisk.91abccec.js +8 -0
- package/asterisk.d.ts +1 -0
- package/button.89b2675b.js +135 -0
- package/button.d.ts +1 -0
- package/buttonround.c60c8034.js +118 -0
- package/buttonround.d.ts +1 -0
- package/checkbox.7d414047.js +112 -0
- package/checkbox.d.ts +1 -0
- package/checkboxgroup.d.ts +1 -0
- package/checkboxgroup.e9e25471.js +78 -0
- package/chunks/360.3f3132d9.js +11 -0
- package/chunks/CustomReactSelect.9d0a378a.js +5011 -0
- package/chunks/Input.utils.f8f3286f.js +106 -0
- package/chunks/Link.module.b8230547.js +37 -0
- package/chunks/RadioGroup.module.59ca486a.js +11 -0
- package/chunks/academic-cap.a6849ffc.js +11 -0
- package/chunks/alarm-clock.542230f3.js +11 -0
- package/chunks/arrow-clockwise.0496f663.js +11 -0
- package/chunks/arrow-counterclockwise.635a0130.js +11 -0
- package/chunks/arrow-down-line.0976611e.js +11 -0
- package/chunks/arrow-down.9780d975.js +11 -0
- package/chunks/arrow-edge.3288acdd.js +11 -0
- package/chunks/arrow-left.ace9c808.js +11 -0
- package/chunks/arrow-out.0499f39e.js +11 -0
- package/chunks/arrow-outline-left.efc33275.js +11 -0
- package/chunks/arrow-right.133feef2.js +11 -0
- package/chunks/arrow-up-arrow-down.b612e9b1.js +11 -0
- package/chunks/arrow-up.3be6430a.js +11 -0
- package/chunks/at.6279d12b.js +11 -0
- package/chunks/barcode-scanner.0a4a314d.js +11 -0
- package/chunks/battery.e1249ee1.js +11 -0
- package/chunks/bell.87fe4f0b.js +11 -0
- package/chunks/bin-open.be4290d8.js +11 -0
- package/chunks/bin.b36466f3.js +11 -0
- package/chunks/bluetooth.54b89b90.js +11 -0
- package/chunks/bookmark.4d5ce4c3.js +11 -0
- package/chunks/burger.1301d91e.js +11 -0
- package/chunks/calendar.ba39a664.js +11 -0
- package/chunks/camera.3bed4f3b.js +11 -0
- package/chunks/cart-check.9fb6abdb.js +11 -0
- package/chunks/cart-plus.fd5c4674.js +11 -0
- package/chunks/cart.7516d35c.js +11 -0
- package/chunks/catalog.bd0c7830.js +11 -0
- package/chunks/certificate.1639c28e.js +11 -0
- package/chunks/chain-link.45025ed0.js +11 -0
- package/chunks/chainsaw.56d43a9f.js +11 -0
- package/chunks/check.a08beeae.js +11 -0
- package/chunks/chevron-down.80b0dc85.js +11 -0
- package/chunks/chevron-left.f5feade0.js +11 -0
- package/chunks/chevron-line-left.17b172d1.js +11 -0
- package/chunks/chevron-line-right.7cd234b7.js +11 -0
- package/chunks/chevron-right.259bc1a3.js +11 -0
- package/chunks/chevron-up.d1335850.js +11 -0
- package/chunks/circle-check-colored.98e13ab9.js +11 -0
- package/chunks/circle-check-inverted.db29ab06.js +11 -0
- package/chunks/circle-info-colored.8da47e36.js +11 -0
- package/chunks/circle-info-inverted.0ed118fb.js +11 -0
- package/chunks/circle-pause.55300d1b.js +11 -0
- package/chunks/circle-stroke.203dd7aa.js +11 -0
- package/chunks/circle.33ec82eb.js +11 -0
- package/chunks/clock.3014a102.js +11 -0
- package/chunks/coffee-cup.98d6531f.js +11 -0
- package/chunks/compare.c76b221b.js +11 -0
- package/chunks/connected-box-mobile.9cd742dd.js +11 -0
- package/chunks/connected-box-stationary.191a3ed0.js +11 -0
- package/chunks/connected-box.fe21c39b.js +11 -0
- package/chunks/cross.fe709ee7.js +11 -0
- package/chunks/diamond-exclamationmark-colored.bf3ffccf.js +11 -0
- package/chunks/diamond-exclamationmark-inverted.b5648587.js +11 -0
- package/chunks/diamond.e962c289.js +11 -0
- package/chunks/diskette.04733444.js +11 -0
- package/chunks/distance.9e6b56ff.js +11 -0
- package/chunks/dots-connected.9869fae1.js +11 -0
- package/chunks/download-complete.0b84a7cc.js +11 -0
- package/chunks/envelope-open.3c3fd714.js +11 -0
- package/chunks/envelope.5c9ff834.js +11 -0
- package/chunks/exclamationmark.92afe58f.js +11 -0
- package/chunks/exit.bde46887.js +11 -0
- package/chunks/eye-closed.0b517bb7.js +11 -0
- package/chunks/eye.8f4b311b.js +11 -0
- package/chunks/facebook.4a040606.js +11 -0
- package/chunks/filter.dee66683.js +11 -0
- package/chunks/finger-double-arrow.9cd4c623.js +11 -0
- package/chunks/flash.15646b5e.js +11 -0
- package/chunks/fullscreen.fdd976fe.js +11 -0
- package/chunks/gear.1f5f6fe9.js +11 -0
- package/chunks/globe.7f419498.js +11 -0
- package/chunks/grid.2c1cdc21.js +11 -0
- package/chunks/guidance.63bebf3e.js +11 -0
- package/chunks/haircross.0ac15319.js +11 -0
- package/chunks/hanger.edc848f4.js +11 -0
- package/chunks/headphones.a023699e.js +11 -0
- package/chunks/heart.d4440641.js +11 -0
- package/chunks/helpers.ea3ca41a.js +7 -0
- package/chunks/hexagon-arrow-clockwise.98e9b555.js +11 -0
- package/chunks/horizontal-ellipsis.84419429.js +11 -0
- package/chunks/house.70059642.js +11 -0
- package/chunks/imow.3374e620.js +11 -0
- package/chunks/index.8021d3e0.js +45 -0
- package/chunks/info.1787448e.js +11 -0
- package/chunks/instagram.e12dd682.js +11 -0
- package/chunks/jsx-runtime.5c071667.js +632 -0
- package/chunks/leave-fullscreen.def46043.js +11 -0
- package/chunks/lightbulb.b73d3ebf.js +11 -0
- package/chunks/linkedin.ce0c68cb.js +11 -0
- package/chunks/list-three-rows.ef44c7ef.js +11 -0
- package/chunks/list-two-rows.5ed8f1af.js +11 -0
- package/chunks/loading-spinner.8293421e.js +11 -0
- package/chunks/lock.3cbc8ced.js +11 -0
- package/chunks/magnifying-glass-minus.b0f906e5.js +11 -0
- package/chunks/magnifying-glass-plus.6ffc69c5.js +11 -0
- package/chunks/magnifying-glass.c297e41f.js +11 -0
- package/chunks/map.c96b1dcd.js +11 -0
- package/chunks/minus.7f6676e8.js +11 -0
- package/chunks/mobile.416ee5b0.js +11 -0
- package/chunks/nine-squares.34eeb0d4.js +11 -0
- package/chunks/note-check.aaf92ef9.js +11 -0
- package/chunks/note-plus.e7ab1b93.js +11 -0
- package/chunks/note.cc96375c.js +11 -0
- package/chunks/number-input.076fcf63.js +11 -0
- package/chunks/paperclip.e8831256.js +11 -0
- package/chunks/parcel.75534dbd.js +11 -0
- package/chunks/pause.901567cf.js +11 -0
- package/chunks/pdf.92c1781a.js +11 -0
- package/chunks/pen.ecbcb50d.js +11 -0
- package/chunks/percent.4b7fa587.js +11 -0
- package/chunks/petrol.41999bec.js +11 -0
- package/chunks/phone.3c23c041.js +11 -0
- package/chunks/pin-s.a5519070.js +11 -0
- package/chunks/pin.1137362d.js +11 -0
- package/chunks/pinterest.88763b51.js +11 -0
- package/chunks/placeholder.d6fdaf8f.js +11 -0
- package/chunks/play.dd0f1d8c.js +11 -0
- package/chunks/plug.00f114c4.js +11 -0
- package/chunks/plus.42721ebf.js +11 -0
- package/chunks/printer.5bb7ee0d.js +11 -0
- package/chunks/prohibition-sign.af5616b3.js +11 -0
- package/chunks/questionmark.db94a06d.js +11 -0
- package/chunks/security.2be491e3.js +11 -0
- package/chunks/share.ddae7aef.js +11 -0
- package/chunks/shirt.135d58c1.js +11 -0
- package/chunks/shop.f120426b.js +11 -0
- package/chunks/sound-off.c6f5ed43.js +11 -0
- package/chunks/sound-on.212c36bc.js +11 -0
- package/chunks/speechbubble.9428546e.js +11 -0
- package/chunks/speechbubbles.65cb946e.js +11 -0
- package/chunks/square.452f505f.js +11 -0
- package/chunks/star-half.1458bc5b.js +11 -0
- package/chunks/star.fab17456.js +11 -0
- package/chunks/tag.4d730d72.js +11 -0
- package/chunks/thumbs-down.cbf6e4ec.js +11 -0
- package/chunks/thumbs-up.435754e1.js +11 -0
- package/chunks/triangle-exclamationmark-colored.94025893.js +11 -0
- package/chunks/triangle-exclamationmark-inverted.bc4eed15.js +11 -0
- package/chunks/triangle.bff84ddf.js +11 -0
- package/chunks/truck.a904d6d3.js +11 -0
- package/chunks/two-people-screen.3e509922.js +11 -0
- package/chunks/two-sheets.d1cfef0f.js +11 -0
- package/chunks/upload.7f1850a3.js +11 -0
- package/chunks/useBreakpoint.6c1b06c2.js +48 -0
- package/chunks/user.bf5b30a5.js +11 -0
- package/chunks/vertical-ellipsis.1cac00e5.js +11 -0
- package/chunks/wc.9d108bd0.js +11 -0
- package/chunks/wifi-1bar.b6fc33aa.js +11 -0
- package/chunks/wifi-2bars.27e9da59.js +11 -0
- package/chunks/wifi-off.e5daf3a9.js +11 -0
- package/chunks/wifi.40bb915d.js +11 -0
- package/chunks/wind-rose.27fa658a.js +11 -0
- package/chunks/wrench.69493ef3.js +11 -0
- package/chunks/x.d9da4202.js +11 -0
- package/chunks/xing.e17c1a24.js +11 -0
- package/chunks/youtube.dbf50787.js +11 -0
- package/combobox.d.ts +1 -0
- package/combobox.f98a4472.js +45 -0
- package/components/Asterisk/Asterisk.d.ts +2 -0
- package/components/Button/Button.d.ts +45 -0
- package/components/Button/Button.test.d.ts +1 -0
- package/components/Button/Button.utils.d.ts +6 -0
- package/components/ButtonRound/ButtonRound.d.ts +11 -0
- package/components/ButtonRound/ButtonRound.test.d.ts +1 -0
- package/components/ButtonRound/ButtonRound.utils.d.ts +2 -0
- package/components/Checkbox/Checkbox.d.ts +26 -0
- package/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/components/CheckboxGroup/CheckboxGroup.d.ts +41 -0
- package/components/CheckboxGroup/CheckboxGroup.test.d.ts +1 -0
- package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +4 -0
- package/components/Combobox/Combobox.d.ts +18 -0
- package/components/Combobox/Combobox.test.d.ts +1 -0
- package/components/Combobox/Combobox.utils.d.ts +57 -0
- package/components/Combobox/Combobox.utils.test.d.ts +1 -0
- package/components/CustomReactSelect/CustomReactSelect.d.ts +60 -0
- package/components/CustomReactSelect/CustomReactSelect.utils.d.ts +15 -0
- package/components/CustomReactSelect/CustomReactSelect.utils.test.d.ts +1 -0
- package/components/CustomReactSelect/OptionCheckbox.d.ts +13 -0
- package/components/Fieldset/Fieldset.d.ts +35 -0
- package/components/Fieldset/Fieldset.test.d.ts +1 -0
- package/components/Fieldset/Fieldset.utils.d.ts +10 -0
- package/components/FloatingActionButton/FloatingActionButton.d.ts +13 -0
- package/components/FloatingActionButton/FloatingActionButton.test.d.ts +1 -0
- package/components/Heading/Heading.d.ts +18 -0
- package/components/Heading/Heading.test.d.ts +1 -0
- package/components/Heading/Heading.utils.d.ts +4 -0
- package/components/Icon/Icon.d.ts +23 -0
- package/components/Icon/Icon.test.d.ts +1 -0
- package/components/Icon/Icon.utils.d.ts +12 -0
- package/components/Input/Input.d.ts +54 -0
- package/components/Input/Input.test.d.ts +1 -0
- package/components/Input/Input.utils.d.ts +59 -0
- package/components/Input/Input.utils.test.d.ts +1 -0
- package/components/InputPassword/InputPassword.d.ts +41 -0
- package/components/InputPassword/InputPassword.test.d.ts +1 -0
- package/components/InputPassword/InputPassword.utils.d.ts +12 -0
- package/components/InputPassword/InputPassword.utils.test.d.ts +1 -0
- package/components/InputSearch/InputSearch.d.ts +44 -0
- package/components/InputSearch/InputSearch.test.d.ts +1 -0
- package/components/InputSearch/InputSearch.utils.d.ts +23 -0
- package/components/InputSearch/InputSearch.utils.test.d.ts +1 -0
- package/components/InputStepper/InputStepper.d.ts +52 -0
- package/components/InputStepper/InputStepper.test.d.ts +1 -0
- package/components/InputStepper/InputStepper.utils.d.ts +12 -0
- package/components/InputStepper/InputStepper.utils.test.d.ts +1 -0
- package/components/Link/Link.d.ts +50 -0
- package/components/Link/Link.test.d.ts +1 -0
- package/components/Link/Link.utils.d.ts +8 -0
- package/components/LinkStandalone/LinkStandalone.d.ts +15 -0
- package/components/LinkStandalone/LinkStandalone.test.d.ts +1 -0
- package/components/LinkStandalone/LinkStandalone.utils.d.ts +2 -0
- package/components/Logo/Logo.d.ts +21 -0
- package/components/Logo/Logo.utils.d.ts +3 -0
- package/components/Radio/Radio.d.ts +27 -0
- package/components/Radio/Radio.test.d.ts +1 -0
- package/components/RadioGroup/RadioGroup.d.ts +56 -0
- package/components/RadioGroup/RadioGroup.test.d.ts +1 -0
- package/components/RadioGroup/RadioGroup.utils.d.ts +6 -0
- package/components/Select/Select.d.ts +43 -0
- package/components/Select/Select.test.d.ts +1 -0
- package/components/Select/Select.utils.d.ts +35 -0
- package/components/Select/Select.utils.test.d.ts +1 -0
- package/components/Spinner/Spinner.d.ts +14 -0
- package/components/Spinner/Spinner.test.d.ts +1 -0
- package/components/Spinner/Spinner.utils.d.ts +3 -0
- package/components/Switch/Switch.d.ts +29 -0
- package/components/Switch/Switch.test.d.ts +1 -0
- package/components/Switch/Switch.utils.d.ts +2 -0
- package/components/SystemFeedback/SystemFeedback.d.ts +9 -0
- package/components/SystemFeedback/SystemFeedback.test.d.ts +1 -0
- package/components/SystemFeedback/SystemFeedback.utils.d.ts +8 -0
- package/components/Text/Text.d.ts +21 -0
- package/components/Text/Text.test.d.ts +1 -0
- package/components/Text/Text.utils.d.ts +6 -0
- package/components/Textarea/Textarea.d.ts +42 -0
- package/components/Textarea/Textarea.test.d.ts +1 -0
- package/components/Textarea/Textarea.utils.d.ts +13 -0
- package/components/Textarea/Textarea.utils.test.d.ts +1 -0
- package/components/Title/Title.d.ts +20 -0
- package/components/Title/Title.test.d.ts +1 -0
- package/components/Title/Title.utils.d.ts +3 -0
- package/customreactselect.a53f9932.js +13 -0
- package/customreactselect.d.ts +1 -0
- package/favicon.ico +0 -0
- package/fieldset.d.ts +1 -0
- package/fieldset.fb7b7e49.js +98 -0
- package/floatingactionbutton.281b5465.js +87 -0
- package/floatingactionbutton.d.ts +1 -0
- package/heading.cb7698f4.js +44 -0
- package/heading.d.ts +1 -0
- package/icon-192.png +0 -0
- package/icon-512.png +0 -0
- package/icon.b4211784.js +215 -0
- package/icon.d.ts +1 -0
- package/icon.svg +1 -0
- package/index.d.ts +23 -0
- package/index.es.js +49 -0
- package/input.abb902e3.js +228 -0
- package/input.d.ts +1 -0
- package/inputpassword.11c12c66.js +139 -0
- package/inputpassword.d.ts +1 -0
- package/inputsearch.0c88e71a.js +188 -0
- package/inputsearch.d.ts +1 -0
- package/inputstepper.b74dac4d.js +284 -0
- package/inputstepper.d.ts +1 -0
- package/link.cd3720d1.js +84 -0
- package/link.d.ts +1 -0
- package/linkstandalone.26b52de0.js +80 -0
- package/linkstandalone.d.ts +1 -0
- package/logo.d.ts +1 -0
- package/logo.e6576fe3.js +68 -0
- package/manifest.json +6 -0
- package/manifest.webmanifest +6 -0
- package/optioncheckbox.7195f001.js +43 -0
- package/optioncheckbox.d.ts +1 -0
- package/package.json +125 -0
- package/partials/apple-icon.png +0 -0
- package/partials/copyAssets.js +84 -0
- package/partials/favicon.ico +0 -0
- package/partials/icon-192.png +0 -0
- package/partials/icon-512.png +0 -0
- package/partials/icon.svg +1 -0
- package/partials/index.d.ts +2 -0
- package/partials/index.js +2167 -0
- package/partials/lib/partials.d.ts +17 -0
- package/partials/manifest.json +6 -0
- package/partials/manifest.webmanifest +6 -0
- package/partials/shared.d.ts +2 -0
- package/radio.1b205d64.js +79 -0
- package/radio.d.ts +1 -0
- package/radiogroup.6a22fe96.js +100 -0
- package/radiogroup.d.ts +1 -0
- package/react.svg +1 -0
- package/select.2ff31eab.js +188 -0
- package/select.d.ts +1 -0
- package/spinner.d.ts +1 -0
- package/spinner.ee015469.js +58 -0
- package/styles/fonts/STIHLContrafaceDisplayTitling.woff +0 -0
- package/styles/fonts/STIHLContrafaceDisplayTitling.woff2 +0 -0
- package/styles/fonts/STIHLContrafaceText-Bold.woff +0 -0
- package/styles/fonts/STIHLContrafaceText-Bold.woff2 +0 -0
- package/styles/fonts/STIHLContrafaceText.woff +0 -0
- package/styles/fonts/STIHLContrafaceText.woff2 +0 -0
- package/styles/fonts/font-face.min.css +1 -0
- package/styles/fonts/index.es.js +1 -0
- package/styles/scss/_index.scss +21 -0
- package/styles/scss/lib/_a11y.scss +15 -0
- package/styles/scss/lib/_animation.scss +6 -0
- package/styles/scss/lib/_breakpoints.scss +16 -0
- package/styles/scss/lib/_container-query.scss +58 -0
- package/styles/scss/lib/_focus.scss +61 -0
- package/styles/scss/lib/_grid-extended.scss +11 -0
- package/styles/scss/lib/_grid-full.scss +6 -0
- package/styles/scss/lib/_grid-main.scss +117 -0
- package/styles/scss/lib/_grid-narrow.scss +14 -0
- package/styles/scss/lib/_grid-sidebar-sidebar.scss +48 -0
- package/styles/scss/lib/_grid-sidebar.scss +174 -0
- package/styles/scss/lib/_grid.scss +86 -0
- package/styles/scss/lib/_heading.scss +45 -0
- package/styles/scss/lib/_helpers.scss +3 -0
- package/styles/scss/lib/_hover.scss +10 -0
- package/styles/scss/lib/_link.scss +155 -0
- package/styles/scss/lib/_media-query.scss +32 -0
- package/styles/scss/lib/_spacing.scss +18 -0
- package/styles/scss/lib/_text.scss +63 -0
- package/styles/scss/lib/_theme.scss +160 -0
- package/styles/scss/lib/_transition.scss +26 -0
- package/switch.2f011fcc.js +65 -0
- package/switch.d.ts +1 -0
- package/systemfeedback.6bbd1505.js +25 -0
- package/systemfeedback.d.ts +1 -0
- package/text.8d80704f.js +57 -0
- package/text.d.ts +1 -0
- package/textarea.d.ts +1 -0
- package/textarea.e156b0ce.js +189 -0
- package/title.d.ts +1 -0
- package/title.d855a8e4.js +36 -0
- package/types/aria-types.d.ts +330 -0
- package/types/common-types.d.ts +13 -0
- package/types/icon-types.d.ts +2 -0
- package/types/index.d.ts +3 -0
- package/utils/breakpoint-customizable.d.ts +12 -0
- package/utils/has-document.d.ts +1 -0
- package/utils/has-window.d.ts +1 -0
- package/utils/helpers.d.ts +27 -0
- package/utils/helpers.test.d.ts +1 -0
- package/utils/index.d.ts +4 -0
- package/utils/link-target.d.ts +2 -0
- package/utils/render-documentation.d.ts +26 -0
- package/utils/theme.d.ts +2 -0
- package/utils/useBreakpoint.d.ts +12 -0
- package/utils/useBreakpoint.test.d.ts +1 -0
- package/utils/vitest.setup.d.ts +0 -0
- package/utils/wait-for-icon.d.ts +25 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import "./assets/Textarea.eecf04b3.css";
|
|
2
|
+
import { j as o } from "./chunks/jsx-runtime.5c071667.js";
|
|
3
|
+
import { c as S } from "./chunks/index.8021d3e0.js";
|
|
4
|
+
import { useState as c, useRef as ie, useEffect as m } from "react";
|
|
5
|
+
import { u as ne, h as re } from "./chunks/useBreakpoint.6c1b06c2.js";
|
|
6
|
+
import { g as H, p as V } from "./chunks/helpers.ea3ca41a.js";
|
|
7
|
+
import { Asterisk as se } from "./asterisk.91abccec.js";
|
|
8
|
+
import { DSSystemFeedback as le } from "./systemfeedback.6bbd1505.js";
|
|
9
|
+
const ce = "_textarea_1oki7_73", de = "_textarea--invalid_1oki7_183", ue = "_textarea--small_1oki7_190", _e = "_textarea--resize-auto_1oki7_202", fe = "_root_1oki7_212", xe = "_hint_1oki7_220", me = "_label_1oki7_220", he = "_affix_1oki7_224", be = "_affix--small_1oki7_242", ke = "_affix--disabled_1oki7_254", pe = "_prefix_1oki7_258", ve = "_suffix_1oki7_264", Se = "_leading-icon_1oki7_269", Ce = "_leading-icon--small_1oki7_274", Ie = "_action-button_1oki7_278", ge = "_label--hidden_1oki7_295", je = "_feedback_1oki7_322", we = "_char-count_1oki7_327", Ae = "_char-count-announcer_1oki7_342", t = {
|
|
10
|
+
textarea: ce,
|
|
11
|
+
"textarea--invalid": "_textarea--invalid_1oki7_183",
|
|
12
|
+
textareaInvalid: de,
|
|
13
|
+
"textarea--small": "_textarea--small_1oki7_190",
|
|
14
|
+
textareaSmall: ue,
|
|
15
|
+
"textarea--resize-auto": "_textarea--resize-auto_1oki7_202",
|
|
16
|
+
textareaResizeAuto: _e,
|
|
17
|
+
root: fe,
|
|
18
|
+
hint: xe,
|
|
19
|
+
label: me,
|
|
20
|
+
affix: he,
|
|
21
|
+
"affix--small": "_affix--small_1oki7_242",
|
|
22
|
+
affixSmall: be,
|
|
23
|
+
"affix--disabled": "_affix--disabled_1oki7_254",
|
|
24
|
+
affixDisabled: ke,
|
|
25
|
+
prefix: pe,
|
|
26
|
+
suffix: ve,
|
|
27
|
+
"leading-icon": "_leading-icon_1oki7_269",
|
|
28
|
+
leadingIcon: Se,
|
|
29
|
+
"leading-icon--small": "_leading-icon--small_1oki7_274",
|
|
30
|
+
leadingIconSmall: Ce,
|
|
31
|
+
"action-button": "_action-button_1oki7_278",
|
|
32
|
+
actionButton: Ie,
|
|
33
|
+
"label--hidden": "_label--hidden_1oki7_295",
|
|
34
|
+
labelHidden: ge,
|
|
35
|
+
feedback: je,
|
|
36
|
+
"char-count": "_char-count_1oki7_327",
|
|
37
|
+
charCount: we,
|
|
38
|
+
"char-count-announcer": "_char-count-announcer_1oki7_342",
|
|
39
|
+
charCountAnnouncer: Ae
|
|
40
|
+
}, ye = ({ id: i, label: u }) => {
|
|
41
|
+
if (!i)
|
|
42
|
+
throw new Error(
|
|
43
|
+
H(
|
|
44
|
+
"DSTextarea",
|
|
45
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
if (!u)
|
|
49
|
+
throw new Error(
|
|
50
|
+
H(
|
|
51
|
+
"DSTextarea",
|
|
52
|
+
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
}, Ve = ({
|
|
56
|
+
id: i,
|
|
57
|
+
label: u,
|
|
58
|
+
charsLimitText: z = "Character limit reached",
|
|
59
|
+
charsRemainingText: P = "Characters remaining:",
|
|
60
|
+
className: q,
|
|
61
|
+
defaultValue: M,
|
|
62
|
+
disabled: O = !1,
|
|
63
|
+
hint: h,
|
|
64
|
+
hideLabel: F = !1,
|
|
65
|
+
invalid: n = !1,
|
|
66
|
+
maxLength: e,
|
|
67
|
+
readonly: C = !1,
|
|
68
|
+
required: I = !1,
|
|
69
|
+
resize: _ = "vertical",
|
|
70
|
+
size: W = "medium",
|
|
71
|
+
systemFeedback: s,
|
|
72
|
+
value: b,
|
|
73
|
+
wrapperClassName: G,
|
|
74
|
+
onChange: g,
|
|
75
|
+
onInput: j,
|
|
76
|
+
...J
|
|
77
|
+
}) => {
|
|
78
|
+
process.env.NODE_ENV !== "production" && ye({
|
|
79
|
+
id: i,
|
|
80
|
+
label: u
|
|
81
|
+
});
|
|
82
|
+
const [K, w] = c(M || ""), [l, A] = c(0), [Q, y] = c(0), [U, D] = c("off"), [N, k] = c(s), [p, v] = c(n), R = b !== void 0, f = R ? b : K, r = ie(null), X = ne(F);
|
|
83
|
+
m(() => {
|
|
84
|
+
if (!e || e <= 0)
|
|
85
|
+
return;
|
|
86
|
+
l >= e * 0.8 ? D("polite") : D("off");
|
|
87
|
+
const a = setTimeout(() => {
|
|
88
|
+
y(e - l || 0);
|
|
89
|
+
}, 1e3);
|
|
90
|
+
return () => clearTimeout(a);
|
|
91
|
+
}, [l]), m(() => {
|
|
92
|
+
w(f || ""), d(), e && e > 0 && (A(f.toString().length || 0), y(e - f.toString().length || 0));
|
|
93
|
+
}, [b]), m(() => {
|
|
94
|
+
n && s ? (k(s), v(n)) : !n && e && e >= 0 && l >= e ? (v(!0), k(z)) : (k(s), v(n));
|
|
95
|
+
}, [n, p, s, l]), m(() => {
|
|
96
|
+
if (re && _ === "auto")
|
|
97
|
+
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
98
|
+
}, [_, r.current]);
|
|
99
|
+
const Y = S(t.root, G), Z = S(t.textarea, q, {
|
|
100
|
+
// small textarea
|
|
101
|
+
[t.textareaSmall]: W === "small",
|
|
102
|
+
// invalid state
|
|
103
|
+
[t.textareaInvalid]: p,
|
|
104
|
+
// resize handling
|
|
105
|
+
[t.textareaResizeAuto]: _ === "auto"
|
|
106
|
+
}), L = S(t.label, {
|
|
107
|
+
// hide label only visually to keep them available for assistive technologies
|
|
108
|
+
[t.labelHidden]: X
|
|
109
|
+
}), T = `${i}-label`, B = `${i}-feedback`, E = `${i}-hint`, $ = `${i}-char-count-announcer`, ee = h ? ` ${E}` : "", d = () => {
|
|
110
|
+
if (r.current && _ === "auto") {
|
|
111
|
+
r.current.style.height = "auto";
|
|
112
|
+
const a = V(r.current.scrollHeight), x = V(2);
|
|
113
|
+
r.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
114
|
+
// from jumping as soon as the user starts typing.
|
|
115
|
+
a + x}rem`;
|
|
116
|
+
}
|
|
117
|
+
}, ae = () => {
|
|
118
|
+
const a = [];
|
|
119
|
+
return e && e > 0 && a.push($), n && s && a.push(B), a.length > 0 ? a.join(" ") : void 0;
|
|
120
|
+
}, te = (a) => {
|
|
121
|
+
var x;
|
|
122
|
+
j && j(a), e && e > 0 && A(((x = r.current) == null ? void 0 : x.value.length) || 0), d();
|
|
123
|
+
}, oe = (a) => {
|
|
124
|
+
g && g(a), R || w(a.target.value);
|
|
125
|
+
};
|
|
126
|
+
return /* @__PURE__ */ o.jsxs("div", { className: Y, children: [
|
|
127
|
+
/* @__PURE__ */ o.jsxs("label", { className: L, id: T, htmlFor: i, children: [
|
|
128
|
+
u,
|
|
129
|
+
I && /* @__PURE__ */ o.jsx(se, {})
|
|
130
|
+
] }),
|
|
131
|
+
h && /* @__PURE__ */ o.jsx("div", { className: t.hint, id: E, children: h }),
|
|
132
|
+
p && N && /* @__PURE__ */ o.jsx(
|
|
133
|
+
le,
|
|
134
|
+
{
|
|
135
|
+
className: t.feedback,
|
|
136
|
+
message: N,
|
|
137
|
+
type: "invalid",
|
|
138
|
+
id: B
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ o.jsx(
|
|
142
|
+
"textarea",
|
|
143
|
+
{
|
|
144
|
+
className: Z,
|
|
145
|
+
id: i,
|
|
146
|
+
ref: r,
|
|
147
|
+
...J,
|
|
148
|
+
"aria-labelledby": `${T}${ee}`,
|
|
149
|
+
"aria-describedby": ae(),
|
|
150
|
+
"aria-invalid": n,
|
|
151
|
+
"aria-disabled": C,
|
|
152
|
+
maxLength: e,
|
|
153
|
+
readOnly: C,
|
|
154
|
+
required: I,
|
|
155
|
+
disabled: O,
|
|
156
|
+
value: f,
|
|
157
|
+
defaultValue: void 0,
|
|
158
|
+
rows: void 0,
|
|
159
|
+
cols: void 0,
|
|
160
|
+
onChange: oe,
|
|
161
|
+
onInput: te
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
e !== void 0 && e > 0 && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
165
|
+
/* @__PURE__ */ o.jsxs("div", { className: t.charCount, "aria-hidden": "true", children: [
|
|
166
|
+
l,
|
|
167
|
+
"/",
|
|
168
|
+
e
|
|
169
|
+
] }),
|
|
170
|
+
/* @__PURE__ */ o.jsxs(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
className: t.charCountAnnouncer,
|
|
174
|
+
id: $,
|
|
175
|
+
"aria-live": U,
|
|
176
|
+
"aria-atomic": "true",
|
|
177
|
+
children: [
|
|
178
|
+
P,
|
|
179
|
+
" ",
|
|
180
|
+
Q
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
] })
|
|
185
|
+
] });
|
|
186
|
+
};
|
|
187
|
+
export {
|
|
188
|
+
Ve as DSTextarea
|
|
189
|
+
};
|
package/title.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/Title/Title'
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./assets/Title.60d50d3e.css";
|
|
2
|
+
import { j as t } from "./chunks/jsx-runtime.5c071667.js";
|
|
3
|
+
import { c as n } from "./chunks/index.8021d3e0.js";
|
|
4
|
+
const q = "_root_116qq_25", h = "_root--x-large_116qq_28", m = "_root--large_116qq_42", d = "_root--theme-dark_116qq_56", i = "_dash_116qq_59", o = {
|
|
5
|
+
root: q,
|
|
6
|
+
"root--x-large": "_root--x-large_116qq_28",
|
|
7
|
+
rootXLarge: h,
|
|
8
|
+
"root--large": "_root--large_116qq_42",
|
|
9
|
+
rootLarge: m,
|
|
10
|
+
"root--theme-dark": "_root--theme-dark_116qq_56",
|
|
11
|
+
rootThemeDark: d,
|
|
12
|
+
dash: i
|
|
13
|
+
}, L = ({
|
|
14
|
+
children: e,
|
|
15
|
+
className: a,
|
|
16
|
+
size: r = "x-large",
|
|
17
|
+
tag: s = "h1",
|
|
18
|
+
// Design suggested to set default tag to h1
|
|
19
|
+
theme: _ = "light",
|
|
20
|
+
...l
|
|
21
|
+
}) => {
|
|
22
|
+
const g = s, c = n(o.root, a, {
|
|
23
|
+
// sizes
|
|
24
|
+
[o.rootXLarge]: r === "x-large",
|
|
25
|
+
[o.rootLarge]: r === "large",
|
|
26
|
+
// dark theme
|
|
27
|
+
[o.rootThemeDark]: _ === "dark"
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ t.jsxs(g, { className: c, ...l, children: [
|
|
30
|
+
e,
|
|
31
|
+
/* @__PURE__ */ t.jsx("span", { className: o.dash, "aria-hidden": "true", children: "ƒ" })
|
|
32
|
+
] });
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
L as DSTitle
|
|
36
|
+
};
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
/* Auto Generated Below */
|
|
2
|
+
|
|
3
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
4
|
+
|
|
5
|
+
export type AriaAttributes = {
|
|
6
|
+
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
|
|
7
|
+
'aria-activedescendant'?: string | undefined;
|
|
8
|
+
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
|
|
9
|
+
'aria-atomic'?: Booleanish | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
|
|
12
|
+
* presented if they are made.
|
|
13
|
+
*/
|
|
14
|
+
'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both' | undefined;
|
|
15
|
+
/** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
|
|
16
|
+
/**
|
|
17
|
+
* Defines a string value that labels the current element, which is intended to be converted into Braille.
|
|
18
|
+
* @see aria-label.
|
|
19
|
+
*/
|
|
20
|
+
'aria-braillelabel'?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
|
|
23
|
+
* @see aria-roledescription.
|
|
24
|
+
*/
|
|
25
|
+
'aria-brailleroledescription'?: string | undefined;
|
|
26
|
+
'aria-busy'?: Booleanish | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
|
|
29
|
+
* @see aria-pressed @see aria-selected.
|
|
30
|
+
*/
|
|
31
|
+
'aria-checked'?: boolean | 'false' | 'mixed' | 'true' | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Defines the total number of columns in a table, grid, or treegrid.
|
|
34
|
+
* @see aria-colindex.
|
|
35
|
+
*/
|
|
36
|
+
'aria-colcount'?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
|
|
39
|
+
* @see aria-colcount @see aria-colspan.
|
|
40
|
+
*/
|
|
41
|
+
'aria-colindex'?: number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Defines a human readable text alternative of aria-colindex.
|
|
44
|
+
* @see aria-rowindextext.
|
|
45
|
+
*/
|
|
46
|
+
'aria-colindextext'?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
|
|
49
|
+
* @see aria-colindex @see aria-rowspan.
|
|
50
|
+
*/
|
|
51
|
+
'aria-colspan'?: number | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Identifies the element (or elements) whose contents or presence are controlled by the current element.
|
|
54
|
+
* @see aria-owns.
|
|
55
|
+
*/
|
|
56
|
+
'aria-controls'?: string | undefined;
|
|
57
|
+
/** Indicates the element that represents the current item within a container or set of related elements. */
|
|
58
|
+
'aria-current'?:
|
|
59
|
+
| boolean
|
|
60
|
+
| 'false'
|
|
61
|
+
| 'true'
|
|
62
|
+
| 'page'
|
|
63
|
+
| 'step'
|
|
64
|
+
| 'location'
|
|
65
|
+
| 'date'
|
|
66
|
+
| 'time'
|
|
67
|
+
| undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Identifies the element (or elements) that describes the object.
|
|
70
|
+
* @see aria-labelledby
|
|
71
|
+
*/
|
|
72
|
+
'aria-describedby'?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Defines a string value that describes or annotates the current element.
|
|
75
|
+
* @see related aria-describedby.
|
|
76
|
+
*/
|
|
77
|
+
'aria-description'?: string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Identifies the element that provides a detailed, extended description for the object.
|
|
80
|
+
* @see aria-describedby.
|
|
81
|
+
*/
|
|
82
|
+
'aria-details'?: string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|
|
85
|
+
* @see aria-hidden @see aria-readonly.
|
|
86
|
+
*/
|
|
87
|
+
'aria-disabled'?: Booleanish | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Indicates what functions can be performed when a dragged object is released on the drop target.
|
|
90
|
+
* @deprecated in ARIA 1.1
|
|
91
|
+
*/
|
|
92
|
+
'aria-dropeffect'?:
|
|
93
|
+
| 'none'
|
|
94
|
+
| 'copy'
|
|
95
|
+
| 'execute'
|
|
96
|
+
| 'link'
|
|
97
|
+
| 'move'
|
|
98
|
+
| 'popup'
|
|
99
|
+
| undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Identifies the element that provides an error message for the object.
|
|
102
|
+
* @see aria-invalid @see aria-describedby.
|
|
103
|
+
*/
|
|
104
|
+
'aria-errormessage'?: string | undefined;
|
|
105
|
+
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
|
|
106
|
+
'aria-expanded'?: Booleanish | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
|
|
109
|
+
* allows assistive technology to override the general default of reading in document source order.
|
|
110
|
+
*/
|
|
111
|
+
'aria-flowto'?: string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Indicates an element's "grabbed" state in a drag-and-drop operation.
|
|
114
|
+
* @deprecated in ARIA 1.1
|
|
115
|
+
*/
|
|
116
|
+
'aria-grabbed'?: Booleanish | undefined;
|
|
117
|
+
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
|
|
118
|
+
'aria-haspopup'?:
|
|
119
|
+
| boolean
|
|
120
|
+
| 'false'
|
|
121
|
+
| 'true'
|
|
122
|
+
| 'menu'
|
|
123
|
+
| 'listbox'
|
|
124
|
+
| 'tree'
|
|
125
|
+
| 'grid'
|
|
126
|
+
| 'dialog'
|
|
127
|
+
| undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Indicates whether the element is exposed to an accessibility API.
|
|
130
|
+
* @see aria-disabled.
|
|
131
|
+
*/
|
|
132
|
+
'aria-hidden'?: Booleanish | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* Indicates the entered value does not conform to the format expected by the application.
|
|
135
|
+
* @see aria-errormessage.
|
|
136
|
+
*/
|
|
137
|
+
'aria-invalid'?:
|
|
138
|
+
| boolean
|
|
139
|
+
| 'false'
|
|
140
|
+
| 'true'
|
|
141
|
+
| 'grammar'
|
|
142
|
+
| 'spelling'
|
|
143
|
+
| undefined;
|
|
144
|
+
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
|
|
145
|
+
'aria-keyshortcuts'?: string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Defines a string value that labels the current element.
|
|
148
|
+
* @see aria-labelledby.
|
|
149
|
+
*/
|
|
150
|
+
'aria-label'?: string | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* Identifies the element (or elements) that labels the current element.
|
|
153
|
+
* @see aria-describedby.
|
|
154
|
+
*/
|
|
155
|
+
'aria-labelledby'?: string | undefined;
|
|
156
|
+
/** Defines the hierarchical level of an element within a structure. */
|
|
157
|
+
'aria-level'?: number | undefined;
|
|
158
|
+
/** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
|
|
159
|
+
'aria-live'?: 'off' | 'assertive' | 'polite' | undefined;
|
|
160
|
+
/** Indicates whether an element is modal when displayed. */
|
|
161
|
+
'aria-modal'?: Booleanish | undefined;
|
|
162
|
+
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
|
|
163
|
+
'aria-multiline'?: Booleanish | undefined;
|
|
164
|
+
/** Indicates that the user may select more than one item from the current selectable descendants. */
|
|
165
|
+
'aria-multiselectable'?: Booleanish | undefined;
|
|
166
|
+
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
|
|
167
|
+
'aria-orientation'?: 'horizontal' | 'vertical' | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
|
|
170
|
+
* between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
|
|
171
|
+
* @see aria-controls.
|
|
172
|
+
*/
|
|
173
|
+
'aria-owns'?: string | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
|
|
176
|
+
* A hint could be a sample value or a brief description of the expected format.
|
|
177
|
+
*/
|
|
178
|
+
'aria-placeholder'?: string | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
|
|
181
|
+
* @see aria-setsize.
|
|
182
|
+
*/
|
|
183
|
+
'aria-posinset'?: number | undefined;
|
|
184
|
+
/**
|
|
185
|
+
* Indicates the current "pressed" state of toggle buttons.
|
|
186
|
+
* @see aria-checked @see aria-selected.
|
|
187
|
+
*/
|
|
188
|
+
'aria-pressed'?: boolean | 'false' | 'mixed' | 'true' | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* Indicates that the element is not editable, but is otherwise operable.
|
|
191
|
+
* @see aria-disabled.
|
|
192
|
+
*/
|
|
193
|
+
'aria-readonly'?: Booleanish | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
|
|
196
|
+
* @see aria-atomic.
|
|
197
|
+
*/
|
|
198
|
+
'aria-relevant'?:
|
|
199
|
+
| 'additions'
|
|
200
|
+
| 'additions removals'
|
|
201
|
+
| 'additions text'
|
|
202
|
+
| 'all'
|
|
203
|
+
| 'removals'
|
|
204
|
+
| 'removals additions'
|
|
205
|
+
| 'removals text'
|
|
206
|
+
| 'text'
|
|
207
|
+
| 'text additions'
|
|
208
|
+
| 'text removals'
|
|
209
|
+
| undefined;
|
|
210
|
+
/** Indicates that user input is required on the element before a form may be submitted. */
|
|
211
|
+
'aria-required'?: Booleanish | undefined;
|
|
212
|
+
/** Defines a human-readable, author-localized description for the role of an element. */
|
|
213
|
+
'aria-roledescription'?: string | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* Defines the total number of rows in a table, grid, or treegrid.
|
|
216
|
+
* @see aria-rowindex.
|
|
217
|
+
*/
|
|
218
|
+
'aria-rowcount'?: number | undefined;
|
|
219
|
+
/**
|
|
220
|
+
* Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
|
|
221
|
+
* @see aria-rowcount @see aria-rowspan.
|
|
222
|
+
*/
|
|
223
|
+
'aria-rowindex'?: number | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* Defines a human readable text alternative of aria-rowindex.
|
|
226
|
+
* @see aria-colindextext.
|
|
227
|
+
*/
|
|
228
|
+
'aria-rowindextext'?: string | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
|
|
231
|
+
* @see aria-rowindex @see aria-colspan.
|
|
232
|
+
*/
|
|
233
|
+
'aria-rowspan'?: number | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* Indicates the current "selected" state of various widgets.
|
|
236
|
+
* @see aria-checked @see aria-pressed.
|
|
237
|
+
*/
|
|
238
|
+
'aria-selected'?: Booleanish | undefined;
|
|
239
|
+
/**
|
|
240
|
+
* Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
|
|
241
|
+
* @see aria-posinset.
|
|
242
|
+
*/
|
|
243
|
+
'aria-setsize'?: number | undefined;
|
|
244
|
+
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
|
|
245
|
+
'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' | undefined;
|
|
246
|
+
/** Defines the maximum allowed value for a range widget. */
|
|
247
|
+
'aria-valuemax'?: number | undefined;
|
|
248
|
+
/** Defines the minimum allowed value for a range widget. */
|
|
249
|
+
'aria-valuemin'?: number | undefined;
|
|
250
|
+
/**
|
|
251
|
+
* Defines the current value for a range widget.
|
|
252
|
+
* @see aria-valuetext.
|
|
253
|
+
*/
|
|
254
|
+
'aria-valuenow'?: number | undefined;
|
|
255
|
+
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
|
|
256
|
+
'aria-valuetext'?: string | undefined;
|
|
257
|
+
/** All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions */
|
|
258
|
+
role?: AriaRole;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export type AriaRole =
|
|
262
|
+
| 'alert'
|
|
263
|
+
| 'alertdialog'
|
|
264
|
+
| 'application'
|
|
265
|
+
| 'article'
|
|
266
|
+
| 'banner'
|
|
267
|
+
| 'button'
|
|
268
|
+
| 'cell'
|
|
269
|
+
| 'checkbox'
|
|
270
|
+
| 'columnheader'
|
|
271
|
+
| 'combobox'
|
|
272
|
+
| 'complementary'
|
|
273
|
+
| 'contentinfo'
|
|
274
|
+
| 'definition'
|
|
275
|
+
| 'dialog'
|
|
276
|
+
| 'directory'
|
|
277
|
+
| 'document'
|
|
278
|
+
| 'feed'
|
|
279
|
+
| 'figure'
|
|
280
|
+
| 'form'
|
|
281
|
+
| 'grid'
|
|
282
|
+
| 'gridcell'
|
|
283
|
+
| 'group'
|
|
284
|
+
| 'heading'
|
|
285
|
+
| 'img'
|
|
286
|
+
| 'link'
|
|
287
|
+
| 'list'
|
|
288
|
+
| 'listbox'
|
|
289
|
+
| 'listitem'
|
|
290
|
+
| 'log'
|
|
291
|
+
| 'main'
|
|
292
|
+
| 'marquee'
|
|
293
|
+
| 'math'
|
|
294
|
+
| 'menu'
|
|
295
|
+
| 'menubar'
|
|
296
|
+
| 'menuitem'
|
|
297
|
+
| 'menuitemcheckbox'
|
|
298
|
+
| 'menuitemradio'
|
|
299
|
+
| 'navigation'
|
|
300
|
+
| 'none'
|
|
301
|
+
| 'note'
|
|
302
|
+
| 'option'
|
|
303
|
+
| 'presentation'
|
|
304
|
+
| 'progressbar'
|
|
305
|
+
| 'radio'
|
|
306
|
+
| 'radiogroup'
|
|
307
|
+
| 'region'
|
|
308
|
+
| 'row'
|
|
309
|
+
| 'rowgroup'
|
|
310
|
+
| 'rowheader'
|
|
311
|
+
| 'scrollbar'
|
|
312
|
+
| 'search'
|
|
313
|
+
| 'searchbox'
|
|
314
|
+
| 'separator'
|
|
315
|
+
| 'slider'
|
|
316
|
+
| 'spinbutton'
|
|
317
|
+
| 'status'
|
|
318
|
+
| 'switch'
|
|
319
|
+
| 'tab'
|
|
320
|
+
| 'table'
|
|
321
|
+
| 'tablist'
|
|
322
|
+
| 'tabpanel'
|
|
323
|
+
| 'term'
|
|
324
|
+
| 'textbox'
|
|
325
|
+
| 'timer'
|
|
326
|
+
| 'toolbar'
|
|
327
|
+
| 'tooltip'
|
|
328
|
+
| 'tree'
|
|
329
|
+
| 'treegrid'
|
|
330
|
+
| 'treeitem';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// common type definitions
|
|
2
|
+
export type { BreakpointCustomizable } from '../utils/breakpoint-customizable';
|
|
3
|
+
export type { LinkTarget } from '../utils/link-target';
|
|
4
|
+
export type { Theme } from '../utils/theme';
|
|
5
|
+
|
|
6
|
+
import type { AriaAttributes } from './aria-types';
|
|
7
|
+
export type SelectedAriaAttributes<T extends keyof AriaAttributes> = Pick<
|
|
8
|
+
AriaAttributes,
|
|
9
|
+
T
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
// Type that makes fields optional
|
|
13
|
+
export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ICON_NAMES: readonly ["360", "academic-cap", "alarm-clock", "arrow-clockwise", "arrow-counterclockwise", "arrow-down", "arrow-down-line", "arrow-edge", "arrow-left", "arrow-out", "arrow-outline-left", "arrow-right", "arrow-up", "arrow-up-arrow-down", "at", "barcode-scanner", "battery", "bell", "bin", "bin-open", "bluetooth", "bookmark", "burger", "calendar", "camera", "cart", "cart-check", "cart-plus", "catalog", "certificate", "chain-link", "chainsaw", "check", "chevron-down", "chevron-left", "chevron-line-left", "chevron-line-right", "chevron-right", "chevron-up", "circle", "circle-check-colored", "circle-check-inverted", "circle-info-colored", "circle-info-inverted", "circle-pause", "circle-stroke", "clock", "coffee-cup", "compare", "connected-box", "connected-box-mobile", "connected-box-stationary", "cross", "diamond", "diamond-exclamationmark-colored", "diamond-exclamationmark-inverted", "diskette", "distance", "dots-connected", "download-complete", "envelope", "envelope-open", "exclamationmark", "exit", "eye", "eye-closed", "facebook", "filter", "finger-double-arrow", "flash", "fullscreen", "gear", "globe", "grid", "guidance", "haircross", "hanger", "headphones", "heart", "hexagon-arrow-clockwise", "horizontal-ellipsis", "house", "imow", "info", "instagram", "leave-fullscreen", "lightbulb", "linkedin", "list-three-rows", "list-two-rows", "loading-spinner", "lock", "magnifying-glass", "magnifying-glass-minus", "magnifying-glass-plus", "map", "minus", "mobile", "nine-squares", "note", "note-check", "note-plus", "number-input", "paperclip", "parcel", "pause", "pdf", "pen", "percent", "petrol", "phone", "pin", "pin-s", "pinterest", "placeholder", "play", "plug", "plus", "printer", "prohibition-sign", "questionmark", "security", "share", "shirt", "shop", "sound-off", "sound-on", "speechbubble", "speechbubbles", "square", "star", "star-half", "tag", "thumbs-down", "thumbs-up", "triangle", "triangle-exclamationmark-colored", "triangle-exclamationmark-inverted", "truck", "two-people-screen", "two-sheets", "upload", "user", "vertical-ellipsis", "wc", "wifi", "wifi-1bar", "wifi-2bars", "wifi-off", "wind-rose", "wrench", "x", "xing", "youtube"];
|
|
2
|
+
export type IconName = typeof ICON_NAMES[number];
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type BreakpointCustomizable<T> = T | BreakpointValues<T>;
|
|
2
|
+
export type BreakpointValue = string | number | boolean;
|
|
3
|
+
export type BreakpointValues<T> = {
|
|
4
|
+
[key in Breakpoint]?: T;
|
|
5
|
+
} & {
|
|
6
|
+
base: T;
|
|
7
|
+
};
|
|
8
|
+
export declare const breakpointMap: {
|
|
9
|
+
[key in Breakpoint]: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const breakpoints: readonly ["base", "s", "m", "l", "xl"];
|
|
12
|
+
export type Breakpoint = (typeof breakpoints)[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hasDocument: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hasWindow: boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a pixel value to rem units.
|
|
3
|
+
*
|
|
4
|
+
* This function assumes the root font size of the document is 16 pixels,
|
|
5
|
+
* which is a common default in web browsers. It divides the given pixel value by 16
|
|
6
|
+
* to convert it into rem units.
|
|
7
|
+
*
|
|
8
|
+
* @param {number} px - The pixel value to be converted to rem units.
|
|
9
|
+
* @returns {number} - The equivalent value in rem units.
|
|
10
|
+
*/
|
|
11
|
+
export declare const pixelToRem: (px: number) => number;
|
|
12
|
+
/**
|
|
13
|
+
* Generates a message with a standardized format for all user facing warning/error messages.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} componentName - The name of the component generating the message.
|
|
16
|
+
* @param {string} message - The message to be included in the generated message.
|
|
17
|
+
* @returns {string} A message with a standardized format: "[STIHL Design System] - [componentName]: message".
|
|
18
|
+
*/
|
|
19
|
+
export declare const generateDSMessage: (componentName: string, message: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves the closest ancestor of the given element that matches a specified selector.
|
|
22
|
+
*
|
|
23
|
+
* @param {HTMLElement} element - The HTMLElement from which to start searching.
|
|
24
|
+
* @param {string} selector - The CSS selector used to match the ancestor elements.
|
|
25
|
+
* @returns {Element|null} The closest ancestor element that matches the specified selector, or null if no matching element is found.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getClosestHTMLElement: (element: HTMLElement, selector: string) => Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type DocumentationRenderOptions = {
|
|
3
|
+
hideCodeExample?: boolean;
|
|
4
|
+
hideControls?: boolean;
|
|
5
|
+
isDocumentationAtTop?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Renders documentation from a markdown string.
|
|
9
|
+
* @param documentation - The markdown string to render.
|
|
10
|
+
* @returns A JSX.Element with the rendered documentation.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderDocumentation(documentation: string): JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Renders documentation with specified rendering options.
|
|
15
|
+
* @param options - Optional rendering options to customize the output.
|
|
16
|
+
* @returns A JSX.Element with the rendered documentation.
|
|
17
|
+
*/
|
|
18
|
+
export declare function renderDocumentation(options?: DocumentationRenderOptions): JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Renders documentation from a markdown string with specified rendering options.
|
|
21
|
+
* @param documentation - Optional markdown string to render.
|
|
22
|
+
* @param options - Optional rendering options to customize the output.
|
|
23
|
+
* @returns A JSX.Element with the rendered documentation.
|
|
24
|
+
*/
|
|
25
|
+
export declare function renderDocumentation(documentation?: string, options?: DocumentationRenderOptions): JSX.Element;
|
|
26
|
+
export {};
|
package/utils/theme.d.ts
ADDED