@hkdigital/lib-core 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +149 -0
- package/dist/assets/autospuiten/car-paint-picker/army-green.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/electric-blue.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/lemon-yellow.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/opaque-purple.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/rusty.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/sunset-orange.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker/tomato-red.jpg +0 -0
- package/dist/assets/autospuiten/car-paint-picker.d.ts +17 -0
- package/dist/assets/autospuiten/car-paint-picker.js +41 -0
- package/dist/assets/autospuiten/labels.d.ts +7 -0
- package/dist/assets/autospuiten/labels.js +7 -0
- package/dist/classes/cache/IndexedDbCache.d.ts +216 -0
- package/dist/classes/cache/IndexedDbCache.js +1407 -0
- package/dist/classes/cache/MemoryResponseCache.d.ts +106 -0
- package/dist/classes/cache/MemoryResponseCache.js +138 -0
- package/dist/classes/cache/index.d.ts +3 -0
- package/dist/classes/cache/index.js +5 -0
- package/dist/classes/cache/typedef.d.ts +67 -0
- package/dist/classes/cache/typedef.js +41 -0
- package/dist/classes/data/IterableTree.d.ts +51 -0
- package/dist/classes/data/IterableTree.js +243 -0
- package/dist/classes/data/Selector.d.ts +30 -0
- package/dist/classes/data/Selector.js +190 -0
- package/dist/classes/data/index.d.ts +2 -0
- package/dist/classes/data/index.js +2 -0
- package/dist/classes/events/EventEmitter.d.ts +142 -0
- package/dist/classes/events/EventEmitter.js +275 -0
- package/dist/classes/events/index.d.ts +1 -0
- package/dist/classes/events/index.js +2 -0
- package/dist/classes/index.d.ts +4 -0
- package/dist/classes/index.js +4 -0
- package/dist/classes/logging/Logger.d.ts +78 -0
- package/dist/classes/logging/Logger.js +210 -0
- package/dist/classes/logging/constants.d.ts +12 -0
- package/dist/classes/logging/constants.js +16 -0
- package/dist/classes/logging/index.d.ts +2 -0
- package/dist/classes/logging/index.js +4 -0
- package/dist/classes/logging/typedef.d.ts +34 -0
- package/dist/classes/logging/typedef.js +17 -0
- package/dist/classes/promise/HkPromise.d.ts +121 -0
- package/dist/classes/promise/HkPromise.js +377 -0
- package/dist/classes/promise/index.d.ts +1 -0
- package/dist/classes/promise/index.js +1 -0
- package/dist/classes/services/ServiceBase.d.ts +163 -0
- package/dist/classes/services/ServiceBase.js +463 -0
- package/dist/classes/services/ServiceManager.d.ts +179 -0
- package/dist/classes/services/ServiceManager.js +614 -0
- package/dist/classes/services/index.d.ts +4 -0
- package/dist/classes/services/index.js +5 -0
- package/dist/classes/services/service-states.d.ts +159 -0
- package/dist/classes/services/service-states.js +205 -0
- package/dist/classes/services/typedef.d.ts +247 -0
- package/dist/classes/services/typedef.js +179 -0
- package/dist/classes/stores/SubscribersCount.d.ts +39 -0
- package/dist/classes/stores/SubscribersCount.js +107 -0
- package/dist/classes/stores/index.d.ts +1 -0
- package/dist/classes/stores/index.js +1 -0
- package/dist/classes/streams/LogTransformStream.d.ts +4 -0
- package/dist/classes/streams/LogTransformStream.js +19 -0
- package/dist/classes/streams/ServerEventsStore.d.ts +22 -0
- package/dist/classes/streams/ServerEventsStore.js +110 -0
- package/dist/classes/streams/TimeStampSource.d.ts +13 -0
- package/dist/classes/streams/TimeStampSource.js +26 -0
- package/dist/classes/streams/index.d.ts +3 -0
- package/dist/classes/streams/index.js +3 -0
- package/dist/classes/svelte/audio/AudioLoader.svelte.d.ts +30 -0
- package/dist/classes/svelte/audio/AudioLoader.svelte.js +58 -0
- package/dist/classes/svelte/audio/AudioScene.svelte.d.ts +74 -0
- package/dist/classes/svelte/audio/AudioScene.svelte.js +324 -0
- package/dist/classes/svelte/audio/mocks.d.ts +7 -0
- package/dist/classes/svelte/audio/mocks.js +35 -0
- package/dist/classes/svelte/finite-state-machine/FiniteStateMachine.svelte.d.ts +50 -0
- package/dist/classes/svelte/finite-state-machine/FiniteStateMachine.svelte.js +133 -0
- package/dist/classes/svelte/finite-state-machine/index.d.ts +1 -0
- package/dist/classes/svelte/finite-state-machine/index.js +1 -0
- package/dist/classes/svelte/image/ImageLoader.svelte.d.ts +19 -0
- package/dist/classes/svelte/image/ImageLoader.svelte.js +45 -0
- package/dist/classes/svelte/image/ImageScene.svelte.d.ts +78 -0
- package/dist/classes/svelte/image/ImageScene.svelte.js +249 -0
- package/dist/classes/svelte/image/ImageVariantsLoader.svelte.d.ts +43 -0
- package/dist/classes/svelte/image/ImageVariantsLoader.svelte.js +152 -0
- package/dist/classes/svelte/image/index.d.ts +2 -0
- package/dist/classes/svelte/image/index.js +4 -0
- package/dist/classes/svelte/image/mocks.d.ts +7 -0
- package/dist/classes/svelte/image/mocks.js +35 -0
- package/dist/classes/svelte/image/typedef.d.ts +16 -0
- package/dist/classes/svelte/image/typedef.js +8 -0
- package/dist/classes/svelte/index.d.ts +9 -0
- package/dist/classes/svelte/index.js +14 -0
- package/dist/classes/svelte/loading-state-machine/LoadingStateMachine.svelte.d.ts +12 -0
- package/dist/classes/svelte/loading-state-machine/LoadingStateMachine.svelte.js +109 -0
- package/dist/classes/svelte/loading-state-machine/constants.d.ts +12 -0
- package/dist/classes/svelte/loading-state-machine/constants.js +16 -0
- package/dist/classes/svelte/loading-state-machine/index.d.ts +2 -0
- package/dist/classes/svelte/loading-state-machine/index.js +3 -0
- package/dist/classes/svelte/network-loader/NetworkLoader.svelte.d.ts +91 -0
- package/dist/classes/svelte/network-loader/NetworkLoader.svelte.js +338 -0
- package/dist/classes/svelte/network-loader/constants.d.ts +2 -0
- package/dist/classes/svelte/network-loader/constants.js +3 -0
- package/dist/classes/svelte/network-loader/index.d.ts +2 -0
- package/dist/classes/svelte/network-loader/index.js +3 -0
- package/dist/classes/svelte/network-loader/mocks.d.ts +7 -0
- package/dist/classes/svelte/network-loader/mocks.js +30 -0
- package/dist/classes/svelte/network-loader/typedef.d.ts +7 -0
- package/dist/classes/svelte/network-loader/typedef.js +8 -0
- package/dist/components/area/HkArea.svelte +49 -0
- package/dist/components/area/HkArea.svelte.d.ts +26 -0
- package/dist/components/area/HkGridArea.svelte +77 -0
- package/dist/components/area/HkGridArea.svelte.d.ts +42 -0
- package/dist/components/area/index.d.ts +2 -0
- package/dist/components/area/index.js +2 -0
- package/dist/components/buttons/button/Button.svelte +82 -0
- package/dist/components/buttons/button/Button.svelte.d.ts +44 -0
- package/dist/components/buttons/button-icon-steeze/SteezeIconButton.svelte +30 -0
- package/dist/components/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts +16 -0
- package/dist/components/buttons/button-text/TextButton.svelte +21 -0
- package/dist/components/buttons/button-text/TextButton.svelte.d.ts +12 -0
- package/dist/components/buttons/index.d.ts +3 -0
- package/dist/components/buttons/index.js +3 -0
- package/dist/components/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte +146 -0
- package/dist/components/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte.d.ts +6 -0
- package/dist/components/debug/index.d.ts +1 -0
- package/dist/components/debug/index.js +1 -0
- package/dist/components/drag-drop/DragController.d.ts +20 -0
- package/dist/components/drag-drop/DragController.js +44 -0
- package/dist/components/drag-drop/DragDropContext.svelte +111 -0
- package/dist/components/drag-drop/DragDropContext.svelte.d.ts +18 -0
- package/dist/components/drag-drop/Draggable.svelte +519 -0
- package/dist/components/drag-drop/Draggable.svelte.d.ts +95 -0
- package/dist/components/drag-drop/DropZone.svelte +258 -0
- package/dist/components/drag-drop/DropZone.svelte.d.ts +96 -0
- package/dist/components/drag-drop/DropZoneArea.svelte +119 -0
- package/dist/components/drag-drop/DropZoneArea.svelte.d.ts +90 -0
- package/dist/components/drag-drop/DropZoneList.svelte +125 -0
- package/dist/components/drag-drop/DropZoneList.svelte.d.ts +92 -0
- package/dist/components/drag-drop/actions.d.ts +9 -0
- package/dist/components/drag-drop/actions.js +26 -0
- package/dist/components/drag-drop/drag-state.svelte.d.ts +97 -0
- package/dist/components/drag-drop/drag-state.svelte.js +322 -0
- package/dist/components/drag-drop/index.d.ts +6 -0
- package/dist/components/drag-drop/index.js +7 -0
- package/dist/components/drag-drop/util.d.ts +0 -0
- package/dist/components/drag-drop/util.js +85 -0
- package/dist/components/hkdev/blocks/TextBlock.svelte +47 -0
- package/dist/components/hkdev/blocks/TextBlock.svelte.d.ts +24 -0
- package/dist/components/hkdev/buttons/CheckButton.svelte +63 -0
- package/dist/components/hkdev/buttons/CheckButton.svelte.d.ts +34 -0
- package/dist/components/icons/HkIcon.svelte +86 -0
- package/dist/components/icons/HkIcon.svelte.d.ts +22 -0
- package/dist/components/icons/HkTabIcon.svelte +116 -0
- package/dist/components/icons/HkTabIcon.svelte.d.ts +40 -0
- package/dist/components/icons/SteezeIcon.svelte +97 -0
- package/dist/components/icons/SteezeIcon.svelte.d.ts +22 -0
- package/dist/components/icons/index.d.ts +4 -0
- package/dist/components/icons/index.js +6 -0
- package/dist/components/icons/typedef.d.ts +13 -0
- package/dist/components/icons/typedef.js +16 -0
- package/dist/components/index.d.ts +0 -0
- package/dist/components/index.js +2 -0
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/components/inputs/index.js +1 -0
- package/dist/components/inputs/text-input/TestTextInput.svelte__ +102 -0
- package/dist/components/inputs/text-input/TextInput.svelte +223 -0
- package/dist/components/inputs/text-input/TextInput.svelte.d.ts +56 -0
- package/dist/components/inputs/text-input/TextInput.svelte___ +83 -0
- package/dist/components/inputs/text-input/assets/IconInvalid.svelte +14 -0
- package/dist/components/inputs/text-input/assets/IconInvalid.svelte.d.ts +26 -0
- package/dist/components/inputs/text-input/assets/IconValid.svelte +12 -0
- package/dist/components/inputs/text-input/assets/IconValid.svelte.d.ts +26 -0
- package/dist/components/layout/grid-layers/GridLayers.svelte +63 -0
- package/dist/components/layout/grid-layers/GridLayers.svelte.d.ts +26 -0
- package/dist/components/layout/grid-layers/GridLayers.svelte__heightFrom__ +372 -0
- package/dist/components/layout/grid-layers/util.d.ts +19 -0
- package/dist/components/layout/grid-layers/util.js +74 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.js +1 -0
- package/dist/components/panels/index.d.ts +1 -0
- package/dist/components/panels/index.js +1 -0
- package/dist/components/panels/panel/Panel.svelte +43 -0
- package/dist/components/panels/panel/Panel.svelte.d.ts +24 -0
- package/dist/components/rows/index.d.ts +2 -0
- package/dist/components/rows/index.js +3 -0
- package/dist/components/rows/panel-grid-row/PanelGridRow.svelte +104 -0
- package/dist/components/rows/panel-grid-row/PanelGridRow.svelte.d.ts +26 -0
- package/dist/components/rows/panel-row-2/PanelRow2.svelte +40 -0
- package/dist/components/rows/panel-row-2/PanelRow2.svelte.d.ts +26 -0
- package/dist/components/tab-bar/HkTabBar.state.svelte.d.ts +54 -0
- package/dist/components/tab-bar/HkTabBar.state.svelte.js +149 -0
- package/dist/components/tab-bar/HkTabBar.svelte +74 -0
- package/dist/components/tab-bar/HkTabBar.svelte.d.ts +34 -0
- package/dist/components/tab-bar/HkTabBarSelector.state.svelte.d.ts +19 -0
- package/dist/components/tab-bar/HkTabBarSelector.state.svelte.js +93 -0
- package/dist/components/tab-bar/HkTabBarSelector.svelte +49 -0
- package/dist/components/tab-bar/HkTabBarSelector.svelte.d.ts +36 -0
- package/dist/components/tab-bar/index.d.ts +5 -0
- package/dist/components/tab-bar/index.js +17 -0
- package/dist/components/tab-bar/typedef.d.ts +8 -0
- package/dist/components/tab-bar/typedef.js +11 -0
- package/dist/config/imagetools-config.d.ts +26 -0
- package/dist/config/imagetools-config.js +189 -0
- package/dist/config/imagetools.d.ts +72 -0
- package/dist/constants/bases.d.ts +10 -0
- package/dist/constants/bases.js +13 -0
- package/dist/constants/errors/api.d.ts +10 -0
- package/dist/constants/errors/api.js +9 -0
- package/dist/constants/errors/generic.d.ts +20 -0
- package/dist/constants/errors/generic.js +20 -0
- package/dist/constants/errors/http.d.ts +16 -0
- package/dist/constants/errors/http.js +16 -0
- package/dist/constants/errors/index.d.ts +4 -0
- package/dist/constants/errors/index.js +4 -0
- package/dist/constants/errors/jwt.d.ts +8 -0
- package/dist/constants/errors/jwt.js +5 -0
- package/dist/constants/http/headers.d.ts +5 -0
- package/dist/constants/http/headers.js +6 -0
- package/dist/constants/http/index.d.ts +2 -0
- package/dist/constants/http/index.js +2 -0
- package/dist/constants/http/methods.d.ts +7 -0
- package/dist/constants/http/methods.js +14 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/mime/application.d.ts +3 -0
- package/dist/constants/mime/application.js +5 -0
- package/dist/constants/mime/audio.d.ts +10 -0
- package/dist/constants/mime/audio.js +13 -0
- package/dist/constants/mime/image.d.ts +3 -0
- package/dist/constants/mime/image.js +3 -0
- package/dist/constants/mime/index.d.ts +4 -0
- package/dist/constants/mime/index.js +4 -0
- package/dist/constants/mime/text.d.ts +2 -0
- package/dist/constants/mime/text.js +2 -0
- package/dist/constants/regexp/index.d.ts +3 -0
- package/dist/constants/regexp/index.js +31 -0
- package/dist/constants/regexp/inspiratie.js__ +95 -0
- package/dist/constants/regexp/text.d.ts +47 -0
- package/dist/constants/regexp/text.js +49 -0
- package/dist/constants/regexp/user.d.ts +6 -0
- package/dist/constants/regexp/user.js +33 -0
- package/dist/constants/regexp/web.d.ts +1 -0
- package/dist/constants/regexp/web.js +3 -0
- package/dist/constants/state-labels/drag-states.d.ts +5 -0
- package/dist/constants/state-labels/drag-states.js +6 -0
- package/dist/constants/state-labels/drop-states.d.ts +4 -0
- package/dist/constants/state-labels/drop-states.js +6 -0
- package/dist/constants/state-labels/input-states.d.ts +8 -0
- package/dist/constants/state-labels/input-states.js +11 -0
- package/dist/constants/state-labels/submit-states.d.ts +4 -0
- package/dist/constants/state-labels/submit-states.js +4 -0
- package/dist/constants/time.d.ts +18 -0
- package/dist/constants/time.js +28 -0
- package/dist/css/utilities.css +43 -0
- package/dist/design/design-config.d.ts +157 -0
- package/dist/design/design-config.js +73 -0
- package/dist/design/tailwind-theme-extend.d.ts +23 -0
- package/dist/design/tailwind-theme-extend.js +158 -0
- package/dist/features/button-group/ButtonGroup.svelte +82 -0
- package/dist/features/button-group/ButtonGroup.svelte.d.ts +34 -0
- package/dist/features/button-group/typedef.d.ts +7 -0
- package/dist/features/button-group/typedef.js +10 -0
- package/dist/features/compare-left-right/CompareLeftRight.svelte +179 -0
- package/dist/features/compare-left-right/CompareLeftRight.svelte.d.ts +18 -0
- package/dist/features/compare-left-right/index.d.ts +1 -0
- package/dist/features/compare-left-right/index.js +1 -0
- package/dist/features/game-box/GameBox.svelte +577 -0
- package/dist/features/game-box/GameBox.svelte.d.ts +140 -0
- package/dist/features/game-box/gamebox.util.d.ts +32 -0
- package/dist/features/game-box/gamebox.util.js +83 -0
- package/dist/features/hk-app-layout/HkAppLayout.state.svelte.d.ts +6 -0
- package/dist/features/hk-app-layout/HkAppLayout.state.svelte.js +25 -0
- package/dist/features/hk-app-layout/HkAppLayout.svelte +251 -0
- package/dist/features/hk-app-layout/HkAppLayout.svelte.d.ts +19 -0
- package/dist/features/image-box/ImageBox.svelte +210 -0
- package/dist/features/image-box/ImageBox.svelte.d.ts +38 -0
- package/dist/features/image-box/index.d.ts +4 -0
- package/dist/features/image-box/index.js +5 -0
- package/dist/features/image-box/typedef.d.ts +4 -0
- package/dist/features/image-box/typedef.js +32 -0
- package/dist/features/index.d.ts +11 -0
- package/dist/features/index.js +23 -0
- package/dist/features/presenter/ImageSlide.svelte +64 -0
- package/dist/features/presenter/ImageSlide.svelte.d.ts +36 -0
- package/dist/features/presenter/Presenter.state.svelte.d.ts +74 -0
- package/dist/features/presenter/Presenter.state.svelte.js +638 -0
- package/dist/features/presenter/Presenter.svelte +142 -0
- package/dist/features/presenter/Presenter.svelte.d.ts +18 -0
- package/dist/features/presenter/constants.d.ts +5 -0
- package/dist/features/presenter/constants.js +7 -0
- package/dist/features/presenter/index.d.ts +6 -0
- package/dist/features/presenter/index.js +10 -0
- package/dist/features/presenter/typedef.d.ts +92 -0
- package/dist/features/presenter/typedef.js +106 -0
- package/dist/features/presenter/util.d.ts +63 -0
- package/dist/features/presenter/util.js +210 -0
- package/dist/features/virtual-viewport/VirtualViewport.svelte +196 -0
- package/dist/features/virtual-viewport/VirtualViewport.svelte.d.ts +42 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/logging/adapters/console.d.ts +48 -0
- package/dist/logging/adapters/console.js +114 -0
- package/dist/logging/adapters/pino.d.ts +25 -0
- package/dist/logging/adapters/pino.js +60 -0
- package/dist/logging/constants.d.ts +1 -0
- package/dist/logging/constants.js +1 -0
- package/dist/logging/factories/client.d.ts +10 -0
- package/dist/logging/factories/client.js +21 -0
- package/dist/logging/factories/server.d.ts +10 -0
- package/dist/logging/factories/server.js +22 -0
- package/dist/logging/factories/universal.d.ts +9 -0
- package/dist/logging/factories/universal.js +23 -0
- package/dist/logging/index.d.ts +5 -0
- package/dist/logging/index.js +8 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/validate-url.d.ts +30 -0
- package/dist/schemas/validate-url.js +180 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/server/logger.d.ts +25 -0
- package/dist/server/logger.js +94 -0
- package/dist/states/index.d.ts +1 -0
- package/dist/states/index.js +1 -0
- package/dist/states/navigation.svelte.d.ts +23 -0
- package/dist/states/navigation.svelte.js +55 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.js +1 -0
- package/dist/stores/theme.d.ts +28 -0
- package/dist/stores/theme.js +80 -0
- package/dist/themes/hkdev/components/blocks/text-block.css +34 -0
- package/dist/themes/hkdev/components/boxes/game-box.css +11 -0
- package/dist/themes/hkdev/components/buttons/button-icon-steeze.css +22 -0
- package/dist/themes/hkdev/components/buttons/button-text.css +32 -0
- package/dist/themes/hkdev/components/buttons/button.css +146 -0
- package/dist/themes/hkdev/components/buttons/skip-button.css +5 -0
- package/dist/themes/hkdev/components/drag-drop/draggable.css +73 -0
- package/dist/themes/hkdev/components/drag-drop/drop-zone.css +58 -0
- package/dist/themes/hkdev/components/icons/icon-steeze.css +16 -0
- package/dist/themes/hkdev/components/inputs/text-input.css +102 -0
- package/dist/themes/hkdev/components/panels/panel.css +25 -0
- package/dist/themes/hkdev/components/rows/panel-grid-row.css +4 -0
- package/dist/themes/hkdev/components/rows/panel-row-2.css +5 -0
- package/dist/themes/hkdev/components.css +29 -0
- package/dist/themes/hkdev/debug.css +2 -0
- package/dist/themes/hkdev/global/layout.css +32 -0
- package/dist/themes/hkdev/global/on-colors.css +32 -0
- package/dist/themes/hkdev/globals.css +4 -0
- package/dist/themes/hkdev/responsive.css +12 -0
- package/dist/themes/hkdev/theme-ext.d.ts +4 -0
- package/dist/themes/hkdev/theme-ext.js +12 -0
- package/dist/themes/hkdev/theme.css +219 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +1 -0
- package/dist/typedef/context.d.ts +3 -0
- package/dist/typedef/context.js +6 -0
- package/dist/typedef/drag.d.ts +29 -0
- package/dist/typedef/drag.js +25 -0
- package/dist/typedef/drop.d.ts +15 -0
- package/dist/typedef/drop.js +12 -0
- package/dist/typedef/image.d.ts +12 -0
- package/dist/typedef/image.js +38 -0
- package/dist/typedef/index.d.ts +4 -0
- package/dist/typedef/index.js +4 -0
- package/dist/util/array/index.d.ts +183 -0
- package/dist/util/array/index.js +436 -0
- package/dist/util/bases/base58.d.ts +58 -0
- package/dist/util/bases/base58.js +262 -0
- package/dist/util/bases/index.d.ts +1 -0
- package/dist/util/bases/index.js +1 -0
- package/dist/util/compare/index.d.ts +68 -0
- package/dist/util/compare/index.js +247 -0
- package/dist/util/css/css-vars.d.ts +24 -0
- package/dist/util/css/css-vars.js +83 -0
- package/dist/util/css/index.d.ts +1 -0
- package/dist/util/css/index.js +1 -0
- package/dist/util/design-system/components/states.d.ts +15 -0
- package/dist/util/design-system/components/states.js +22 -0
- package/dist/util/design-system/css/clamp.d.ts +17 -0
- package/dist/util/design-system/css/clamp.js +66 -0
- package/dist/util/design-system/css/root-design-vars.d.ts +77 -0
- package/dist/util/design-system/css/root-design-vars.js +102 -0
- package/dist/util/design-system/index.d.ts +5 -0
- package/dist/util/design-system/index.js +5 -0
- package/dist/util/design-system/layout/scaling.d.ts +98 -0
- package/dist/util/design-system/layout/scaling.js +228 -0
- package/dist/util/design-system/skeleton.d.ts +41 -0
- package/dist/util/design-system/skeleton.js +208 -0
- package/dist/util/design-system/tailwind.d.ts +183 -0
- package/dist/util/design-system/tailwind.js +288 -0
- package/dist/util/env/index.d.ts +1 -0
- package/dist/util/env/index.js +9 -0
- package/dist/util/exceptions/index.d.ts +15 -0
- package/dist/util/exceptions/index.js +23 -0
- package/dist/util/expect/arrays.d.ts +30 -0
- package/dist/util/expect/arrays.js +47 -0
- package/dist/util/expect/index.d.ts +103 -0
- package/dist/util/expect/index.js +259 -0
- package/dist/util/expect/primitives.d.ts +30 -0
- package/dist/util/expect/primitives.js +55 -0
- package/dist/util/expect/url.d.ts +32 -0
- package/dist/util/expect/url.js +60 -0
- package/dist/util/function/index.d.ts +34 -0
- package/dist/util/function/index.js +218 -0
- package/dist/util/geo/index.d.ts +10 -0
- package/dist/util/geo/index.js +26 -0
- package/dist/util/http/caching.d.ts +28 -0
- package/dist/util/http/caching.js +263 -0
- package/dist/util/http/errors.d.ts +18 -0
- package/dist/util/http/errors.js +97 -0
- package/dist/util/http/headers.d.ts +40 -0
- package/dist/util/http/headers.js +75 -0
- package/dist/util/http/http-request.d.ts +267 -0
- package/dist/util/http/http-request.js +578 -0
- package/dist/util/http/index.d.ts +6 -0
- package/dist/util/http/index.js +22 -0
- package/dist/util/http/json-request.d.ts +84 -0
- package/dist/util/http/json-request.js +224 -0
- package/dist/util/http/mocks.d.ts +20 -0
- package/dist/util/http/mocks.js +65 -0
- package/dist/util/http/response.d.ts +125 -0
- package/dist/util/http/response.js +294 -0
- package/dist/util/http/test-data__/content-length-test-hkdigital-small.V4HfZyBQ.avif +0 -0
- package/dist/util/http/typedef.d.ts +184 -0
- package/dist/util/http/typedef.js +93 -0
- package/dist/util/http/url.d.ts +25 -0
- package/dist/util/http/url.js +52 -0
- package/dist/util/image/index.d.ts +25 -0
- package/dist/util/image/index.js +86 -0
- package/dist/util/index.d.ts +3 -0
- package/dist/util/index.js +3 -0
- package/dist/util/is/index.d.ts +68 -0
- package/dist/util/is/index.js +140 -0
- package/dist/util/iterate/index.d.ts +131 -0
- package/dist/util/iterate/index.js +234 -0
- package/dist/util/object/index.d.ts +326 -0
- package/dist/util/object/index.js +1361 -0
- package/dist/util/singleton/index.d.ts +34 -0
- package/dist/util/singleton/index.js +97 -0
- package/dist/util/string/array-path.d.ts +15 -0
- package/dist/util/string/array-path.js +75 -0
- package/dist/util/string/convert.d.ts +22 -0
- package/dist/util/string/convert.js +54 -0
- package/dist/util/string/fs.d.ts +55 -0
- package/dist/util/string/fs.js +226 -0
- package/dist/util/string/index.d.ts +5 -0
- package/dist/util/string/index.js +5 -0
- package/dist/util/string/interpolate.d.ts +22 -0
- package/dist/util/string/interpolate.js +61 -0
- package/dist/util/string/pad.d.ts +8 -0
- package/dist/util/string/pad.js +10 -0
- package/dist/util/svelte/index.d.ts +3 -0
- package/dist/util/svelte/index.js +4 -0
- package/dist/util/svelte/loading/loading-tracker.svelte.d.ts +31 -0
- package/dist/util/svelte/loading/loading-tracker.svelte.js +108 -0
- package/dist/util/svelte/observe/index.d.ts +10 -0
- package/dist/util/svelte/observe/index.js +49 -0
- package/dist/util/svelte/state-context/index.d.ts +18 -0
- package/dist/util/svelte/state-context/index.js +117 -0
- package/dist/util/svelte/wait/index.d.ts +15 -0
- package/dist/util/svelte/wait/index.js +38 -0
- package/dist/util/sveltekit/index.d.ts +1 -0
- package/dist/util/sveltekit/index.js +1 -0
- package/dist/util/sveltekit/route-folders/index.d.ts +28 -0
- package/dist/util/sveltekit/route-folders/index.js +101 -0
- package/dist/util/time/index.d.ts +108 -0
- package/dist/util/time/index.js +323 -0
- package/dist/util/unique/index.d.ts +81 -0
- package/dist/util/unique/index.js +249 -0
- package/dist/valibot/date.js__ +10 -0
- package/dist/valibot/index.d.ts +4 -0
- package/dist/valibot/index.js +9 -0
- package/dist/valibot/url.d.ts +26 -0
- package/dist/valibot/url.js +95 -0
- package/dist/valibot/user.d.ts +6 -0
- package/dist/valibot/user.js +23 -0
- package/dist/zod/all.d.ts +6 -0
- package/dist/zod/all.js +33 -0
- package/dist/zod/generic.d.ts +6 -0
- package/dist/zod/generic.js +11 -0
- package/dist/zod/javascript.d.ts +8 -0
- package/dist/zod/javascript.js +32 -0
- package/dist/zod/user.d.ts +9 -0
- package/dist/zod/user.js +16 -0
- package/dist/zod/web.d.ts +21 -0
- package/dist/zod/web.js +52 -0
- package/package.json +133 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TextInput } from './text-input/TextInput.svelte';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* @type {{
|
|
4
|
+
* base?: string,
|
|
5
|
+
* error?: string,
|
|
6
|
+
* classes?: string,
|
|
7
|
+
* fieldClasses?: string,
|
|
8
|
+
* fieldError?: string,
|
|
9
|
+
* legendBase?: string,
|
|
10
|
+
* legendClasses?: string,
|
|
11
|
+
* legendError?: string,
|
|
12
|
+
* value?: string,
|
|
13
|
+
* type?: 'text' | 'url' | 'email' | 'number',
|
|
14
|
+
* pattern?: string,
|
|
15
|
+
* required?: boolean,
|
|
16
|
+
* title?: string,
|
|
17
|
+
* valid?: boolean,
|
|
18
|
+
* pristine?: boolean,
|
|
19
|
+
* validate?: (value: string) => string | undefined,
|
|
20
|
+
* } & { [attr: string]: any }}
|
|
21
|
+
*/
|
|
22
|
+
let {
|
|
23
|
+
base = '',
|
|
24
|
+
error = '',
|
|
25
|
+
classes = '',
|
|
26
|
+
|
|
27
|
+
fieldClasses,
|
|
28
|
+
fieldError,
|
|
29
|
+
|
|
30
|
+
legendBase = 'ml-16tp px-8tp',
|
|
31
|
+
legendClasses,
|
|
32
|
+
legendError,
|
|
33
|
+
|
|
34
|
+
value = $bindable(''),
|
|
35
|
+
type = 'text',
|
|
36
|
+
pattern,
|
|
37
|
+
required = false,
|
|
38
|
+
|
|
39
|
+
title = '',
|
|
40
|
+
|
|
41
|
+
valid = $bindable(true),
|
|
42
|
+
pristine = $bindable(true),
|
|
43
|
+
|
|
44
|
+
validate,
|
|
45
|
+
|
|
46
|
+
...attrs
|
|
47
|
+
} = $props();
|
|
48
|
+
|
|
49
|
+
let inputRef = $state();
|
|
50
|
+
let validationMessage = $state('');
|
|
51
|
+
let initialValue = $state('');
|
|
52
|
+
|
|
53
|
+
$effect(() => {
|
|
54
|
+
if (!inputRef) return;
|
|
55
|
+
initialValue = value;
|
|
56
|
+
validateInput(inputRef, value);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
function validateInput(input, currentValue) {
|
|
60
|
+
input.setCustomValidity('');
|
|
61
|
+
const isBuiltInValid = input.checkValidity();
|
|
62
|
+
|
|
63
|
+
if (isBuiltInValid && validate) {
|
|
64
|
+
const customError = validate(currentValue);
|
|
65
|
+
input.setCustomValidity(customError || '');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
pristine = currentValue === initialValue;
|
|
69
|
+
valid = input.validity.valid;
|
|
70
|
+
validationMessage = input.validationMessage;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function handleInput(event) {
|
|
74
|
+
validateInput(event.target, event.target.value);
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<fieldset
|
|
79
|
+
data-inputs="text-input"
|
|
80
|
+
class="flex w-full items-center rounded {fieldClasses}"
|
|
81
|
+
>
|
|
82
|
+
<legend class="{legendBase} {legendClasses}">{title}</legend>
|
|
83
|
+
|
|
84
|
+
<input
|
|
85
|
+
bind:this={inputRef}
|
|
86
|
+
{type}
|
|
87
|
+
{pattern}
|
|
88
|
+
{required}
|
|
89
|
+
{value}
|
|
90
|
+
class="w-full border-none bg-transparent {base} {classes}"
|
|
91
|
+
aria-invalid={!valid}
|
|
92
|
+
aria-errormessage={!valid ? 'validation-message' : undefined}
|
|
93
|
+
oninput={handleInput}
|
|
94
|
+
{...attrs}
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
{#if !valid}
|
|
98
|
+
<small id="validation-message" class="text-error" role="alert">
|
|
99
|
+
{validationMessage}
|
|
100
|
+
</small>
|
|
101
|
+
{/if}
|
|
102
|
+
</fieldset>
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import IconValid from './assets/IconValid.svelte';
|
|
3
|
+
import IconInvalid from './assets/IconInvalid.svelte';
|
|
4
|
+
|
|
5
|
+
import { Star, ExclamationTriangle, CheckCircle } from '@steeze-ui/heroicons';
|
|
6
|
+
|
|
7
|
+
import { HkIcon } from '../../icons/index.js';
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
PRISTINE,
|
|
11
|
+
DIRTY,
|
|
12
|
+
FOCUSED,
|
|
13
|
+
UNFOCUSED,
|
|
14
|
+
VALID,
|
|
15
|
+
INVALID,
|
|
16
|
+
REQUIRED,
|
|
17
|
+
DISABLED
|
|
18
|
+
} from '../../../constants/state-labels/input-states.js';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @type {{
|
|
22
|
+
* base?: string,
|
|
23
|
+
* borderShape?: string,
|
|
24
|
+
* classes?: string,
|
|
25
|
+
* inputBase?: string,
|
|
26
|
+
* inputClasses?: string,
|
|
27
|
+
* legendBase?: string,
|
|
28
|
+
* legendClasses?: string,
|
|
29
|
+
* iconClasses?: string,
|
|
30
|
+
* initialValue?: string,
|
|
31
|
+
* value?: string,
|
|
32
|
+
* type?: 'text' | 'url' | 'email' | 'number',
|
|
33
|
+
* pattern?: string,
|
|
34
|
+
* required?: boolean,
|
|
35
|
+
* title?: string,
|
|
36
|
+
* placeholder?: string,
|
|
37
|
+
* isValid?: boolean,
|
|
38
|
+
* isPristine?: boolean,
|
|
39
|
+
* hasFocus?: boolean,
|
|
40
|
+
* validate?: (value: string) => string | undefined,
|
|
41
|
+
* iconRequired?: import('svelte').Snippet,
|
|
42
|
+
* iconValid?: import('svelte').Snippet,
|
|
43
|
+
* iconInvalid?: import('svelte').Snippet
|
|
44
|
+
* } & { [attr: string]: any }}
|
|
45
|
+
*/
|
|
46
|
+
let {
|
|
47
|
+
initialValue = '',
|
|
48
|
+
value = $bindable(''),
|
|
49
|
+
|
|
50
|
+
isValid = $bindable(true),
|
|
51
|
+
isPristine = $bindable(true),
|
|
52
|
+
hasFocus = $bindable(false),
|
|
53
|
+
|
|
54
|
+
// Fieldset
|
|
55
|
+
base = 'px-10p pb-10p',
|
|
56
|
+
borderShape = 'border-1p rounded-xs',
|
|
57
|
+
|
|
58
|
+
classes = '',
|
|
59
|
+
|
|
60
|
+
// Input
|
|
61
|
+
inputBase = 'w-full outline-none border-none bg-transparent',
|
|
62
|
+
inputClasses,
|
|
63
|
+
|
|
64
|
+
// Legend
|
|
65
|
+
legendBase,
|
|
66
|
+
legendClasses,
|
|
67
|
+
|
|
68
|
+
// Icon
|
|
69
|
+
iconBase = 'w-[24px] h-[24px]',
|
|
70
|
+
iconClasses = '',
|
|
71
|
+
|
|
72
|
+
// Input type and built-in validation
|
|
73
|
+
|
|
74
|
+
type = 'text',
|
|
75
|
+
required = false,
|
|
76
|
+
disabled = false,
|
|
77
|
+
|
|
78
|
+
title = '',
|
|
79
|
+
placeholder = '',
|
|
80
|
+
|
|
81
|
+
// legend = 'Invalid',
|
|
82
|
+
// legendInvalid?
|
|
83
|
+
|
|
84
|
+
iconRequired,
|
|
85
|
+
iconValid,
|
|
86
|
+
iconInvalid,
|
|
87
|
+
|
|
88
|
+
validate,
|
|
89
|
+
|
|
90
|
+
...attrs
|
|
91
|
+
} = $props();
|
|
92
|
+
|
|
93
|
+
let inputRef = $state();
|
|
94
|
+
let validationMessage = $state('');
|
|
95
|
+
|
|
96
|
+
$effect(() => {
|
|
97
|
+
if (!inputRef) return;
|
|
98
|
+
validateInput(inputRef, initialValue);
|
|
99
|
+
value = initialValue;
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
function validateInput(input, currentValue) {
|
|
103
|
+
input.setCustomValidity('');
|
|
104
|
+
const isBuiltInValid = input.checkValidity();
|
|
105
|
+
|
|
106
|
+
if (isBuiltInValid && validate) {
|
|
107
|
+
const customError = validate(currentValue);
|
|
108
|
+
input.setCustomValidity(customError || '');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
isPristine = currentValue === initialValue;
|
|
112
|
+
isValid = input.validity.valid;
|
|
113
|
+
validationMessage = input.validationMessage;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function handleInput(event) {
|
|
117
|
+
validateInput(event.target, event.target.value);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// let legendHeight = $state(0);
|
|
121
|
+
|
|
122
|
+
// let paddingBottomStyle = $derived.by(() => {
|
|
123
|
+
// return `padding-bottom: ${legendHeight / 2}px;`;
|
|
124
|
+
// });
|
|
125
|
+
|
|
126
|
+
let hideLegendStyle = $derived.by(() => {
|
|
127
|
+
if (isValid && !title) {
|
|
128
|
+
return 'width: 0;';
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
let stateClasses = $derived.by(() => {
|
|
133
|
+
//
|
|
134
|
+
// Return CSS classes that indicate the component's state
|
|
135
|
+
//
|
|
136
|
+
// @see $lib/constants/state-labels
|
|
137
|
+
//
|
|
138
|
+
const outArr = [];
|
|
139
|
+
|
|
140
|
+
outArr.push(isPristine ? PRISTINE : DIRTY);
|
|
141
|
+
outArr.push(hasFocus ? FOCUSED : UNFOCUSED);
|
|
142
|
+
outArr.push(isValid ? VALID : INVALID);
|
|
143
|
+
|
|
144
|
+
if (required) {
|
|
145
|
+
outArr.push(REQUIRED);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (disabled) {
|
|
149
|
+
outArr.push(DISABLED);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return outArr.join(' ');
|
|
153
|
+
});
|
|
154
|
+
</script>
|
|
155
|
+
|
|
156
|
+
<!-- {#snippet defaultWarning()}
|
|
157
|
+
<WarningIcon />
|
|
158
|
+
{/snippet} -->
|
|
159
|
+
|
|
160
|
+
<fieldset
|
|
161
|
+
data-input="text-input"
|
|
162
|
+
class="{base} {borderShape} {classes} {stateClasses}"
|
|
163
|
+
>
|
|
164
|
+
<legend
|
|
165
|
+
data-child="legend"
|
|
166
|
+
class="{legendBase} {legendClasses}"
|
|
167
|
+
style={hideLegendStyle}
|
|
168
|
+
>
|
|
169
|
+
{#if title}
|
|
170
|
+
{title}
|
|
171
|
+
<!-- {:else if !isValid}
|
|
172
|
+
{invalidTitle} -->
|
|
173
|
+
{:else}
|
|
174
|
+
|
|
175
|
+
{/if}
|
|
176
|
+
</legend>
|
|
177
|
+
|
|
178
|
+
<div class="grid grid-cols-[1fr_auto] items-center">
|
|
179
|
+
<input
|
|
180
|
+
data-child="input"
|
|
181
|
+
bind:this={inputRef}
|
|
182
|
+
{type}
|
|
183
|
+
{required}
|
|
184
|
+
{disabled}
|
|
185
|
+
bind:value
|
|
186
|
+
{placeholder}
|
|
187
|
+
class="{inputBase} {inputClasses}"
|
|
188
|
+
aria-invalid={!isValid}
|
|
189
|
+
aria-errormessage={!isValid ? 'validation-message' : undefined}
|
|
190
|
+
oninput={handleInput}
|
|
191
|
+
onfocus={() => {
|
|
192
|
+
hasFocus = true;
|
|
193
|
+
}}
|
|
194
|
+
onblur={() => {
|
|
195
|
+
hasFocus = false;
|
|
196
|
+
}}
|
|
197
|
+
{...attrs}
|
|
198
|
+
/>
|
|
199
|
+
|
|
200
|
+
<div data-child="icon-box" class="{iconBase} {iconClasses}">
|
|
201
|
+
{#if isPristine && required}
|
|
202
|
+
{#if iconRequired}
|
|
203
|
+
{@render iconRequired()}
|
|
204
|
+
{:else}
|
|
205
|
+
<HkIcon src={Star} theme="solid" />
|
|
206
|
+
{/if}
|
|
207
|
+
{:else if isValid}
|
|
208
|
+
{#if iconValid}
|
|
209
|
+
{@render iconValid()}
|
|
210
|
+
{:else}
|
|
211
|
+
<HkIcon src={CheckCircle} theme="solid" />
|
|
212
|
+
{/if}
|
|
213
|
+
{:else if iconInvalid}
|
|
214
|
+
{@render iconInvalid()}
|
|
215
|
+
{:else}
|
|
216
|
+
<HkIcon src={ExclamationTriangle} theme="solid" />
|
|
217
|
+
{/if}
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</fieldset>
|
|
221
|
+
|
|
222
|
+
<style>
|
|
223
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default TextInput;
|
|
2
|
+
type TextInput = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<{
|
|
5
|
+
base?: string;
|
|
6
|
+
borderShape?: string;
|
|
7
|
+
classes?: string;
|
|
8
|
+
inputBase?: string;
|
|
9
|
+
inputClasses?: string;
|
|
10
|
+
legendBase?: string;
|
|
11
|
+
legendClasses?: string;
|
|
12
|
+
iconClasses?: string;
|
|
13
|
+
initialValue?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
type?: "number" | "url" | "text" | "email";
|
|
16
|
+
pattern?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
title?: string;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
isValid?: boolean;
|
|
21
|
+
isPristine?: boolean;
|
|
22
|
+
hasFocus?: boolean;
|
|
23
|
+
validate?: (value: string) => string;
|
|
24
|
+
iconRequired?: Snippet<[]>;
|
|
25
|
+
iconValid?: Snippet<[]>;
|
|
26
|
+
iconInvalid?: Snippet<[]>;
|
|
27
|
+
} & {
|
|
28
|
+
[attr: string]: any;
|
|
29
|
+
}>): void;
|
|
30
|
+
};
|
|
31
|
+
declare const TextInput: import("svelte").Component<{
|
|
32
|
+
base?: string;
|
|
33
|
+
borderShape?: string;
|
|
34
|
+
classes?: string;
|
|
35
|
+
inputBase?: string;
|
|
36
|
+
inputClasses?: string;
|
|
37
|
+
legendBase?: string;
|
|
38
|
+
legendClasses?: string;
|
|
39
|
+
iconClasses?: string;
|
|
40
|
+
initialValue?: string;
|
|
41
|
+
value?: string;
|
|
42
|
+
type?: "text" | "url" | "email" | "number";
|
|
43
|
+
pattern?: string;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
title?: string;
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
isValid?: boolean;
|
|
48
|
+
isPristine?: boolean;
|
|
49
|
+
hasFocus?: boolean;
|
|
50
|
+
validate?: (value: string) => string | undefined;
|
|
51
|
+
iconRequired?: import("svelte").Snippet;
|
|
52
|
+
iconValid?: import("svelte").Snippet;
|
|
53
|
+
iconInvalid?: import("svelte").Snippet;
|
|
54
|
+
} & {
|
|
55
|
+
[attr: string]: any;
|
|
56
|
+
}, {}, "value" | "isValid" | "isPristine" | "hasFocus">;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* @type {{
|
|
4
|
+
* classes?: string,
|
|
5
|
+
* fieldClasses?: string,
|
|
6
|
+
* legendClasses?: string,
|
|
7
|
+
* legendTitle?: string,
|
|
8
|
+
* error?: boolean,
|
|
9
|
+
* type?: string,
|
|
10
|
+
* placeholder: string,
|
|
11
|
+
* required: boolean,
|
|
12
|
+
* snippetWarning?: import('svelte').Snippet,
|
|
13
|
+
* } & { [attr: string]: any }}
|
|
14
|
+
*/
|
|
15
|
+
let {
|
|
16
|
+
// Style
|
|
17
|
+
classes,
|
|
18
|
+
fieldClasses,
|
|
19
|
+
legendClasses,
|
|
20
|
+
|
|
21
|
+
// Functionality
|
|
22
|
+
name,
|
|
23
|
+
disabled,
|
|
24
|
+
required,
|
|
25
|
+
|
|
26
|
+
// initialValue
|
|
27
|
+
// value
|
|
28
|
+
// readonly
|
|
29
|
+
// pattern
|
|
30
|
+
// minlength
|
|
31
|
+
// maxlength
|
|
32
|
+
|
|
33
|
+
// Text placeholders
|
|
34
|
+
legendTitle,
|
|
35
|
+
placeholder,
|
|
36
|
+
|
|
37
|
+
type,
|
|
38
|
+
snippetWarning,
|
|
39
|
+
|
|
40
|
+
// Attributes
|
|
41
|
+
...attrs
|
|
42
|
+
} = $props();
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
{#snippet defaultWarning()}
|
|
46
|
+
<svg
|
|
47
|
+
width="17"
|
|
48
|
+
height="16"
|
|
49
|
+
viewBox="0 0 17 16"
|
|
50
|
+
fill="none"
|
|
51
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
+
>
|
|
53
|
+
<path
|
|
54
|
+
fill-rule="evenodd"
|
|
55
|
+
clip-rule="evenodd"
|
|
56
|
+
d="M6.36747 1.28014C7.3152 -0.426712 9.68492 -0.426712 10.6318 1.28014L16.6669 12.1596C17.6138 13.8664 16.429 16 14.5343 16H2.46497C0.570331 16 -0.613713 13.8664 0.333194 12.1596L6.36665 1.28014H6.36747ZM8.50006 5.75805C8.66328 5.75805 8.81981 5.82549 8.93522 5.94553C9.05063 6.06556 9.11547 6.22837 9.11547 6.39812V9.59846C9.11547 9.76822 9.05063 9.93102 8.93522 10.0511C8.81981 10.1711 8.66328 10.2385 8.50006 10.2385C8.33684 10.2385 8.18031 10.1711 8.0649 10.0511C7.94949 9.93102 7.88465 9.76822 7.88465 9.59846V6.39812C7.88465 6.22837 7.94949 6.06556 8.0649 5.94553C8.18031 5.82549 8.33684 5.75805 8.50006 5.75805ZM8.50006 12.7988C8.66328 12.7988 8.81981 12.7314 8.93522 12.6113C9.05063 12.4913 9.11547 12.3285 9.11547 12.1587C9.11547 11.989 9.05063 11.8262 8.93522 11.7061C8.81981 11.5861 8.66328 11.5187 8.50006 11.5187C8.33684 11.5187 8.18031 11.5861 8.0649 11.7061C7.94949 11.8262 7.88465 11.989 7.88465 12.1587C7.88465 12.3285 7.94949 12.4913 8.0649 12.6113C8.18031 12.7314 8.33684 12.7988 8.50006 12.7988Z"
|
|
57
|
+
fill="#F8705E"
|
|
58
|
+
/>
|
|
59
|
+
</svg>
|
|
60
|
+
{/snippet}
|
|
61
|
+
|
|
62
|
+
<fieldset
|
|
63
|
+
data-input="text-input"
|
|
64
|
+
class="flex w-full items-center rounded {fieldClasses}"
|
|
65
|
+
>
|
|
66
|
+
<legend class="px-2 {legendClasses}" class:error>{legendTitle}</legend>
|
|
67
|
+
<input
|
|
68
|
+
class="w-full border-none bg-transparent {classes}"
|
|
69
|
+
{type}
|
|
70
|
+
{placeholder}
|
|
71
|
+
{name}
|
|
72
|
+
{required}
|
|
73
|
+
{...attrs}
|
|
74
|
+
/>
|
|
75
|
+
{#if error}
|
|
76
|
+
{#if snippetWarning}
|
|
77
|
+
{@render snippetWarning()}
|
|
78
|
+
{:else}
|
|
79
|
+
{@render defaultWarning()}
|
|
80
|
+
{/if}
|
|
81
|
+
<!-- <img src={warningSymbol} class="mb-2 mr-8" alt="Warning" /> -->
|
|
82
|
+
{/if}
|
|
83
|
+
</fieldset>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
width="17"
|
|
3
|
+
height="16"
|
|
4
|
+
viewBox="0 0 17 16"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<path
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
clip-rule="evenodd"
|
|
11
|
+
d="M6.36747 1.28014C7.3152 -0.426712 9.68492 -0.426712 10.6318 1.28014L16.6669 12.1596C17.6138 13.8664 16.429 16 14.5343 16H2.46497C0.570331 16 -0.613713 13.8664 0.333194 12.1596L6.36665 1.28014H6.36747ZM8.50006 5.75805C8.66328 5.75805 8.81981 5.82549 8.93522 5.94553C9.05063 6.06556 9.11547 6.22837 9.11547 6.39812V9.59846C9.11547 9.76822 9.05063 9.93102 8.93522 10.0511C8.81981 10.1711 8.66328 10.2385 8.50006 10.2385C8.33684 10.2385 8.18031 10.1711 8.0649 10.0511C7.94949 9.93102 7.88465 9.76822 7.88465 9.59846V6.39812C7.88465 6.22837 7.94949 6.06556 8.0649 5.94553C8.18031 5.82549 8.33684 5.75805 8.50006 5.75805ZM8.50006 12.7988C8.66328 12.7988 8.81981 12.7314 8.93522 12.6113C9.05063 12.4913 9.11547 12.3285 9.11547 12.1587C9.11547 11.989 9.05063 11.8262 8.93522 11.7061C8.81981 11.5861 8.66328 11.5187 8.50006 11.5187C8.33684 11.5187 8.18031 11.5861 8.0649 11.7061C7.94949 11.8262 7.88465 11.989 7.88465 12.1587C7.88465 12.3285 7.94949 12.4913 8.0649 12.6113C8.18031 12.7314 8.33684 12.7988 8.50006 12.7988Z"
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default IconInvalid;
|
|
2
|
+
type IconInvalid = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const IconInvalid: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
viewBox="0 0 24 24"
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
class="size-6"
|
|
6
|
+
>
|
|
7
|
+
<path
|
|
8
|
+
fill-rule="evenodd"
|
|
9
|
+
d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z"
|
|
10
|
+
clip-rule="evenodd"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default IconValid;
|
|
2
|
+
type IconValid = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const IconValid: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
+
$$bindings?: Bindings;
|
|
17
|
+
} & Exports;
|
|
18
|
+
(internal: unknown, props: {
|
|
19
|
+
$$events?: Events;
|
|
20
|
+
$$slots?: Slots;
|
|
21
|
+
}): Exports & {
|
|
22
|
+
$set?: any;
|
|
23
|
+
$on?: any;
|
|
24
|
+
};
|
|
25
|
+
z_$$bindings?: Bindings;
|
|
26
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/**
|
|
3
|
+
* GridLayers Component
|
|
4
|
+
*
|
|
5
|
+
* Creates a single-cell grid where all children occupy the same space,
|
|
6
|
+
* enabling layered layouts with natural height behavior.
|
|
7
|
+
*
|
|
8
|
+
* @type {{
|
|
9
|
+
* base?: string,
|
|
10
|
+
* bg?: string,
|
|
11
|
+
* padding?: string,
|
|
12
|
+
* margin?: string,
|
|
13
|
+
* classes?: string,
|
|
14
|
+
* style?: string,
|
|
15
|
+
* overflow?: string,
|
|
16
|
+
* children: import('svelte').Snippet,
|
|
17
|
+
* [attr: string]: any
|
|
18
|
+
* }}
|
|
19
|
+
*/
|
|
20
|
+
const {
|
|
21
|
+
// Container styles
|
|
22
|
+
base = '',
|
|
23
|
+
bg = '',
|
|
24
|
+
padding = '',
|
|
25
|
+
margin = '',
|
|
26
|
+
classes = '',
|
|
27
|
+
style = '',
|
|
28
|
+
overflow = '',
|
|
29
|
+
|
|
30
|
+
// Content
|
|
31
|
+
children,
|
|
32
|
+
|
|
33
|
+
// Attributes
|
|
34
|
+
...attrs
|
|
35
|
+
} = $props();
|
|
36
|
+
|
|
37
|
+
// Build the inline style
|
|
38
|
+
let containerStyle = $derived.by(() => {
|
|
39
|
+
const styles = ['grid-template: 1fr / 1fr;'];
|
|
40
|
+
|
|
41
|
+
if (style) {
|
|
42
|
+
styles.push(style);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return styles.join(' ');
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<div
|
|
50
|
+
data-component="grid-layers"
|
|
51
|
+
class="grid {base} {bg} {classes} {margin} {padding} {overflow}"
|
|
52
|
+
style={containerStyle}
|
|
53
|
+
{...attrs}
|
|
54
|
+
>
|
|
55
|
+
{@render children()}
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<style>
|
|
59
|
+
/* All direct children occupy the same grid area */
|
|
60
|
+
div > :global(*) {
|
|
61
|
+
grid-area: 1 / 1;
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default GridLayers;
|
|
2
|
+
type GridLayers = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<{
|
|
5
|
+
[attr: string]: any;
|
|
6
|
+
base?: string;
|
|
7
|
+
bg?: string;
|
|
8
|
+
padding?: string;
|
|
9
|
+
margin?: string;
|
|
10
|
+
classes?: string;
|
|
11
|
+
style?: string;
|
|
12
|
+
overflow?: string;
|
|
13
|
+
children: Snippet<[]>;
|
|
14
|
+
}>): void;
|
|
15
|
+
};
|
|
16
|
+
declare const GridLayers: import("svelte").Component<{
|
|
17
|
+
[attr: string]: any;
|
|
18
|
+
base?: string;
|
|
19
|
+
bg?: string;
|
|
20
|
+
padding?: string;
|
|
21
|
+
margin?: string;
|
|
22
|
+
classes?: string;
|
|
23
|
+
style?: string;
|
|
24
|
+
overflow?: string;
|
|
25
|
+
children: import("svelte").Snippet;
|
|
26
|
+
}, {}, "">;
|