loon-bulma-react 2025.0.34 → 2025.1.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/.github/workflows/deploy-example.yml +43 -0
- package/.github/workflows/run-test.yml +31 -0
- package/.prettierignore +5 -0
- package/.prettierrc.json +19 -0
- package/dist/classes/Console.d.ts +29 -0
- package/dist/classes/FetchWrapper.d.ts +124 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +28 -0
- package/dist/components/Block/Block.d.ts +9 -0
- package/dist/components/Box/BorderBox.d.ts +29 -0
- package/dist/components/Box/Box.d.ts +20 -0
- package/dist/components/Button/Button.d.ts +84 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +26 -0
- package/dist/components/Calendar/CalendarItems/CalendarColoredItem.d.ts +18 -0
- package/dist/components/Calendar/CalendarItems/CalendarItem.d.ts +18 -0
- package/dist/components/Calendar/DayContainer.d.ts +25 -0
- package/dist/components/Calendar/EventDescriptions.d.ts +33 -0
- package/dist/components/Calendar/Fourweeks/FourweeksView.d.ts +23 -0
- package/dist/components/Calendar/Mini/MiniView.d.ts +24 -0
- package/dist/components/Calendar/Month/MonthView.d.ts +23 -0
- package/dist/components/Calendar/Planning/PlanningView.d.ts +42 -0
- package/dist/components/Calendar/Props.d.ts +58 -0
- package/dist/components/Calendar/Week/AlldayContainer.d.ts +19 -0
- package/dist/components/Calendar/Week/HourRow.d.ts +30 -0
- package/dist/components/Calendar/Week/WeekView.d.ts +24 -0
- package/dist/components/Calendar/calendar.functions.d.ts +10 -0
- package/dist/components/Calendar/index.d.ts +15 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +49 -0
- package/dist/components/Columns/Column.d.ts +207 -0
- package/dist/components/Columns/Columns.d.ts +35 -0
- package/dist/components/Container/Container.d.ts +44 -0
- package/dist/components/Content/Content.d.ts +22 -0
- package/dist/components/DataTable/DataTable.d.ts +187 -0
- package/dist/components/Divider/Divider.d.ts +8 -0
- package/dist/components/Dropdown/Dropdown.d.ts +25 -0
- package/dist/components/Footer/Footer.d.ts +22 -0
- package/dist/components/Help/Help.d.ts +19 -0
- package/dist/components/Hero/Hero.d.ts +104 -0
- package/dist/components/Icon/Icon.d.ts +82 -0
- package/dist/components/Image/Image.d.ts +28 -0
- package/dist/components/Indicator/Indicator.d.ts +25 -0
- package/dist/components/Kbd/Kbd.d.ts +30 -0
- package/dist/components/Label/Label.d.ts +11 -0
- package/dist/components/Link/Link.d.ts +44 -0
- package/dist/components/Menu/Menu.d.ts +64 -0
- package/dist/components/Message/Message.d.ts +49 -0
- package/dist/components/Modal/Modal.d.ts +74 -0
- package/dist/components/Notification/Notification.d.ts +38 -0
- package/dist/components/Pagination/Pagination.d.ts +56 -0
- package/dist/components/Panel/Panel.d.ts +98 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +28 -0
- package/dist/components/QuickView/QuickView.d.ts +61 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +76 -0
- package/dist/components/Section/Section.d.ts +21 -0
- package/dist/components/SimpleTable/SimpleTable.d.ts +121 -0
- package/dist/components/Steps/Steps.d.ts +61 -0
- package/dist/components/TabBar/TabBar.d.ts +47 -0
- package/dist/components/Tag/Tag.d.ts +54 -0
- package/dist/components/TimeLine/TimeLine.d.ts +62 -0
- package/dist/components/Titles/Titles.d.ts +71 -0
- package/dist/components/ToggleBar/ToggleBar.d.ts +80 -0
- package/dist/components/Tooltip/Tooltip.d.ts +49 -0
- package/dist/components/TreeView/TreeView.d.ts +48 -0
- package/dist/contexts/ActionSheet/ActionSheetContextProvider.d.ts +76 -0
- package/dist/contexts/AppProvider/AppProviders.d.ts +18 -0
- package/dist/contexts/ColorSchemeProvider/ColorSchemeProvider.d.ts +15 -0
- package/dist/contexts/Confirm/ConfirmContextProvider.d.ts +60 -0
- package/dist/contexts/DefaultsProvider/DefaultsProvider.d.ts +94 -0
- package/dist/contexts/DialogsProvider/DialogsProvider.d.ts +4 -0
- package/dist/contexts/KeysProvider/KeysProvider.d.ts +35 -0
- package/dist/contexts/ModalProvider/ModalProvider.d.ts +11 -0
- package/dist/contexts/ModeProvider/ModeProvider.d.ts +14 -0
- package/dist/contexts/Notifier/Notifier.d.ts +81 -0
- package/dist/contexts/Prompt/PromptContextProvider.d.ts +71 -0
- package/dist/forms/Checkbox/Checkbox.d.ts +47 -0
- package/dist/forms/ComboBox/ComboBox.d.ts +44 -0
- package/dist/forms/ComboBox/MultiComboBox.d.ts +44 -0
- package/dist/forms/ComboBox/useComboBoxScroll.d.ts +4 -0
- package/dist/forms/Currency/CurrencyInput.d.ts +47 -0
- package/dist/forms/Datetimes/DateInput.d.ts +37 -0
- package/dist/forms/Datetimes/DateTimeInput.d.ts +44 -0
- package/dist/forms/Datetimes/TimeInput.d.ts +42 -0
- package/dist/forms/File/FileInput.d.ts +71 -0
- package/dist/forms/Input.d.ts +223 -0
- package/dist/forms/MaskedInput/MaskedInput.d.ts +46 -0
- package/dist/forms/Numeric/NumberInput.d.ts +14 -0
- package/dist/forms/Numeric/RangeInput.d.ts +21 -0
- package/dist/forms/Others/ColorInput.d.ts +56 -0
- package/dist/forms/Others/HiddenInput.d.ts +29 -0
- package/dist/forms/Others/TelephoneInput.d.ts +14 -0
- package/dist/forms/Others/URLInput.d.ts +14 -0
- package/dist/forms/Periodes/MonthInput.d.ts +43 -0
- package/dist/forms/Periodes/WeekInput.d.ts +43 -0
- package/dist/forms/Radio/Radio.d.ts +97 -0
- package/dist/forms/Select/Select.d.ts +132 -0
- package/dist/forms/TagsInput/TagsInput.d.ts +44 -0
- package/dist/forms/Text/EmailInput.d.ts +14 -0
- package/dist/forms/Text/FormattedInput.d.ts +54 -0
- package/dist/forms/Text/PasswordInput.d.ts +19 -0
- package/dist/forms/Text/TextArea.d.ts +31 -0
- package/dist/forms/Text/TextEditor.d.ts +36 -0
- package/dist/forms/Text/TextInput.d.ts +30 -0
- package/dist/hooks/useCaretPosition.d.ts +8 -0
- package/dist/hooks/useClickOutside.d.ts +15 -0
- package/dist/hooks/useClipboard.d.ts +21 -0
- package/dist/hooks/useContextMenu.d.ts +29 -0
- package/dist/hooks/useCookieState.d.ts +37 -0
- package/dist/hooks/useDebounced.hooks.d.ts +55 -0
- package/dist/hooks/useFetchApi.d.ts +65 -0
- package/dist/hooks/useHotkeys.d.ts +44 -0
- package/dist/hooks/useIndexedDb.d.ts +89 -0
- package/dist/hooks/useLocalStoredState.d.ts +36 -0
- package/dist/hooks/usePagination.d.ts +25 -0
- package/dist/hooks/usePropState.d.ts +16 -0
- package/dist/hooks/useScrollIntoView.d.ts +59 -0
- package/dist/hooks/useSessionStoredState.d.ts +38 -0
- package/dist/hooks/useToggle.d.ts +16 -0
- package/dist/hooks/useUncontrolled.d.ts +44 -0
- package/dist/hooks/useValidatedState.d.ts +21 -0
- package/dist/index.d.ts +169 -5773
- package/dist/index.js +37319 -55
- package/dist/internal_functions/createIconsInternal.d.ts +17 -0
- package/dist/internal_functions/getAlignmentClass.d.ts +16 -0
- package/dist/internal_functions/getColorClass.d.ts +23 -0
- package/dist/internal_functions/getPositionClass.d.ts +2 -0
- package/dist/internal_functions/getSizeClass.d.ts +23 -0
- package/dist/internal_functions/index.d.ts +8 -0
- package/{styles → dist/styles}/_all.scss +3 -1
- package/dist/styles/tooltip.scss +32 -0
- package/dist/test-data.d.ts +9 -0
- package/dist/types/index.d.ts +111 -0
- package/dist/utils/JSDateTime.class.d.ts +510 -0
- package/dist/utils/JSDuration.class.d.ts +79 -0
- package/dist/utils/calculateTxtColor.function.d.ts +14 -0
- package/dist/utils/colors.d.ts +26 -0
- package/dist/utils/colorscheme.d.ts +5 -0
- package/dist/utils/compare.d.ts +7 -0
- package/dist/utils/deserialize.function.d.ts +2 -0
- package/dist/utils/hasBSN.function.d.ts +27 -0
- package/dist/utils/isIBAN.function.d.ts +24 -0
- package/dist/utils/math.d.ts +22 -0
- package/dist/utils/operators.d.ts +192 -0
- package/dist/utils/serialize.function.d.ts +2 -0
- package/dist/utils/sorting.d.ts +34 -0
- package/dist/utils/string.utils.d.ts +72 -0
- package/eslint.config.js +108 -0
- package/index.html +16 -0
- package/jest.config.ts +12 -0
- package/lib/classes/Console.ts +78 -0
- package/lib/classes/FetchWrapper.ts +392 -0
- package/lib/components/AspectRatio/AspectRatio.test.tsx +67 -0
- package/lib/components/AspectRatio/AspectRatio.tsx +40 -0
- package/lib/components/Block/Block.test.tsx +24 -0
- package/lib/components/Block/Block.tsx +13 -0
- package/lib/components/Box/BorderBox.test.tsx +24 -0
- package/lib/components/Box/BorderBox.tsx +79 -0
- package/lib/components/Box/Box.test.tsx +24 -0
- package/lib/components/Box/Box.tsx +30 -0
- package/lib/components/Button/Button.test.tsx +871 -0
- package/lib/components/Button/Button.tsx +217 -0
- package/lib/components/ButtonGroup/ButtonGroup.test.tsx +115 -0
- package/lib/components/ButtonGroup/ButtonGroup.tsx +130 -0
- package/lib/components/Calendar/CalendarItems/CalendarColoredItem.tsx +63 -0
- package/lib/components/Calendar/CalendarItems/CalendarItem.tsx +49 -0
- package/lib/components/Calendar/DayContainer.tsx +115 -0
- package/lib/components/Calendar/EventDescriptions.tsx +131 -0
- package/lib/components/Calendar/Fourweeks/FourweeksView.test.tsx +262 -0
- package/lib/components/Calendar/Fourweeks/FourweeksView.tsx +169 -0
- package/lib/components/Calendar/Mini/MiniView.tsx +127 -0
- package/lib/components/Calendar/Month/MonthView.test.tsx +266 -0
- package/lib/components/Calendar/Month/MonthView.tsx +178 -0
- package/lib/components/Calendar/Planning/PlanningView.tsx +195 -0
- package/lib/components/Calendar/Props.tsx +64 -0
- package/lib/components/Calendar/Week/AlldayContainer.tsx +38 -0
- package/lib/components/Calendar/Week/HourRow.tsx +159 -0
- package/lib/components/Calendar/Week/WeekView.test.tsx +291 -0
- package/lib/components/Calendar/Week/WeekView.tsx +176 -0
- package/lib/components/Calendar/calendar.functions.ts +32 -0
- package/lib/components/Calendar/index.ts +17 -0
- package/lib/components/CodeBlock/CodeBlock.tsx +128 -0
- package/lib/components/Columns/Column.test.tsx +145 -0
- package/lib/components/Columns/Column.tsx +316 -0
- package/lib/components/Columns/Columns.test.tsx +95 -0
- package/lib/components/Columns/Columns.tsx +62 -0
- package/lib/components/Container/Container.test.tsx +87 -0
- package/lib/components/Container/Container.tsx +140 -0
- package/lib/components/Content/Content.test.tsx +51 -0
- package/lib/components/Content/Content.tsx +31 -0
- package/lib/components/DataTable/DataTable.test.tsx +403 -0
- package/lib/components/DataTable/DataTable.tsx +726 -0
- package/lib/components/Divider/Divider.tsx +18 -0
- package/lib/components/Dropdown/Dropdown.tsx +112 -0
- package/lib/components/Footer/Footer.test.tsx +42 -0
- package/lib/components/Footer/Footer.tsx +34 -0
- package/lib/components/Help/Help.test.tsx +83 -0
- package/lib/components/Help/Help.tsx +25 -0
- package/lib/components/Hero/Hero.test.tsx +222 -0
- package/lib/components/Hero/Hero.tsx +214 -0
- package/lib/components/Icon/Icon.test.tsx +157 -0
- package/lib/components/Icon/Icon.tsx +192 -0
- package/lib/components/Image/Image.test.tsx +72 -0
- package/lib/components/Image/Image.tsx +60 -0
- package/lib/components/Indicator/Indicator.test.tsx +68 -0
- package/lib/components/Indicator/Indicator.tsx +46 -0
- package/lib/components/Kbd/Kbd.test.tsx +49 -0
- package/lib/components/Kbd/Kbd.tsx +51 -0
- package/lib/components/Label/Label.tsx +21 -0
- package/lib/components/Link/Link.test.tsx +84 -0
- package/lib/components/Link/Link.tsx +87 -0
- package/lib/components/Menu/Menu.test.tsx +154 -0
- package/lib/components/Menu/Menu.tsx +264 -0
- package/lib/components/Message/Message.test.tsx +112 -0
- package/lib/components/Message/Message.tsx +154 -0
- package/lib/components/Modal/Modal.test.tsx +188 -0
- package/lib/components/Modal/Modal.tsx +188 -0
- package/lib/components/Notification/Notification.test.tsx +175 -0
- package/lib/components/Notification/Notification.tsx +110 -0
- package/lib/components/Pagination/Pagination.tsx +143 -0
- package/lib/components/Panel/Panel.tsx +225 -0
- package/lib/components/ProgressBar/ProgressBar.test.tsx +92 -0
- package/lib/components/ProgressBar/ProgressBar.tsx +42 -0
- package/lib/components/QuickView/QuickView.test.tsx +81 -0
- package/lib/components/QuickView/QuickView.tsx +122 -0
- package/lib/components/ScrollArea/ScrollArea.test.tsx +682 -0
- package/lib/components/ScrollArea/ScrollArea.tsx +183 -0
- package/lib/components/Section/Section.test.tsx +24 -0
- package/lib/components/Section/Section.tsx +32 -0
- package/lib/components/SimpleTable/SimpleTable.test.tsx +135 -0
- package/lib/components/SimpleTable/SimpleTable.tsx +327 -0
- package/lib/components/Steps/Steps.test.tsx +356 -0
- package/lib/components/Steps/Steps.tsx +164 -0
- package/lib/components/TabBar/TabBar.test.tsx +134 -0
- package/lib/components/TabBar/TabBar.tsx +125 -0
- package/lib/components/Tag/Tag.test.tsx +184 -0
- package/lib/components/Tag/Tag.tsx +131 -0
- package/lib/components/TimeLine/TimeLine.test.tsx +149 -0
- package/lib/components/TimeLine/TimeLine.tsx +116 -0
- package/lib/components/Titles/Titles.test.tsx +53 -0
- package/lib/components/Titles/Titles.tsx +205 -0
- package/lib/components/ToggleBar/ToggleBar.test.tsx +228 -0
- package/lib/components/ToggleBar/ToggleBar.tsx +208 -0
- package/lib/components/Tooltip/Tooltip.test.tsx +61 -0
- package/lib/components/Tooltip/Tooltip.tsx +203 -0
- package/lib/components/TreeView/TreeView.tsx +233 -0
- package/lib/contexts/ActionSheet/ActionSheetContextProvider.test.tsx +24 -0
- package/lib/contexts/ActionSheet/ActionSheetContextProvider.tsx +237 -0
- package/lib/contexts/AppProvider/AppProviders.tsx +56 -0
- package/lib/contexts/ColorSchemeProvider/ColorSchemeProvider.tsx +49 -0
- package/lib/contexts/Confirm/ConfirmContextProvider.test.tsx +24 -0
- package/lib/contexts/Confirm/ConfirmContextProvider.tsx +227 -0
- package/lib/contexts/DefaultsProvider/DefaultsProvider.tsx +178 -0
- package/lib/contexts/DialogsProvider/DialogsProvider.tsx +14 -0
- package/lib/contexts/KeysProvider/KeysProvider.tsx +344 -0
- package/lib/contexts/ModalProvider/ModalProvider.tsx +59 -0
- package/lib/contexts/ModeProvider/ModeProvider.tsx +26 -0
- package/lib/contexts/Notifier/Notifier.test.tsx +342 -0
- package/lib/contexts/Notifier/Notifier.tsx +209 -0
- package/lib/contexts/Prompt/PromptContextProvider.test.tsx +24 -0
- package/lib/contexts/Prompt/PromptContextProvider.tsx +280 -0
- package/lib/forms/Checkbox/Checkbox.test.tsx +171 -0
- package/lib/forms/Checkbox/Checkbox.tsx +256 -0
- package/lib/forms/ComboBox/ComboBox.test.tsx +24 -0
- package/lib/forms/ComboBox/ComboBox.tsx +464 -0
- package/lib/forms/ComboBox/MultiComboBox.test.tsx +30 -0
- package/lib/forms/ComboBox/MultiComboBox.tsx +282 -0
- package/lib/forms/ComboBox/useComboBoxScroll.test.ts +30 -0
- package/lib/forms/ComboBox/useComboBoxScroll.ts +35 -0
- package/lib/forms/Currency/CurrencyInput.test.tsx +131 -0
- package/lib/forms/Currency/CurrencyInput.tsx +269 -0
- package/lib/forms/Datetimes/DateInput.test.tsx +198 -0
- package/lib/forms/Datetimes/DateInput.tsx +56 -0
- package/lib/forms/Datetimes/DateTimeInput.test.tsx +223 -0
- package/lib/forms/Datetimes/DateTimeInput.tsx +102 -0
- package/lib/forms/Datetimes/TimeInput.test.tsx +218 -0
- package/lib/forms/Datetimes/TimeInput.tsx +100 -0
- package/lib/forms/File/FileInput.test.tsx +175 -0
- package/lib/forms/File/FileInput.tsx +240 -0
- package/lib/forms/Input.test.tsx +158 -0
- package/lib/forms/Input.tsx +542 -0
- package/lib/forms/MaskedInput/MaskedInput.tsx +651 -0
- package/lib/forms/Numeric/NumberInput.test.tsx +233 -0
- package/lib/forms/Numeric/NumberInput.tsx +171 -0
- package/lib/forms/Numeric/RangeInput.test.tsx +187 -0
- package/lib/forms/Numeric/RangeInput.tsx +166 -0
- package/lib/forms/Others/ColorInput.test.tsx +181 -0
- package/lib/forms/Others/ColorInput.tsx +117 -0
- package/lib/forms/Others/HiddenInput.test.tsx +25 -0
- package/lib/forms/Others/HiddenInput.tsx +46 -0
- package/lib/forms/Others/TelephoneInput.test.tsx +153 -0
- package/lib/forms/Others/TelephoneInput.tsx +26 -0
- package/lib/forms/Others/URLInput.test.tsx +153 -0
- package/lib/forms/Others/URLInput.tsx +30 -0
- package/lib/forms/Periodes/MonthInput.test.tsx +119 -0
- package/lib/forms/Periodes/MonthInput.tsx +63 -0
- package/lib/forms/Periodes/WeekInput.test.tsx +119 -0
- package/lib/forms/Periodes/WeekInput.tsx +63 -0
- package/lib/forms/Radio/Radio.test.tsx +322 -0
- package/lib/forms/Radio/Radio.tsx +347 -0
- package/lib/forms/Select/Select.test.tsx +223 -0
- package/lib/forms/Select/Select.tsx +405 -0
- package/lib/forms/TagsInput/TagsInput.test.tsx +27 -0
- package/lib/forms/TagsInput/TagsInput.tsx +289 -0
- package/lib/forms/Text/EmailInput.test.tsx +153 -0
- package/lib/forms/Text/EmailInput.tsx +29 -0
- package/lib/forms/Text/FormattedInput.tsx +271 -0
- package/lib/forms/Text/PasswordInput.test.tsx +160 -0
- package/lib/forms/Text/PasswordInput.tsx +154 -0
- package/lib/forms/Text/TextArea.test.tsx +164 -0
- package/lib/forms/Text/TextArea.tsx +169 -0
- package/lib/forms/Text/TextEditor.test.tsx +12 -0
- package/lib/forms/Text/TextEditor.tsx +612 -0
- package/lib/forms/Text/TextInput.test.tsx +147 -0
- package/lib/forms/Text/TextInput.tsx +60 -0
- package/lib/hooks/useCaretPosition.test.tsx +31 -0
- package/lib/hooks/useCaretPosition.tsx +23 -0
- package/lib/hooks/useClickOutside.test.tsx +101 -0
- package/lib/hooks/useClickOutside.ts +44 -0
- package/lib/hooks/useClipboard.ts +59 -0
- package/lib/hooks/useContextMenu.tsx +74 -0
- package/lib/hooks/useCookieState.tsx +117 -0
- package/lib/hooks/useDebounced.hooks.test.ts +70 -0
- package/lib/hooks/useDebounced.hooks.ts +110 -0
- package/lib/hooks/useFetchApi.ts +91 -0
- package/lib/hooks/useHotkeys.test.tsx +111 -0
- package/lib/hooks/useHotkeys.ts +139 -0
- package/lib/hooks/useIndexedDb.tsx +337 -0
- package/lib/hooks/useLocalStoredState.test.tsx +98 -0
- package/lib/hooks/useLocalStoredState.ts +86 -0
- package/lib/hooks/usePagination.test.ts +113 -0
- package/lib/hooks/usePagination.ts +96 -0
- package/lib/hooks/usePropState.ts +25 -0
- package/lib/hooks/useScrollIntoView.ts +250 -0
- package/lib/hooks/useSessionStoredState.ts +87 -0
- package/lib/hooks/useToggle.test.tsx +52 -0
- package/lib/hooks/useToggle.ts +30 -0
- package/lib/hooks/useUncontrolled.test.ts +52 -0
- package/lib/hooks/useUncontrolled.ts +65 -0
- package/lib/hooks/useValidatedState.test.tsx +37 -0
- package/lib/hooks/useValidatedState.ts +37 -0
- package/lib/index.ts +246 -0
- package/lib/internal_functions/createIconsInternal.tsx +94 -0
- package/lib/internal_functions/getAlignmentClass.ts +37 -0
- package/lib/internal_functions/getColorClass.ts +73 -0
- package/lib/internal_functions/getPositionClass.ts +15 -0
- package/lib/internal_functions/getSizeClass.ts +57 -0
- package/lib/internal_functions/index.ts +9 -0
- package/lib/styles/_all.scss +457 -0
- package/lib/styles/bulma-box.scss +135 -0
- package/lib/styles/button.scss +565 -0
- package/lib/styles/buttons.scss +19 -0
- package/lib/styles/calendar.scss +148 -0
- package/lib/styles/checkradio.scss +662 -0
- package/lib/styles/datalist.scss +27 -0
- package/lib/styles/divider.scss +30 -0
- package/lib/styles/dropdown.scss +175 -0
- package/lib/styles/extra-inputs.scss +77 -0
- package/lib/styles/hero.scss +285 -0
- package/lib/styles/indicators.scss +142 -0
- package/lib/styles/keyboard.scss +15 -0
- package/lib/styles/linkbutton.scss +40 -0
- package/lib/styles/menu.scss +164 -0
- package/lib/styles/mini-calendar.scss +70 -0
- package/lib/styles/notifier-container.scss +27 -0
- package/lib/styles/panel.scss +222 -0
- package/lib/styles/quickview.scss +140 -0
- package/lib/styles/range-sliders.scss +298 -0
- package/lib/styles/select.scss +144 -0
- package/lib/styles/steps.scss +288 -0
- package/lib/styles/table.scss +330 -0
- package/lib/styles/tabs.scss +271 -0
- package/lib/styles/timeline.scss +314 -0
- package/lib/styles/tooltip.scss +32 -0
- package/lib/styles/treeview.scss +37 -0
- package/lib/test-data.ts +9002 -0
- package/lib/types/index.tsx +180 -0
- package/lib/types/react-app-env.d.ts +1 -0
- package/lib/types/typings.d.ts +373 -0
- package/lib/utils/JSDateTime.class.test.ts +890 -0
- package/lib/utils/JSDateTime.class.ts +766 -0
- package/lib/utils/JSDuration.class.test.ts +98 -0
- package/lib/utils/JSDuration.class.ts +159 -0
- package/lib/utils/calculateTxtColor.function.test.ts +53 -0
- package/lib/utils/calculateTxtColor.function.ts +56 -0
- package/lib/utils/colors.test.ts +78 -0
- package/lib/utils/colors.ts +178 -0
- package/lib/utils/colorscheme.ts +26 -0
- package/lib/utils/compare.test.ts +137 -0
- package/lib/utils/compare.ts +32 -0
- package/lib/utils/deserialize.function.test.ts +15 -0
- package/lib/utils/deserialize.function.ts +9 -0
- package/lib/utils/hasBSN.function.test.ts +27 -0
- package/lib/utils/hasBSN.function.ts +53 -0
- package/lib/utils/isIBAN.function.test.ts +25 -0
- package/lib/utils/isIBAN.function.ts +131 -0
- package/lib/utils/math.test.ts +70 -0
- package/lib/utils/math.ts +32 -0
- package/lib/utils/operators.test.ts +619 -0
- package/lib/utils/operators.ts +242 -0
- package/lib/utils/serialize.function.test.ts +13 -0
- package/lib/utils/serialize.function.ts +9 -0
- package/lib/utils/sorting.test.ts +114 -0
- package/lib/utils/sorting.ts +50 -0
- package/lib/utils/string.utils.test.ts +85 -0
- package/lib/utils/string.utils.ts +146 -0
- package/lib/vite-env.d.ts +1 -0
- package/package.json +55 -83
- package/public/vite.svg +1 -0
- package/src/App.tsx +77 -0
- package/src/AppHero.tsx +102 -0
- package/src/Console.ts +28 -0
- package/src/MOCK_DATA.ts +10014 -0
- package/src/Tabs/AspectRatioTab.tsx +235 -0
- package/src/Tabs/ButtonsAndTags.tsx +843 -0
- package/src/Tabs/CalendarTab.tsx +560 -0
- package/src/Tabs/ContextsTab.tsx +820 -0
- package/src/Tabs/DataTableTab.tsx +291 -0
- package/src/Tabs/FunctionsTab.tsx +947 -0
- package/src/Tabs/HooksTab.tsx +1008 -0
- package/src/Tabs/InputsTab.tsx +2319 -0
- package/src/Tabs/LayoutsTab.tsx +751 -0
- package/src/Tabs/Nieuw.tsx +440 -0
- package/src/Tabs/NotificationTab.tsx +301 -0
- package/src/Tabs/OverigeTab.tsx +1631 -0
- package/src/Tabs/ReadmeTab.tsx +260 -0
- package/src/Tabs/TestTab.tsx +44 -0
- package/src/Tabs/datatable.css +7 -0
- package/src/Tabs/index.ts +14 -0
- package/src/assets/react.svg +1 -0
- package/src/components/Chevrons.tsx +15 -0
- package/src/components/CodeVoorbeeld.tsx +41 -0
- package/src/components/Nieuwsblok.tsx +22 -0
- package/src/main.tsx +10 -0
- package/src/styles/example-styles.scss +8 -0
- package/src/styles.css +14244 -0
- package/src/styles.css.map +1 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.app.json +32 -0
- package/tsconfig.build.json +132 -0
- package/tsconfig.json +11 -0
- package/tsconfig.node.json +30 -0
- package/vite.config.ts +52 -0
- package/dist/index.cjs +0 -283
- package/dist/index.d.cts +0 -5773
- package/styles/tooltip.scss +0 -201
- /package/{styles → dist/styles}/bulma-box.scss +0 -0
- /package/{styles → dist/styles}/button.scss +0 -0
- /package/{styles → dist/styles}/buttons.scss +0 -0
- /package/{styles → dist/styles}/calendar.scss +0 -0
- /package/{styles → dist/styles}/checkradio.scss +0 -0
- /package/{styles → dist/styles}/datalist.scss +0 -0
- /package/{styles → dist/styles}/divider.scss +0 -0
- /package/{styles → dist/styles}/dropdown.scss +0 -0
- /package/{styles → dist/styles}/extra-inputs.scss +0 -0
- /package/{styles → dist/styles}/hero.scss +0 -0
- /package/{styles → dist/styles}/indicators.scss +0 -0
- /package/{styles → dist/styles}/keyboard.scss +0 -0
- /package/{styles → dist/styles}/linkbutton.scss +0 -0
- /package/{styles → dist/styles}/menu.scss +0 -0
- /package/{styles → dist/styles}/mini-calendar.scss +0 -0
- /package/{styles → dist/styles}/notifier-container.scss +0 -0
- /package/{styles → dist/styles}/panel.scss +0 -0
- /package/{styles → dist/styles}/quickview.scss +0 -0
- /package/{styles → dist/styles}/range-sliders.scss +0 -0
- /package/{styles → dist/styles}/select.scss +0 -0
- /package/{styles → dist/styles}/steps.scss +0 -0
- /package/{styles → dist/styles}/table.scss +0 -0
- /package/{styles → dist/styles}/tabs.scss +0 -0
- /package/{styles → dist/styles}/timeline.scss +0 -0
- /package/{styles → dist/styles}/treeview.scss +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { StrictOmit } from '@lib/types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { InputPropsType, InputStylingPropsType, InputErrorProps } from '../Input';
|
|
4
|
+
type FileInputValue = {
|
|
5
|
+
files: File[];
|
|
6
|
+
path: string;
|
|
7
|
+
};
|
|
8
|
+
type FileInputProps = StrictOmit<InputPropsType<string>, 'type' | 'step' | 'value' | 'onChange' | 'onValueChanged'> & InputStylingPropsType & {
|
|
9
|
+
/** Is het mogelijk om meerdere files te selectere (default = `false`) */
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
/** Tekst op de kies-bestand-button (default = `'Kies een bestand'`) */
|
|
12
|
+
chooseFileTxt?: string;
|
|
13
|
+
/** Tekst om weer te geven als er geen bestanden zijn (default = `'Geen bestand(en) geselecteerd'`) */
|
|
14
|
+
noFilesTxt?: string;
|
|
15
|
+
/** Toon als een grote knop, niet als ene input (default = `false`) */
|
|
16
|
+
boxed?: boolean;
|
|
17
|
+
/** toegestane extensies of MIME-types
|
|
18
|
+
* - type `string`: komma-geschijden lijst van extensies of MIME-types, bijv. `'image/*, .pdf'`
|
|
19
|
+
* - type `string[]`: array van extensies of MIME-types, bijv. `['image/*', '.pdf']`
|
|
20
|
+
*
|
|
21
|
+
* **LET OP:** In het geval van extensies *MOET* de punt ervoor staan!
|
|
22
|
+
*/
|
|
23
|
+
accept?: string | string[];
|
|
24
|
+
/** Voor mobile devices: Welke camera moet gebruikt worden (default = `false`)
|
|
25
|
+
* - `undefined`: laat de gebruiker kiezen
|
|
26
|
+
* - `true`: laat de gebruiker kiezen
|
|
27
|
+
* - `false`: geen camera
|
|
28
|
+
* - `'user'`: de selfie camera
|
|
29
|
+
* - `'environment'`: camera op de achterkant
|
|
30
|
+
*/
|
|
31
|
+
capture?: boolean | 'user' | 'environment';
|
|
32
|
+
/** De geselecteerde files EN het path naar deze files.
|
|
33
|
+
* **LET OP: ** Het is niet mogelijk om in te stellen welke files al geselecteerd zijn.
|
|
34
|
+
*/
|
|
35
|
+
value?: FileInputValue;
|
|
36
|
+
/** functie om de namen van bestanden weer te geven.
|
|
37
|
+
*
|
|
38
|
+
* **default:** toon de namen van alle geselecteerde bestanden, gescheiden door komma's. Als er geen bestanden zijn, dan de noFilesTxt tonen.
|
|
39
|
+
*/
|
|
40
|
+
formatter?: (value: FileInputValue) => string;
|
|
41
|
+
/** callback voor value changes. Bevat het path naar de file(s) en de files in een array. */
|
|
42
|
+
onValueChanged?: (value: FileInputValue) => void | Promise<void>;
|
|
43
|
+
/** callback voor value changes. **LET OP:** de files vindt je in `e.target.files` */
|
|
44
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void | Promise<void>;
|
|
45
|
+
/** foutmelding bij de input */
|
|
46
|
+
errorMessage?: string | ((s: InputErrorProps<FileInputValue>) => string);
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Een input voor het selecteren van een bestand. de `value`-prop is een object met daarin de Files en het fake path.
|
|
50
|
+
* **De `value`-prop *MOET* `undefined` zijn voordat je begint. Het is niet mogelijk om alvast een waarde op te geven voor file-inputs in browsers**
|
|
51
|
+
*
|
|
52
|
+
* Onderstaande props zijn anders of speciaal voor file-inputs
|
|
53
|
+
* @param multiple Is het mogelijk om meerdere files te selectere (default = `false`)
|
|
54
|
+
* @param chooseFileTxt tekst op de knop om files te selecteren (default = `'Kies een bestand'`)
|
|
55
|
+
* @param noFilesTxt tekst om weer te geven als er geen bestanden zijn (default = `'Geen bestand(en) geselecteerd'`)
|
|
56
|
+
* @param boxed toon als een grote knop, niet als ene input (default = `false`)
|
|
57
|
+
* @param accept toegestane extensies of MIME-types
|
|
58
|
+
* - type `string`: komma-geschijden lijst van extensies of MIME-types, bijv. `'image/*, .pdf'`
|
|
59
|
+
* - type `string[]`: array van extensies of MIME-types, bijv. `['image/*', '.pdf']`
|
|
60
|
+
|
|
61
|
+
* **LET OP:** In het geval van extensies *MOET* de punt ervoor staan!
|
|
62
|
+
* @param capture Voor mobile devices: Welke camera moet gebruikt worden (default = `false`)
|
|
63
|
+
* @param value De geselecteerde files EN het path naar deze files.
|
|
64
|
+
* **LET OP: ** Het is niet mogelijk om in te stellen welke files al geselecteerd zijn.
|
|
65
|
+
* @param formatter functie om de namen van bestanden weer te geven.
|
|
66
|
+
* **default:** toon de namen van alle geselecteerde bestanden, gescheiden door komma's. Als er geen bestanden zijn, dan de noFilesTxt tonen.
|
|
67
|
+
* @param onValueChanged callback voor value changes. Bevat het path naar de file(s) en de files in een array.
|
|
68
|
+
*/
|
|
69
|
+
declare function FileInput({ labelHidden, multiple, placeholder, helpTag, errorMessage: errorProp, infoMessage: infoProp, label, disabled, keyboardType, title, name, required, showRequiredOnLabel, spellCheck, id, autoComplete, max, min, readonly, pattern, autofocus, form, inputRef: ref, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onValueChanged, size: sizeProp, alignment: alignmentProp, direction: directionProp, value, icon, boxed, accept, capture, noFilesTxt, chooseFileTxt, infoData, formatter, }: FileInputProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export { FileInput };
|
|
71
|
+
export type { FileInputProps, FileInputValue };
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
import { AlignmentProp, DirectionProp, AutoCompleteProp, KeyboardTypeProp, StrictOmit, SizeProp } from '@lib/types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { MonthInputString } from './Periodes/MonthInput';
|
|
5
|
+
import { WeekInputString } from './Periodes/WeekInput';
|
|
6
|
+
export type InputErrorProps<T = InputValueType> = {
|
|
7
|
+
/** current value */
|
|
8
|
+
value: T | undefined;
|
|
9
|
+
/** is deze input 'touched' (gefocused en weer geblurred (unfocused)) */
|
|
10
|
+
touched: boolean;
|
|
11
|
+
/** is deze input focused? */
|
|
12
|
+
focused: boolean;
|
|
13
|
+
/** is deze input required? */
|
|
14
|
+
required: boolean;
|
|
15
|
+
/** is deze input disabled? */
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
/** is deze input readonly? */
|
|
18
|
+
readonly: boolean;
|
|
19
|
+
};
|
|
20
|
+
type InputValueType = string | number | readonly string[] | undefined;
|
|
21
|
+
type InputStylingPropsType = {
|
|
22
|
+
/** grootte van de input (default = `m`, medium) */ size?: SizeProp | undefined;
|
|
23
|
+
/** alignment van de input (default = `l`, left) */ alignment?: AlignmentProp | undefined;
|
|
24
|
+
/** moet het label van de input verborgen worden? (screenreader only) (default = `false`) */ labelHidden?: boolean | undefined;
|
|
25
|
+
/** label boven (`v`) of voor (`h`) de input, (default = `v`, vertical) */ direction?: DirectionProp | undefined;
|
|
26
|
+
/** (optioneel) icon op de input */ icon?: IconProp | string | undefined | null;
|
|
27
|
+
infoData?: string | React.ReactNode | ((helptag?: string | undefined) => void) | undefined;
|
|
28
|
+
};
|
|
29
|
+
type InputPropsType<T = InputValueType> = {
|
|
30
|
+
optionList?: string[] | Array<{
|
|
31
|
+
value: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** label bij de input. Als geen label, dan wordt de `name`-property gebruikt */ label?: string | undefined;
|
|
35
|
+
/** Wordt er een rood sterretje getoond bij required inputs ? (default = `false`) */ showRequiredOnLabel?: boolean;
|
|
36
|
+
/** foutmelding bij de input */ errorMessage?: string | ((s: InputErrorProps<T>) => string) | undefined;
|
|
37
|
+
/** info-melding bij de input */ infoMessage?: string | ((v?: InputValueType) => string) | undefined;
|
|
38
|
+
/** helptag in Loon bij de input (`:HOOFDGROEP:SUBGROEP:`) */ helpTag?: string;
|
|
39
|
+
/** type input (default = `text`) */ type?: 'text' | 'password' | 'number' | 'email' | 'tel' | 'url' | 'range' | 'date' | 'datetime-local' | 'datetime' | 'month' | 'week' | 'time' | 'color' | 'search' | 'select' | 'file' | 'textarea';
|
|
40
|
+
/** (optioneel) tooltip-title voor de input. Bij gebruik van `pattern`, kan je hier het gewenste formaat opgeven. */ title?: string | undefined;
|
|
41
|
+
/** (optioneel) id voor de input. Als geen id, dan wordt de `name`-property gebruikt */ id?: string | undefined;
|
|
42
|
+
/** name-property voor de input */ name: string;
|
|
43
|
+
/** waarde voor de input */ value?: T | undefined;
|
|
44
|
+
/** is deze input loading (default = false) */ loading?: boolean | undefined;
|
|
45
|
+
/** gebruikt deze input de spellchecked (default = `false`) */ spellCheck?: boolean | undefined;
|
|
46
|
+
/** is deze input required (default= `false`) */ required?: boolean | undefined;
|
|
47
|
+
/** autocomplete voor deze input (default = `off`) */ autoComplete?: AutoCompleteProp | undefined;
|
|
48
|
+
/** type toetsenbord (voor smartphones) voor deze input (default = `text`) */ keyboardType?: KeyboardTypeProp | undefined;
|
|
49
|
+
/** placeholder in de input */ placeholder?: string | undefined;
|
|
50
|
+
/** is deze input disabled 9default = `false`) */ disabled?: boolean | undefined;
|
|
51
|
+
/** bij welk form hoort deze input? */ form?: string | undefined;
|
|
52
|
+
/** patroon voor de inputs (string of regex). Geef met `title` een gewenst formaat op. */ pattern?: string | undefined;
|
|
53
|
+
/** Is deze input readonly (default = `false`). Bij `true` zie je alleen nog maar de content van de input */
|
|
54
|
+
readonly?: boolean | undefined;
|
|
55
|
+
/** moet deze input de focus krijgen? (default = `false`) */ autofocus?: boolean | undefined;
|
|
56
|
+
/** (optionele) `ref` voor gebruik met `React.useRef<HTMLInputElement>` */ inputRef?: React.Ref<HTMLInputElement> | undefined;
|
|
57
|
+
/** max waarde of max lengte voor de input
|
|
58
|
+
* _(altijd hoger dan de `min`-prop)_
|
|
59
|
+
* @example // voor max waarde
|
|
60
|
+
* <Input type="number" max="100"/>
|
|
61
|
+
* <Input type="range" max="100"/>
|
|
62
|
+
* <Input type="date" max="2019-12-25"/>
|
|
63
|
+
* <Input type="month" max="2019-12"/>
|
|
64
|
+
* <Input type="week" max="2019-W23"/>
|
|
65
|
+
* <Input type="time" max="17:30"/>
|
|
66
|
+
* <Input type="datetime-local" max="29-12-25T23:59"/>
|
|
67
|
+
* @example //strings: voor max length, altijd 0 of hoger
|
|
68
|
+
* <Input type="text" max="100"/>
|
|
69
|
+
* <Input type="password" max="50"/> */
|
|
70
|
+
max?: number | WeekInputString | MonthInputString | string | undefined;
|
|
71
|
+
/** min waarde of min lengte voor de input
|
|
72
|
+
* _(altijd lager dan de `max`-prop)_
|
|
73
|
+
* @example <Input type="number" min="1"/>
|
|
74
|
+
* <Input type="range" min="1"/>
|
|
75
|
+
* <Input type="date" min="2019-01-01"/>
|
|
76
|
+
* <Input type="month" min="2019-01-01"/>
|
|
77
|
+
* <Input type="week" min="2019-W01"/>
|
|
78
|
+
* <Input type="time" min="08:30"/>
|
|
79
|
+
* <Input type="datetime-local" max="2019-01-01T00:00"/>
|
|
80
|
+
* @example //strings: voor max length, altijd 0 of hoger
|
|
81
|
+
* <Input type="text" min="100"/>
|
|
82
|
+
* <Input type="password" min="50"/> */
|
|
83
|
+
min?: number | WeekInputString | MonthInputString | string | undefined;
|
|
84
|
+
/** stapgrootte voor groter/kleiner aanpassingen
|
|
85
|
+
* | type| value | Example|
|
|
86
|
+
* |----------------|----------------|---------------------------------------------|
|
|
87
|
+
* | number | `1` | `<Input type="number" step="2"/>` |
|
|
88
|
+
* | range | `1` | `<Input type="range" step="2"/>` |
|
|
89
|
+
* | date | `1` (day) | `<Input type="date" step="2"/>` |
|
|
90
|
+
* | month | `1` (month) | `<Input type="month" step="2"/>` |
|
|
91
|
+
* | week | `1` (week) | `<Input type="week" step="2"/>` |
|
|
92
|
+
* | time | `60` (seconds) | `<Input type="time" step="2"/>` |
|
|
93
|
+
* | datetime-local | `1` (second) | `<Input type="datetime-local" step="900"/>` | */
|
|
94
|
+
step?: number | undefined;
|
|
95
|
+
/** Voeg extra styles to aan deze input */
|
|
96
|
+
styles?: React.CSSProperties | undefined;
|
|
97
|
+
/** Voeg extra classes toe aan deze input */
|
|
98
|
+
className?: string | undefined;
|
|
99
|
+
optionListId?: string | undefined;
|
|
100
|
+
hideIconRight?: boolean | undefined;
|
|
101
|
+
/** callback voor unfocus (blur), zet OOK de input op `touched` */
|
|
102
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void | Promise<void>;
|
|
103
|
+
/** callback voor onChange. Voor de echte waarde, gebruik je `onValueChanged` */
|
|
104
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void | Promise<void>;
|
|
105
|
+
/** value-changed callback met de nieuwe waarde van de input. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt
|
|
106
|
+
* @example
|
|
107
|
+
* const [x, setX] = React.useState('');
|
|
108
|
+
* return <Input value={x} onValueChange={setX} {...props} />
|
|
109
|
+
*/
|
|
110
|
+
onValueChanged?: (e: T) => void | Promise<void>;
|
|
111
|
+
/** callback voor focus MET daarbij de helptag */
|
|
112
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>, helpTag?: string) => void | Promise<void>;
|
|
113
|
+
/** callback voor typen */
|
|
114
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void | Promise<void>;
|
|
115
|
+
/** callback voor typen */
|
|
116
|
+
onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement>) => void | Promise<void>;
|
|
117
|
+
};
|
|
118
|
+
/** Tijd voordat een input de focus verliest als je erop klikt/hovert en er is hulp. Anders is het instant. */
|
|
119
|
+
declare const FOCUS_HELP_TIMEOUT_IN_MS = 333;
|
|
120
|
+
/**
|
|
121
|
+
* Basis input component. Deze component heeft dezelfde properties als de gewone `<input ... />`-tag en de `<Input<T> ... />-tag`.
|
|
122
|
+
* Het verschil met de `Input`-tag is dat deze compionent **geen** direction, label, of icon heeft, dus je kan hem zelf inrichten
|
|
123
|
+
* Wordt door (bijna) alle andere input-componenten gebruikt. Alleen niet door de `<Select>`, <Radio>`, `<Checkbox>` en `<Textarea>` componenten.
|
|
124
|
+
* @example <BaseInput type="text" name="myInput" value={x} onValueChanged={setX} />
|
|
125
|
+
* @description callbacks.
|
|
126
|
+
* | callback | | description |
|
|
127
|
+
* |----------------|------|---------------------------------------------|
|
|
128
|
+
* | onBlur |`(e: React.FocusEvent<HTMLInputElement>)=> void` | callback voor unfocus (blur), zet OOK de input op `touched`|
|
|
129
|
+
* | onChange |`(e: React.FocusEvent<HTMLInputElement>)=> void` | callback voor onChange|
|
|
130
|
+
* | onValueChanged |`(v: T)=> void` | value-changed callback met de nieuwe waarde van de input. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt|
|
|
131
|
+
* | onFocus |`(e: React.FocusEvent<HTMLInputElement>, ht?: string)=> void` | callback voor focus, MET de `helpTag` voor gebruik in Loon (F1) |
|
|
132
|
+
* | onKeyDown |`(e: React.KeyboardEvent<HTMLInputElement>)=> void` | callback voor typen |
|
|
133
|
+
* | onKeyUp |`(e: React.KeyboardEvent<HTMLInputElement>)=> void` | callback voor typen |
|
|
134
|
+
* @description props: ({@link InputPropsType}) voor de input.
|
|
135
|
+
* | prop | type | description |
|
|
136
|
+
* |----------------|----------------|---------------------------------------------|
|
|
137
|
+
* | alignment | `AlignmentType` | alignment van de input (default = `left`) |
|
|
138
|
+
* | autoComplete | `AutoCompleteProp` | autocomplete voor deze input (default = `off`)|
|
|
139
|
+
* | autofocus | `boolean` | moet deze input de focus krijgen? (default = `false`)|
|
|
140
|
+
* | disabled | `boolean` | is deze input disabled (default = `false`)|
|
|
141
|
+
* | errorMessage | `string`, `(v?: string) => string` | error message voor deze input (default = `''`)|
|
|
142
|
+
* | form | `string` | form waar deze input bij hoort (default = `undefined`)|
|
|
143
|
+
* | helpTag | `string` `:Hoofdgroep:Subgroep:` | help tag voor deze input (default = `undefined`). Kan gebruikt worden voor de Help In loon (F1) functionaliteit. Meegelevert in de callback voor `onFocus`|
|
|
144
|
+
* | id | `string` | id voor deze input (default = `undefined`)|
|
|
145
|
+
* | inputRef | `React.Ref<HTMLInputElement>` | `ref` voor gebruik met `React.useRef<HTMLInputElement>` (default = `undefined`)|
|
|
146
|
+
* | keyboardType | `string` | keyboard type voor deze input (default = `text`)|
|
|
147
|
+
* | max | `number`,`string` | max waarde of max lengte voor de input (default = `undefined`)|
|
|
148
|
+
* | min | `number`,`string` | min waarde of min lengte voor de input (default = `undefined`)|
|
|
149
|
+
* | name | `string` | name voor deze input (**verplicht**)|
|
|
150
|
+
* | pattern | `string` | pattern voor deze input (default = `undefined`)|
|
|
151
|
+
* | placeholder | `string` | placeholder voor deze input (default = `undefined`)|
|
|
152
|
+
* | readonly | `boolean` | is deze input readonly (default = `false`)|
|
|
153
|
+
* | required | `boolean` | is deze input required (default = `false`)|
|
|
154
|
+
* | size | `SizeProp` | size voor deze input (default = `undefined`)|
|
|
155
|
+
* | spellCheck | `boolean` | moet deze input spellcheck hebben (default = `false`)|
|
|
156
|
+
* | step | `number` | stapgrootte voor groter/kleiner aanpassingen (default = `1`)|
|
|
157
|
+
* | title | `string` | title voor deze input (default = `undefined`)|
|
|
158
|
+
* | type | `string` | type voor deze input (default = `text`)|
|
|
159
|
+
* | value | `string` | value voor deze input (default = `undefined`)|
|
|
160
|
+
*/
|
|
161
|
+
declare function BaseInput<T extends InputValueType = string>({ alignment: alignmentProp, autoComplete, optionListId, autofocus, disabled, errorMessage, infoMessage, form, helpTag, id, inputRef: ref, keyboardType, max, min, name, pattern, placeholder, readonly, required, size: sizeProp, spellCheck, step, title, type, value, className: extraClasses, styles, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onValueChanged, }: StrictOmit<InputPropsType<T>, 'optionList'> & StrictOmit<InputStylingPropsType, 'labelHidden' | 'direction' | 'icon'>): import("react/jsx-runtime").JSX.Element;
|
|
162
|
+
/**
|
|
163
|
+
* Input component. Deze component heeft dezelfde properties als de gewone `<input ... />`-tag en de `<BaseInput<T> ... />-tag`.
|
|
164
|
+
* Het verschil met de `BaseInput`-tag is dat deze compionent **wel** direction, label, of icon heeft.
|
|
165
|
+
* @example <Input type="text" name="myInput" value={x} onValueChanged={setX} icon={faMouse} />
|
|
166
|
+
* @description callbacks.
|
|
167
|
+
* | callback | | description |
|
|
168
|
+
* |----------------|------|---------------------------------------------|
|
|
169
|
+
* | onBlur |`(e: React.FocusEvent<HTMLInputElement>)=> void` | callback voor unfocus (blur), zet OOK de input op `touched`|
|
|
170
|
+
* | onChange |`(e: React.FocusEvent<HTMLInputElement>)=> void` | callback voor onChange|
|
|
171
|
+
* | onValueChanged |`(v: T)=> void` | value-changed callback met de nieuwe waarde van de input. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt|
|
|
172
|
+
* | onFocus |`(e: React.FocusEvent<HTMLInputElement>, ht?: string)=> void` | callback voor focus, MET de `helpTag` voor gebruik in Loon (F1) |
|
|
173
|
+
* | onKeyDown |`(e: React.KeyboardEvent<HTMLInputElement>)=> void` | callback voor typen |
|
|
174
|
+
* | onKeyUp |`(e: React.KeyboardEvent<HTMLInputElement>)=> void` | callback voor typen |
|
|
175
|
+
* @description props: {@link InputPropsType} voor de input.
|
|
176
|
+
* | prop | type | description |
|
|
177
|
+
* |----------------|----------------|---------------------------------------------|
|
|
178
|
+
* | alignment | `AlignmentType` | alignment van de input (default = `left`) |
|
|
179
|
+
* | autoComplete | `AutoCompleteProp` | autocomplete voor deze input (default = `off`)|
|
|
180
|
+
* | autofocus | `boolean` | moet deze input de focus krijgen? (default = `false`)|
|
|
181
|
+
* | disabled | `boolean` | is deze input disabled (default = `false`)|
|
|
182
|
+
* | direction | `DirectionProp` | direction voor deze input (default = `h`). Voor styling|
|
|
183
|
+
* | errorMessage | `string`, `(v?: string) => string` | error message voor deze input (default = `''`)|
|
|
184
|
+
* | form | `string` | form waar deze input bij hoort (default = `undefined`)|
|
|
185
|
+
* | helpTag | `string` | help tag voor deze input (default = `undefined`). Kan gebruikt worden voor de Help In loon (F1) functionaliteit. Meegelevert in de callback voor `onFocus`|
|
|
186
|
+
* | id | `string` | id voor deze input (default = `undefined`)|
|
|
187
|
+
* | inputRef | `React.Ref<HTMLInputElement>` | `ref` voor gebruik met `React.useRef<HTMLInputElement>` (default = `undefined`)|
|
|
188
|
+
* | keyboardType | `string` | keyboard type voor deze input (default = `text`)|
|
|
189
|
+
* | max | `number`, `string` | max waarde of max lengte voor de input (default = `undefined`)|
|
|
190
|
+
* | min | `number`, `string` | min waarde of min lengte voor de input (default = `undefined`)|
|
|
191
|
+
* | name | `string` | name voor deze input (**verplicht**)|
|
|
192
|
+
* | pattern | `string` | pattern voor deze input (default = `undefined`)|
|
|
193
|
+
* | placeholder | `string` | placeholder voor deze input (default = `undefined`)|
|
|
194
|
+
* | readonly | `boolean` | is deze input readonly (default = `false`)|
|
|
195
|
+
* | required | `boolean` | is deze input required (default = `false`)|
|
|
196
|
+
* | size | `SizeProp` | size voor deze input (default = `undefined`)|
|
|
197
|
+
* | spellCheck | `boolean` | moet deze input spellcheck hebben (default = `false`)|
|
|
198
|
+
* | step | `number` | stapgrootte voor groter/kleiner aanpassingen (default = `1`)|
|
|
199
|
+
* | title | `string` | title voor deze input (default = `undefined`)|
|
|
200
|
+
* | type | `string` | type voor deze input (default = `text`)|
|
|
201
|
+
* | value | `string` | value voor deze input (default = `undefined`)|
|
|
202
|
+
*/
|
|
203
|
+
declare function Input<T extends InputValueType = string>({ direction: directionProp, errorMessage, infoMessage, showRequiredOnLabel, hideIconRight, icon, id, label, labelHidden, name, required, loading, disabled, readonly, size: sizeProp, value, infoData, helpTag, optionList, onBlur, onFocus, ...props }: StrictOmit<InputPropsType<T>, 'optionListId'> & InputStylingPropsType): import("react/jsx-runtime").JSX.Element;
|
|
204
|
+
type InputContainerProps = {
|
|
205
|
+
label: string;
|
|
206
|
+
required: boolean;
|
|
207
|
+
showRequiredOnLabel: boolean;
|
|
208
|
+
inputId: string;
|
|
209
|
+
labelHidden?: boolean;
|
|
210
|
+
loading?: boolean;
|
|
211
|
+
children: React.ReactNode;
|
|
212
|
+
size: SizeProp;
|
|
213
|
+
direction: DirectionProp;
|
|
214
|
+
controlClassName?: string;
|
|
215
|
+
infoData?: React.ReactNode | undefined;
|
|
216
|
+
setHovered?: (hovered: boolean) => void;
|
|
217
|
+
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
218
|
+
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
219
|
+
};
|
|
220
|
+
/** Een wrapper voor een input component, om te zorgen dat ze allemaal op dezelfde manier horizontaal of verticaal aligned worden. */
|
|
221
|
+
declare function InputContainer({ children, controlClassName, direction, showRequiredOnLabel, inputId, label, labelHidden, required, size, loading, infoData, setHovered, onMouseEnter, onMouseLeave, }: InputContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
222
|
+
export { BaseInput, Input, InputContainer, FOCUS_HELP_TIMEOUT_IN_MS };
|
|
223
|
+
export type { InputPropsType, InputStylingPropsType, InputValueType };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MaskedInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onBlur'> {
|
|
3
|
+
mask: any;
|
|
4
|
+
guide?: boolean;
|
|
5
|
+
value?: string | number;
|
|
6
|
+
pipe?: any;
|
|
7
|
+
placeholderChar?: string;
|
|
8
|
+
keepCharPositions?: boolean;
|
|
9
|
+
showMask?: boolean;
|
|
10
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
11
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
type Mask = Array<string | RegExp> | ((value: string, config?: any) => Array<string | RegExp> | false);
|
|
14
|
+
interface ConformToMaskConfig {
|
|
15
|
+
guide?: boolean;
|
|
16
|
+
previousConformedValue?: string;
|
|
17
|
+
placeholderChar?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
currentCaretPosition?: number;
|
|
20
|
+
keepCharPositions?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface ConformToMaskResult {
|
|
23
|
+
conformedValue: string;
|
|
24
|
+
meta: {
|
|
25
|
+
someCharsRejected: boolean;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare const MaskedInput: React.ForwardRefExoticComponent<MaskedInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
export default function conformToMask(rawValue: string | undefined, mask: Mask, config?: ConformToMaskConfig): ConformToMaskResult;
|
|
30
|
+
export declare function createNumberMask({ prefix, suffix, includeThousandsSeparator, thousandsSeparatorSymbol, allowDecimal, decimalSymbol, decimalLimit, requireDecimal, allowNegative, allowLeadingZeroes, integerLimit, }?: {
|
|
31
|
+
prefix?: string | undefined;
|
|
32
|
+
suffix?: string | undefined;
|
|
33
|
+
includeThousandsSeparator?: boolean | undefined;
|
|
34
|
+
thousandsSeparatorSymbol?: string | undefined;
|
|
35
|
+
allowDecimal?: boolean | undefined;
|
|
36
|
+
decimalSymbol?: string | undefined;
|
|
37
|
+
decimalLimit?: number | undefined;
|
|
38
|
+
requireDecimal?: boolean | undefined;
|
|
39
|
+
allowNegative?: boolean | undefined;
|
|
40
|
+
allowLeadingZeroes?: boolean | undefined;
|
|
41
|
+
integerLimit?: null | undefined;
|
|
42
|
+
}): {
|
|
43
|
+
(rawValue?: string): any;
|
|
44
|
+
instanceOf: string;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StrictOmit } from '@lib/types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
3
|
+
type NumberInputProps = StrictOmit<InputPropsType<number>, 'type' | 'spellCheck'> & InputStylingPropsType & {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
suffix?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* NumberInput: input voor een getal
|
|
9
|
+
* @param value De waarde van de input
|
|
10
|
+
* @example <NumberInput value={1} step={3}/>
|
|
11
|
+
*/
|
|
12
|
+
declare function NumberInput({ value, prefix, suffix, icon, name, id: idProp, label, direction: directionProp, size: sizeProp, alignment: alignmentProp, required, disabled, readonly, loading, labelHidden, showRequiredOnLabel, hideIconRight, className: extraClasses, infoData, helpTag, errorMessage, infoMessage, onValueChanged, onBlur, onFocus, ...props }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { NumberInput };
|
|
14
|
+
export type { NumberInputProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StrictOmit } from '@lib/types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
3
|
+
type RangeInputProps = StrictOmit<InputPropsType<number>, 'autofocus' | 'autoComplete' | 'type' | 'spellCheck' | 'placeholder' | 'hideIconRight'> & StrictOmit<InputStylingPropsType, 'alignment' | 'icon'> & {
|
|
4
|
+
/** value-unit om __voor__ de geselecteerde waarde te zetten. (default = `''`) */
|
|
5
|
+
prefix?: string;
|
|
6
|
+
/** value-unit om __achter__ de geselecteerde waarde te zetten. (default = `''`) */
|
|
7
|
+
suffix?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* RangeInput: input voor een getal. De range-input heeft geen placeholder, icon, autoComplete, spellCheck en autofocus. Ook size en alignment zijn niet van toepassing. Alleen op de uitlijning van het label
|
|
11
|
+
* @param value De waarde van de input
|
|
12
|
+
* @param prefix De unit (default = ''). Staat **voor** de geselecteerde waarde
|
|
13
|
+
* @param suffix De unit (default = ''). Staat **achter** de geselecteerde waarde
|
|
14
|
+
* @param min De minimale waarde van de input (default = 0)
|
|
15
|
+
* @param max De maximale waarde van de input (default = 100)
|
|
16
|
+
* @param step De stapgrootte van de input (default = 1)
|
|
17
|
+
* @example <RangeInput value={50} min={0} max={100} />
|
|
18
|
+
*/
|
|
19
|
+
declare function RangeInput({ value, min, max, step, prefix, suffix, helpTag, errorMessage, infoMessage, label, disabled, title, name, size: sizeProp, required, showRequiredOnLabel, id, readonly, form, inputRef, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onValueChanged, direction: directionProp, labelHidden, infoData, }: RangeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { RangeInput };
|
|
21
|
+
export type { RangeInputProps };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { StrictOmit, HexColor, RGBColor, HSLColor } from '@lib/types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
3
|
+
type ColorInputProps = StrictOmit<InputPropsType<string>, 'type' | 'value' | 'onValueChanged' | 'step' | 'min' | 'max' | 'autoComplete' | 'spellCheck' | 'keyboardType'> & InputStylingPropsType & {
|
|
4
|
+
/** Gebruik de color-input met een hex-color, bijvooerbeeld`#ff8000` of `#fff` */
|
|
5
|
+
hexValue?: HexColor;
|
|
6
|
+
/** value-changed callback met de nieuwe waarde van de input in Hex-format. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt
|
|
7
|
+
* @example
|
|
8
|
+
* const [x, setX] = React.useState('#ff8000');
|
|
9
|
+
* return <ColorInput hexValue={x} onHexValueChange={setX} {...props} />
|
|
10
|
+
*/
|
|
11
|
+
onHexValueChanged?: (v: HexColor) => void | Promise<void>;
|
|
12
|
+
/** Gebruik de color-input met een RGB-color, van `[0, 0, 0]` t/m `[255, 255, 255]` */
|
|
13
|
+
rgbValue?: RGBColor;
|
|
14
|
+
/** value-changed callback met de nieuwe waarde van de input in RGB-format. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt
|
|
15
|
+
* @example
|
|
16
|
+
* const [x, setX] = React.useState([255, 128, 0]);
|
|
17
|
+
* return <ColorInput rgbValue={x} onRGBValueChange={setX} {...props} />
|
|
18
|
+
*/
|
|
19
|
+
onRGBValueChanged?: (v: RGBColor) => void | Promise<void>;
|
|
20
|
+
/** Gebruik de color-input met een HSL-color, van `[0, 0, 0]` t/m `[360, 100, 100]` */
|
|
21
|
+
hslValue?: HSLColor;
|
|
22
|
+
/** value-changed callback met de nieuwe waarde van de input in HSL-format. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt
|
|
23
|
+
* @example
|
|
24
|
+
* const [x, setX] = React.useState([60, 100, 50]);
|
|
25
|
+
* return <ColorInput hslValue={x} onHSLValueChange={setX} {...props} />
|
|
26
|
+
*/
|
|
27
|
+
onHSLValueChanged?: (v: HSLColor) => void | Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Een color-input component dat een hex-color, een rgb-color of een hsl-color kan gebruiken.
|
|
31
|
+
* @description __LET OP:__ _Er zit een volgorde-afhankelijkheid in deze component: HEX gaat voor RGB en RGB gaat voor HSL._
|
|
32
|
+
* @param value deze bestaat niet. er zijn 3 verschillende manieren om de value te zetten
|
|
33
|
+
* - `hexValue` Gebruik de color-input met een hex-color, bijvooerbeeld`#ff8000` of `#fff`
|
|
34
|
+
* - `rgbValue` Gebruik de color-input met een RGB-color, van `[0, 0, 0]` t/m `[255, 255, 255]`
|
|
35
|
+
* - `hslValue` Gebruik de color-input met een HSL-color, van `[0, 0, 0]` t/m `[360, 100, 100]`
|
|
36
|
+
*
|
|
37
|
+
* @param onValueChanged deze bestaat niet. er zijn 3 verschillende manieren om de value te krijgen.
|
|
38
|
+
* - `onHexValueChanged` value-changed callback met de nieuwe waarde van de input in Hex-format.
|
|
39
|
+
* - `onRGBValueChanged` value-changed callback met de nieuwe waarde van de input in RGB-format.
|
|
40
|
+
* - `onHSLValueChanged` value-changed callback met de nieuwe waarde van de input in HSL-format.
|
|
41
|
+
* Daardoor zou je de colors ook naar elkaar kunnen omzetten. De functies daarvoor worden **ook** geexporteerd.
|
|
42
|
+
*@example
|
|
43
|
+
* // Gebruik de color-input met een hex-color, bijvooerbeeld`#ff8000` of `#fff`
|
|
44
|
+
* const [x, setX] = React.useState<HexColor>('#ff8000');
|
|
45
|
+
* <ColorInput hexValue={x} onHexValueChange={setX} {...props} />
|
|
46
|
+
* @example // Gebruik de color-input met een RGB-color, van `[0, 0, 0]` t/m `[255, 255, 255]`
|
|
47
|
+
* const [x, setX] = React.useState<RGBColor>([255, 128, 0]);
|
|
48
|
+
* <ColorInput rgbValue={x} onRGBValueChange={setX} {...props} />
|
|
49
|
+
* @example // Gebruik de color-input met een HSL-color, van `[0, 0, 0]` t/m `[360, 100, 100]`
|
|
50
|
+
* const [x, setX] = React.useState<HSLColor>([60, 100, 50]);
|
|
51
|
+
* <ColorInput hslValue={x} onHSLValueChange={setX} {...props} />
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
declare function ColorInput({ hexValue, rgbValue, hslValue, icon, onHexValueChanged, onRGBValueChanged, onHSLValueChanged, ...props }: ColorInputProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export { ColorInput };
|
|
56
|
+
export type { ColorInputProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type HiddenInputProps = {
|
|
2
|
+
/** Start value voor deze input (optioneel) */
|
|
3
|
+
value?: string;
|
|
4
|
+
/** Name input: gebruikt voor een <label> als er geen label gedefinieerd is & de name-attribuut <input> */
|
|
5
|
+
name: string;
|
|
6
|
+
/** ID voor de input: gebruikt voor een <label for="*id*}"> */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Moet dit verborgen field worden ingevoerd */
|
|
9
|
+
required?: boolean;
|
|
10
|
+
/** (optional) Tooltip voor een hidden input ??? vooral voor test-doeleinden
|
|
11
|
+
* @deprecated use `title`
|
|
12
|
+
*/
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
/** (optional) Tooltip voor een hidden input ??? vooral voor test-doeleinden */
|
|
15
|
+
title?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Maak een input die verborgen is maar wel een waarde moet hebben.
|
|
19
|
+
* @param props
|
|
20
|
+
* @returns een hidden input
|
|
21
|
+
* @param name de naam voor de input (REQUIRED)
|
|
22
|
+
* @param id de id voor de input
|
|
23
|
+
* @param value de waarde
|
|
24
|
+
* @param required moet dit verborgen field worden ingevoerd
|
|
25
|
+
* @example <HiddenInput value={value} {...props} />
|
|
26
|
+
*/
|
|
27
|
+
declare function HiddenInput({ value, name, id, required, title, tooltip }: HiddenInputProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export { HiddenInput };
|
|
29
|
+
export type { HiddenInputProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StrictOmit } from '@lib/types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
3
|
+
type TelephoneInputProps = StrictOmit<InputPropsType<string>, 'type' | 'step' | 'pattern'> & InputStylingPropsType & {
|
|
4
|
+
pattern?: 'mobiel' | 'vast' | string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Een input voor een telefoonnummer. Deze input heeft een default `pattern` voor validatie op form-verzending. Deze kan worden overschreven. Ook wordt de autocomplete op `email` gezet.
|
|
8
|
+
* @example <TelephoneInput name="phonenr" value={phone} onValueChanged={setPhone} pattern='mobiel' />
|
|
9
|
+
* @param pattern het pattern voor validatie, (default = '')
|
|
10
|
+
* @param autoComplete de autocomplete type (password managers) (default = `tel`)
|
|
11
|
+
*/
|
|
12
|
+
declare function TelephoneInput({ value, icon, pattern, autoComplete, onValueChanged, ...props }: TelephoneInputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { TelephoneInput };
|
|
14
|
+
export type { TelephoneInputProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StrictOmit } from '@lib/types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
3
|
+
type URLInputProps = StrictOmit<InputPropsType<string>, 'type' | 'step' | 'pattern'> & InputStylingPropsType & {
|
|
4
|
+
pattern?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Een input voor een URL. Deze input heeft een default `pattern` voor validatie op form-verzending. Deze kan worden overschreven. Ook wordt de autocomplete op `email` gezet.
|
|
8
|
+
* @example <URLInput name="url" value={url} onValueChanged={setUrl} />
|
|
9
|
+
* @param pattern het pattern voor validatie, (default = '')
|
|
10
|
+
* @param autoComplete de autocomplete type (password managers) (default = `url`)
|
|
11
|
+
*/
|
|
12
|
+
declare function URLInput({ value, icon, pattern, autoComplete, onValueChanged, ...props }: URLInputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { URLInput };
|
|
14
|
+
export type { URLInputProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StrictOmit } from '@lib/types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
3
|
+
/** WeekInput: input voor een weeknummer (format: yyyy-MM)
|
|
4
|
+
* -1e getal: jaartal
|
|
5
|
+
* -2e getal: maandnummer (1-12), **met** voorloopnullen. *LET OP: NIET JavaScript Date 0-11!*
|
|
6
|
+
* @example
|
|
7
|
+
* `'2021-01'` // correct
|
|
8
|
+
* `'2021-1'` // incorrect ZONDER ERROR
|
|
9
|
+
* `'2021-001'` // incorrect ZONDER ERROR
|
|
10
|
+
* `'2021-M01'` // incorrect met error
|
|
11
|
+
*/
|
|
12
|
+
type MonthInputString = '' | `${number}-${number}`;
|
|
13
|
+
type MonthInputProps = StrictOmit<InputPropsType<string>, 'type' | 'step' | 'value' | 'onValueChanged' | 'min' | 'max'> & InputStylingPropsType & {
|
|
14
|
+
/** waarde van de month-input zetten met een string van format `yyyy-MM`.
|
|
15
|
+
*
|
|
16
|
+
* *LET OP: Niet JavaScript Date 0-11, maar gewoon 1-12*
|
|
17
|
+
* @example '2021-01'
|
|
18
|
+
*/
|
|
19
|
+
value?: MonthInputString;
|
|
20
|
+
/** minimaal toegestane waarde als MonthInputValue. MOET lager zijn dan `max`-prop */
|
|
21
|
+
min?: MonthInputString;
|
|
22
|
+
/** maximaal toegestane waarde als MonthInputValue. MOET hoger zijn dan `min`-prop */
|
|
23
|
+
max?: MonthInputString;
|
|
24
|
+
/** callback met het resultaat als string */
|
|
25
|
+
onValueChanged?(newVal: MonthInputString): void;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* MonthInput: input voor een maand in een jaar
|
|
29
|
+
*@param value De value bestaat uit 2 delen, gescheiden met een `-`-karakter
|
|
30
|
+
* - 1e getal: jaartal
|
|
31
|
+
* - 2e getal: maandnummer (01-12), **met** voorloopnullen. *LET OP: NIET JavaScript Date 0-11!*
|
|
32
|
+
* @example
|
|
33
|
+
* `'2021-01'` // correct
|
|
34
|
+
* `'2021-1'` // correct
|
|
35
|
+
* `'2021-001'` // incorrect
|
|
36
|
+
* `'2021-M01'` // incorrect
|
|
37
|
+
* @param min minimale waarde als MonthInputValue. MOET lager zijn dan `max`-prop
|
|
38
|
+
* @param max maximale waarde als MonthInputValue. MOET hoger zijn dan `min`-prop
|
|
39
|
+
* @example <MonthInput value="2021-06" min="2021-01" max="2021-12" />
|
|
40
|
+
*/
|
|
41
|
+
declare function MonthInput({ value, min, max, icon, onValueChanged, ...props }: MonthInputProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export { MonthInput };
|
|
43
|
+
export type { MonthInputProps, MonthInputString };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StrictOmit } from '@lib/types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
3
|
+
/** WeekInput: input voor een weeknummer (format: yyyy-Www)
|
|
4
|
+
* -1e getal: jaartal
|
|
5
|
+
* -2e getal: weeknummer, **met** voorloopnullen, voorafgaan door een *'W'*
|
|
6
|
+
* @example
|
|
7
|
+
* `'2021-W01'` // correct
|
|
8
|
+
* `'2021-W1'` // incorrect ZONDER ERROR
|
|
9
|
+
* `'2021-W001'` // incorrect ZONDER ERROR
|
|
10
|
+
* `'2021-01'` // incorrect met error
|
|
11
|
+
* `'202101'` // incorrect met error
|
|
12
|
+
*/
|
|
13
|
+
type WeekInputString = '' | `${number}-W${number}`;
|
|
14
|
+
type WeekInputProps = StrictOmit<InputPropsType<string>, 'type' | 'step' | 'value' | 'onValueChanged' | 'min' | 'max'> & InputStylingPropsType & {
|
|
15
|
+
/** waarde van de weekinput zetten met een string van format `yyyy-Www`
|
|
16
|
+
* @example '2021-W01'
|
|
17
|
+
*/
|
|
18
|
+
value?: WeekInputString;
|
|
19
|
+
/** minimaal toegestane waarde als WeekInputValue. MOET lager zijn dan `max`-prop */
|
|
20
|
+
min?: WeekInputString;
|
|
21
|
+
/** maximaal toegestane waarde als WeekInputValue. MOET hoger zijn dan `min`-prop */
|
|
22
|
+
max?: WeekInputString;
|
|
23
|
+
/** callback met het resultaat als string */
|
|
24
|
+
onValueChanged?(newVal: WeekInputString): void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* WeekInput: input voor een weeknummer in een jaar
|
|
28
|
+
* @param value De value bestaat uit 2 delen, gescheiden met een `-W`-string
|
|
29
|
+
* -1e getal: jaartal
|
|
30
|
+
* -2e getal: weeknummer, **met** voorloopnullen, voorafgaan door een *'W'*
|
|
31
|
+
* @example
|
|
32
|
+
* '2021-W01' // correct
|
|
33
|
+
* '2021-W1' // correct, geen voorloopnullen
|
|
34
|
+
* '2021-W001' // incorrect te veel voorloopnullen
|
|
35
|
+
* '2021-01' // incorrect, weeknummer heeft geen W-karakter
|
|
36
|
+
* '202101' // incorrect, geen `-W`-string
|
|
37
|
+
* @param min minimale waarde als WeekInputValue. MOET lager zijn dan `max`-prop
|
|
38
|
+
* @param max maximale waarde als WeekInputValue. MOET hoger zijn dan `min`-prop
|
|
39
|
+
* @example <WeekInput value="2021-W01" min="2021-W01" max="2021-W53" />
|
|
40
|
+
*/
|
|
41
|
+
declare function WeekInput({ value, min, max, icon, onValueChanged, ...props }: WeekInputProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export { WeekInput };
|
|
43
|
+
export type { WeekInputProps, WeekInputString };
|