From 3de706a2b8409e00ba6769a49f2e59ca98d19a66 Mon Sep 17 00:00:00 2001 From: NiclasNorin Date: Thu, 26 Feb 2026 10:11:36 +0100 Subject: [PATCH] refactor: components use php config files --- .../php/Component/Acceptance/acceptance.json | 49 --------- .../Component/Acceptance/acceptanceConfig.php | 51 +++++++++ source/php/Component/Accordion/accordion.json | 58 ---------- .../Component/Accordion/accordionConfig.php | 60 +++++++++++ .../Accordion__item/accordion__item.json | 57 ---------- .../Accordion__item/accordion__itemConfig.php | 58 ++++++++++ .../php/Component/AnchorMenu/anchorMenu.json | 22 ---- .../Component/AnchorMenu/anchorMenuConfig.php | 24 +++++ source/php/Component/Avatar/avatar.json | 30 ------ source/php/Component/Avatar/avatarConfig.php | 32 ++++++ source/php/Component/Block/BlockTest.php | 5 +- source/php/Component/Block/block.json | 52 --------- source/php/Component/Block/blockConfig.php | 54 ++++++++++ source/php/Component/Box/box.json | 49 --------- source/php/Component/Box/boxConfig.php | 51 +++++++++ source/php/Component/Brand/brand.json | 25 ----- source/php/Component/Brand/brandConfig.php | 27 +++++ .../php/Component/Breadcrumb/breadcrumb.json | 39 ------- .../Component/Breadcrumb/breadcrumbConfig.php | 41 +++++++ source/php/Component/Button/button.json | 78 -------------- source/php/Component/Button/buttonConfig.php | 80 ++++++++++++++ source/php/Component/Calendar/calendar.json | 28 ----- .../php/Component/Calendar/calendarConfig.php | 24 +++++ source/php/Component/Card/card.json | 85 --------------- source/php/Component/Card/cardConfig.php | 87 +++++++++++++++ source/php/Component/Code/code.json | 19 ---- source/php/Component/Code/codeConfig.php | 21 ++++ .../php/Component/Collection/collection.json | 45 -------- .../Component/Collection/collectionConfig.php | 47 ++++++++ .../Collection__item/collection__item.json | 29 ----- .../collection__itemConfig.php | 31 ++++++ source/php/Component/Comment/comment.json | 63 ----------- .../php/Component/Comment/commentConfig.php | 65 ++++++++++++ source/php/Component/Date/date.json | 53 ---------- source/php/Component/Date/dateConfig.php | 55 ++++++++++ source/php/Component/Datebadge/datebadge.json | 29 ----- .../Component/Datebadge/datebadgeConfig.php | 31 ++++++ source/php/Component/Divider/divider.json | 42 -------- .../php/Component/Divider/dividerConfig.php | 42 ++++++++ source/php/Component/Drawer/drawer.json | 23 ---- source/php/Component/Drawer/drawerConfig.php | 31 ++++++ source/php/Component/Dropdown/dropdown.json | 36 ------- .../php/Component/Dropdown/dropdownConfig.php | 36 +++++++ source/php/Component/Element/element.json | 23 ---- .../php/Component/Element/elementConfig.php | 25 +++++ source/php/Component/Fab/fab.json | 29 ----- source/php/Component/Fab/fabConfig.php | 31 ++++++ source/php/Component/Field/field.json | 55 ---------- source/php/Component/Field/fieldConfig.php | 57 ++++++++++ .../php/Component/Fileinput/FileinputTest.php | 5 +- source/php/Component/Fileinput/fileinput.json | 82 -------------- .../Component/Fileinput/fileinputConfig.php | 83 +++++++++++++++ source/php/Component/Footer/footer.json | 47 -------- source/php/Component/Footer/footerConfig.php | 49 +++++++++ source/php/Component/Form/form.json | 26 ----- source/php/Component/Form/formConfig.php | 28 +++++ source/php/Component/Gallery/gallery.json | 27 ----- .../php/Component/Gallery/galleryConfig.php | 29 +++++ source/php/Component/Group/group.json | 37 ------- source/php/Component/Group/groupConfig.php | 39 +++++++ source/php/Component/Header/header.json | 26 ----- source/php/Component/Header/headerConfig.php | 28 +++++ source/php/Component/Hero/HeroTest.php | 5 +- source/php/Component/Hero/hero.json | 95 ----------------- source/php/Component/Hero/heroConfig.php | 100 ++++++++++++++++++ source/php/Component/Icon/icon.json | 43 -------- source/php/Component/Icon/iconConfig.php | 44 ++++++++ .../Component/IconSection/iconSection.json | 20 ---- .../IconSection/iconSectionConfig.php | 22 ++++ .../IconSection__item/iconSection__item.json | 21 ---- .../iconSection__itemConfig.php | 23 ++++ source/php/Component/Iframe/iframe.json | 33 ------ source/php/Component/Iframe/iframeConfig.php | 35 ++++++ source/php/Component/Image/image.json | 66 ------------ source/php/Component/Image/imageConfig.php | 68 ++++++++++++ .../php/Component/Imageinput/imageinput.json | 81 -------------- .../Component/Imageinput/imageinputConfig.php | 83 +++++++++++++++ .../InlineCssWrapper/inlineCssWrapper.json | 21 ---- .../inlineCssWrapperConfig.php | 22 ++++ source/php/Component/Link/link.json | 30 ------ source/php/Component/Link/linkConfig.php | 32 ++++++ source/php/Component/Listing/listing.json | 24 ----- .../php/Component/Listing/listingConfig.php | 26 +++++ source/php/Component/Loader/loader.json | 26 ----- source/php/Component/Loader/loaderConfig.php | 28 +++++ source/php/Component/Logotype/logotype.json | 28 ----- .../php/Component/Logotype/logotypeConfig.php | 30 ++++++ .../Component/Logotypegrid/logotypegrid.json | 19 ---- .../Logotypegrid/logotypegridConfig.php | 21 ++++ source/php/Component/Map/Map.php | 28 +++++ source/php/Component/Map/map.blade.php | 10 ++ source/php/Component/Map/mapConfig.php | 39 +++++++ source/php/Component/MegaMenu/megaMenu.json | 42 -------- .../php/Component/MegaMenu/megaMenuConfig.php | 44 ++++++++ source/php/Component/Menu/menu.json | 28 ----- source/php/Component/Menu/menuConfig.php | 30 ++++++ source/php/Component/Modal/ModalTest.php | 5 +- source/php/Component/Modal/modal.json | 45 -------- source/php/Component/Modal/modalConfig.php | 47 ++++++++ source/php/Component/Nav/nav.json | 41 ------- source/php/Component/Nav/navConfig.php | 43 ++++++++ source/php/Component/Navbar/navbar.json | 30 ------ source/php/Component/Navbar/navbarConfig.php | 31 ++++++ source/php/Component/NewsItem/newsItem.json | 57 ---------- .../php/Component/NewsItem/newsItemConfig.php | 59 +++++++++++ source/php/Component/Notice/notice.json | 38 ------- source/php/Component/Notice/noticeConfig.php | 43 ++++++++ .../Component/Notification/notification.json | 26 ----- .../Notification/notificationConfig.php | 31 ++++++ .../OpenStreetMap/openStreetMap.json | 31 ------ .../OpenStreetMap/openStreetMapConfig.php | 33 ++++++ source/php/Component/Option/option.json | 28 ----- source/php/Component/Option/optionConfig.php | 30 ++++++ .../php/Component/Pagination/pagination.json | 50 --------- .../Component/Pagination/paginationConfig.php | 52 +++++++++ source/php/Component/Paper/paper.json | 21 ---- source/php/Component/Paper/paperConfig.php | 23 ++++ source/php/Component/Person/person.json | 62 ----------- source/php/Component/Person/personConfig.php | 64 +++++++++++ source/php/Component/Product/product.json | 37 ------- .../php/Component/Product/productConfig.php | 39 +++++++ .../Component/ProgressBar/progressBar.json | 17 --- .../ProgressBar/progressBarConfig.php | 16 +++ source/php/Component/Segment/segment.json | 95 ----------------- .../php/Component/Segment/segmentConfig.php | 97 +++++++++++++++++ source/php/Component/Select/select.json | 54 ---------- source/php/Component/Select/selectConfig.php | 56 ++++++++++ source/php/Component/Sidebar/sidebar.json | 23 ---- .../php/Component/Sidebar/sidebarConfig.php | 25 +++++ source/php/Component/Signature/signature.json | 28 ----- .../Component/Signature/signatureConfig.php | 30 ++++++ .../Component/Siteselector/siteselector.json | 30 ------ .../Siteselector/siteselectorConfig.php | 32 ++++++ source/php/Component/Slider/slider.json | 44 -------- source/php/Component/Slider/sliderConfig.php | 44 ++++++++ .../Component/Slider__item/slider__item.json | 68 ------------ .../Slider__item/slider__itemConfig.php | 70 ++++++++++++ source/php/Component/Steppers/steppers.json | 19 ---- .../php/Component/Steppers/steppersConfig.php | 21 ++++ source/php/Component/Table/table.json | 43 -------- source/php/Component/Table/tableConfig.php | 45 ++++++++ source/php/Component/Tabs/tabs.json | 23 ---- source/php/Component/Tabs/tabsConfig.php | 25 +++++ source/php/Component/Tags/tags.json | 30 ------ source/php/Component/Tags/tagsConfig.php | 32 ++++++ .../Component/Testimonials/testimonials.json | 28 ----- .../Testimonials/testimonialsConfig.php | 30 ++++++ source/php/Component/Textarea/textarea.json | 22 ---- .../php/Component/Textarea/textareaConfig.php | 24 +++++ source/php/Component/Tile/tile.json | 20 ---- source/php/Component/Tile/tileConfig.php | 22 ++++ source/php/Component/Timeline/timeline.json | 19 ---- .../php/Component/Timeline/timelineConfig.php | 21 ++++ source/php/Component/Toast/toast.json | 21 ---- source/php/Component/Toast/toastConfig.php | 23 ++++ .../Component/Toast__item/toast__item.json | 15 --- .../Toast__item/toast__itemConfig.php | 17 +++ source/php/Component/Tooltip/tooltip.json | 29 ----- .../php/Component/Tooltip/tooltipConfig.php | 31 ++++++ .../php/Component/Typography/typography.json | 25 ----- .../Component/Typography/typographyConfig.php | 27 +++++ source/php/Component/Video/video.json | 34 ------ source/php/Component/Video/videoConfig.php | 36 +++++++ source/php/Register.php | 55 +++------- .../BladeService/Register/Register.php | 50 ++------- 165 files changed, 3254 insertions(+), 3085 deletions(-) delete mode 100644 source/php/Component/Acceptance/acceptance.json create mode 100644 source/php/Component/Acceptance/acceptanceConfig.php delete mode 100644 source/php/Component/Accordion/accordion.json create mode 100644 source/php/Component/Accordion/accordionConfig.php delete mode 100644 source/php/Component/Accordion__item/accordion__item.json create mode 100644 source/php/Component/Accordion__item/accordion__itemConfig.php delete mode 100644 source/php/Component/AnchorMenu/anchorMenu.json create mode 100644 source/php/Component/AnchorMenu/anchorMenuConfig.php delete mode 100644 source/php/Component/Avatar/avatar.json create mode 100644 source/php/Component/Avatar/avatarConfig.php delete mode 100644 source/php/Component/Block/block.json create mode 100644 source/php/Component/Block/blockConfig.php delete mode 100644 source/php/Component/Box/box.json create mode 100644 source/php/Component/Box/boxConfig.php delete mode 100644 source/php/Component/Brand/brand.json create mode 100644 source/php/Component/Brand/brandConfig.php delete mode 100644 source/php/Component/Breadcrumb/breadcrumb.json create mode 100644 source/php/Component/Breadcrumb/breadcrumbConfig.php delete mode 100644 source/php/Component/Button/button.json create mode 100644 source/php/Component/Button/buttonConfig.php delete mode 100644 source/php/Component/Calendar/calendar.json create mode 100644 source/php/Component/Calendar/calendarConfig.php delete mode 100644 source/php/Component/Card/card.json create mode 100644 source/php/Component/Card/cardConfig.php delete mode 100644 source/php/Component/Code/code.json create mode 100644 source/php/Component/Code/codeConfig.php delete mode 100644 source/php/Component/Collection/collection.json create mode 100644 source/php/Component/Collection/collectionConfig.php delete mode 100644 source/php/Component/Collection__item/collection__item.json create mode 100644 source/php/Component/Collection__item/collection__itemConfig.php delete mode 100644 source/php/Component/Comment/comment.json create mode 100644 source/php/Component/Comment/commentConfig.php delete mode 100644 source/php/Component/Date/date.json create mode 100644 source/php/Component/Date/dateConfig.php delete mode 100644 source/php/Component/Datebadge/datebadge.json create mode 100644 source/php/Component/Datebadge/datebadgeConfig.php delete mode 100644 source/php/Component/Divider/divider.json create mode 100644 source/php/Component/Divider/dividerConfig.php delete mode 100644 source/php/Component/Drawer/drawer.json create mode 100644 source/php/Component/Drawer/drawerConfig.php delete mode 100644 source/php/Component/Dropdown/dropdown.json create mode 100644 source/php/Component/Dropdown/dropdownConfig.php delete mode 100644 source/php/Component/Element/element.json create mode 100644 source/php/Component/Element/elementConfig.php delete mode 100644 source/php/Component/Fab/fab.json create mode 100644 source/php/Component/Fab/fabConfig.php delete mode 100644 source/php/Component/Field/field.json create mode 100644 source/php/Component/Field/fieldConfig.php delete mode 100644 source/php/Component/Fileinput/fileinput.json create mode 100644 source/php/Component/Fileinput/fileinputConfig.php delete mode 100644 source/php/Component/Footer/footer.json create mode 100644 source/php/Component/Footer/footerConfig.php delete mode 100644 source/php/Component/Form/form.json create mode 100644 source/php/Component/Form/formConfig.php delete mode 100644 source/php/Component/Gallery/gallery.json create mode 100644 source/php/Component/Gallery/galleryConfig.php delete mode 100644 source/php/Component/Group/group.json create mode 100644 source/php/Component/Group/groupConfig.php delete mode 100644 source/php/Component/Header/header.json create mode 100644 source/php/Component/Header/headerConfig.php delete mode 100644 source/php/Component/Hero/hero.json create mode 100644 source/php/Component/Hero/heroConfig.php delete mode 100644 source/php/Component/Icon/icon.json create mode 100644 source/php/Component/Icon/iconConfig.php delete mode 100644 source/php/Component/IconSection/iconSection.json create mode 100644 source/php/Component/IconSection/iconSectionConfig.php delete mode 100644 source/php/Component/IconSection__item/iconSection__item.json create mode 100644 source/php/Component/IconSection__item/iconSection__itemConfig.php delete mode 100755 source/php/Component/Iframe/iframe.json create mode 100644 source/php/Component/Iframe/iframeConfig.php delete mode 100644 source/php/Component/Image/image.json create mode 100644 source/php/Component/Image/imageConfig.php delete mode 100644 source/php/Component/Imageinput/imageinput.json create mode 100644 source/php/Component/Imageinput/imageinputConfig.php delete mode 100644 source/php/Component/InlineCssWrapper/inlineCssWrapper.json create mode 100644 source/php/Component/InlineCssWrapper/inlineCssWrapperConfig.php delete mode 100644 source/php/Component/Link/link.json create mode 100644 source/php/Component/Link/linkConfig.php delete mode 100644 source/php/Component/Listing/listing.json create mode 100644 source/php/Component/Listing/listingConfig.php delete mode 100644 source/php/Component/Loader/loader.json create mode 100644 source/php/Component/Loader/loaderConfig.php delete mode 100644 source/php/Component/Logotype/logotype.json create mode 100644 source/php/Component/Logotype/logotypeConfig.php delete mode 100644 source/php/Component/Logotypegrid/logotypegrid.json create mode 100644 source/php/Component/Logotypegrid/logotypegridConfig.php create mode 100644 source/php/Component/Map/Map.php create mode 100644 source/php/Component/Map/map.blade.php create mode 100644 source/php/Component/Map/mapConfig.php delete mode 100644 source/php/Component/MegaMenu/megaMenu.json create mode 100644 source/php/Component/MegaMenu/megaMenuConfig.php delete mode 100644 source/php/Component/Menu/menu.json create mode 100644 source/php/Component/Menu/menuConfig.php delete mode 100644 source/php/Component/Modal/modal.json create mode 100644 source/php/Component/Modal/modalConfig.php delete mode 100644 source/php/Component/Nav/nav.json create mode 100644 source/php/Component/Nav/navConfig.php delete mode 100644 source/php/Component/Navbar/navbar.json create mode 100644 source/php/Component/Navbar/navbarConfig.php delete mode 100644 source/php/Component/NewsItem/newsItem.json create mode 100644 source/php/Component/NewsItem/newsItemConfig.php delete mode 100644 source/php/Component/Notice/notice.json create mode 100644 source/php/Component/Notice/noticeConfig.php delete mode 100644 source/php/Component/Notification/notification.json create mode 100644 source/php/Component/Notification/notificationConfig.php delete mode 100644 source/php/Component/OpenStreetMap/openStreetMap.json create mode 100644 source/php/Component/OpenStreetMap/openStreetMapConfig.php delete mode 100644 source/php/Component/Option/option.json create mode 100644 source/php/Component/Option/optionConfig.php delete mode 100644 source/php/Component/Pagination/pagination.json create mode 100644 source/php/Component/Pagination/paginationConfig.php delete mode 100644 source/php/Component/Paper/paper.json create mode 100644 source/php/Component/Paper/paperConfig.php delete mode 100644 source/php/Component/Person/person.json create mode 100644 source/php/Component/Person/personConfig.php delete mode 100644 source/php/Component/Product/product.json create mode 100644 source/php/Component/Product/productConfig.php delete mode 100644 source/php/Component/ProgressBar/progressBar.json create mode 100644 source/php/Component/ProgressBar/progressBarConfig.php delete mode 100755 source/php/Component/Segment/segment.json create mode 100644 source/php/Component/Segment/segmentConfig.php delete mode 100644 source/php/Component/Select/select.json create mode 100644 source/php/Component/Select/selectConfig.php delete mode 100644 source/php/Component/Sidebar/sidebar.json create mode 100644 source/php/Component/Sidebar/sidebarConfig.php delete mode 100644 source/php/Component/Signature/signature.json create mode 100644 source/php/Component/Signature/signatureConfig.php delete mode 100644 source/php/Component/Siteselector/siteselector.json create mode 100644 source/php/Component/Siteselector/siteselectorConfig.php delete mode 100644 source/php/Component/Slider/slider.json create mode 100644 source/php/Component/Slider/sliderConfig.php delete mode 100644 source/php/Component/Slider__item/slider__item.json create mode 100644 source/php/Component/Slider__item/slider__itemConfig.php delete mode 100644 source/php/Component/Steppers/steppers.json create mode 100644 source/php/Component/Steppers/steppersConfig.php delete mode 100644 source/php/Component/Table/table.json create mode 100644 source/php/Component/Table/tableConfig.php delete mode 100644 source/php/Component/Tabs/tabs.json create mode 100644 source/php/Component/Tabs/tabsConfig.php delete mode 100644 source/php/Component/Tags/tags.json create mode 100644 source/php/Component/Tags/tagsConfig.php delete mode 100644 source/php/Component/Testimonials/testimonials.json create mode 100644 source/php/Component/Testimonials/testimonialsConfig.php delete mode 100644 source/php/Component/Textarea/textarea.json create mode 100644 source/php/Component/Textarea/textareaConfig.php delete mode 100644 source/php/Component/Tile/tile.json create mode 100644 source/php/Component/Tile/tileConfig.php delete mode 100644 source/php/Component/Timeline/timeline.json create mode 100644 source/php/Component/Timeline/timelineConfig.php delete mode 100644 source/php/Component/Toast/toast.json create mode 100644 source/php/Component/Toast/toastConfig.php delete mode 100644 source/php/Component/Toast__item/toast__item.json create mode 100644 source/php/Component/Toast__item/toast__itemConfig.php delete mode 100644 source/php/Component/Tooltip/tooltip.json create mode 100644 source/php/Component/Tooltip/tooltipConfig.php delete mode 100644 source/php/Component/Typography/typography.json create mode 100644 source/php/Component/Typography/typographyConfig.php delete mode 100644 source/php/Component/Video/video.json create mode 100644 source/php/Component/Video/videoConfig.php diff --git a/source/php/Component/Acceptance/acceptance.json b/source/php/Component/Acceptance/acceptance.json deleted file mode 100644 index c27f7448..00000000 --- a/source/php/Component/Acceptance/acceptance.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "slug": "acceptance", - "default": { - "labels": false, - "height": false, - "src": false, - "policy": false, - "host": false, - "name": false, - "icon": "info", - "cover": false, - "modifier": "" - }, - "description": { - "labels": "Object or array containing knownLabels and unknownLabels with title, info, and button", - "height": "height in number ex 500", - "src": "array of urls to hide ex. https://www.youtube.com", - "policy": "URL to third party website policy", - "host": "host ex. youtube.com", - "name": "name of the host", - "icon": "Icon name as a string.", - "cover": "URL for background image", - "modifier": "Modifier variable ex. video" - }, - "types": { - "labels": "array|object|boolean", - "height": "boolean|string", - "src": "boolean|array", - "policy": "boolean", - "host": "boolean", - "name": "boolean", - "icon": "string", - "cover": "boolean", - "modifier": "string" - }, - "view": "acceptance.blade.php", - "dependency": { - "sass": { - "components": [ - "acceptance", - "button", - "icon", - "typography", - "iframe", - "modal" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Acceptance/acceptanceConfig.php b/source/php/Component/Acceptance/acceptanceConfig.php new file mode 100644 index 00000000..7016d71f --- /dev/null +++ b/source/php/Component/Acceptance/acceptanceConfig.php @@ -0,0 +1,51 @@ + 'acceptance', + 'default' => (object) [ + 'labels' => false, + 'height' => false, + 'src' => false, + 'policy' => false, + 'host' => false, + 'name' => false, + 'icon' => 'info', + 'cover' => false, + 'modifier' => '', + ], + 'description' => [ + 'labels' => 'Object or array containing knownLabels and unknownLabels with title, info, and button', + 'height' => 'height in number ex 500', + 'src' => 'array of urls to hide ex. https://www.youtube.com', + 'policy' => 'URL to third party website policy', + 'host' => 'host ex. youtube.com', + 'name' => 'name of the host', + 'icon' => 'Icon name as a string.', + 'cover' => 'URL for background image', + 'modifier' => 'Modifier variable ex. video', + ], + 'types' => [ + 'labels' => 'array|object|boolean', + 'height' => 'boolean|string', + 'src' => 'boolean|array', + 'policy' => 'boolean', + 'host' => 'boolean', + 'name' => 'boolean', + 'icon' => 'string', + 'cover' => 'boolean', + 'modifier' => 'string', + ], + 'view' => 'acceptance.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'acceptance', + 'button', + 'icon', + 'typography', + 'iframe', + 'modal', + ], + ], + ], +]; diff --git a/source/php/Component/Accordion/accordion.json b/source/php/Component/Accordion/accordion.json deleted file mode 100644 index 06e5d648..00000000 --- a/source/php/Component/Accordion/accordion.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "slug": "accordion", - "default": { - "id": "", - "list": [], - "beforeHeading": "", - "afterHeading": "", - "beforeContent": "

", - "afterContent": "

", - "componentElement": "div", - "sectionElement": "div", - "sectionHeadingElement": "button", - "sectionContentElement": "div", - "spacedSections": false, - "taxonomy": [], - "taxonomyPosition": "" - }, - "description": { - "id": "ID for the accordion", - "list": "List of accordion section", - "beforeHeading": "Insert before heading", - "afterHeading": "Insert after heading", - "beforeContent": "Insert before content", - "afterContent": "Insert after content", - "componentElement": "Component element", - "sectionElement": "Section element", - "sectionHeadingElement": "Section heading component", - "sectionContentElement": "Section content component", - "spacedSections": "Sections are spaced instead of glued together", - "taxonomy": "Array of taxonomies such as tags", - "taxonomyPosition": "Taxonomy position like top or below" - }, - "types": { - "id": "string", - "list": "array", - "beforeHeading": "string", - "afterHeading": "string", - "beforeContent": "string", - "afterContent": "string", - "componentElement": "string", - "sectionElement": "string", - "sectionHeadingElement": "string", - "sectionContentElement": "string", - "spacedSections": "bool", - "taxonomy": "array", - "taxonomyPosition": "string" - }, - "view": "accordion.blade.php", - "dependency": { - "sass": { - "components": [ - "accordion", - "icon", - "tags" - ] - } - } -} diff --git a/source/php/Component/Accordion/accordionConfig.php b/source/php/Component/Accordion/accordionConfig.php new file mode 100644 index 00000000..d0ed0e18 --- /dev/null +++ b/source/php/Component/Accordion/accordionConfig.php @@ -0,0 +1,60 @@ + 'accordion', + 'default' => (object) [ + 'id' => '', + 'list' => [], + 'beforeHeading' => '', + 'afterHeading' => '', + 'beforeContent' => '

', + 'afterContent' => '

', + 'componentElement' => 'div', + 'sectionElement' => 'div', + 'sectionHeadingElement' => 'button', + 'sectionContentElement' => 'div', + 'spacedSections' => false, + 'taxonomy' => [], + 'taxonomyPosition' => '', + ], + 'description' => [ + 'id' => 'ID for the accordion', + 'list' => 'List of accordion section', + 'beforeHeading' => 'Insert before heading', + 'afterHeading' => 'Insert after heading', + 'beforeContent' => 'Insert before content', + 'afterContent' => 'Insert after content', + 'componentElement' => 'Component element', + 'sectionElement' => 'Section element', + 'sectionHeadingElement' => 'Section heading component', + 'sectionContentElement' => 'Section content component', + 'spacedSections' => 'Sections are spaced instead of glued together', + 'taxonomy' => 'Array of taxonomies such as tags', + 'taxonomyPosition' => 'Taxonomy position like top or below', + ], + 'types' => [ + 'id' => 'string', + 'list' => 'array', + 'beforeHeading' => 'string', + 'afterHeading' => 'string', + 'beforeContent' => 'string', + 'afterContent' => 'string', + 'componentElement' => 'string', + 'sectionElement' => 'string', + 'sectionHeadingElement' => 'string', + 'sectionContentElement' => 'string', + 'spacedSections' => 'bool', + 'taxonomy' => 'array', + 'taxonomyPosition' => 'string', + ], + 'view' => 'accordion.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'accordion', + 'icon', + 'tags', + ], + ], + ], +]; diff --git a/source/php/Component/Accordion__item/accordion__item.json b/source/php/Component/Accordion__item/accordion__item.json deleted file mode 100644 index ca9b28be..00000000 --- a/source/php/Component/Accordion__item/accordion__item.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "slug": "accordion__item", - "default": { - "id": "", - "heading": "", - "beforeHeading": "", - "afterHeading": "", - "beforeContent": "", - "afterContent": "", - "sectionElement": "div", - "sectionHeadingElement": "a", - "sectionContentElement": "div", - "taxonomy": [], - "taxonomyPosition": "", - "icon": "keyboard_arrow_down" - }, - "description": { - "id": "ID for the accordion", - "heading": "The heading", - "beforeHeading": "Insert before heading", - "afterHeading": "Insert after heading", - "beforeContent": "Insert before content", - "afterContent": "Insert after content", - "sectionElement": "Section element", - "sectionHeadingElement": "Section heading component", - "sectionContentElement": "Section content component", - "taxonomy": "Array of taxonomies such as tags", - "taxonomyPosition": "Taxonomy position like top or below", - "icon": "Icon to show for expand functionality." - }, - "types": - { - "id": "string", - "heading": "string|array", - "beforeHeading": "string", - "afterHeading": "string", - "beforeContent": "string", - "afterContent": "string", - "sectionElement": "string", - "sectionHeadingElement": "string", - "sectionContentElement": "string", - "taxonomy": "array", - "taxonomyPosition": "string", - "icon": "string" - }, - "view": "accordion__item.blade.php", - "dependency": { - "sass": { - "components": [ - "accordion", - "accordion__item", - "icon", - "tags" - ] - } - } -} diff --git a/source/php/Component/Accordion__item/accordion__itemConfig.php b/source/php/Component/Accordion__item/accordion__itemConfig.php new file mode 100644 index 00000000..e3af0e36 --- /dev/null +++ b/source/php/Component/Accordion__item/accordion__itemConfig.php @@ -0,0 +1,58 @@ + 'accordion__item', + 'default' => (object) [ + 'id' => '', + 'heading' => '', + 'beforeHeading' => '', + 'afterHeading' => '', + 'beforeContent' => '', + 'afterContent' => '', + 'sectionElement' => 'div', + 'sectionHeadingElement' => 'a', + 'sectionContentElement' => 'div', + 'taxonomy' => [], + 'taxonomyPosition' => '', + 'icon' => 'keyboard_arrow_down', + ], + 'description' => [ + 'id' => 'ID for the accordion', + 'heading' => 'The heading', + 'beforeHeading' => 'Insert before heading', + 'afterHeading' => 'Insert after heading', + 'beforeContent' => 'Insert before content', + 'afterContent' => 'Insert after content', + 'sectionElement' => 'Section element', + 'sectionHeadingElement' => 'Section heading component', + 'sectionContentElement' => 'Section content component', + 'taxonomy' => 'Array of taxonomies such as tags', + 'taxonomyPosition' => 'Taxonomy position like top or below', + 'icon' => 'Icon to show for expand functionality.', + ], + 'types' => [ + 'id' => 'string', + 'heading' => 'string|array', + 'beforeHeading' => 'string', + 'afterHeading' => 'string', + 'beforeContent' => 'string', + 'afterContent' => 'string', + 'sectionElement' => 'string', + 'sectionHeadingElement' => 'string', + 'sectionContentElement' => 'string', + 'taxonomy' => 'array', + 'taxonomyPosition' => 'string', + 'icon' => 'string', + ], + 'view' => 'accordion__item.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'accordion', + 'accordion__item', + 'icon', + 'tags', + ], + ], + ], +]; diff --git a/source/php/Component/AnchorMenu/anchorMenu.json b/source/php/Component/AnchorMenu/anchorMenu.json deleted file mode 100644 index 4e80ca0f..00000000 --- a/source/php/Component/AnchorMenu/anchorMenu.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "slug": "anchorMenu", - "default": { - "menuItems": [] - }, - "description": { - "menuItems": "An array containing arrays of items. An item should contain a label, anchor and if wanted an icon as well." - }, - "types": { - "menuItems": "array" - }, - "view": "anchorMenu.blade.php", - "dependency": { - "sass": { - "components": [ - "link", - "group", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/AnchorMenu/anchorMenuConfig.php b/source/php/Component/AnchorMenu/anchorMenuConfig.php new file mode 100644 index 00000000..36ed9b8e --- /dev/null +++ b/source/php/Component/AnchorMenu/anchorMenuConfig.php @@ -0,0 +1,24 @@ + 'anchorMenu', + 'default' => (object) [ + 'menuItems' => [], + ], + 'description' => [ + 'menuItems' => 'An array containing arrays of items. An item should contain a label, anchor and if wanted an icon as well.', + ], + 'types' => [ + 'menuItems' => 'array', + ], + 'view' => 'anchorMenu.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'link', + 'group', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Avatar/avatar.json b/source/php/Component/Avatar/avatar.json deleted file mode 100644 index 239cc4fb..00000000 --- a/source/php/Component/Avatar/avatar.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "slug": "avatar", - "default": { - "image": false, - "icon": [], - "name": "", - "size": "md" - }, - "description": { - "image": "A url to a profile image or an ImageInterface.", - "icon": "Attributes for @icon component (separate reference).", - "name": "Persons full name", - "size": "sm,md,lg,full" - }, - "types": { - "image": "string|ImageInterface|boolean", - "icon": "array", - "name": "string", - "size": "string" - }, - "view": "avatar.blade.php", - "dependency": { - "sass": { - "components": [ - "avatar", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Avatar/avatarConfig.php b/source/php/Component/Avatar/avatarConfig.php new file mode 100644 index 00000000..feb79514 --- /dev/null +++ b/source/php/Component/Avatar/avatarConfig.php @@ -0,0 +1,32 @@ + 'avatar', + 'default' => (object) [ + 'image' => false, + 'icon' => [], + 'name' => '', + 'size' => 'md', + ], + 'description' => [ + 'image' => 'A url to a profile image or an ImageInterface.', + 'icon' => 'Attributes for @icon component (separate reference).', + 'name' => 'Persons full name', + 'size' => 'sm,md,lg,full', + ], + 'types' => [ + 'image' => 'string|ImageInterface|boolean', + 'icon' => 'array', + 'name' => 'string', + 'size' => 'string', + ], + 'view' => 'avatar.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'avatar', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Block/BlockTest.php b/source/php/Component/Block/BlockTest.php index 6c8146d4..5e635c31 100644 --- a/source/php/Component/Block/BlockTest.php +++ b/source/php/Component/Block/BlockTest.php @@ -53,8 +53,7 @@ public function hasNoContentDataProvider(): array private function getComponentDefaultData() { - $jsonFile = file_get_contents('source/php/Component/Block/block.json', true); - $json = json_decode($jsonFile, true); - return $json['default']; + $config = require 'source/php/Component/Block/blockConfig.php'; + return (array) $config['default']; } } diff --git a/source/php/Component/Block/block.json b/source/php/Component/Block/block.json deleted file mode 100644 index 22c314a7..00000000 --- a/source/php/Component/Block/block.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "slug": "block", - "default": { - "heading": "", - "content": "", - "meta": "", - "secondaryMeta": "", - "image": false, - "link": "", - "ratio": "4:3", - "date": "", - "dateBadge": false, - "icon": false, - "iconBackgroundColor": null - }, - "description": { - "heading": "The heading of the block", - "content": "Short text to describe target content.", - "meta": "String or array of strings containing the meta information", - "secondaryMeta": "String or array of strings containing the secondary meta information", - "image": "Array of image attributes, src, alt, backgroudColor.", - "link": "Simple href link", - "ratio": "Ratio of the block", - "date": "Preformatted date", - "dateBadge": "Display date as a badge.", - "icon": "An array with the same specification as the icon component" - }, - "types": { - "heading": "string", - "content": "string|array", - "meta": "string|array", - "secondaryMeta": "string|array", - "image": "array|boolean|ImageInterface", - "link": "string", - "ratio": "string", - "date": "array", - "dateBadge": "boolean", - "icon": "boolean|array", - "iconBackgroundColor": "string" - }, - "view": "block.blade.php", - "dependency": { - "sass": { - "components": [ - "block", - "image", - "typography", - "group" - ] - } - } -} diff --git a/source/php/Component/Block/blockConfig.php b/source/php/Component/Block/blockConfig.php new file mode 100644 index 00000000..eea79f12 --- /dev/null +++ b/source/php/Component/Block/blockConfig.php @@ -0,0 +1,54 @@ + 'block', + 'default' => (object) [ + 'heading' => '', + 'content' => '', + 'meta' => '', + 'secondaryMeta' => '', + 'image' => false, + 'link' => '', + 'ratio' => '4:3', + 'date' => '', + 'dateBadge' => false, + 'icon' => false, + 'iconBackgroundColor' => null, + ], + 'description' => [ + 'heading' => 'The heading of the block', + 'content' => 'Short text to describe target content.', + 'meta' => 'String or array of strings containing the meta information', + 'secondaryMeta' => 'String or array of strings containing the secondary meta information', + 'image' => 'Array of image attributes, src, alt, backgroudColor.', + 'link' => 'Simple href link', + 'ratio' => 'Ratio of the block', + 'date' => 'Preformatted date', + 'dateBadge' => 'Display date as a badge.', + 'icon' => 'An array with the same specification as the icon component', + ], + 'types' => [ + 'heading' => 'string', + 'content' => 'string|array', + 'meta' => 'string|array', + 'secondaryMeta' => 'string|array', + 'image' => 'array|boolean|ImageInterface', + 'link' => 'string', + 'ratio' => 'string', + 'date' => 'array', + 'dateBadge' => 'boolean', + 'icon' => 'boolean|array', + 'iconBackgroundColor' => 'string', + ], + 'view' => 'block.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'block', + 'image', + 'typography', + 'group', + ], + ], + ], +]; diff --git a/source/php/Component/Box/box.json b/source/php/Component/Box/box.json deleted file mode 100644 index 9252a65c..00000000 --- a/source/php/Component/Box/box.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "slug": "box", - "default": { - "heading": "", - "content": "", - "meta": "", - "secondaryMeta": "", - "link": "", - "ratio": "1:1", - "date": "", - "dateBadge": null, - "image": false, - "icon": "" - }, - "description": { - "heading": "The heading of the block", - "content": "Short text to describe target content.", - "meta": "String or array of strings containing the meta information", - "secondaryMeta": "String or array of strings containing the secondary meta information", - "link": "Simple href link", - "ratio": "Ratio of the block", - "date": "Preformatted date", - "dateBadge": "Display date as a badge.", - "image": "Image object (see image component), svg or raster image.", - "icon": "Icon name as a string." - }, - "types": { - "heading": "string", - "content": "string", - "meta": "string|array", - "secondaryMeta": "string|array", - "link": "string", - "ratio": "string", - "date": "string", - "dateBadge": "boolean", - "image": "array|boolean|ImageInterface", - "icon": "string" - }, - "view": "box.blade.php", - "dependency": { - "sass": { - "components": [ - "box", - "image", - "typography" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Box/boxConfig.php b/source/php/Component/Box/boxConfig.php new file mode 100644 index 00000000..53ba55b4 --- /dev/null +++ b/source/php/Component/Box/boxConfig.php @@ -0,0 +1,51 @@ + 'box', + 'default' => (object) [ + 'heading' => '', + 'content' => '', + 'meta' => '', + 'secondaryMeta' => '', + 'link' => '', + 'ratio' => '1:1', + 'date' => '', + 'dateBadge' => null, + 'image' => false, + 'icon' => '', + ], + 'description' => [ + 'heading' => 'The heading of the block', + 'content' => 'Short text to describe target content.', + 'meta' => 'String or array of strings containing the meta information', + 'secondaryMeta' => 'String or array of strings containing the secondary meta information', + 'link' => 'Simple href link', + 'ratio' => 'Ratio of the block', + 'date' => 'Preformatted date', + 'dateBadge' => 'Display date as a badge.', + 'image' => 'Image object (see image component), svg or raster image.', + 'icon' => 'Icon name as a string.', + ], + 'types' => [ + 'heading' => 'string', + 'content' => 'string', + 'meta' => 'string|array', + 'secondaryMeta' => 'string|array', + 'link' => 'string', + 'ratio' => 'string', + 'date' => 'string', + 'dateBadge' => 'boolean', + 'image' => 'array|boolean|ImageInterface', + 'icon' => 'string', + ], + 'view' => 'box.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'box', + 'image', + 'typography', + ], + ], + ], +]; diff --git a/source/php/Component/Brand/brand.json b/source/php/Component/Brand/brand.json deleted file mode 100644 index f7189736..00000000 --- a/source/php/Component/Brand/brand.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "slug": "brand", - "default": { - "logotype": [], - "text": [] - }, - "description": { - "logotype": "Array containing specified logotype component attributes", - "text": "Array of brand name, each item will be separated on multiple lines" - }, - "types": { - "logotype": "array", - "text": "array" - }, - "view": "brand.blade.php", - "dependency": { - "sass": { - "components": [ - "brand", - "logotype", - "image" - ] - } - } -} diff --git a/source/php/Component/Brand/brandConfig.php b/source/php/Component/Brand/brandConfig.php new file mode 100644 index 00000000..5cf3ccff --- /dev/null +++ b/source/php/Component/Brand/brandConfig.php @@ -0,0 +1,27 @@ + 'brand', + 'default' => (object) [ + 'logotype' => [], + 'text' => [], + ], + 'description' => [ + 'logotype' => 'Array containing specified logotype component attributes', + 'text' => 'Array of brand name, each item will be separated on multiple lines', + ], + 'types' => [ + 'logotype' => 'array', + 'text' => 'array', + ], + 'view' => 'brand.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'brand', + 'logotype', + 'image', + ], + ], + ], +]; diff --git a/source/php/Component/Breadcrumb/breadcrumb.json b/source/php/Component/Breadcrumb/breadcrumb.json deleted file mode 100644 index 27746441..00000000 --- a/source/php/Component/Breadcrumb/breadcrumb.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "slug": "breadcrumb", - "default": { - "list": [], - "label": "Breadcrumb", - "componentElement": "nav", - "listType": "ol", - "listItemType": "li", - "prefixLabel": "", - "truncate": null - }, - "description": { - "list": "Array of breadcrumb items.", - "label": "The aria-label of the component", - "componentElement": "What element to wrap this component with.", - "listType": "The list type ol/ul", - "listItemType": "The item type: li", - "prefixLabel": "The label before the breadcrumb items (screen reader only).", - "truncate": "The number of letters until item is truncated." - }, - "types": { - "list": "array", - "label": "string", - "componentElement": "string", - "listType": "string", - "listItemType": "string", - "prefixLabel": "string", - "truncate": "int|boolean" - }, - "view": "breadcrumb.blade.php", - "dependency": { - "sass": { - "components": [ - "breadcrumb", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Breadcrumb/breadcrumbConfig.php b/source/php/Component/Breadcrumb/breadcrumbConfig.php new file mode 100644 index 00000000..a6a95da5 --- /dev/null +++ b/source/php/Component/Breadcrumb/breadcrumbConfig.php @@ -0,0 +1,41 @@ + 'breadcrumb', + 'default' => (object) [ + 'list' => [], + 'label' => 'Breadcrumb', + 'componentElement' => 'nav', + 'listType' => 'ol', + 'listItemType' => 'li', + 'prefixLabel' => '', + 'truncate' => null, + ], + 'description' => [ + 'list' => 'Array of breadcrumb items.', + 'label' => 'The aria-label of the component', + 'componentElement' => 'What element to wrap this component with.', + 'listType' => 'The list type ol/ul', + 'listItemType' => 'The item type: li', + 'prefixLabel' => 'The label before the breadcrumb items (screen reader only).', + 'truncate' => 'The number of letters until item is truncated.', + ], + 'types' => [ + 'list' => 'array', + 'label' => 'string', + 'componentElement' => 'string', + 'listType' => 'string', + 'listItemType' => 'string', + 'prefixLabel' => 'string', + 'truncate' => 'int|boolean', + ], + 'view' => 'breadcrumb.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'breadcrumb', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Button/button.json b/source/php/Component/Button/button.json deleted file mode 100644 index 1cf843c3..00000000 --- a/source/php/Component/Button/button.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "slug":"button", - "default":{ - "text": false, - "size": "md", - "color": "default", - "type": "button", - "style": "filled", - "shape": "normal", - "href": false, - "target":"_top", - "componentElement":"button", - "labelElement":"span", - "ripple": true, - "pressed": "false", - "toggle": false, - "icon": false, - "reversePositions": false, - "fullWidth": false, - "classListIcon": [], - "classListText": [], - "ariaLabel": "", - "disableColor": true - }, - "description":{ - "label":"The label of the button.", - "href":"Where should the button link to?", - "target":"Open a new tab or not?", - "componentElement":"The tag to use for this component.", - "labelElement":"The element containing the label.", - "ripple":"Enable / disable ripple on click.", - "text": "The text-content of a button.", - "icon": "The name of the icon.", - "color": "The color scheme for the button.", - "size": "The size of the button; sm, md, lg.", - "toggle": "Will toggle the color of the font.", - "type": "What button type.", - "style": "The type of appearance, can be basic, filled or outlined.", - "shape": "If the shape of the button should be normal, or fully rounded (pill style).", - "reversePositions": "Reverse the position of icon and text.", - "fullWidth": "Makes button full width.", - "classListIcon": "Array of classes placed on the icon", - "classListText": "Array of classes placed on the text", - "ariaLabel": "Aria label text for the button", - "disableColor": "To use or not to use the disabled color even if the button is disabled" - }, - "types": { - "text": "string", - "size": "string", - "color": "string", - "type": "string", - "style": "string", - "shape": "string", - "href": "string|NULL", - "target": "string", - "componentElement":"string", - "labelElement":"string", - "ripple": "boolean", - "pressed": "string", - "toggle": "boolean", - "icon": "string", - "reversePositions": "boolean", - "fullWidth": "boolean", - "classListIcon": "array", - "classListText": "array", - "ariaLabel": "string", - "disableColor": "boolean" - }, - "view":"button.blade.php", - "dependency": { - "sass": { - "components": [ - "button", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Button/buttonConfig.php b/source/php/Component/Button/buttonConfig.php new file mode 100644 index 00000000..68265458 --- /dev/null +++ b/source/php/Component/Button/buttonConfig.php @@ -0,0 +1,80 @@ + 'button', + 'default' => (object) [ + 'text' => false, + 'size' => 'md', + 'color' => 'default', + 'type' => 'button', + 'style' => 'filled', + 'shape' => 'normal', + 'href' => false, + 'target' => '_top', + 'componentElement' => 'button', + 'labelElement' => 'span', + 'ripple' => true, + 'pressed' => 'false', + 'toggle' => false, + 'icon' => false, + 'reversePositions' => false, + 'fullWidth' => false, + 'classListIcon' => [], + 'classListText' => [], + 'ariaLabel' => '', + 'disableColor' => true, + ], + 'description' => [ + 'label' => 'The label of the button.', + 'href' => 'Where should the button link to?', + 'target' => 'Open a new tab or not?', + 'componentElement' => 'The tag to use for this component.', + 'labelElement' => 'The element containing the label.', + 'ripple' => 'Enable / disable ripple on click.', + 'text' => 'The text-content of a button.', + 'icon' => 'The name of the icon.', + 'color' => 'The color scheme for the button.', + 'size' => 'The size of the button; sm, md, lg.', + 'toggle' => 'Will toggle the color of the font.', + 'type' => 'What button type.', + 'style' => 'The type of appearance, can be basic, filled or outlined.', + 'shape' => 'If the shape of the button should be normal, or fully rounded (pill style).', + 'reversePositions' => 'Reverse the position of icon and text.', + 'fullWidth' => 'Makes button full width.', + 'classListIcon' => 'Array of classes placed on the icon', + 'classListText' => 'Array of classes placed on the text', + 'ariaLabel' => 'Aria label text for the button', + 'disableColor' => 'To use or not to use the disabled color even if the button is disabled', + ], + 'types' => [ + 'text' => 'string', + 'size' => 'string', + 'color' => 'string', + 'type' => 'string', + 'style' => 'string', + 'shape' => 'string', + 'href' => 'string|NULL', + 'target' => 'string', + 'componentElement' => 'string', + 'labelElement' => 'string', + 'ripple' => 'boolean', + 'pressed' => 'string', + 'toggle' => 'boolean', + 'icon' => 'string', + 'reversePositions' => 'boolean', + 'fullWidth' => 'boolean', + 'classListIcon' => 'array', + 'classListText' => 'array', + 'ariaLabel' => 'string', + 'disableColor' => 'boolean', + ], + 'view' => 'button.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'button', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Calendar/calendar.json b/source/php/Component/Calendar/calendar.json deleted file mode 100644 index 57ad057c..00000000 --- a/source/php/Component/Calendar/calendar.json +++ /dev/null @@ -1,28 +0,0 @@ - - -{ - "slug":"calendar", - "default":{ - "componentElement": "div", - "size": "large", - "get": "", - "set": "", - "color": "default", - "weekStart": "Monday" - }, - "description":{ - - }, - "view":"calendar.blade.php", - "dependency": { - "sass": { - "components": [ - "calendar", - "modal", - "button" - ] - } - } -} - - diff --git a/source/php/Component/Calendar/calendarConfig.php b/source/php/Component/Calendar/calendarConfig.php new file mode 100644 index 00000000..d2b404b4 --- /dev/null +++ b/source/php/Component/Calendar/calendarConfig.php @@ -0,0 +1,24 @@ + 'calendar', + 'default' => (object) [ + 'componentElement' => 'div', + 'size' => 'large', + 'get' => '', + 'set' => '', + 'color' => 'default', + 'weekStart' => 'Monday', + ], + 'description' => [], + 'view' => 'calendar.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'calendar', + 'modal', + 'button', + ], + ], + ], +]; diff --git a/source/php/Component/Card/card.json b/source/php/Component/Card/card.json deleted file mode 100644 index 1c55fc75..00000000 --- a/source/php/Component/Card/card.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "slug": "card", - "default": { - "eyebrow": "", - "heading": "", - "subHeading": "", - "meta": "", - "content": "", - "buttons": [], - "image": false, - "ratio": "16:9", - "collapsible": false, - "tags": null, - "link": "", - "linkText": "", - "date": false, - "dateBadge": false, - "hasPlaceholder": false, - "icon": false, - "iconBackgroundColor": null, - "color": "default", - "metaFirst": false, - "headingAboveImage": false - }, - "description": { - "eyebrow": "A smaller heading above the primary one", - "heading": "The card heading", - "subHeading": "A subheading below the heading, explaining more stuff.", - "meta": "Small text below title, in meta style.", - "content": "The card content", - "buttons": "Array with buttons that has parameters like href, text and attributeList.", - "image": "A url to an image.", - "ratio": "The ratio of the image", - "collapsible": "If the content should be collapsible.", - "tags": "A tags array", - "link": "A hyperlink to another location.", - "linkText": "The text of the link, if not set, the link will not be displayed.", - "date": "Preformatted date", - "dateBadge": "Display date as a badge. Requires image to be set.", - "hasPlaceholder": "If the card should have a placeholder, if the image is missing.", - "icon": "An array with the same specification as the icon component", - "iconBackgroundColor": "The background color of the icon", - "color": "The background color of the image.", - "metaFirst": "If the meta should be displayed before the heading.", - "headingAboveImage": "If the headings should be displayed above the image." - }, - "types": { - "eyebrow": "string", - "heading": "string", - "subHeading": "string", - "meta": "string", - "content": "string", - "buttons": "array", - "image": "array|boolean|ImageInterface", - "ratio": "string", - "collapsible": "boolean", - "tags": "array", - "link": "string", - "linkText": "string", - "date": "array", - "dateBadge": "boolean", - "hasPlaceholder": "boolean", - "icon": "boolean|array", - "iconBackgroundColor": "string", - "color": "string", - "containerAware": "boolean", - "metaFirst": "boolean", - "headingAboveImage": "boolean" - }, - "view": "card.blade.php", - "dependency": { - "sass": { - "components": [ - "card", - "paper", - "icon", - "accordion", - "image", - "typography", - "avatar", - "group" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Card/cardConfig.php b/source/php/Component/Card/cardConfig.php new file mode 100644 index 00000000..d0df6452 --- /dev/null +++ b/source/php/Component/Card/cardConfig.php @@ -0,0 +1,87 @@ + 'card', + 'default' => (object) [ + 'eyebrow' => '', + 'heading' => '', + 'subHeading' => '', + 'meta' => '', + 'content' => '', + 'buttons' => [], + 'image' => false, + 'ratio' => '16:9', + 'collapsible' => false, + 'tags' => null, + 'link' => '', + 'linkText' => '', + 'date' => false, + 'dateBadge' => false, + 'hasPlaceholder' => false, + 'icon' => false, + 'iconBackgroundColor' => null, + 'color' => 'default', + 'metaFirst' => false, + 'headingAboveImage' => false, + ], + 'description' => [ + 'eyebrow' => 'A smaller heading above the primary one', + 'heading' => 'The card heading', + 'subHeading' => 'A subheading below the heading, explaining more stuff.', + 'meta' => 'Small text below title, in meta style.', + 'content' => 'The card content', + 'buttons' => 'Array with buttons that has parameters like href, text and attributeList.', + 'image' => 'A url to an image.', + 'ratio' => 'The ratio of the image', + 'collapsible' => 'If the content should be collapsible.', + 'tags' => 'A tags array', + 'link' => 'A hyperlink to another location.', + 'linkText' => 'The text of the link, if not set, the link will not be displayed.', + 'date' => 'Preformatted date', + 'dateBadge' => 'Display date as a badge. Requires image to be set.', + 'hasPlaceholder' => 'If the card should have a placeholder, if the image is missing.', + 'icon' => 'An array with the same specification as the icon component', + 'iconBackgroundColor' => 'The background color of the icon', + 'color' => 'The background color of the image.', + 'metaFirst' => 'If the meta should be displayed before the heading.', + 'headingAboveImage' => 'If the headings should be displayed above the image.', + ], + 'types' => [ + 'eyebrow' => 'string', + 'heading' => 'string', + 'subHeading' => 'string', + 'meta' => 'string', + 'content' => 'string', + 'buttons' => 'array', + 'image' => 'array|boolean|ImageInterface', + 'ratio' => 'string', + 'collapsible' => 'boolean', + 'tags' => 'array', + 'link' => 'string', + 'linkText' => 'string', + 'date' => 'array', + 'dateBadge' => 'boolean', + 'hasPlaceholder' => 'boolean', + 'icon' => 'boolean|array', + 'iconBackgroundColor' => 'string', + 'color' => 'string', + 'containerAware' => 'boolean', + 'metaFirst' => 'boolean', + 'headingAboveImage' => 'boolean', + ], + 'view' => 'card.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'card', + 'paper', + 'icon', + 'accordion', + 'image', + 'typography', + 'avatar', + 'group', + ], + ], + ], +]; diff --git a/source/php/Component/Code/code.json b/source/php/Component/Code/code.json deleted file mode 100644 index d53716e2..00000000 --- a/source/php/Component/Code/code.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "slug": "code", - "default": { - "content": "Undocumented code...", - "slot": "echo 'Whoops, theres no code here. Where is it?'", - "language": "php", - "escape": false, - "componentElement": "div", - "preTagElement": "pre" - }, - "view": "code.blade.php", - "dependency": { - "sass": { - "components": [ - "code" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Code/codeConfig.php b/source/php/Component/Code/codeConfig.php new file mode 100644 index 00000000..ac1faacb --- /dev/null +++ b/source/php/Component/Code/codeConfig.php @@ -0,0 +1,21 @@ + 'code', + 'default' => (object) [ + 'content' => 'Undocumented code...', + 'slot' => 'echo \'Whoops, theres no code here. Where is it?\'', + 'language' => 'php', + 'escape' => false, + 'componentElement' => 'div', + 'preTagElement' => 'pre', + ], + 'view' => 'code.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'code', + ], + ], + ], +]; diff --git a/source/php/Component/Collection/collection.json b/source/php/Component/Collection/collection.json deleted file mode 100644 index 61478148..00000000 --- a/source/php/Component/Collection/collection.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "slug": "collection", - "default": { - "componentElement": "div", - "list": false, - "bordered": false, - "compact": false, - "sharp": false, - "sharpBottom": false, - "sharpTop": false, - "unbox": false - }, - "description": { - "componentElement": "The element type of list.", - "list": "A array input list, contains 'content' and 'link' array keys.", - "bordered": "Adds borders.", - "compact": "If the list should be displayed in a compressed format.", - "sharp": "Every single edge as sharp as hell, be careful!", - "sharpBottom": "Makes the bottom really sharp. Yep.", - "sharpTop": "Makes the top really sharp. Yep.", - "unbox": "Removes the border." - }, - "types":{ - "componentElement": "string", - "list": "array|boolean", - "bordered": "boolean", - "compact": "boolean", - "sharp": "boolean", - "sharpBottom": "boolean", - "sharpTop": "boolean", - "unbox": "boolean" - }, - "view": "collection.blade.php", - "dependency": { - "sass": { - "components": [ - "collection", - "collection__item", - "typography", - "link", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Collection/collectionConfig.php b/source/php/Component/Collection/collectionConfig.php new file mode 100644 index 00000000..3a2d62a0 --- /dev/null +++ b/source/php/Component/Collection/collectionConfig.php @@ -0,0 +1,47 @@ + 'collection', + 'default' => (object) [ + 'componentElement' => 'div', + 'list' => false, + 'bordered' => false, + 'compact' => false, + 'sharp' => false, + 'sharpBottom' => false, + 'sharpTop' => false, + 'unbox' => false, + ], + 'description' => [ + 'componentElement' => 'The element type of list.', + 'list' => 'A array input list, contains \'content\' and \'link\' array keys.', + 'bordered' => 'Adds borders.', + 'compact' => 'If the list should be displayed in a compressed format.', + 'sharp' => 'Every single edge as sharp as hell, be careful!', + 'sharpBottom' => 'Makes the bottom really sharp. Yep.', + 'sharpTop' => 'Makes the top really sharp. Yep.', + 'unbox' => 'Removes the border.', + ], + 'types' => [ + 'componentElement' => 'string', + 'list' => 'array|boolean', + 'bordered' => 'boolean', + 'compact' => 'boolean', + 'sharp' => 'boolean', + 'sharpBottom' => 'boolean', + 'sharpTop' => 'boolean', + 'unbox' => 'boolean', + ], + 'view' => 'collection.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'collection', + 'collection__item', + 'typography', + 'link', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Collection__item/collection__item.json b/source/php/Component/Collection__item/collection__item.json deleted file mode 100644 index 38339252..00000000 --- a/source/php/Component/Collection__item/collection__item.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "slug": "collection__item", - "default": { - "componentElement": "div", - "prefix": "", - "icon": false, - "iconLast": false, - "action": false, - "secondary": "", - "link": "", - "bordered": false - }, - "description": { - "elementType": "The type of list item. Default: li", - "isCurrent": "Mark this as current", - "isAligned": "Do not flow around elements placed either side of content.", - "subItem": "Slot for providing subitems (automatically wrapped in new collection, with subcollection flag. )", - "bordered": "Shows a border around the item." - }, - "view": "collection__item.blade.php", - "dependency": { - "sass": { - "components": [ - "collection", - "collection__item" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Collection__item/collection__itemConfig.php b/source/php/Component/Collection__item/collection__itemConfig.php new file mode 100644 index 00000000..63a68eb2 --- /dev/null +++ b/source/php/Component/Collection__item/collection__itemConfig.php @@ -0,0 +1,31 @@ + 'collection__item', + 'default' => (object) [ + 'componentElement' => 'div', + 'prefix' => '', + 'icon' => false, + 'iconLast' => false, + 'action' => false, + 'secondary' => '', + 'link' => '', + 'bordered' => false, + ], + 'description' => [ + 'elementType' => 'The type of list item. Default: li', + 'isCurrent' => 'Mark this as current', + 'isAligned' => 'Do not flow around elements placed either side of content.', + 'subItem' => 'Slot for providing subitems (automatically wrapped in new collection, with subcollection flag. )', + 'bordered' => 'Shows a border around the item.', + ], + 'view' => 'collection__item.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'collection', + 'collection__item', + ], + ], + ], +]; diff --git a/source/php/Component/Comment/comment.json b/source/php/Component/Comment/comment.json deleted file mode 100644 index 371df566..00000000 --- a/source/php/Component/Comment/comment.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "slug": "comment", - "default": { - "author": "", - "author_url": "", - "author_image": "", - "text": "", - "icon": "", - "bubble_color": "dark", - "date": "01/02/2019", - "date_suffix": "ago", - "dateLabels": [], - "dateLabelsPlural": [], - "componentElement": "div", - "is_reply": false, - "filterHtml": false, - "allowedTags": "" - }, - "description": { - "author": "Name of the commenter", - "author_url": "URL to the profile of the author", - "author_image": "A link to an image", - "text": "Content of the comment", - "icon": "Which icon to show", - "bubble_color": "Color for comment bubble background: light or dark", - "date": "The date when the comment was posted", - "date_suffix": "Time elapsed 'since' ", - "dateLabels": "Array containing translations valid keys: year, month, week, day, hour, minute, second", - "dateLabelsPlural": "Array containing translations valid keys: year, month, week, day, hour, minute, second", - "componentElement": "Element of the component", - "is_reply": "If true the comment will be displayed as a reply", - "filterHtml": "If set to true the comment will be filtered from html tags", - "allowedTags": "Which tags should be excluded from filtration" - }, - "types": { - "author": "string", - "author_url": "string", - "author_image": "string", - "text": "string", - "icon": "string", - "bubble_color": "string", - "date": "string", - "date_suffix": "string", - "dateLabels": "array", - "dateLabelsPlural": "array", - "componentElement": "string", - "is_reply": "boolean", - "filterHtml": "boolean", - "allowedTags": "string", - "actions": "object" - }, - "view": "comment.blade.php", - "dependency": { - "sass": { - "components": [ - "comment", - "avatar", - "typography", - "link" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Comment/commentConfig.php b/source/php/Component/Comment/commentConfig.php new file mode 100644 index 00000000..691d352f --- /dev/null +++ b/source/php/Component/Comment/commentConfig.php @@ -0,0 +1,65 @@ + 'comment', + 'default' => (object) [ + 'author' => '', + 'author_url' => '', + 'author_image' => '', + 'text' => '', + 'icon' => '', + 'bubble_color' => 'dark', + 'date' => '01/02/2019', + 'date_suffix' => 'ago', + 'dateLabels' => [], + 'dateLabelsPlural' => [], + 'componentElement' => 'div', + 'is_reply' => false, + 'filterHtml' => false, + 'allowedTags' => '', + ], + 'description' => [ + 'author' => 'Name of the commenter', + 'author_url' => 'URL to the profile of the author', + 'author_image' => 'A link to an image', + 'text' => 'Content of the comment', + 'icon' => 'Which icon to show', + 'bubble_color' => 'Color for comment bubble background: light or dark', + 'date' => 'The date when the comment was posted', + 'date_suffix' => 'Time elapsed \'since\' ', + 'dateLabels' => 'Array containing translations valid keys: year, month, week, day, hour, minute, second', + 'dateLabelsPlural' => 'Array containing translations valid keys: year, month, week, day, hour, minute, second', + 'componentElement' => 'Element of the component', + 'is_reply' => 'If true the comment will be displayed as a reply', + 'filterHtml' => 'If set to true the comment will be filtered from html tags', + 'allowedTags' => 'Which tags should be excluded from filtration', + ], + 'types' => [ + 'author' => 'string', + 'author_url' => 'string', + 'author_image' => 'string', + 'text' => 'string', + 'icon' => 'string', + 'bubble_color' => 'string', + 'date' => 'string', + 'date_suffix' => 'string', + 'dateLabels' => 'array', + 'dateLabelsPlural' => 'array', + 'componentElement' => 'string', + 'is_reply' => 'boolean', + 'filterHtml' => 'boolean', + 'allowedTags' => 'string', + 'actions' => 'object', + ], + 'view' => 'comment.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'comment', + 'avatar', + 'typography', + 'link', + ], + ], + ], +]; diff --git a/source/php/Component/Date/date.json b/source/php/Component/Date/date.json deleted file mode 100644 index 59fcabc0..00000000 --- a/source/php/Component/Date/date.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "slug": "date", - "default": { - "timestamp": "", - "time_since": false, - "time_since_cap": "6 months", - "format": null, - "region": "en_US", - "timezone": "UTC", - "action": "formatDate", - "labels": [], - "labelsPlural": [], - "timeSinceSuffix": "ago", - "nowLabel": "just now", - "timeNowCap": 60 - }, - "description": { - "timestamp": "The date, in date string format or in unix timestamp format.", - "time_since": "Will return the date since.", - "time_since_cap": "How long back to spell out time since", - "format": "Present date's in this format. Default: D d M Y", - "region": "Region for the date", - "timezone": "Timezone for the date", - "action": "What to do with the inputted date: formatDate, timesince, timeuntil. Can be false to just output the timestamp.", - "labels": "Array containing translations valid keys: year, month, week, day, hour, minute, second", - "labelsPlural": "Array containing translations valid keys: year, month, week, day, hour, minute, second", - "timeSinceSuffix": "Suffix for the time since label", - "nowLabel": "What to show when the date is considered to be in the present", - "timeNowCap": "How many seconds back to show 'nowLabel'" - }, - "types": { - "timestamp": "string|integer", - "time_since": "boolean", - "time_since_cap": "string", - "format": "string", - "region": "string", - "timezone": "string", - "action": "string|boolean", - "labels": "object|array", - "labelsPlural": "object|array", - "timeSinceSuffix": "string", - "nowLabel": "string", - "timeNowCap": "integer" - }, - "view": "date.blade.php", - "dependency": { - "sass": { - "components": [ - "date" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Date/dateConfig.php b/source/php/Component/Date/dateConfig.php new file mode 100644 index 00000000..4b687468 --- /dev/null +++ b/source/php/Component/Date/dateConfig.php @@ -0,0 +1,55 @@ + 'date', + 'default' => (object) [ + 'timestamp' => '', + 'time_since' => false, + 'time_since_cap' => '6 months', + 'format' => null, + 'region' => 'en_US', + 'timezone' => 'UTC', + 'action' => 'formatDate', + 'labels' => [], + 'labelsPlural' => [], + 'timeSinceSuffix' => 'ago', + 'nowLabel' => 'just now', + 'timeNowCap' => 60, + ], + 'description' => [ + 'timestamp' => 'The date, in date string format or in unix timestamp format.', + 'time_since' => 'Will return the date since.', + 'time_since_cap' => 'How long back to spell out time since', + 'format' => 'Present date\'s in this format. Default: D d M Y', + 'region' => 'Region for the date', + 'timezone' => 'Timezone for the date', + 'action' => 'What to do with the inputted date: formatDate, timesince, timeuntil. Can be false to just output the timestamp.', + 'labels' => 'Array containing translations valid keys: year, month, week, day, hour, minute, second', + 'labelsPlural' => 'Array containing translations valid keys: year, month, week, day, hour, minute, second', + 'timeSinceSuffix' => 'Suffix for the time since label', + 'nowLabel' => 'What to show when the date is considered to be in the present', + 'timeNowCap' => 'How many seconds back to show \'nowLabel\'', + ], + 'types' => [ + 'timestamp' => 'string|integer', + 'time_since' => 'boolean', + 'time_since_cap' => 'string', + 'format' => 'string', + 'region' => 'string', + 'timezone' => 'string', + 'action' => 'string|boolean', + 'labels' => 'object|array', + 'labelsPlural' => 'object|array', + 'timeSinceSuffix' => 'string', + 'nowLabel' => 'string', + 'timeNowCap' => 'integer', + ], + 'view' => 'date.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'date', + ], + ], + ], +]; diff --git a/source/php/Component/Datebadge/datebadge.json b/source/php/Component/Datebadge/datebadge.json deleted file mode 100644 index abf09b33..00000000 --- a/source/php/Component/Datebadge/datebadge.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "slug": "datebadge", - "default": { - "date": false, - "size": "md", - "translucent": false, - "color": "light" - }, - "description": { - "date": "A date string in any format or a unix timestamp.", - "size": "The size of the datebadge. Can be either 'sm', 'md' or 'lg'.", - "translucent": "If true, the datebadge will have a translucent background.", - "color": "The color of the datebadge. Can be either 'light', 'dark', 'primary', 'secondary'." - }, - "types": { - "date": "string|integer", - "size": "string", - "translucent": "boolean", - "color": "string" - }, - "view": "datebadge.blade.php", - "dependency": { - "sass": { - "components": [ - "typography" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Datebadge/datebadgeConfig.php b/source/php/Component/Datebadge/datebadgeConfig.php new file mode 100644 index 00000000..746255f8 --- /dev/null +++ b/source/php/Component/Datebadge/datebadgeConfig.php @@ -0,0 +1,31 @@ + 'datebadge', + 'default' => (object) [ + 'date' => false, + 'size' => 'md', + 'translucent' => false, + 'color' => 'light', + ], + 'description' => [ + 'date' => 'A date string in any format or a unix timestamp.', + 'size' => 'The size of the datebadge. Can be either \'sm\', \'md\' or \'lg\'.', + 'translucent' => 'If true, the datebadge will have a translucent background.', + 'color' => 'The color of the datebadge. Can be either \'light\', \'dark\', \'primary\', \'secondary\'.', + ], + 'types' => [ + 'date' => 'string|integer', + 'size' => 'string', + 'translucent' => 'boolean', + 'color' => 'string', + ], + 'view' => 'datebadge.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'typography', + ], + ], + ], +]; diff --git a/source/php/Component/Divider/divider.json b/source/php/Component/Divider/divider.json deleted file mode 100644 index 4e0c9a46..00000000 --- a/source/php/Component/Divider/divider.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "slug": "divider", - "default": { - "componentElement": "div", - "style": "dashed", - "size": "md", - "title": "", - "titleVariant": "h2", - "align": "center", - "frame": true, - "customFont": false - }, - "description": { - "componentElement": "The tag to use for this component.", - "style": "Either dashed, solid or dotted.", - "size": "The length of the divider. Either sm, md or lg.", - "title": "Title to be displayed in the divider.", - "align": "Alignment of text in the divider. left, center or right.", - "frame": "If set to true, the title will be wrapped in a frame.", - "customFont": "Enable if font color should be customized. Default: false" - }, - "types":{ - "componentElement": "string", - "style": "string", - "size": "string", - "title": "string", - "titleVariant": "string", - "align": "string", - "frame": "boolean", - "customFont": "boolean" - }, - "view": "dropdown.blade.php", - "dependency": { - "sass": { - "components": [ - "divider" - ] - } - } -} - - diff --git a/source/php/Component/Divider/dividerConfig.php b/source/php/Component/Divider/dividerConfig.php new file mode 100644 index 00000000..409589c1 --- /dev/null +++ b/source/php/Component/Divider/dividerConfig.php @@ -0,0 +1,42 @@ + 'divider', + 'default' => (object) [ + 'componentElement' => 'div', + 'style' => 'dashed', + 'size' => 'md', + 'title' => '', + 'titleVariant' => 'h2', + 'align' => 'center', + 'frame' => true, + 'customFont' => false, + ], + 'description' => [ + 'componentElement' => 'The tag to use for this component.', + 'style' => 'Either dashed, solid or dotted.', + 'size' => 'The length of the divider. Either sm, md or lg.', + 'title' => 'Title to be displayed in the divider.', + 'align' => 'Alignment of text in the divider. left, center or right.', + 'frame' => 'If set to true, the title will be wrapped in a frame.', + 'customFont' => 'Enable if font color should be customized. Default: false', + ], + 'types' => [ + 'componentElement' => 'string', + 'style' => 'string', + 'size' => 'string', + 'title' => 'string', + 'titleVariant' => 'string', + 'align' => 'string', + 'frame' => 'boolean', + 'customFont' => 'boolean', + ], + 'view' => 'dropdown.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'divider', + ], + ], + ], +]; diff --git a/source/php/Component/Drawer/drawer.json b/source/php/Component/Drawer/drawer.json deleted file mode 100644 index f578b34f..00000000 --- a/source/php/Component/Drawer/drawer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "slug": "drawer", - "default": { - "label": "Close", - "screenSizes": ["xs", "sm", "md", "lg", "xl"], - "toggleButtonData": [] - }, - "description": { - "label": "What to say in the label of the close drawer button.", - "screenSizes": "Show on selected screen sizes. xs,sm,md,lg,xl.", - "toggleButtonData": "The data to be passed to the toggle button. If empty no button will be rendered." - }, - "view": "drawer.blade.php", - "dependency": { - "sass": { - "components": [ - "button", - "icon", - "nav" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Drawer/drawerConfig.php b/source/php/Component/Drawer/drawerConfig.php new file mode 100644 index 00000000..1c0045c0 --- /dev/null +++ b/source/php/Component/Drawer/drawerConfig.php @@ -0,0 +1,31 @@ + 'drawer', + 'default' => (object) [ + 'label' => 'Close', + 'screenSizes' => [ + 'xs', + 'sm', + 'md', + 'lg', + 'xl', + ], + 'toggleButtonData' => [], + ], + 'description' => [ + 'label' => 'What to say in the label of the close drawer button.', + 'screenSizes' => 'Show on selected screen sizes. xs,sm,md,lg,xl.', + 'toggleButtonData' => 'The data to be passed to the toggle button. If empty no button will be rendered.', + ], + 'view' => 'drawer.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'button', + 'icon', + 'nav', + ], + ], + ], +]; diff --git a/source/php/Component/Dropdown/dropdown.json b/source/php/Component/Dropdown/dropdown.json deleted file mode 100644 index 359c0587..00000000 --- a/source/php/Component/Dropdown/dropdown.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "slug": "dropdown", - "default": { - "items": [], - "href": "#", - "componentElement": "div", - "itemElement": "a", - "direction": "bottom", - "popup": "" - }, - "description": { - "href": "Where should the button link to?", - "componentElement": "The tag to use for this component.", - "items": "An array of arrays representing each item with a name and a link.", - "direction": "The direction in which the popup-menu opens in.", - "itemElement": "The tag to use for each list item." - }, - "types":{ - "items": "array", - "href": "string", - "componentElement": "string", - "itemElement": "string", - "direction": "string", - "popup": "string" - }, - "view": "dropdown.blade.php", - "dependency": { - "sass": { - "components": [ - "dropdown" - ] - } - } -} - - diff --git a/source/php/Component/Dropdown/dropdownConfig.php b/source/php/Component/Dropdown/dropdownConfig.php new file mode 100644 index 00000000..80cae42b --- /dev/null +++ b/source/php/Component/Dropdown/dropdownConfig.php @@ -0,0 +1,36 @@ + 'dropdown', + 'default' => (object) [ + 'items' => [], + 'href' => '#', + 'componentElement' => 'div', + 'itemElement' => 'a', + 'direction' => 'bottom', + 'popup' => '', + ], + 'description' => [ + 'href' => 'Where should the button link to?', + 'componentElement' => 'The tag to use for this component.', + 'items' => 'An array of arrays representing each item with a name and a link.', + 'direction' => 'The direction in which the popup-menu opens in.', + 'itemElement' => 'The tag to use for each list item.', + ], + 'types' => [ + 'items' => 'array', + 'href' => 'string', + 'componentElement' => 'string', + 'itemElement' => 'string', + 'direction' => 'string', + 'popup' => 'string', + ], + 'view' => 'dropdown.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'dropdown', + ], + ], + ], +]; diff --git a/source/php/Component/Element/element.json b/source/php/Component/Element/element.json deleted file mode 100644 index 5985869e..00000000 --- a/source/php/Component/Element/element.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "slug": "element", - "default": { - "componentElement": "div", - "hideIfNoContent": true - }, - "description": { - "componentElement": "The tag to use for this component.", - "hideIfNoContent": "If true, the component will not be rendered if there is no content." - }, - "types":{ - "componentElement": "string", - "hideIfNoContent": "boolean" - }, - "view": "element.blade.php", - "dependency": { - "sass": { - "components": [ - "element" - ] - } - } -} diff --git a/source/php/Component/Element/elementConfig.php b/source/php/Component/Element/elementConfig.php new file mode 100644 index 00000000..6ce48f0a --- /dev/null +++ b/source/php/Component/Element/elementConfig.php @@ -0,0 +1,25 @@ + 'element', + 'default' => (object) [ + 'componentElement' => 'div', + 'hideIfNoContent' => true, + ], + 'description' => [ + 'componentElement' => 'The tag to use for this component.', + 'hideIfNoContent' => 'If true, the component will not be rendered if there is no content.', + ], + 'types' => [ + 'componentElement' => 'string', + 'hideIfNoContent' => 'boolean', + ], + 'view' => 'element.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'element', + ], + ], + ], +]; diff --git a/source/php/Component/Fab/fab.json b/source/php/Component/Fab/fab.json deleted file mode 100644 index 03c463b3..00000000 --- a/source/php/Component/Fab/fab.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "slug": "fab", - "default": { - "position": "bottom-right", - "heading": "Samlade länkar för elever och föräldrar", - "button": false, - "slot": "", - "closeLabel": false, - "closeIcon": false - }, - "description": { - "position": "Where on the screen the FAB should be positioned", - "heading": "Heading text for panel", - "button": "Settings for the button element (trigger)", - "slot": "Contents of popup panel", - "closeLabel": "The label to indicate closing action", - "closeIcon": "The icon to indicate closing action" - }, - "view": "fab.blade.php", - "dependency": { - "sass": { - "components": [ - "fab", - "button", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Fab/fabConfig.php b/source/php/Component/Fab/fabConfig.php new file mode 100644 index 00000000..200d529b --- /dev/null +++ b/source/php/Component/Fab/fabConfig.php @@ -0,0 +1,31 @@ + 'fab', + 'default' => (object) [ + 'position' => 'bottom-right', + 'heading' => 'Samlade länkar för elever och föräldrar', + 'button' => false, + 'slot' => '', + 'closeLabel' => false, + 'closeIcon' => false, + ], + 'description' => [ + 'position' => 'Where on the screen the FAB should be positioned', + 'heading' => 'Heading text for panel', + 'button' => 'Settings for the button element (trigger)', + 'slot' => 'Contents of popup panel', + 'closeLabel' => 'The label to indicate closing action', + 'closeIcon' => 'The icon to indicate closing action', + ], + 'view' => 'fab.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'fab', + 'button', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Field/field.json b/source/php/Component/Field/field.json deleted file mode 100644 index cf3d146c..00000000 --- a/source/php/Component/Field/field.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "slug": "field", - "default": { - "label": "", - "name": "", - "type": "text", - "validationRegexp": false, - "invalidMessage": false, - "required": false, - "autocomplete": "on", - "value": "", - "icon": "", - "size": "md", - "radius": "md", - "placeholder": "", - "hideLabel": false, - "helperText": "", - "multiline": false, - "borderless": false, - "shadow": false, - "fieldAttributeList": [], - "moveAttributesListToFieldAttributes": true, - "description": "" - }, - "description": { - "label": "Label for the field.", - "name": "The name of the field (html name='')", - "type": "text, checkbox and radio", - "validationRegexp": "Regular expression for validation. Will apply on non empty strings or all strings when required.", - "invalidMessage": "Message to display when the field is invalid.", - "required": "Require this field to be filled in.", - "autocomplete": "Browser automatically completes the input values based on values that the user has entered before. Reference: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-autocomplete", - "value": "Field value", - "icon": "Adds a icon before the input field (string)", - "radius": "If any special type of rounded corners should be used (none, xs, sm, md, lg)", - "placeholder": "Example value for field", - "hideLabel": "This will remove the visible label. Label will be auditible for screen readers.", - "helperText": "Text displayed below the field.", - "multiline": "Render textarea instead of input. Boolean or number of rows to render.", - "borderless": "Removes the border around the input field", - "shadow": "If the current theme applies shadows to element, append shadow here too.", - "fieldAttributeList": "Attributes for field element. Valid input attributes are casted to here from attributesList.", - "moveAttributesListToFieldAttributes": "If we should move attributesList to fieldAttributeList automatically", - "description": "Description for the field." - }, - "view": "field.blade.php", - "dependency": { - "sass": { - "components": [ - "fields", - "icon" - ] - } - } -} diff --git a/source/php/Component/Field/fieldConfig.php b/source/php/Component/Field/fieldConfig.php new file mode 100644 index 00000000..f533967d --- /dev/null +++ b/source/php/Component/Field/fieldConfig.php @@ -0,0 +1,57 @@ + 'field', + 'default' => (object) [ + 'label' => '', + 'name' => '', + 'type' => 'text', + 'validationRegexp' => false, + 'invalidMessage' => false, + 'required' => false, + 'autocomplete' => 'on', + 'value' => '', + 'icon' => '', + 'size' => 'md', + 'radius' => 'md', + 'placeholder' => '', + 'hideLabel' => false, + 'helperText' => '', + 'multiline' => false, + 'borderless' => false, + 'shadow' => false, + 'fieldAttributeList' => [], + 'moveAttributesListToFieldAttributes' => true, + 'description' => '', + ], + 'description' => [ + 'label' => 'Label for the field.', + 'name' => 'The name of the field (html name=\'\')', + 'type' => 'text, checkbox and radio', + 'validationRegexp' => 'Regular expression for validation. Will apply on non empty strings or all strings when required.', + 'invalidMessage' => 'Message to display when the field is invalid.', + 'required' => 'Require this field to be filled in.', + 'autocomplete' => 'Browser automatically completes the input values based on values that the user has entered before. Reference: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-autocomplete', + 'value' => 'Field value', + 'icon' => 'Adds a icon before the input field (string)', + 'radius' => 'If any special type of rounded corners should be used (none, xs, sm, md, lg)', + 'placeholder' => 'Example value for field', + 'hideLabel' => 'This will remove the visible label. Label will be auditible for screen readers.', + 'helperText' => 'Text displayed below the field.', + 'multiline' => 'Render textarea instead of input. Boolean or number of rows to render.', + 'borderless' => 'Removes the border around the input field', + 'shadow' => 'If the current theme applies shadows to element, append shadow here too.', + 'fieldAttributeList' => 'Attributes for field element. Valid input attributes are casted to here from attributesList.', + 'moveAttributesListToFieldAttributes' => 'If we should move attributesList to fieldAttributeList automatically', + 'description' => 'Description for the field.', + ], + 'view' => 'field.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'fields', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Fileinput/FileinputTest.php b/source/php/Component/Fileinput/FileinputTest.php index ad098ccc..e63f03ad 100644 --- a/source/php/Component/Fileinput/FileinputTest.php +++ b/source/php/Component/Fileinput/FileinputTest.php @@ -84,9 +84,8 @@ public function testThrowsErrorIfMinNumberIsNotAnInteger() private static function getData(array $merge = []): array { - $jsonFile = __DIR__ . '/fileinput.json'; - $decodedJson = json_decode(file_get_contents($jsonFile), true); - $defaultData = $decodedJson['default'] ?? []; + $config = require __DIR__ . '/fileinputConfig.php'; + $defaultData = (array) ($config['default'] ?? []); return array_merge($defaultData, $merge); } diff --git a/source/php/Component/Fileinput/fileinput.json b/source/php/Component/Fileinput/fileinput.json deleted file mode 100644 index ac8b233e..00000000 --- a/source/php/Component/Fileinput/fileinput.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "slug": "fileinput", - "default": { - "description": "", - "name": "files", - "accept": "audio/*,video/*,image/*", - "multiple": false, - "preview": false, - "maxSize": null, - "uploadErrorMessage": null, - "uploadErrorMessageMinFiles": null, - "icon": "file_upload", - "required": false, - "filesMax": 1, - "filesMin": 0, - "label": "", - "buttonLabel": "Select file", - "buttonRemoveLabel": "Remove file", - "buttonDropLabel": "Drop files here", - "allowedFileTypesLabel": "Allowed files: ", - "fileTypeVideosLabel": "Videos", - "fileTypeImagesLabel": "Images", - "fileTypeAudioLabel": "Audios", - "maximumSizeLabel": "Maximum size" - }, - "description": { - "description": "Additional description or instructions.", - "name": "files", - "accept": "What file types to accept. Use MIME types. Example: audio/*,video/*,image/*", - "multiple": "Allow single or multiple files", - "uploadErrorMessage": "Message to show when upload fails", - "uploadErrorMessageMinFiles": "Message to show when minimum number of files is not met", - "icon": "@link:component/icon", - "required": "If field is required", - "filesMax": "Maximum number of files (int). Foced to 1 if multiple is false. Default 10 for multiple.", - "filesMin": "Minimum number of files (int). Default is 0.", - "buttonDropLabel": "A label for the drop area", - "maxSize": "Maximum file size allowed in MB. Number (int) in bytes or string (small, medium, large). Default is null (no limit).", - "label": "Label to show on the field", - "buttonLabel": "What text to show on the button", - "buttonRemoveLabel": "What text to show on the remove button", - "allowedFileTypesLabel": "Label for allowed file types", - "fileTypeVideosLabel": "Label for video file types", - "fileTypeImagesLabel": "Label for image file types", - "fileTypeAudioLabel": "Label for audio file types", - "maximumSizeLabel": "Maximum size" - }, - "types": { - "description": "string", - "name": "string", - "accept": "string", - "multiple": "boolean", - "uploadErrorMessage": "string", - "uploadErrorMessageMinFiles": "string", - "icon": "string", - "required": "boolean", - "filesMax": "integer", - "filesMin": "integer", - "preview": "boolean", - "maxSize": "string|int", - "label": "string", - "buttonLabel": "string", - "buttonRemoveLabel": "string", - "buttonDropLabel": "string", - "allowedFileTypesLabel": "string", - "fileTypeVideosLabel": "string", - "fileTypeImagesLabel": "string", - "fileTypeAudioLabel": "string", - "maximumSizeLabel": "string" - - }, - "view": "fileinput.blade.php", - "dependency": { - "sass": { - "components": [ - "fileInput", - "icon", - "button" - ] - } - } -} diff --git a/source/php/Component/Fileinput/fileinputConfig.php b/source/php/Component/Fileinput/fileinputConfig.php new file mode 100644 index 00000000..a7db6c2b --- /dev/null +++ b/source/php/Component/Fileinput/fileinputConfig.php @@ -0,0 +1,83 @@ + 'fileinput', + 'default' => (object) [ + 'description' => '', + 'name' => 'files', + 'accept' => 'audio/*,video/*,image/*', + 'multiple' => false, + 'preview' => false, + 'maxSize' => null, + 'uploadErrorMessage' => null, + 'uploadErrorMessageMinFiles' => null, + 'icon' => 'file_upload', + 'required' => false, + 'filesMax' => 1, + 'filesMin' => 0, + 'label' => '', + 'buttonLabel' => 'Select file', + 'buttonRemoveLabel' => 'Remove file', + 'buttonDropLabel' => 'Drop files here', + 'allowedFileTypesLabel' => 'Allowed files: ', + 'fileTypeVideosLabel' => 'Videos', + 'fileTypeImagesLabel' => 'Images', + 'fileTypeAudioLabel' => 'Audios', + 'maximumSizeLabel' => 'Maximum size', + ], + 'description' => [ + 'description' => 'Additional description or instructions.', + 'name' => 'files', + 'accept' => 'What file types to accept. Use MIME types. Example: audio/*,video/*,image/*', + 'multiple' => 'Allow single or multiple files', + 'uploadErrorMessage' => 'Message to show when upload fails', + 'uploadErrorMessageMinFiles' => 'Message to show when minimum number of files is not met', + 'icon' => '@link:component/icon', + 'required' => 'If field is required', + 'filesMax' => 'Maximum number of files (int). Foced to 1 if multiple is false. Default 10 for multiple.', + 'filesMin' => 'Minimum number of files (int). Default is 0.', + 'buttonDropLabel' => 'A label for the drop area', + 'maxSize' => 'Maximum file size allowed in MB. Number (int) in bytes or string (small, medium, large). Default is null (no limit).', + 'label' => 'Label to show on the field', + 'buttonLabel' => 'What text to show on the button', + 'buttonRemoveLabel' => 'What text to show on the remove button', + 'allowedFileTypesLabel' => 'Label for allowed file types', + 'fileTypeVideosLabel' => 'Label for video file types', + 'fileTypeImagesLabel' => 'Label for image file types', + 'fileTypeAudioLabel' => 'Label for audio file types', + 'maximumSizeLabel' => 'Maximum size', + ], + 'types' => [ + 'description' => 'string', + 'name' => 'string', + 'accept' => 'string', + 'multiple' => 'boolean', + 'uploadErrorMessage' => 'string', + 'uploadErrorMessageMinFiles' => 'string', + 'icon' => 'string', + 'required' => 'boolean', + 'filesMax' => 'integer', + 'filesMin' => 'integer', + 'preview' => 'boolean', + 'maxSize' => 'string|int', + 'label' => 'string', + 'buttonLabel' => 'string', + 'buttonRemoveLabel' => 'string', + 'buttonDropLabel' => 'string', + 'allowedFileTypesLabel' => 'string', + 'fileTypeVideosLabel' => 'string', + 'fileTypeImagesLabel' => 'string', + 'fileTypeAudioLabel' => 'string', + 'maximumSizeLabel' => 'string', + ], + 'view' => 'fileinput.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'fileInput', + 'icon', + 'button', + ], + ], + ], +]; diff --git a/source/php/Component/Footer/footer.json b/source/php/Component/Footer/footer.json deleted file mode 100644 index 74759829..00000000 --- a/source/php/Component/Footer/footer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "slug": "footer", - "default": { - "componentElement": "footer", - "slotOnly": false, - "id": null, - "logotype": "/", - "logotypeHref": "", - "links": [], - "subfooterLogotype": "", - "prefooter": null, - "postfooter": null, - "footerareas": null - }, - "descriptions": { - "componentElement": "The element tag to render", - "slotOnly": "Set to true will enable only slot area", - "id" : "Custom container id", - "logotype": "Footer logotype url.", - "logotypeHref": "The url to link the logotype to.", - "subfooterLogotype": "Subfooter logotype url.", - "prefooter": "Arbitrary HTML placed before the main footer content. Wrapped in container and 12col grid.", - "postfooter": "Arbitrary HTML placed after the main footer content. Wrapped in container and 12col grid.", - "footerareas": "Arbitrary HTML content. Wrapped in container and 12col grid." - }, - "types": { - "componentElement": "string", - "slotOnly": "boolean", - "id": "string", - "logotype": "string", - "logotypeHref": "string", - "links": "array", - "subfooterLogotype": "string", - "prefooter": "string", - "postfooter": "string", - "footerareas": "string" - }, - "view": "footer.blade.php", - "dependency": { - "sass": { - "components": [ - "footer", - "typography" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Footer/footerConfig.php b/source/php/Component/Footer/footerConfig.php new file mode 100644 index 00000000..b7db3139 --- /dev/null +++ b/source/php/Component/Footer/footerConfig.php @@ -0,0 +1,49 @@ + 'footer', + 'default' => (object) [ + 'componentElement' => 'footer', + 'slotOnly' => false, + 'id' => null, + 'logotype' => '/', + 'logotypeHref' => '', + 'links' => [], + 'subfooterLogotype' => '', + 'prefooter' => null, + 'postfooter' => null, + 'footerareas' => null, + ], + 'descriptions' => [ + 'componentElement' => 'The element tag to render', + 'slotOnly' => 'Set to true will enable only slot area', + 'id' => 'Custom container id', + 'logotype' => 'Footer logotype url.', + 'logotypeHref' => 'The url to link the logotype to.', + 'subfooterLogotype' => 'Subfooter logotype url.', + 'prefooter' => 'Arbitrary HTML placed before the main footer content. Wrapped in container and 12col grid.', + 'postfooter' => 'Arbitrary HTML placed after the main footer content. Wrapped in container and 12col grid.', + 'footerareas' => 'Arbitrary HTML content. Wrapped in container and 12col grid.', + ], + 'types' => [ + 'componentElement' => 'string', + 'slotOnly' => 'boolean', + 'id' => 'string', + 'logotype' => 'string', + 'logotypeHref' => 'string', + 'links' => 'array', + 'subfooterLogotype' => 'string', + 'prefooter' => 'string', + 'postfooter' => 'string', + 'footerareas' => 'string', + ], + 'view' => 'footer.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'footer', + 'typography', + ], + ], + ], +]; diff --git a/source/php/Component/Form/form.json b/source/php/Component/Form/form.json deleted file mode 100644 index 9c448c05..00000000 --- a/source/php/Component/Form/form.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "slug":"form", - "default":{ - "method":"POST", - "action": "#", - "validation": true, - "errorMessage": "", - "validateMessage": "" - }, - "description":{ - "method":"Set to POST by default", - "action":"Path to file, set to # by default", - "validation":"Validation method toggle on off", - "errorMessage": "If filled: Gives a general error message when form is invalid", - "validateMessage": "If filled: Gives a general success message when form is valid" - }, - "view":"form.blade.php", - "dependency": { - "sass": { - "components": [ - "form", - "notice" - ] - } - } - } \ No newline at end of file diff --git a/source/php/Component/Form/formConfig.php b/source/php/Component/Form/formConfig.php new file mode 100644 index 00000000..8f268af7 --- /dev/null +++ b/source/php/Component/Form/formConfig.php @@ -0,0 +1,28 @@ + 'form', + 'default' => (object) [ + 'method' => 'POST', + 'action' => '#', + 'validation' => true, + 'errorMessage' => '', + 'validateMessage' => '', + ], + 'description' => [ + 'method' => 'Set to POST by default', + 'action' => 'Path to file, set to # by default', + 'validation' => 'Validation method toggle on off', + 'errorMessage' => 'If filled: Gives a general error message when form is invalid', + 'validateMessage' => 'If filled: Gives a general success message when form is valid', + ], + 'view' => 'form.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'form', + 'notice', + ], + ], + ], +]; diff --git a/source/php/Component/Gallery/gallery.json b/source/php/Component/Gallery/gallery.json deleted file mode 100644 index c177c034..00000000 --- a/source/php/Component/Gallery/gallery.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "slug": "gallery", - "default": { - "list": [], - "ariaLabels": {} - }, - "description": { - "list": "Array with following keys: largeImage, smallImage, caption and alt", - "ariaLabels": "Object with following keys: prev, next" - }, - "types": { - "list": "array", - "ariaLabels": "object" - }, - "view": "gallery.blade.php", - "dependency": { - "sass": { - "components": [ - "gallery", - "modal", - "image", - "button", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Gallery/galleryConfig.php b/source/php/Component/Gallery/galleryConfig.php new file mode 100644 index 00000000..07f47db0 --- /dev/null +++ b/source/php/Component/Gallery/galleryConfig.php @@ -0,0 +1,29 @@ + 'gallery', + 'default' => (object) [ + 'list' => [], + 'ariaLabels' => [], + ], + 'description' => [ + 'list' => 'Array with following keys: largeImage, smallImage, caption and alt', + 'ariaLabels' => 'Object with following keys: prev, next', + ], + 'types' => [ + 'list' => 'array', + 'ariaLabels' => 'object', + ], + 'view' => 'gallery.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'gallery', + 'modal', + 'image', + 'button', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Group/group.json b/source/php/Component/Group/group.json deleted file mode 100644 index 9ee9ba1d..00000000 --- a/source/php/Component/Group/group.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "slug": "group", - "default": { - "direction": "horizontal", - "jusitifyContent": "", - "alignItems": "", - "alignContent": "", - "display": "", - "wrap": "", - "flexGrow": false, - "flexShrink": true, - "gap": "", - "fluidGrid": null, - "columns": null - }, - "description": { - "direction": "What direction to group (horizontal or vertical)", - "jusitifyContent": "Justify the content to either position (ex. left, center, right)", - "alignItems": "Alignment of the content items (ex. center)", - "alignContent": "Alignment of the content (ex. end)", - "flex": "Type of flex (ex. inline-flex)", - "wrap": "Wrap the content (ex. nowrap, wrap, wrap-reverse)", - "flexGrow": "Allow to grow the content within the group", - "flexShrink": "Allow to shrink the content within the group", - "gap": "A number between 1-10 that sets the gap between flexed elements.", - "fluidGrid": "Uses flexbox and media queries to determine amount of items per row. Can be a number between 1-4 which will determine the maximum amount of items per row.", - "columns": "Number of items per row. (number between 1-12)" - }, - "view": "group.blade.php", - "dependency": { - "sass": { - "components": [ - "group" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Group/groupConfig.php b/source/php/Component/Group/groupConfig.php new file mode 100644 index 00000000..f58f5165 --- /dev/null +++ b/source/php/Component/Group/groupConfig.php @@ -0,0 +1,39 @@ + 'group', + 'default' => (object) [ + 'direction' => 'horizontal', + 'jusitifyContent' => '', + 'alignItems' => '', + 'alignContent' => '', + 'display' => '', + 'wrap' => '', + 'flexGrow' => false, + 'flexShrink' => true, + 'gap' => '', + 'fluidGrid' => null, + 'columns' => null, + ], + 'description' => [ + 'direction' => 'What direction to group (horizontal or vertical)', + 'jusitifyContent' => 'Justify the content to either position (ex. left, center, right)', + 'alignItems' => 'Alignment of the content items (ex. center)', + 'alignContent' => 'Alignment of the content (ex. end)', + 'flex' => 'Type of flex (ex. inline-flex)', + 'wrap' => 'Wrap the content (ex. nowrap, wrap, wrap-reverse)', + 'flexGrow' => 'Allow to grow the content within the group', + 'flexShrink' => 'Allow to shrink the content within the group', + 'gap' => 'A number between 1-10 that sets the gap between flexed elements.', + 'fluidGrid' => 'Uses flexbox and media queries to determine amount of items per row. Can be a number between 1-4 which will determine the maximum amount of items per row.', + 'columns' => 'Number of items per row. (number between 1-12)', + ], + 'view' => 'group.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'group', + ], + ], + ], +]; diff --git a/source/php/Component/Header/header.json b/source/php/Component/Header/header.json deleted file mode 100644 index 622ff50e..00000000 --- a/source/php/Component/Header/header.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "slug": "header", - "default": { - "componentElement": "header", - "id": null, - "textColor": false, - "backgroundColor": false, - "sticky": false - }, - "descriptions": { - "componentElement": "The element tag to render", - "logotypeHref": "The url to link the logotype to.", - "id" : "Custom container id", - "textColor": "Color name of the text", - "backgroundColor": "Color name of the background", - "sticky": "Stick to top when scrolling" - }, - "view": "header.blade.php", - "dependency": { - "sass": { - "components": [ - "header" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Header/headerConfig.php b/source/php/Component/Header/headerConfig.php new file mode 100644 index 00000000..f2cf4dd3 --- /dev/null +++ b/source/php/Component/Header/headerConfig.php @@ -0,0 +1,28 @@ + 'header', + 'default' => (object) [ + 'componentElement' => 'header', + 'id' => null, + 'textColor' => false, + 'backgroundColor' => false, + 'sticky' => false, + ], + 'descriptions' => [ + 'componentElement' => 'The element tag to render', + 'logotypeHref' => 'The url to link the logotype to.', + 'id' => 'Custom container id', + 'textColor' => 'Color name of the text', + 'backgroundColor' => 'Color name of the background', + 'sticky' => 'Stick to top when scrolling', + ], + 'view' => 'header.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'header', + ], + ], + ], +]; diff --git a/source/php/Component/Hero/HeroTest.php b/source/php/Component/Hero/HeroTest.php index a54b9933..7a71ab78 100644 --- a/source/php/Component/Hero/HeroTest.php +++ b/source/php/Component/Hero/HeroTest.php @@ -55,9 +55,8 @@ public function hasContentProvider() { private function getComponentData(array $data) { - $jsonFile = file_get_contents('source/php/Component/Hero/hero.json', true); - $json = json_decode($jsonFile, true); - $default = $json['default']; + $config = require 'source/php/Component/Hero/heroConfig.php'; + $default = (array) $config['default']; return array_merge($default, $data); } } diff --git a/source/php/Component/Hero/hero.json b/source/php/Component/Hero/hero.json deleted file mode 100644 index a8848890..00000000 --- a/source/php/Component/Hero/hero.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "slug": "hero", - "default": { - "image": false, - "imageFocus": {"top": 30, "left": 50}, - "video": false, - "size": "normal", - "title": "", - "byline": "", - "paragraph": "", - "stretch": false, - "animation": false, - "ariaLabel": "Hero", - "heroView": "default", - "customHeroData": false, - "meta": false, - "background": false, - "textColor": "", - "textAlignment": "left", - "contentBackgroundColor": "", - "contentAlignmentVertical": "bottom", - "contentAlignmentHorizontal": "left", - "contentApplyRoundedCorners": true, - "contentApplyShadows": true, - "buttonArgs": [], - "poster": false, - "overlay": "", - "content": false - }, - "description": { - "image": "Background image", - "imageFocus": "Where to focus in the background.", - "video": "Display a video as a background. This option will replace image.", - "size": "Ratio (normal, large)", - "title": "The title text", - "byline": "The byline text", - "meta": "The meta text", - "paragraph": "The body text.", - "stretch": "Always stretch the hero vertically. Makes the hero the width of the viewport. Requires a centered container.", - "animation": "Name of the animation", - "ariaLabel": "Label provided for accessibility tools such as screen readers", - "heroView": "Select which view to display", - "customHeroData": "An array containing the custom data for the selected view (heroView).", - "background": "Image or a color", - "textColor": "The color of the text.", - "textAlignment": "Alignment texts. Supports \"left\", \"center\" and \"right\".", - "contentBackgroundColor": "The background color for texts in the content area.", - "contentAlignmentVertical": "Vertical placement of the content: top|center|bottom.", - "contentAlignmentHoriontal": "Horizontal placement of the content: left|center|right.", - "contentApplyRoundedCorners": "Apply rounded corners to content if contentBackgroundColor is set.", - "contentApplyShadows": "Apply shadows to content if contentBackgroundColor is set.", - "buttonArgs": "Add a @button by passing @button component arguments. If button is treated as a link, all te text elements in the content gets wrapped with this link.", - "poster": "Poster image for the video", - "overlay": "Add an overlay over an image to make text more legible", - "content": "Content slot to be displayed in the hero" - }, - "types": { - "image": "string|ImageInterface", - "imageFocus": "object", - "video": "string", - "size": "string", - "title": "string", - "byline": "string", - "paragraph": "string", - "stretch": "boolean", - "animation": "string", - "ariaLabel": "string", - "heroView": "string", - "customHeroData": "array", - "meta": "string", - "background": "string", - "textColor": "string", - "textAlignment": "string", - "contentBackgroundColor": "string", - "contentAlignmentVertical": "string", - "contentAlignmentHorizontal": "string", - "contentApplyRoundedCorners": "boolean", - "contentApplyShadows": "boolean", - "buttonArgs": "array", - "poster": "boolean", - "overlay": "string", - "content": "string|boolean" - }, - "view": "hero.blade.php", - "dependency": { - "sass": { - "components": [ - "hero", - "typography", - "group", - "image" - ] - } - } -} diff --git a/source/php/Component/Hero/heroConfig.php b/source/php/Component/Hero/heroConfig.php new file mode 100644 index 00000000..0ba883a5 --- /dev/null +++ b/source/php/Component/Hero/heroConfig.php @@ -0,0 +1,100 @@ + 'hero', + 'default' => (object) [ + 'image' => false, + 'imageFocus' => (object) [ + 'top' => 30, + 'left' => 50, + ], + 'video' => false, + 'size' => 'normal', + 'title' => '', + 'byline' => '', + 'paragraph' => '', + 'stretch' => false, + 'animation' => false, + 'ariaLabel' => 'Hero', + 'heroView' => 'default', + 'customHeroData' => false, + 'meta' => false, + 'background' => false, + 'textColor' => '', + 'textAlignment' => 'left', + 'contentBackgroundColor' => '', + 'contentAlignmentVertical' => 'bottom', + 'contentAlignmentHorizontal' => 'left', + 'contentApplyRoundedCorners' => true, + 'contentApplyShadows' => true, + 'buttonArgs' => [], + 'poster' => false, + 'overlay' => '', + 'content' => false, + ], + 'description' => [ + 'image' => 'Background image', + 'imageFocus' => 'Where to focus in the background.', + 'video' => 'Display a video as a background. This option will replace image.', + 'size' => 'Ratio (normal, large)', + 'title' => 'The title text', + 'byline' => 'The byline text', + 'meta' => 'The meta text', + 'paragraph' => 'The body text.', + 'stretch' => 'Always stretch the hero vertically. Makes the hero the width of the viewport. Requires a centered container.', + 'animation' => 'Name of the animation', + 'ariaLabel' => 'Label provided for accessibility tools such as screen readers', + 'heroView' => 'Select which view to display', + 'customHeroData' => 'An array containing the custom data for the selected view (heroView).', + 'background' => 'Image or a color', + 'textColor' => 'The color of the text.', + 'textAlignment' => 'Alignment texts. Supports "left", "center" and "right".', + 'contentBackgroundColor' => 'The background color for texts in the content area.', + 'contentAlignmentVertical' => 'Vertical placement of the content: top|center|bottom.', + 'contentAlignmentHoriontal' => 'Horizontal placement of the content: left|center|right.', + 'contentApplyRoundedCorners' => 'Apply rounded corners to content if contentBackgroundColor is set.', + 'contentApplyShadows' => 'Apply shadows to content if contentBackgroundColor is set.', + 'buttonArgs' => 'Add a @button by passing @button component arguments. If button is treated as a link, all te text elements in the content gets wrapped with this link.', + 'poster' => 'Poster image for the video', + 'overlay' => 'Add an overlay over an image to make text more legible', + 'content' => 'Content slot to be displayed in the hero', + ], + 'types' => [ + 'image' => 'string|ImageInterface', + 'imageFocus' => 'object', + 'video' => 'string', + 'size' => 'string', + 'title' => 'string', + 'byline' => 'string', + 'paragraph' => 'string', + 'stretch' => 'boolean', + 'animation' => 'string', + 'ariaLabel' => 'string', + 'heroView' => 'string', + 'customHeroData' => 'array', + 'meta' => 'string', + 'background' => 'string', + 'textColor' => 'string', + 'textAlignment' => 'string', + 'contentBackgroundColor' => 'string', + 'contentAlignmentVertical' => 'string', + 'contentAlignmentHorizontal' => 'string', + 'contentApplyRoundedCorners' => 'boolean', + 'contentApplyShadows' => 'boolean', + 'buttonArgs' => 'array', + 'poster' => 'boolean', + 'overlay' => 'string', + 'content' => 'string|boolean', + ], + 'view' => 'hero.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'hero', + 'typography', + 'group', + 'image', + ], + ], + ], +]; diff --git a/source/php/Component/Icon/icon.json b/source/php/Component/Icon/icon.json deleted file mode 100644 index 29792691..00000000 --- a/source/php/Component/Icon/icon.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "slug": "icon", - "default": { - "size": "inherit", - "label": "", - "icon": "", - "color": "", - "customColor": "", - "componentElement": "span", - "filled": null, - "decorative": false - }, - "description": { - "size": "Sizes: xs, sm, md, lg, xl, xxl", - "label": "A label on the icon", - "icon": "The icon name or a url to a svg file", - "color": "The color of the icon", - "customColor": "A custom HEX color", - "componentElement": "Icon HTML tag", - "filled": "If the icons should be filled or not", - "decorative": "If the icon is decorative only or serves a purpose." - }, - "types": { - "size": "string", - "label": "string", - "icon": "string", - "color": "string", - "customColor": "string", - "componentElement": "string", - "filled": "boolean", - "isSvg": "boolean", - "decorative": "boolean" - }, - "view": "icon.blade.php", - "dependency": { - "sass": { - "components": [ - "icon" - ] - } - } -} - diff --git a/source/php/Component/Icon/iconConfig.php b/source/php/Component/Icon/iconConfig.php new file mode 100644 index 00000000..700bb4d9 --- /dev/null +++ b/source/php/Component/Icon/iconConfig.php @@ -0,0 +1,44 @@ + 'icon', + 'default' => (object) [ + 'size' => 'inherit', + 'label' => '', + 'icon' => '', + 'color' => '', + 'customColor' => '', + 'componentElement' => 'span', + 'filled' => null, + 'decorative' => false, + ], + 'description' => [ + 'size' => 'Sizes: xs, sm, md, lg, xl, xxl', + 'label' => 'A label on the icon', + 'icon' => 'The icon name or a url to a svg file', + 'color' => 'The color of the icon', + 'customColor' => 'A custom HEX color', + 'componentElement' => 'Icon HTML tag', + 'filled' => 'If the icons should be filled or not', + 'decorative' => 'If the icon is decorative only or serves a purpose.', + ], + 'types' => [ + 'size' => 'string', + 'label' => 'string', + 'icon' => 'string', + 'color' => 'string', + 'customColor' => 'string', + 'componentElement' => 'string', + 'filled' => 'boolean', + 'isSvg' => 'boolean', + 'decorative' => 'boolean', + ], + 'view' => 'icon.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/IconSection/iconSection.json b/source/php/Component/IconSection/iconSection.json deleted file mode 100644 index 1863c5ff..00000000 --- a/source/php/Component/IconSection/iconSection.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "slug": "iconSection", - "default": { - "gap": 0 - }, - "description": { - "gap": "The gap between the items in the icon section. Number between 0-12" - }, - "types": { - "gap": "number" - }, - "view": "iconSection.blade.php", - "dependency": { - "sass": { - "components": [ - "element" - ] - } - } -} diff --git a/source/php/Component/IconSection/iconSectionConfig.php b/source/php/Component/IconSection/iconSectionConfig.php new file mode 100644 index 00000000..fa7d0a34 --- /dev/null +++ b/source/php/Component/IconSection/iconSectionConfig.php @@ -0,0 +1,22 @@ + 'iconSection', + 'default' => (object) [ + 'gap' => 0, + ], + 'description' => [ + 'gap' => 'The gap between the items in the icon section. Number between 0-12', + ], + 'types' => [ + 'gap' => 'number', + ], + 'view' => 'iconSection.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'element', + ], + ], + ], +]; diff --git a/source/php/Component/IconSection__item/iconSection__item.json b/source/php/Component/IconSection__item/iconSection__item.json deleted file mode 100644 index 310d87b0..00000000 --- a/source/php/Component/IconSection__item/iconSection__item.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "slug": "iconSection__item", - "default": { - "icon": null - }, - "description": { - "icon": "An array with the same specification as the icon component" - }, - "types": { - "icon": "array" - }, - "view": "iconSection__item.blade.php", - "dependency": { - "sass": { - "components": [ - "element", - "icon" - ] - } - } -} diff --git a/source/php/Component/IconSection__item/iconSection__itemConfig.php b/source/php/Component/IconSection__item/iconSection__itemConfig.php new file mode 100644 index 00000000..a5082a3a --- /dev/null +++ b/source/php/Component/IconSection__item/iconSection__itemConfig.php @@ -0,0 +1,23 @@ + 'iconSection__item', + 'default' => (object) [ + 'icon' => null, + ], + 'description' => [ + 'icon' => 'An array with the same specification as the icon component', + ], + 'types' => [ + 'icon' => 'array', + ], + 'view' => 'iconSection__item.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'element', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Iframe/iframe.json b/source/php/Component/Iframe/iframe.json deleted file mode 100755 index d57f7793..00000000 --- a/source/php/Component/Iframe/iframe.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "slug": "iframe", - "default": { - "src": "about:blank", - "loading": "lazy", - "width": "100%", - "height": "400", - "frameborder": "0", - "labels": "", - "modifier": "", - "title": "External content", - "poster": false - }, - "description": { - "src": "Source URL", - "loading": "Loading type (for defering)", - "width": "Width in number or % (ex: 100% or 400)", - "height": "Height in number", - "frameborder": "Default border of the iframe (0 for none, 1 for border)", - "labels": "JSON string of an object containing button, title and info labels", - "modifier": "Modifier variable ex. video" - }, - "view": "iframe.blade.php", - "dependency": { - "sass": { - "components": [ - "button", - "typography", - "acceptance" - ] - } - } -} diff --git a/source/php/Component/Iframe/iframeConfig.php b/source/php/Component/Iframe/iframeConfig.php new file mode 100644 index 00000000..8999dc3d --- /dev/null +++ b/source/php/Component/Iframe/iframeConfig.php @@ -0,0 +1,35 @@ + 'iframe', + 'default' => (object) [ + 'src' => 'about:blank', + 'loading' => 'lazy', + 'width' => '100%', + 'height' => '400', + 'frameborder' => '0', + 'labels' => '', + 'modifier' => '', + 'title' => 'External content', + 'poster' => false, + ], + 'description' => [ + 'src' => 'Source URL', + 'loading' => 'Loading type (for defering)', + 'width' => 'Width in number or % (ex: 100% or 400)', + 'height' => 'Height in number', + 'frameborder' => 'Default border of the iframe (0 for none, 1 for border)', + 'labels' => 'JSON string of an object containing button, title and info labels', + 'modifier' => 'Modifier variable ex. video', + ], + 'view' => 'iframe.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'button', + 'typography', + 'acceptance', + ], + ], + ], +]; diff --git a/source/php/Component/Image/image.json b/source/php/Component/Image/image.json deleted file mode 100644 index 701e0975..00000000 --- a/source/php/Component/Image/image.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "slug": "image", - "default": { - "src": false, - "srcset": false, - "alt": "", - "caption": "", - "removeCaption": false, - "byline": "", - "fullWidth": false, - "cover": false, - "rounded": false, - "placeholderEnabled": true, - "placeholderText": false, - "placeholderIcon": "broken_image", - "placeholderIconSize": "xxl", - "imgAttributeList": [], - "lqipEnabled": true, - "calculateAspectRatio": true - }, - "description": { - "src": "A string containing a valid URL or an ImageInterface object. If the object is used, the srcset attribute is ignored.", - "srcset": "A string containing a valid srcset attribute. Ignored if src is an ImageInterface object.", - "alt": "Alt text of the imag. May override the alt text of the ImageInterface object.", - "caption": "Image caption. That will be visible for the user. ", - "removeCaption": "Removes the visible caption. The caption may still be used as an alt-text for the image.", - "byline": "Byline for additional information, placed under the caption", - "fullWidth": "If the image should obtain the --full-width modifier.", - "cover": "If the image should obtain the --cover modifier.", - "rounded": "Border radius of the image, false for no radius. Accepted values are xs, sm, md, lg, full (circle)", - "placeholderEnabled": "If the placeholder should be enabled, if false, the component will not render at all if the src is empty", - "placeholderText": "Label to show if image is missing", - "placeholderIcon": "Icon to display if image is missing / false to hide", - "placeholderIconSize": "Icons size, please refer to image component for size.", - "imgAttributeList": "Attributes for the img element.", - "lqipEnabled": "If the low quality image placeholder should be enabled.", - "calculateAspectRatio": "If the aspect ratio should be calculated based on the image dimensions. This option will be ignored if cover is set to true." - }, - "types": { - "src": "boolean|string|ImageInterface", - "srcset": "boolean|string", - "alt": "string|NULL", - "caption": "string|boolean", - "removeCaption": "boolean", - "byline": "string|NULL", - "fullWidth": "boolean", - "cover": "boolean", - "rounded": "boolean", - "placeholderEnabled": "boolean", - "placeholderText": "string|boolean", - "placeholderIcon": "string", - "placeholderIconSize": "string", - "imgAttributeList": "array", - "lqipEnabled": "boolean", - "calculateAspectRatio": "boolean" - }, - "view": "image.blade.php", - "dependency": { - "sass": { - "components": [ - "image", - "icon" - ] - } - } -} diff --git a/source/php/Component/Image/imageConfig.php b/source/php/Component/Image/imageConfig.php new file mode 100644 index 00000000..b9a12748 --- /dev/null +++ b/source/php/Component/Image/imageConfig.php @@ -0,0 +1,68 @@ + 'image', + 'default' => (object) [ + 'src' => false, + 'srcset' => false, + 'alt' => '', + 'caption' => '', + 'removeCaption' => false, + 'byline' => '', + 'fullWidth' => false, + 'cover' => false, + 'rounded' => false, + 'placeholderEnabled' => true, + 'placeholderText' => false, + 'placeholderIcon' => 'broken_image', + 'placeholderIconSize' => 'xxl', + 'imgAttributeList' => [], + 'lqipEnabled' => true, + 'calculateAspectRatio' => true, + ], + 'description' => [ + 'src' => 'A string containing a valid URL or an ImageInterface object. If the object is used, the srcset attribute is ignored.', + 'srcset' => 'A string containing a valid srcset attribute. Ignored if src is an ImageInterface object.', + 'alt' => 'Alt text of the imag. May override the alt text of the ImageInterface object.', + 'caption' => 'Image caption. That will be visible for the user. ', + 'removeCaption' => 'Removes the visible caption. The caption may still be used as an alt-text for the image.', + 'byline' => 'Byline for additional information, placed under the caption', + 'fullWidth' => 'If the image should obtain the --full-width modifier.', + 'cover' => 'If the image should obtain the --cover modifier.', + 'rounded' => 'Border radius of the image, false for no radius. Accepted values are xs, sm, md, lg, full (circle)', + 'placeholderEnabled' => 'If the placeholder should be enabled, if false, the component will not render at all if the src is empty', + 'placeholderText' => 'Label to show if image is missing', + 'placeholderIcon' => 'Icon to display if image is missing / false to hide', + 'placeholderIconSize' => 'Icons size, please refer to image component for size.', + 'imgAttributeList' => 'Attributes for the img element.', + 'lqipEnabled' => 'If the low quality image placeholder should be enabled.', + 'calculateAspectRatio' => 'If the aspect ratio should be calculated based on the image dimensions. This option will be ignored if cover is set to true.', + ], + 'types' => [ + 'src' => 'boolean|string|ImageInterface', + 'srcset' => 'boolean|string', + 'alt' => 'string|NULL', + 'caption' => 'string|boolean', + 'removeCaption' => 'boolean', + 'byline' => 'string|NULL', + 'fullWidth' => 'boolean', + 'cover' => 'boolean', + 'rounded' => 'boolean', + 'placeholderEnabled' => 'boolean', + 'placeholderText' => 'string|boolean', + 'placeholderIcon' => 'string', + 'placeholderIconSize' => 'string', + 'imgAttributeList' => 'array', + 'lqipEnabled' => 'boolean', + 'calculateAspectRatio' => 'boolean', + ], + 'view' => 'image.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'image', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Imageinput/imageinput.json b/source/php/Component/Imageinput/imageinput.json deleted file mode 100644 index bdc067d4..00000000 --- a/source/php/Component/Imageinput/imageinput.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "slug": "imageinput", - "default": { - "description": "", - "name": "files", - "accept": "audio/*,video/*,image/*", - "multiple": false, - "preview": true, - "maxSize": null, - "uploadErrorMessage": null, - "uploadErrorMessageMinFiles": null, - "icon": "file_upload", - "required": false, - "filesMax": 1, - "filesMin": 0, - "label": "", - "buttonLabel": "Select file", - "buttonRemoveLabel": "Remove file", - "buttonDropLabel": "Drop files here", - "allowedFileTypesLabel": "Allowed files: ", - "fileTypeVideosLabel": "Videos", - "fileTypeImagesLabel": "Images", - "fileTypeAudioLabel": "Audios", - "maximumSizeLabel": "Maximum size" - }, - "description": { - "description": "Additional description or instructions.", - "name": "files", - "accept": "What file types to accept. Use MIME types. Example: audio/*,video/*,image/*", - "multiple": "Allow single or multiple files", - "uploadErrorMessage": "Message to show when upload fails", - "uploadErrorMessageMinFiles": "Message to show when minimum number of files is not met", - "icon": "@link:component/icon", - "required": "If field is required", - "filesMax": "Maximum number of files (int). Foced to 1 if multiple is false. Default 10 for multiple.", - "filesMin": "Minimum number of files (int). Default 0.", - "maxSize": "Maximum file size allowed in MB. Number (int) in bytes or string (small, medium, large). Default is null (no limit).", - "lang": "An object containing language strings for the component.", - "label": "string", - "buttonLabel": "What text to show on the button", - "buttonRemoveLabel": "What text to show on the remove button", - "buttonDropLabel": "A label for the drop area", - "allowedFileTypesLabel": "Label for allowed file types", - "fileTypeVideosLabel": "Label for video file types", - "fileTypeImagesLabel": "Label for image file types", - "fileTypeAudioLabel": "Label for audio file types", - "maximumSizeLabel": "Maximum size" - }, - "types": { - "description": "string", - "name": "string", - "accept": "string", - "multiple": "boolean", - "uploadErrorMessage": "string", - "uploadErrorMessageMinFiles": "string", - "icon": "string", - "required": "boolean", - "filesMax": "integer", - "filesMin": "integer", - "preview": "boolean", - "maxSize": "string|int", - "lang": "object", - "label": "string", - "buttonLabel": "string", - "buttonRemoveLabel": "string", - "buttonDropLabel": "string", - "allowedFileTypesLabel": "string", - "fileTypeVideosLabel": "string", - "fileTypeImagesLabel": "string", - "fileTypeAudioLabel": "string", - "maximumSizeLabel": "string" - }, - "view": "imageinput.blade.php", - "dependency": { - "sass": { - "components": [ - "fileinput" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Imageinput/imageinputConfig.php b/source/php/Component/Imageinput/imageinputConfig.php new file mode 100644 index 00000000..46321b0b --- /dev/null +++ b/source/php/Component/Imageinput/imageinputConfig.php @@ -0,0 +1,83 @@ + 'imageinput', + 'default' => (object) [ + 'description' => '', + 'name' => 'files', + 'accept' => 'audio/*,video/*,image/*', + 'multiple' => false, + 'preview' => true, + 'maxSize' => null, + 'uploadErrorMessage' => null, + 'uploadErrorMessageMinFiles' => null, + 'icon' => 'file_upload', + 'required' => false, + 'filesMax' => 1, + 'filesMin' => 0, + 'label' => '', + 'buttonLabel' => 'Select file', + 'buttonRemoveLabel' => 'Remove file', + 'buttonDropLabel' => 'Drop files here', + 'allowedFileTypesLabel' => 'Allowed files: ', + 'fileTypeVideosLabel' => 'Videos', + 'fileTypeImagesLabel' => 'Images', + 'fileTypeAudioLabel' => 'Audios', + 'maximumSizeLabel' => 'Maximum size', + ], + 'description' => [ + 'description' => 'Additional description or instructions.', + 'name' => 'files', + 'accept' => 'What file types to accept. Use MIME types. Example: audio/*,video/*,image/*', + 'multiple' => 'Allow single or multiple files', + 'uploadErrorMessage' => 'Message to show when upload fails', + 'uploadErrorMessageMinFiles' => 'Message to show when minimum number of files is not met', + 'icon' => '@link:component/icon', + 'required' => 'If field is required', + 'filesMax' => 'Maximum number of files (int). Foced to 1 if multiple is false. Default 10 for multiple.', + 'filesMin' => 'Minimum number of files (int). Default 0.', + 'maxSize' => 'Maximum file size allowed in MB. Number (int) in bytes or string (small, medium, large). Default is null (no limit).', + 'lang' => 'An object containing language strings for the component.', + 'label' => 'string', + 'buttonLabel' => 'What text to show on the button', + 'buttonRemoveLabel' => 'What text to show on the remove button', + 'buttonDropLabel' => 'A label for the drop area', + 'allowedFileTypesLabel' => 'Label for allowed file types', + 'fileTypeVideosLabel' => 'Label for video file types', + 'fileTypeImagesLabel' => 'Label for image file types', + 'fileTypeAudioLabel' => 'Label for audio file types', + 'maximumSizeLabel' => 'Maximum size', + ], + 'types' => [ + 'description' => 'string', + 'name' => 'string', + 'accept' => 'string', + 'multiple' => 'boolean', + 'uploadErrorMessage' => 'string', + 'uploadErrorMessageMinFiles' => 'string', + 'icon' => 'string', + 'required' => 'boolean', + 'filesMax' => 'integer', + 'filesMin' => 'integer', + 'preview' => 'boolean', + 'maxSize' => 'string|int', + 'lang' => 'object', + 'label' => 'string', + 'buttonLabel' => 'string', + 'buttonRemoveLabel' => 'string', + 'buttonDropLabel' => 'string', + 'allowedFileTypesLabel' => 'string', + 'fileTypeVideosLabel' => 'string', + 'fileTypeImagesLabel' => 'string', + 'fileTypeAudioLabel' => 'string', + 'maximumSizeLabel' => 'string', + ], + 'view' => 'imageinput.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'fileinput', + ], + ], + ], +]; diff --git a/source/php/Component/InlineCssWrapper/inlineCssWrapper.json b/source/php/Component/InlineCssWrapper/inlineCssWrapper.json deleted file mode 100644 index a775c3c0..00000000 --- a/source/php/Component/InlineCssWrapper/inlineCssWrapper.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "slug": "inlineCssWrapper", - "default": { - "componentElement": "div", - "styles": [] - }, - "description": { - }, - "types":{ - "componentElement": "string", - "styles": "array" - }, - "view": "inlineCssWrapper.blade.php", - "dependency": { - "sass": { - "components": [ - "inlineCssWrapper" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/InlineCssWrapper/inlineCssWrapperConfig.php b/source/php/Component/InlineCssWrapper/inlineCssWrapperConfig.php new file mode 100644 index 00000000..aad37bab --- /dev/null +++ b/source/php/Component/InlineCssWrapper/inlineCssWrapperConfig.php @@ -0,0 +1,22 @@ + 'inlineCssWrapper', + 'default' => (object) [ + 'componentElement' => 'div', + 'styles' => [], + ], + 'description' => [], + 'types' => [ + 'componentElement' => 'string', + 'styles' => 'array', + ], + 'view' => 'inlineCssWrapper.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'inlineCssWrapper', + ], + ], + ], +]; diff --git a/source/php/Component/Link/link.json b/source/php/Component/Link/link.json deleted file mode 100644 index 52a2d0c5..00000000 --- a/source/php/Component/Link/link.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "slug": "link", - "default": { - "componentElement": "span", - "slot": "Undefined label", - "href": "", - "target": "_top", - "keepContent": true, - "keepWrapper": true, - "xfn": false, - "unstyled": false - }, - "description": { - "slot": "The content of the link", - "href": "Where should the link go to?", - "target": "Link target attribute. Default is _top. Allowed values are _blank, _self, _parent or _top. This is only added if href is not empty.", - "keepContent": "If link is empty, should we show content anyways? Prints the content wrazpped by a span element.", - "keepWrapper": "If link is empty and keepContent is true, should we keep the span added by keepContent? If false, it will print the content without any wrapping element.", - "xfn": "Relation to the link (ex. nofollow)", - "unstyled": "If true, all link styles will use inherit from parent element." - }, - "view": "link.blade.php", - "dependency": { - "sass": { - "components": [ - "link" - ] - } - } -} diff --git a/source/php/Component/Link/linkConfig.php b/source/php/Component/Link/linkConfig.php new file mode 100644 index 00000000..d859ffa9 --- /dev/null +++ b/source/php/Component/Link/linkConfig.php @@ -0,0 +1,32 @@ + 'link', + 'default' => (object) [ + 'componentElement' => 'span', + 'slot' => 'Undefined label', + 'href' => '', + 'target' => '_top', + 'keepContent' => true, + 'keepWrapper' => true, + 'xfn' => false, + 'unstyled' => false, + ], + 'description' => [ + 'slot' => 'The content of the link', + 'href' => 'Where should the link go to?', + 'target' => 'Link target attribute. Default is _top. Allowed values are _blank, _self, _parent or _top. This is only added if href is not empty.', + 'keepContent' => 'If link is empty, should we show content anyways? Prints the content wrazpped by a span element.', + 'keepWrapper' => 'If link is empty and keepContent is true, should we keep the span added by keepContent? If false, it will print the content without any wrapping element.', + 'xfn' => 'Relation to the link (ex. nofollow)', + 'unstyled' => 'If true, all link styles will use inherit from parent element.', + ], + 'view' => 'link.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'link', + ], + ], + ], +]; diff --git a/source/php/Component/Listing/listing.json b/source/php/Component/Listing/listing.json deleted file mode 100644 index 801ee819..00000000 --- a/source/php/Component/Listing/listing.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "slug": "listing", - "default": { - "list": [], - "elementType": "ul", - "icon": true, - "padding": false - }, - "description": { - "list": "List of arrays containing at least 'label' but can also contain 'href' and or 'icon' according to the Icon component.", - "elementType": "The type of list, ul, ol.", - "icon": "Can be true/false or the name of the Icon. Displays an icon at the end of links", - "padding": "False or a number between 0 and 10. Sets the padding between the child elements" - }, - "view": "listing.blade.php", - "dependency": { - "sass": { - "components": [ - "list", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/Listing/listingConfig.php b/source/php/Component/Listing/listingConfig.php new file mode 100644 index 00000000..e5108e98 --- /dev/null +++ b/source/php/Component/Listing/listingConfig.php @@ -0,0 +1,26 @@ + 'listing', + 'default' => (object) [ + 'list' => [], + 'elementType' => 'ul', + 'icon' => true, + 'padding' => false, + ], + 'description' => [ + 'list' => 'List of arrays containing at least \'label\' but can also contain \'href\' and or \'icon\' according to the Icon component.', + 'elementType' => 'The type of list, ul, ol.', + 'icon' => 'Can be true/false or the name of the Icon. Displays an icon at the end of links', + 'padding' => 'False or a number between 0 and 10. Sets the padding between the child elements', + ], + 'view' => 'listing.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'list', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Loader/loader.json b/source/php/Component/Loader/loader.json deleted file mode 100644 index f62dbbd4..00000000 --- a/source/php/Component/Loader/loader.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "slug": "loader", - "default": { - "componentElement": "div", - "shape": "circular", - "size": "md", - "color": "black", - "text": "" - }, - "description": { - "componentElement": "The tag for the component", - "shape": "Visual shape for the loader (circular, linear)", - "size": "Size for the loader (xs, sm, md, lg, xl)", - "color": "black, white, secondary, primary", - "text": "Loading text" - }, - "view": "loader.blade.php", - "dependency": { - "sass": { - "components": [ - "loader", - "typography" - ] - } - } -} diff --git a/source/php/Component/Loader/loaderConfig.php b/source/php/Component/Loader/loaderConfig.php new file mode 100644 index 00000000..e4793791 --- /dev/null +++ b/source/php/Component/Loader/loaderConfig.php @@ -0,0 +1,28 @@ + 'loader', + 'default' => (object) [ + 'componentElement' => 'div', + 'shape' => 'circular', + 'size' => 'md', + 'color' => 'black', + 'text' => '', + ], + 'description' => [ + 'componentElement' => 'The tag for the component', + 'shape' => 'Visual shape for the loader (circular, linear)', + 'size' => 'Size for the loader (xs, sm, md, lg, xl)', + 'color' => 'black, white, secondary, primary', + 'text' => 'Loading text', + ], + 'view' => 'loader.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'loader', + 'typography', + ], + ], + ], +]; diff --git a/source/php/Component/Logotype/logotype.json b/source/php/Component/Logotype/logotype.json deleted file mode 100644 index 673e2dd6..00000000 --- a/source/php/Component/Logotype/logotype.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "slug": "logotype", - "default": { - "src": false, - "alt": "", - "caption": "", - "title": "", - "placeholderText": "Image missing", - "hasRipple": true - }, - "description": { - "src": "A image source", - "alt": "Alt text for the image", - "caption": "A label below the logotype. eg company name", - "title": "A title (not displayed)", - "placeholderText": "What to show if an invalid url is entered.", - "hasRipple": "Enable / disable ripple fx" - }, - "view": "logotype.blade.php", - "dependency": { - "sass": { - "components": [ - "logotype", - "image" - ] - } - } -} diff --git a/source/php/Component/Logotype/logotypeConfig.php b/source/php/Component/Logotype/logotypeConfig.php new file mode 100644 index 00000000..676f3f43 --- /dev/null +++ b/source/php/Component/Logotype/logotypeConfig.php @@ -0,0 +1,30 @@ + 'logotype', + 'default' => (object) [ + 'src' => false, + 'alt' => '', + 'caption' => '', + 'title' => '', + 'placeholderText' => 'Image missing', + 'hasRipple' => true, + ], + 'description' => [ + 'src' => 'A image source', + 'alt' => 'Alt text for the image', + 'caption' => 'A label below the logotype. eg company name', + 'title' => 'A title (not displayed)', + 'placeholderText' => 'What to show if an invalid url is entered.', + 'hasRipple' => 'Enable / disable ripple fx', + ], + 'view' => 'logotype.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'logotype', + 'image', + ], + ], + ], +]; diff --git a/source/php/Component/Logotypegrid/logotypegrid.json b/source/php/Component/Logotypegrid/logotypegrid.json deleted file mode 100644 index d6df19af..00000000 --- a/source/php/Component/Logotypegrid/logotypegrid.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "slug": "logotypegrid", - "default": { - "items": [] - }, - "description": { - "items": "A list of items, containing: src, alt, url(optional)" - }, - "view": "logotypegrid.blade.php", - "dependency": { - "sass": { - "components": [ - "logotypegrid", - "logotype", - "image" - ] - } - } -} diff --git a/source/php/Component/Logotypegrid/logotypegridConfig.php b/source/php/Component/Logotypegrid/logotypegridConfig.php new file mode 100644 index 00000000..dd9bd7cb --- /dev/null +++ b/source/php/Component/Logotypegrid/logotypegridConfig.php @@ -0,0 +1,21 @@ + 'logotypegrid', + 'default' => (object) [ + 'items' => [], + ], + 'description' => [ + 'items' => 'A list of items, containing: src, alt, url(optional)', + ], + 'view' => 'logotypegrid.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'logotypegrid', + 'logotype', + 'image', + ], + ], + ], +]; diff --git a/source/php/Component/Map/Map.php b/source/php/Component/Map/Map.php new file mode 100644 index 00000000..9adf4abd --- /dev/null +++ b/source/php/Component/Map/Map.php @@ -0,0 +1,28 @@ +data); + + $this->data['id'] = $this->getUid(); + + $this->data['attributeList']['data-js-map-start-position'] = json_encode($startPosition); + $this->data['attributeList']['data-js-map-markers'] = json_encode($markers ?? []); + $this->data['attributeList']['data-js-map-style'] = $mapStyle; + $this->data['attributeList']['data-js-map-id'] = $this->data['id']; + $this->data['attributeList']['style'] = "position: relative; height: {$height}; width: 100%;"; + $this->data['attributeList']['data-js-map-provider'] = $provider; + + $this->data['matAttributeList'] = []; + $this->data['mapAttributeList']['style'] = "position: unset; height: {$height}; width: 100%; background: #f0f0f0;"; + } +} diff --git a/source/php/Component/Map/map.blade.php b/source/php/Component/Map/map.blade.php new file mode 100644 index 00000000..9201d6b0 --- /dev/null +++ b/source/php/Component/Map/map.blade.php @@ -0,0 +1,10 @@ +@element([ + 'classList' => [$baseClass, 'openstreetmap'], + 'attributeList' => $attributeList +]) + @element([ + 'id' => $id + ]) + @endelement + +@endelement \ No newline at end of file diff --git a/source/php/Component/Map/mapConfig.php b/source/php/Component/Map/mapConfig.php new file mode 100644 index 00000000..a774a1dc --- /dev/null +++ b/source/php/Component/Map/mapConfig.php @@ -0,0 +1,39 @@ + 'map', + 'default' => (object) [ + 'markers' => [], + 'startPosition' => (object) [ + 'lat' => 56.046467, + 'lng' => 12.694512, + 'zoom' => 16, + ], + 'mapStyle' => 'default', + 'height' => '600px', + 'provider' => 'openstreetmap', + ], + 'description' => [ + 'startPosition' => 'An object containing lat, lng, and zoom.', + 'markers' => 'An array of objects containing lat, lng, and content.', + 'mapStyle' => 'Theming of the map (pale, dark, color, default)', + 'height' => 'A css height value including unit (px, vh, %)', + 'provider' => 'The map provider to use (openstreetmap, googlemaps)', + ], + 'types' => [ + 'startPosition' => 'object', + 'markers' => 'array', + 'mapStyle' => 'string', + 'height' => 'string', + 'fullWidth' => 'boolean', + 'provider' => 'string', + ], + 'view' => 'map.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'element', + ], + ], + ], +]; diff --git a/source/php/Component/MegaMenu/megaMenu.json b/source/php/Component/MegaMenu/megaMenu.json deleted file mode 100644 index b9aff83e..00000000 --- a/source/php/Component/MegaMenu/megaMenu.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "slug": "megaMenu", - "default": { - "menuItems": [], - "parentType": "default", - "parentStyle": false, - "parentStyleColor": "primary", - "childType": "default", - "childStyle": false, - "childStyleColor": "primary", - "mobile": false - }, - "types": { - "menuItems": "array", - "parentType": "string", - "parentStyle": "string|boolean", - "parentStyleColor": "string", - "childType": "string", - "childStyle": "string|boolean", - "childStyleColor": "string", - "mobile": "boolean" - }, - "description": { - "menuItems": "List of arrays containing at least 'label' and 'href' option 'icon' name as string.", - "parentType": "Select the type of menu parents.", - "parentStyle": "Select the style of menu parents (only applies when type equals button).", - "parentStyleColor": "Select the color of the parent style. (only applies when type equals button).", - "childType": "Select the type of menu children.", - "childStyle": "Select the style of menu children. (only applies when type equals button).", - "childStyleColor": "Select the color of the child style. (only applies when type equals button).", - "mobile": "If true, the mega menu will be visible on mobile as well." - }, - "view": "megaMenu.blade.php", - "dependency": { - "sass": { - "components": [ - "menu", - "icon" - ] - } - } -} \ No newline at end of file diff --git a/source/php/Component/MegaMenu/megaMenuConfig.php b/source/php/Component/MegaMenu/megaMenuConfig.php new file mode 100644 index 00000000..fc864b6f --- /dev/null +++ b/source/php/Component/MegaMenu/megaMenuConfig.php @@ -0,0 +1,44 @@ + 'megaMenu', + 'default' => (object) [ + 'menuItems' => [], + 'parentType' => 'default', + 'parentStyle' => false, + 'parentStyleColor' => 'primary', + 'childType' => 'default', + 'childStyle' => false, + 'childStyleColor' => 'primary', + 'mobile' => false, + ], + 'types' => [ + 'menuItems' => 'array', + 'parentType' => 'string', + 'parentStyle' => 'string|boolean', + 'parentStyleColor' => 'string', + 'childType' => 'string', + 'childStyle' => 'string|boolean', + 'childStyleColor' => 'string', + 'mobile' => 'boolean', + ], + 'description' => [ + 'menuItems' => 'List of arrays containing at least \'label\' and \'href\' option \'icon\' name as string.', + 'parentType' => 'Select the type of menu parents.', + 'parentStyle' => 'Select the style of menu parents (only applies when type equals button).', + 'parentStyleColor' => 'Select the color of the parent style. (only applies when type equals button).', + 'childType' => 'Select the type of menu children.', + 'childStyle' => 'Select the style of menu children. (only applies when type equals button).', + 'childStyleColor' => 'Select the color of the child style. (only applies when type equals button).', + 'mobile' => 'If true, the mega menu will be visible on mobile as well.', + ], + 'view' => 'megaMenu.blade.php', + 'dependency' => [ + 'sass' => [ + 'components' => [ + 'menu', + 'icon', + ], + ], + ], +]; diff --git a/source/php/Component/Menu/menu.json b/source/php/Component/Menu/menu.json deleted file mode 100644 index ac6787d7..00000000 --- a/source/php/Component/Menu/menu.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "slug": "menu", - "default": { - "activeIndex": false, - "items": [], - "elementType": "nav", - "activeClass": "--active", - "wrapper": true, - "isHorizontal": false - }, - "description": { - "activeIndex": "The currently active index", - "items": "List of arrays containing at least 'label' and 'href' option 'icon' name as string.", - "elementType": "The type of wrapper.", - "activeClass": "The name of currently active class.", - "wrapper": "Wrap component with