@goldencomm/create-baseline 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -79
- package/index.mjs +175 -283
- package/package.json +13 -30
- package/templates/ci/bitbucket-pipelines.yml +29 -0
- package/templates/code-connect/accordion-item.figma.ts +45 -0
- package/templates/code-connect/accordion.figma.ts +40 -0
- package/templates/code-connect/alert.figma.ts +378 -0
- package/templates/code-connect/avatar-badge.figma.ts +14 -0
- package/templates/code-connect/avatar-group-count.figma.ts +16 -0
- package/templates/code-connect/avatar-group.figma.ts +30 -0
- package/templates/code-connect/avatar.figma.ts +34 -0
- package/templates/code-connect/badge.figma.ts +383 -0
- package/templates/code-connect/breadcrumb-item.figma.ts +23 -0
- package/templates/code-connect/breadcrumb-separator.figma.ts +12 -0
- package/templates/code-connect/breadcrumb.figma.ts +32 -0
- package/templates/code-connect/button-group.figma.ts +28 -0
- package/templates/code-connect/button.figma.ts +408 -0
- package/templates/code-connect/card.figma.ts +74 -0
- package/templates/code-connect/carousel.figma.ts +27 -0
- package/templates/code-connect/checkbox.figma.ts +34 -0
- package/templates/code-connect/columns-1.figma.ts +43 -0
- package/templates/code-connect/columns-2.figma.ts +49 -0
- package/templates/code-connect/columns-3.figma.ts +45 -0
- package/templates/code-connect/columns-4.figma.ts +46 -0
- package/templates/code-connect/container.figma.ts +42 -0
- package/templates/code-connect/dialog.figma.ts +72 -0
- package/templates/code-connect/drawer.figma.ts +69 -0
- package/templates/code-connect/dropdown-menu-checkbox-item.figma.ts +19 -0
- package/templates/code-connect/dropdown-menu-item.figma.ts +25 -0
- package/templates/code-connect/dropdown-menu-label.figma.ts +16 -0
- package/templates/code-connect/dropdown-menu-radio-item.figma.ts +19 -0
- package/templates/code-connect/dropdown-menu-separator.figma.ts +12 -0
- package/templates/code-connect/dropdown-menu-sub-trigger.figma.ts +22 -0
- package/templates/code-connect/dropdown-menu.figma.ts +44 -0
- package/templates/code-connect/field-horizontal.figma.ts +73 -0
- package/templates/code-connect/field.figma.ts +68 -0
- package/templates/code-connect/hover-card.figma.ts +41 -0
- package/templates/code-connect/icon-button.figma.ts +382 -0
- package/templates/code-connect/input-group.figma.ts +51 -0
- package/templates/code-connect/input-otp.figma.ts +40 -0
- package/templates/code-connect/input.figma.ts +42 -0
- package/templates/code-connect/item-group.figma.ts +30 -0
- package/templates/code-connect/item.figma.ts +50 -0
- package/templates/code-connect/kbd.figma.ts +16 -0
- package/templates/code-connect/media.figma.ts +35 -0
- package/templates/code-connect/meter.figma.ts +31 -0
- package/templates/code-connect/native-select.figma.ts +36 -0
- package/templates/code-connect/navigation-menu-link.figma.ts +33 -0
- package/templates/code-connect/navigation-menu-trigger.figma.ts +28 -0
- package/templates/code-connect/navigation-menu.figma.ts +30 -0
- package/templates/code-connect/pagination-ellipsis.figma.ts +11 -0
- package/templates/code-connect/pagination-link.figma.ts +24 -0
- package/templates/code-connect/pagination-next.figma.ts +17 -0
- package/templates/code-connect/pagination-previous.figma.ts +17 -0
- package/templates/code-connect/pagination.figma.ts +33 -0
- package/templates/code-connect/panel.figma.ts +40 -0
- package/templates/code-connect/popover.figma.ts +58 -0
- package/templates/code-connect/progress.figma.ts +34 -0
- package/templates/code-connect/radio.figma.ts +29 -0
- package/templates/code-connect/section.figma.ts +42 -0
- package/templates/code-connect/select.figma.ts +30 -0
- package/templates/code-connect/sheet.figma.ts +70 -0
- package/templates/code-connect/sidebar-menu-button.figma.ts +36 -0
- package/templates/code-connect/sidebar.figma.ts +44 -0
- package/templates/code-connect/spinner.figma.ts +13 -0
- package/templates/code-connect/switch.figma.ts +32 -0
- package/templates/code-connect/table-cell.figma.ts +21 -0
- package/templates/code-connect/table.figma.ts +62 -0
- package/templates/code-connect/tabs-trigger.figma.ts +369 -0
- package/templates/code-connect/tabs.figma.ts +28 -0
- package/templates/code-connect/textarea.figma.ts +32 -0
- package/templates/code-connect/toggle-group.figma.ts +24 -0
- package/templates/code-connect/toggle.figma.ts +385 -0
- package/templates/code-connect/tooltip.figma.ts +29 -0
- package/templates/next/app/globals.css +13 -12
- package/templates/next/app/page.tsx +38 -26
- package/templates/next/public/placeholder.svg +1 -0
- package/templates/shopify/.gitattributes +1 -0
- package/templates/shopify/.shopifyignore +23 -0
- package/templates/shopify/.theme-check.yml +1 -0
- package/templates/shopify/CODE_OF_CONDUCT.md +132 -0
- package/templates/shopify/CONTRIBUTING.md +24 -0
- package/templates/shopify/LICENSE.md +9 -0
- package/templates/shopify/README.md +160 -0
- package/templates/shopify/assets/carousel.js +2 -0
- package/templates/shopify/assets/critical.css +117 -0
- package/templates/shopify/assets/icon-account.svg +6 -0
- package/templates/shopify/assets/icon-cart.svg +5 -0
- package/templates/shopify/assets/predictive-search.js +65 -0
- package/templates/shopify/assets/shoppy-x-ray.svg +1 -0
- package/templates/shopify/blocks/_accordion-item.liquid +44 -0
- package/templates/shopify/blocks/_card-footer.liquid +26 -0
- package/templates/shopify/blocks/_carousel-slide.liquid +21 -0
- package/templates/shopify/blocks/_column.liquid +30 -0
- package/templates/shopify/blocks/_dialog-footer.liquid +28 -0
- package/templates/shopify/blocks/_sheet-footer.liquid +28 -0
- package/templates/shopify/blocks/_tab.liquid +21 -0
- package/templates/shopify/blocks/accordion.liquid +40 -0
- package/templates/shopify/blocks/blog-posts.liquid +70 -0
- package/templates/shopify/blocks/button.figma.ts +359 -0
- package/templates/shopify/blocks/button.liquid +477 -0
- package/templates/shopify/blocks/card.liquid +73 -0
- package/templates/shopify/blocks/carousel.liquid +47 -0
- package/templates/shopify/blocks/columns.liquid +73 -0
- package/templates/shopify/blocks/contact-form.liquid +69 -0
- package/templates/shopify/blocks/container.liquid +29 -0
- package/templates/shopify/blocks/dialog.liquid +77 -0
- package/templates/shopify/blocks/group.liquid +105 -0
- package/templates/shopify/blocks/heading.liquid +57 -0
- package/templates/shopify/blocks/icon-button.figma.ts +358 -0
- package/templates/shopify/blocks/media.liquid +80 -0
- package/templates/shopify/blocks/navigation-menu.liquid +23 -0
- package/templates/shopify/blocks/panel.liquid +64 -0
- package/templates/shopify/blocks/popover.liquid +88 -0
- package/templates/shopify/blocks/section-heading.liquid +68 -0
- package/templates/shopify/blocks/sheet.liquid +90 -0
- package/templates/shopify/blocks/tabs.liquid +58 -0
- package/templates/shopify/blocks/text.liquid +59 -0
- package/templates/shopify/build-js.mjs +22 -0
- package/templates/shopify/config/settings_data.json +182 -0
- package/templates/shopify/config/settings_schema.json +365 -0
- package/templates/shopify/layout/password.liquid +19 -0
- package/templates/shopify/layout/theme.liquid +57 -0
- package/templates/shopify/locales/en.default.json +58 -0
- package/templates/shopify/locales/en.default.schema.json +303 -0
- package/templates/shopify/package-lock.json +521 -0
- package/templates/shopify/package.json +17 -0
- package/templates/shopify/sections/404.liquid +23 -0
- package/templates/shopify/sections/article.liquid +81 -0
- package/templates/shopify/sections/baseline-header.liquid +236 -0
- package/templates/shopify/sections/baseline-kitchen-sink.liquid +988 -0
- package/templates/shopify/sections/baseline-section.liquid +661 -0
- package/templates/shopify/sections/blog.liquid +36 -0
- package/templates/shopify/sections/cart.liquid +65 -0
- package/templates/shopify/sections/collection.liquid +54 -0
- package/templates/shopify/sections/collections.liquid +83 -0
- package/templates/shopify/sections/custom-section.liquid +60 -0
- package/templates/shopify/sections/footer-group.json +25 -0
- package/templates/shopify/sections/footer.liquid +57 -0
- package/templates/shopify/sections/header-group.json +22 -0
- package/templates/shopify/sections/page.liquid +18 -0
- package/templates/shopify/sections/password.liquid +36 -0
- package/templates/shopify/sections/product.liquid +60 -0
- package/templates/shopify/sections/search.liquid +73 -0
- package/templates/shopify/snippets/accordion-item.figma.ts +34 -0
- package/templates/shopify/snippets/accordion-item.liquid +36 -0
- package/templates/shopify/snippets/accordion.figma.ts +37 -0
- package/templates/shopify/snippets/accordion.liquid +169 -0
- package/templates/shopify/snippets/alert.figma.ts +31 -0
- package/templates/shopify/snippets/alert.liquid +104 -0
- package/templates/shopify/snippets/avatar-group.figma.ts +17 -0
- package/templates/shopify/snippets/avatar-group.liquid +66 -0
- package/templates/shopify/snippets/avatar.figma.ts +24 -0
- package/templates/shopify/snippets/avatar.liquid +143 -0
- package/templates/shopify/snippets/badge.figma.ts +355 -0
- package/templates/shopify/snippets/badge.liquid +111 -0
- package/templates/shopify/snippets/baseline-schemes.liquid +44 -0
- package/templates/shopify/snippets/baseline-tokens.liquid +712 -0
- package/templates/shopify/snippets/breadcrumb.figma.ts +12 -0
- package/templates/shopify/snippets/breadcrumb.liquid +124 -0
- package/templates/shopify/snippets/button-group.liquid +148 -0
- package/templates/shopify/snippets/button.liquid +144 -0
- package/templates/shopify/snippets/card.figma.ts +43 -0
- package/templates/shopify/snippets/card.liquid +196 -0
- package/templates/shopify/snippets/carousel-item.liquid +18 -0
- package/templates/shopify/snippets/carousel.figma.ts +28 -0
- package/templates/shopify/snippets/carousel.liquid +121 -0
- package/templates/shopify/snippets/checkbox.liquid +147 -0
- package/templates/shopify/snippets/container.liquid +52 -0
- package/templates/shopify/snippets/css-variables.liquid +18 -0
- package/templates/shopify/snippets/dialog.figma.ts +36 -0
- package/templates/shopify/snippets/dialog.liquid +217 -0
- package/templates/shopify/snippets/field-separator.liquid +68 -0
- package/templates/shopify/snippets/field.liquid +187 -0
- package/templates/shopify/snippets/icon.liquid +101 -0
- package/templates/shopify/snippets/image.liquid +64 -0
- package/templates/shopify/snippets/input-group.liquid +196 -0
- package/templates/shopify/snippets/input.liquid +126 -0
- package/templates/shopify/snippets/item-group.liquid +31 -0
- package/templates/shopify/snippets/item.figma.ts +40 -0
- package/templates/shopify/snippets/item.liquid +162 -0
- package/templates/shopify/snippets/media.figma.ts +33 -0
- package/templates/shopify/snippets/media.liquid +273 -0
- package/templates/shopify/snippets/meta-tags.liquid +105 -0
- package/templates/shopify/snippets/meter.figma.ts +24 -0
- package/templates/shopify/snippets/meter.liquid +118 -0
- package/templates/shopify/snippets/native-select.liquid +141 -0
- package/templates/shopify/snippets/navigation-menu-item.figma.ts +23 -0
- package/templates/shopify/snippets/navigation-menu-item.liquid +40 -0
- package/templates/shopify/snippets/navigation-menu-link.figma.ts +27 -0
- package/templates/shopify/snippets/navigation-menu-link.liquid +31 -0
- package/templates/shopify/snippets/navigation-menu.figma.ts +12 -0
- package/templates/shopify/snippets/navigation-menu.liquid +300 -0
- package/templates/shopify/snippets/pagination.figma.ts +13 -0
- package/templates/shopify/snippets/pagination.liquid +208 -0
- package/templates/shopify/snippets/popover.figma.ts +41 -0
- package/templates/shopify/snippets/popover.liquid +203 -0
- package/templates/shopify/snippets/progress.figma.ts +26 -0
- package/templates/shopify/snippets/progress.liquid +114 -0
- package/templates/shopify/snippets/radio.liquid +145 -0
- package/templates/shopify/snippets/sheet.figma.ts +37 -0
- package/templates/shopify/snippets/sheet.liquid +197 -0
- package/templates/shopify/snippets/sidebar-menu-item.liquid +34 -0
- package/templates/shopify/snippets/sidebar-menu-sub-link.liquid +17 -0
- package/templates/shopify/snippets/sidebar-menu.liquid +139 -0
- package/templates/shopify/snippets/spinner.liquid +42 -0
- package/templates/shopify/snippets/switch.liquid +180 -0
- package/templates/shopify/snippets/tab.figma.ts +353 -0
- package/templates/shopify/snippets/tab.liquid +33 -0
- package/templates/shopify/snippets/tabs.figma.ts +21 -0
- package/templates/shopify/snippets/tabs.liquid +260 -0
- package/templates/shopify/snippets/text-styles.liquid +45 -0
- package/templates/shopify/snippets/textarea.liquid +103 -0
- package/templates/shopify/snippets/toggle-group.figma.ts +30 -0
- package/templates/shopify/snippets/toggle-group.liquid +46 -0
- package/templates/shopify/snippets/toggle.figma.ts +357 -0
- package/templates/shopify/snippets/toggle.liquid +104 -0
- package/templates/shopify/snippets/typeset.liquid +498 -0
- package/templates/shopify/src/carousel.js +94 -0
- package/templates/shopify/templates/404.json +20 -0
- package/templates/shopify/templates/article.json +20 -0
- package/templates/shopify/templates/blog.json +20 -0
- package/templates/shopify/templates/cart.json +20 -0
- package/templates/shopify/templates/collection.json +20 -0
- package/templates/shopify/templates/gift_card.liquid +73 -0
- package/templates/shopify/templates/index.json +18 -0
- package/templates/shopify/templates/list-collections.json +20 -0
- package/templates/shopify/templates/page.json +20 -0
- package/templates/shopify/templates/password.json +21 -0
- package/templates/shopify/templates/product.json +20 -0
- package/templates/shopify/templates/search.json +20 -0
- package/templates/skills/baseline-client-tokens/SKILL.md +74 -0
- package/templates/wordpress/.ddev/commands/web/seed +258 -3
- package/templates/wordpress/.ddev/config.yaml +10 -7
- package/templates/wordpress/.ddev/seed/gravityforms-contact.json +1 -0
- package/templates/wordpress/README.md +37 -39
- package/templates/wordpress/auth.json.example +1 -1
- package/templates/wordpress/composer.json +88 -84
- package/templates/wordpress/theme/README.md +3 -0
- package/templates/wordpress/theme/acf-json/.gitkeep +0 -0
- package/templates/wordpress/theme/acf-json/group_baseline_alert.json +83 -0
- package/templates/wordpress/theme/acf-json/group_baseline_avatar.json +82 -0
- package/templates/wordpress/theme/acf-json/group_baseline_avatar_group.json +35 -0
- package/templates/wordpress/theme/acf-json/group_baseline_badge.json +93 -0
- package/templates/wordpress/theme/acf-json/group_baseline_carousel.json +21 -0
- package/templates/wordpress/theme/acf-json/group_baseline_carousel_slide.json +16 -0
- package/templates/wordpress/theme/acf-json/group_baseline_dialog.json +68 -0
- package/templates/wordpress/theme/acf-json/group_baseline_dialog_footer.json +23 -0
- package/templates/wordpress/theme/acf-json/group_baseline_item.json +101 -0
- package/templates/wordpress/theme/acf-json/group_baseline_item_group.json +26 -0
- package/templates/wordpress/theme/acf-json/group_baseline_sheet.json +104 -0
- package/templates/wordpress/theme/acf-json/group_baseline_sheet_footer.json +31 -0
- package/templates/wordpress/theme/assets/app.css +2 -0
- package/templates/wordpress/theme/assets/editor.css +2 -0
- package/templates/wordpress/theme/assets/images/placeholder.svg +1 -0
- package/templates/wordpress/theme/assets/js/carousel-editor.js +85 -0
- package/templates/wordpress/theme/assets/js/carousel.js +2 -0
- package/templates/wordpress/theme/assets/js/core-button-editor.js +243 -0
- package/templates/wordpress/theme/assets/js/core-layout-editor.js +144 -0
- package/templates/wordpress/theme/assets/js/core-navigation.js +11 -0
- package/templates/wordpress/theme/assets/js/media-editor.js +52 -0
- package/templates/wordpress/theme/assets/js/media.js +38 -0
- package/templates/wordpress/theme/assets/tokens.css +1030 -0
- package/templates/wordpress/theme/blocks/alert/alert.figma.ts +32 -0
- package/templates/wordpress/theme/blocks/alert/block.json +24 -0
- package/templates/wordpress/theme/blocks/alert/render.php +30 -0
- package/templates/wordpress/theme/blocks/avatar/block.json +24 -0
- package/templates/wordpress/theme/blocks/avatar/render.php +35 -0
- package/templates/wordpress/theme/blocks/avatar-group/avatar-group.figma.ts +16 -0
- package/templates/wordpress/theme/blocks/avatar-group/block.json +25 -0
- package/templates/wordpress/theme/blocks/avatar-group/render.php +27 -0
- package/templates/wordpress/theme/blocks/badge/badge.figma.ts +349 -0
- package/templates/wordpress/theme/blocks/badge/block.json +23 -0
- package/templates/wordpress/theme/blocks/badge/render.php +28 -0
- package/templates/wordpress/theme/blocks/carousel/block.json +25 -0
- package/templates/wordpress/theme/blocks/carousel/carousel.figma.ts +22 -0
- package/templates/wordpress/theme/blocks/carousel/render.php +54 -0
- package/templates/wordpress/theme/blocks/carousel-slide/block.json +24 -0
- package/templates/wordpress/theme/blocks/carousel-slide/render.php +13 -0
- package/templates/wordpress/theme/blocks/dialog/block.json +24 -0
- package/templates/wordpress/theme/blocks/dialog/dialog.figma.ts +36 -0
- package/templates/wordpress/theme/blocks/dialog/render.php +41 -0
- package/templates/wordpress/theme/blocks/dialog-footer/block.json +25 -0
- package/templates/wordpress/theme/blocks/dialog-footer/render.php +18 -0
- package/templates/wordpress/theme/blocks/item/block.json +25 -0
- package/templates/wordpress/theme/blocks/item/item.figma.ts +43 -0
- package/templates/wordpress/theme/blocks/item/render.php +38 -0
- package/templates/wordpress/theme/blocks/item-group/block.json +25 -0
- package/templates/wordpress/theme/blocks/item-group/item-group.figma.ts +28 -0
- package/templates/wordpress/theme/blocks/item-group/render.php +22 -0
- package/templates/wordpress/theme/blocks/sheet/block.json +24 -0
- package/templates/wordpress/theme/blocks/sheet/render.php +39 -0
- package/templates/wordpress/theme/blocks/sheet/sheet.figma.ts +38 -0
- package/templates/wordpress/theme/blocks/sheet-footer/block.json +25 -0
- package/templates/wordpress/theme/blocks/sheet-footer/render.php +18 -0
- package/templates/wordpress/theme/build-js.mjs +22 -0
- package/templates/wordpress/theme/code-connect/accordion-item.figma.ts +47 -0
- package/templates/wordpress/theme/code-connect/accordion.figma.ts +37 -0
- package/templates/wordpress/theme/code-connect/avatar.figma.ts +25 -0
- package/templates/wordpress/theme/code-connect/breadcrumb.figma.ts +12 -0
- package/templates/wordpress/theme/code-connect/button.figma.ts +360 -0
- package/templates/wordpress/theme/code-connect/card.figma.ts +45 -0
- package/templates/wordpress/theme/code-connect/icon-button.figma.ts +359 -0
- package/templates/wordpress/theme/code-connect/navigation-menu.figma.ts +20 -0
- package/templates/wordpress/theme/code-connect/pagination.figma.ts +17 -0
- package/templates/wordpress/theme/code-connect/popover.figma.ts +42 -0
- package/templates/wordpress/theme/code-connect/tabs.figma.ts +32 -0
- package/templates/wordpress/theme/code-connect/toggle-group.figma.ts +34 -0
- package/templates/wordpress/theme/code-connect/toggle.figma.ts +356 -0
- package/templates/wordpress/theme/composer.json +7 -0
- package/templates/wordpress/theme/footer.php +4 -0
- package/templates/wordpress/theme/functions.php +86 -0
- package/templates/wordpress/theme/header.php +17 -0
- package/templates/wordpress/theme/inc/acf.php +13 -0
- package/templates/wordpress/theme/inc/blocks.php +41 -0
- package/templates/wordpress/theme/inc/carousel.php +36 -0
- package/templates/wordpress/theme/inc/components/alert.php +83 -0
- package/templates/wordpress/theme/inc/components/avatar.php +111 -0
- package/templates/wordpress/theme/inc/components/badge.php +96 -0
- package/templates/wordpress/theme/inc/components/button.php +77 -0
- package/templates/wordpress/theme/inc/components/dialog.php +98 -0
- package/templates/wordpress/theme/inc/components/item.php +111 -0
- package/templates/wordpress/theme/inc/components/popover.php +125 -0
- package/templates/wordpress/theme/inc/components/sheet.php +88 -0
- package/templates/wordpress/theme/inc/components/toggle.php +127 -0
- package/templates/wordpress/theme/inc/core-button.php +96 -0
- package/templates/wordpress/theme/inc/core-card.php +30 -0
- package/templates/wordpress/theme/inc/core-layout.php +76 -0
- package/templates/wordpress/theme/inc/core-navigation.php +31 -0
- package/templates/wordpress/theme/inc/core-pagination.php +87 -0
- package/templates/wordpress/theme/inc/header.php +39 -0
- package/templates/wordpress/theme/inc/icons.generated.php +94 -0
- package/templates/wordpress/theme/inc/icons.php +70 -0
- package/templates/wordpress/theme/inc/looks.generated.php +18 -0
- package/templates/wordpress/theme/inc/media.php +183 -0
- package/templates/wordpress/theme/inc/sections.php +16 -0
- package/templates/wordpress/theme/index.php +24 -0
- package/templates/wordpress/theme/package-lock.json +1637 -0
- package/templates/wordpress/theme/package.json +23 -0
- package/templates/wordpress/theme/parts/header.html +23 -0
- package/templates/wordpress/theme/patterns/blog-card-grid.php +41 -0
- package/templates/wordpress/theme/patterns/card.php +46 -0
- package/templates/wordpress/theme/patterns/contact-centered.php +22 -0
- package/templates/wordpress/theme/patterns/cta-left.php +25 -0
- package/templates/wordpress/theme/patterns/faq-centered.php +36 -0
- package/templates/wordpress/theme/patterns/header-inline.php +33 -0
- package/templates/wordpress/theme/patterns/header-stacked.php +25 -0
- package/templates/wordpress/theme/patterns/hero-centered.php +28 -0
- package/templates/wordpress/theme/patterns/hero-split.php +41 -0
- package/templates/wordpress/theme/patterns/section.php +28 -0
- package/templates/wordpress/theme/src/app.css +45 -0
- package/templates/wordpress/theme/src/carousel.css +93 -0
- package/templates/wordpress/theme/src/carousel.js +94 -0
- package/templates/wordpress/theme/src/checkbox.css +102 -0
- package/templates/wordpress/theme/src/core-accordion.css +158 -0
- package/templates/wordpress/theme/src/core-avatar.css +68 -0
- package/templates/wordpress/theme/src/core-breadcrumbs.css +124 -0
- package/templates/wordpress/theme/src/core-button-editor.css +45 -0
- package/templates/wordpress/theme/src/core-button.css +155 -0
- package/templates/wordpress/theme/src/core-card.css +157 -0
- package/templates/wordpress/theme/src/core-layout.css +73 -0
- package/templates/wordpress/theme/src/core-navigation.css +290 -0
- package/templates/wordpress/theme/src/core-pagination.css +112 -0
- package/templates/wordpress/theme/src/core-table.css +88 -0
- package/templates/wordpress/theme/src/core-tabs.css +86 -0
- package/templates/wordpress/theme/src/dialog.css +29 -0
- package/templates/wordpress/theme/src/editor.css +65 -0
- package/templates/wordpress/theme/src/field.css +95 -0
- package/templates/wordpress/theme/src/fonts.css +3 -0
- package/templates/wordpress/theme/src/gravityforms.css +919 -0
- package/templates/wordpress/theme/src/header.css +80 -0
- package/templates/wordpress/theme/src/icons.generated.css +16 -0
- package/templates/wordpress/theme/src/input-group.css +105 -0
- package/templates/wordpress/theme/src/input.css +116 -0
- package/templates/wordpress/theme/src/item.css +7 -0
- package/templates/wordpress/theme/src/looks.generated.css +358 -0
- package/templates/wordpress/theme/src/media.css +160 -0
- package/templates/wordpress/theme/src/radio.css +88 -0
- package/templates/wordpress/theme/src/sections.css +80 -0
- package/templates/wordpress/theme/src/sheet.css +24 -0
- package/templates/wordpress/theme/src/switch.css +120 -0
- package/templates/wordpress/theme/src/text-styles.css +44 -0
- package/templates/wordpress/theme/src/textarea.css +61 -0
- package/templates/wordpress/theme/src/toggle-group.css +28 -0
- package/templates/wordpress/theme/src/typeset.css +510 -0
- package/templates/wordpress/theme/style.css +13 -0
- package/templates/wordpress/theme/theme.json +362 -0
- package/templates/wordpress/web/wp-config.php +38 -0
- package/templates/wordpress/wp-cli.yml +1 -0
- package/templates/next/.claude/skills/ai-elements/SKILL.md +0 -160
- package/templates/next/.claude/skills/ai-elements/references/agent.md +0 -134
- package/templates/next/.claude/skills/ai-elements/references/artifact.md +0 -84
- package/templates/next/.claude/skills/ai-elements/references/attachments.md +0 -190
- package/templates/next/.claude/skills/ai-elements/references/audio-player.md +0 -134
- package/templates/next/.claude/skills/ai-elements/references/canvas.md +0 -34
- package/templates/next/.claude/skills/ai-elements/references/chain-of-thought.md +0 -81
- package/templates/next/.claude/skills/ai-elements/references/checkpoint.md +0 -183
- package/templates/next/.claude/skills/ai-elements/references/code-block.md +0 -170
- package/templates/next/.claude/skills/ai-elements/references/commit.md +0 -177
- package/templates/next/.claude/skills/ai-elements/references/confirmation.md +0 -262
- package/templates/next/.claude/skills/ai-elements/references/connection.md +0 -34
- package/templates/next/.claude/skills/ai-elements/references/context.md +0 -126
- package/templates/next/.claude/skills/ai-elements/references/controls.md +0 -32
- package/templates/next/.claude/skills/ai-elements/references/conversation.md +0 -224
- package/templates/next/.claude/skills/ai-elements/references/edge.md +0 -52
- package/templates/next/.claude/skills/ai-elements/references/environment-variables.md +0 -102
- package/templates/next/.claude/skills/ai-elements/references/file-tree.md +0 -72
- package/templates/next/.claude/skills/ai-elements/references/image.md +0 -146
- package/templates/next/.claude/skills/ai-elements/references/inline-citation.md +0 -299
- package/templates/next/.claude/skills/ai-elements/references/jsx-preview.md +0 -104
- package/templates/next/.claude/skills/ai-elements/references/message.md +0 -237
- package/templates/next/.claude/skills/ai-elements/references/mic-selector.md +0 -189
- package/templates/next/.claude/skills/ai-elements/references/model-selector.md +0 -112
- package/templates/next/.claude/skills/ai-elements/references/node.md +0 -73
- package/templates/next/.claude/skills/ai-elements/references/open-in-chat.md +0 -67
- package/templates/next/.claude/skills/ai-elements/references/package-info.md +0 -95
- package/templates/next/.claude/skills/ai-elements/references/panel.md +0 -33
- package/templates/next/.claude/skills/ai-elements/references/persona.md +0 -166
- package/templates/next/.claude/skills/ai-elements/references/plan.md +0 -79
- package/templates/next/.claude/skills/ai-elements/references/prompt-input.md +0 -579
- package/templates/next/.claude/skills/ai-elements/references/queue.md +0 -172
- package/templates/next/.claude/skills/ai-elements/references/reasoning.md +0 -238
- package/templates/next/.claude/skills/ai-elements/references/sandbox.md +0 -129
- package/templates/next/.claude/skills/ai-elements/references/schema-display.md +0 -102
- package/templates/next/.claude/skills/ai-elements/references/shimmer.md +0 -48
- package/templates/next/.claude/skills/ai-elements/references/snippet.md +0 -64
- package/templates/next/.claude/skills/ai-elements/references/sources.md +0 -209
- package/templates/next/.claude/skills/ai-elements/references/speech-input.md +0 -163
- package/templates/next/.claude/skills/ai-elements/references/stack-trace.md +0 -224
- package/templates/next/.claude/skills/ai-elements/references/suggestion.md +0 -124
- package/templates/next/.claude/skills/ai-elements/references/task.md +0 -222
- package/templates/next/.claude/skills/ai-elements/references/terminal.md +0 -103
- package/templates/next/.claude/skills/ai-elements/references/test-results.md +0 -157
- package/templates/next/.claude/skills/ai-elements/references/tool.md +0 -285
- package/templates/next/.claude/skills/ai-elements/references/toolbar.md +0 -32
- package/templates/next/.claude/skills/ai-elements/references/transcription.md +0 -120
- package/templates/next/.claude/skills/ai-elements/references/voice-selector.md +0 -241
- package/templates/next/.claude/skills/ai-elements/references/web-preview.md +0 -200
- package/templates/next/.claude/skills/ai-elements/scripts/agent.tsx +0 -61
- package/templates/next/.claude/skills/ai-elements/scripts/artifact.tsx +0 -127
- package/templates/next/.claude/skills/ai-elements/scripts/attachments-inline.tsx +0 -128
- package/templates/next/.claude/skills/ai-elements/scripts/attachments-list.tsx +0 -95
- package/templates/next/.claude/skills/ai-elements/scripts/attachments.tsx +0 -85
- package/templates/next/.claude/skills/ai-elements/scripts/audio-player-remote.tsx +0 -35
- package/templates/next/.claude/skills/ai-elements/scripts/audio-player.tsx +0 -68
- package/templates/next/.claude/skills/ai-elements/scripts/chain-of-thought.tsx +0 -82
- package/templates/next/.claude/skills/ai-elements/scripts/checkpoint.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/code-block-dark.tsx +0 -46
- package/templates/next/.claude/skills/ai-elements/scripts/code-block.tsx +0 -120
- package/templates/next/.claude/skills/ai-elements/scripts/commit.tsx +0 -94
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation-accepted.tsx +0 -40
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation-rejected.tsx +0 -40
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation-request.tsx +0 -54
- package/templates/next/.claude/skills/ai-elements/scripts/confirmation.tsx +0 -55
- package/templates/next/.claude/skills/ai-elements/scripts/context.tsx +0 -45
- package/templates/next/.claude/skills/ai-elements/scripts/conversation.tsx +0 -177
- package/templates/next/.claude/skills/ai-elements/scripts/environment-variables.tsx +0 -62
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree-basic.tsx +0 -18
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree-expanded.tsx +0 -21
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree-selection.tsx +0 -24
- package/templates/next/.claude/skills/ai-elements/scripts/file-tree.tsx +0 -42
- package/templates/next/.claude/skills/ai-elements/scripts/image.tsx +0 -20
- package/templates/next/.claude/skills/ai-elements/scripts/inline-citation.tsx +0 -97
- package/templates/next/.claude/skills/ai-elements/scripts/jsx-preview.tsx +0 -104
- package/templates/next/.claude/skills/ai-elements/scripts/message.tsx +0 -365
- package/templates/next/.claude/skills/ai-elements/scripts/mic-selector.tsx +0 -49
- package/templates/next/.claude/skills/ai-elements/scripts/model-selector.tsx +0 -365
- package/templates/next/.claude/skills/ai-elements/scripts/open-in-chat.tsx +0 -33
- package/templates/next/.claude/skills/ai-elements/scripts/package-info.tsx +0 -51
- package/templates/next/.claude/skills/ai-elements/scripts/persona-command.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/persona-glint.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/persona-halo.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/persona-mana.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/persona-obsidian.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/persona-opal.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/plan.tsx +0 -65
- package/templates/next/.claude/skills/ai-elements/scripts/prompt-input-cursor.tsx +0 -502
- package/templates/next/.claude/skills/ai-elements/scripts/prompt-input-tooltip.tsx +0 -44
- package/templates/next/.claude/skills/ai-elements/scripts/prompt-input.tsx +0 -267
- package/templates/next/.claude/skills/ai-elements/scripts/queue-prompt-input.tsx +0 -394
- package/templates/next/.claude/skills/ai-elements/scripts/queue.tsx +0 -295
- package/templates/next/.claude/skills/ai-elements/scripts/reasoning.tsx +0 -71
- package/templates/next/.claude/skills/ai-elements/scripts/sandbox.tsx +0 -178
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-basic.tsx +0 -9
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-body.tsx +0 -20
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-nested.tsx +0 -23
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display-params.tsx +0 -16
- package/templates/next/.claude/skills/ai-elements/scripts/schema-display.tsx +0 -110
- package/templates/next/.claude/skills/ai-elements/scripts/shimmer-duration.tsx +0 -31
- package/templates/next/.claude/skills/ai-elements/scripts/shimmer-elements.tsx +0 -43
- package/templates/next/.claude/skills/ai-elements/scripts/shimmer.tsx +0 -17
- package/templates/next/.claude/skills/ai-elements/scripts/snippet-plain.tsx +0 -19
- package/templates/next/.claude/skills/ai-elements/scripts/snippet.tsx +0 -25
- package/templates/next/.claude/skills/ai-elements/scripts/sources-custom.tsx +0 -39
- package/templates/next/.claude/skills/ai-elements/scripts/sources.tsx +0 -32
- package/templates/next/.claude/skills/ai-elements/scripts/speech-input.tsx +0 -84
- package/templates/next/.claude/skills/ai-elements/scripts/stack-trace-collapsed.tsx +0 -39
- package/templates/next/.claude/skills/ai-elements/scripts/stack-trace-no-internal.tsx +0 -41
- package/templates/next/.claude/skills/ai-elements/scripts/stack-trace.tsx +0 -58
- package/templates/next/.claude/skills/ai-elements/scripts/suggestion-input.tsx +0 -144
- package/templates/next/.claude/skills/ai-elements/scripts/suggestion.tsx +0 -32
- package/templates/next/.claude/skills/ai-elements/scripts/task.tsx +0 -59
- package/templates/next/.claude/skills/ai-elements/scripts/terminal-basic.tsx +0 -7
- package/templates/next/.claude/skills/ai-elements/scripts/terminal-clear.tsx +0 -19
- package/templates/next/.claude/skills/ai-elements/scripts/terminal-streaming.tsx +0 -38
- package/templates/next/.claude/skills/ai-elements/scripts/terminal.tsx +0 -82
- package/templates/next/.claude/skills/ai-elements/scripts/test-results-basic.tsx +0 -27
- package/templates/next/.claude/skills/ai-elements/scripts/test-results-errors.tsx +0 -51
- package/templates/next/.claude/skills/ai-elements/scripts/test-results-suites.tsx +0 -40
- package/templates/next/.claude/skills/ai-elements/scripts/test-results.tsx +0 -102
- package/templates/next/.claude/skills/ai-elements/scripts/tool-input-available.tsx +0 -31
- package/templates/next/.claude/skills/ai-elements/scripts/tool-input-streaming.tsx +0 -30
- package/templates/next/.claude/skills/ai-elements/scripts/tool-output-available.tsx +0 -80
- package/templates/next/.claude/skills/ai-elements/scripts/tool-output-error.tsx +0 -44
- package/templates/next/.claude/skills/ai-elements/scripts/tool.tsx +0 -222
- package/templates/next/.claude/skills/ai-elements/scripts/transcription.tsx +0 -290
- package/templates/next/.claude/skills/ai-elements/scripts/voice-selector.tsx +0 -245
- package/templates/next/.claude/skills/ai-elements/scripts/web-preview.tsx +0 -115
- package/templates/next/.claude/skills/ai-sdk/SKILL.md +0 -78
- package/templates/next/.claude/skills/frontend-design/LICENSE.txt +0 -177
- package/templates/next/.claude/skills/frontend-design/SKILL.md +0 -55
- package/templates/next/.claude/skills/gc-implement-figma-page/SKILL.md +0 -93
- package/templates/next/.claude/skills/migrate-ai-sdk-v6-to-v7/SKILL.md +0 -108
- package/templates/next/.claude/skills/vercel-composition-patterns/AGENTS.md +0 -946
- package/templates/next/.claude/skills/vercel-composition-patterns/README.md +0 -60
- package/templates/next/.claude/skills/vercel-composition-patterns/SKILL.md +0 -89
- package/templates/next/.claude/skills/vercel-composition-patterns/metadata.json +0 -11
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/_sections.md +0 -29
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/_template.md +0 -24
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +0 -100
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/architecture-compound-components.md +0 -112
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +0 -87
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +0 -100
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/react19-no-forwardref.md +0 -42
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/state-context-interface.md +0 -191
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/state-decouple-implementation.md +0 -113
- package/templates/next/.claude/skills/vercel-composition-patterns/rules/state-lift-state.md +0 -125
- package/templates/next/.claude/skills/vercel-react-best-practices/AGENTS.md +0 -3810
- package/templates/next/.claude/skills/vercel-react-best-practices/README.md +0 -123
- package/templates/next/.claude/skills/vercel-react-best-practices/SKILL.md +0 -149
- package/templates/next/.claude/skills/vercel-react-best-practices/metadata.json +0 -15
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/_sections.md +0 -46
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/_template.md +0 -28
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-effect-event-deps.md +0 -56
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-init-once.md +0 -42
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +0 -39
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-api-routes.md +0 -38
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +0 -37
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-defer-await.md +0 -82
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-dependencies.md +0 -51
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-parallel.md +0 -28
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-analyzable-paths.md +0 -63
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -60
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/bundle-preload.md +0 -50
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -107
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-early-exit.md +0 -50
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-flatmap-filter.md +0 -60
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-index-maps.md +0 -37
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +0 -49
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-request-idle-callback.md +0 -105
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-activity.md +0 -26
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +0 -30
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-resource-hints.md +0 -85
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-script-defer-async.md +0 -68
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +0 -75
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +0 -40
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +0 -38
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-memo.md +0 -44
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +0 -45
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-no-inline-components.md +0 -82
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -35
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +0 -64
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-use-deferred-value.md +0 -59
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +0 -73
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-auth-actions.md +0 -96
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-cache-react.md +0 -76
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-dedup-props.md +0 -65
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-hoist-static-io.md +0 -149
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-no-shared-module-state.md +0 -50
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +0 -34
- package/templates/next/.claude/skills/vercel-react-best-practices/rules/server-serialization.md +0 -38
- package/templates/next/.claude/skills/web-design-guidelines/SKILL.md +0 -39
- package/templates/next/CLAUDE.md +0 -42
- package/templates/next/README.md +0 -30
- package/templates/next/_gitignore +0 -4
- package/templates/next/app/layout.tsx +0 -44
- package/templates/next/globals.d.ts +0 -8
- package/templates/next/next.config.mjs +0 -6
- package/templates/next/package.json +0 -38
- package/templates/next/postcss.config.mjs +0 -5
- package/templates/next/skills-lock.json +0 -47
- package/templates/next/tsconfig.json +0 -36
- package/templates/shopify-theme/.claude/skills/gc-shopify-block/SKILL.md +0 -44
- package/templates/shopify-theme/.claude/skills/shopify-dev/SKILL.md +0 -51
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/log_skill_use.mjs +0 -205
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/search_docs.mjs +0 -272
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/track-telemetry.ps1 +0 -361
- package/templates/shopify-theme/.claude/skills/shopify-dev/scripts/track-telemetry.sh +0 -527
- package/templates/shopify-theme/.claude/skills/shopify-liquid/SKILL.md +0 -343
- package/templates/shopify-theme/.claude/skills/shopify-liquid/blocks/hero-slide.liquid +0 -342
- package/templates/shopify-theme/.claude/skills/shopify-liquid/config/settings_schema.json +0 -1
- package/templates/shopify-theme/.claude/skills/shopify-liquid/featured-collection.liquid +0 -457
- package/templates/shopify-theme/.claude/skills/shopify-liquid/locales/en.default.json +0 -10
- package/templates/shopify-theme/.claude/skills/shopify-liquid/locales/en.default.schema.json +0 -103
- package/templates/shopify-theme/.claude/skills/shopify-liquid/package.json +0 -10
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/search_docs.mjs +0 -759
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/track-telemetry.ps1 +0 -361
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/track-telemetry.sh +0 -527
- package/templates/shopify-theme/.claude/skills/shopify-liquid/scripts/validate.mjs +0 -654
- package/templates/shopify-theme/.claude/skills/shopify-liquid/sections/hero-banner.liquid +0 -329
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/SKILL.md +0 -165
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/scripts/log_skill_use.mjs +0 -205
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/scripts/track-telemetry.ps1 +0 -361
- package/templates/shopify-theme/.claude/skills/shopify-use-shopify-cli/scripts/track-telemetry.sh +0 -527
- package/templates/shopify-theme/.shopifyignore +0 -9
- package/templates/shopify-theme/CLAUDE.md +0 -51
- package/templates/shopify-theme/README.md +0 -92
- package/templates/shopify-theme/assets/baseline.css +0 -8390
- package/templates/shopify-theme/assets/swiper-element-bundle.min.js +0 -14
- package/templates/shopify-theme/blocks/_accordion.liquid +0 -59
- package/templates/shopify-theme/blocks/_carousel-slide.liquid +0 -24
- package/templates/shopify-theme/blocks/_modal-body.liquid +0 -18
- package/templates/shopify-theme/blocks/_modal-footer.liquid +0 -36
- package/templates/shopify-theme/blocks/_modal-header.liquid +0 -19
- package/templates/shopify-theme/blocks/_modal-media.liquid +0 -37
- package/templates/shopify-theme/blocks/accordion-group.liquid +0 -53
- package/templates/shopify-theme/blocks/alert.liquid +0 -92
- package/templates/shopify-theme/blocks/avatar-group.liquid +0 -51
- package/templates/shopify-theme/blocks/avatar.liquid +0 -56
- package/templates/shopify-theme/blocks/badge.liquid +0 -33
- package/templates/shopify-theme/blocks/breadcrumb.liquid +0 -45
- package/templates/shopify-theme/blocks/button.liquid +0 -51
- package/templates/shopify-theme/blocks/buttons.liquid +0 -41
- package/templates/shopify-theme/blocks/card.liquid +0 -67
- package/templates/shopify-theme/blocks/carousel.liquid +0 -55
- package/templates/shopify-theme/blocks/column.liquid +0 -33
- package/templates/shopify-theme/blocks/image.liquid +0 -37
- package/templates/shopify-theme/blocks/modal.liquid +0 -52
- package/templates/shopify-theme/blocks/popover.liquid +0 -24
- package/templates/shopify-theme/blocks/skeleton.liquid +0 -22
- package/templates/shopify-theme/blocks/spinner.liquid +0 -22
- package/templates/shopify-theme/blocks/split.liquid +0 -39
- package/templates/shopify-theme/blocks/tab.liquid +0 -19
- package/templates/shopify-theme/blocks/tabs.liquid +0 -78
- package/templates/shopify-theme/blocks/tags.liquid +0 -55
- package/templates/shopify-theme/blocks/text.liquid +0 -55
- package/templates/shopify-theme/blocks/tooltip.liquid +0 -50
- package/templates/shopify-theme/blocks/typography.liquid +0 -90
- package/templates/shopify-theme/config/settings_data.json +0 -4
- package/templates/shopify-theme/config/settings_schema.json +0 -10
- package/templates/shopify-theme/layout/theme.liquid +0 -21
- package/templates/shopify-theme/locales/en.default.json +0 -5
- package/templates/shopify-theme/locales/en.default.schema.json +0 -131
- package/templates/shopify-theme/package.json +0 -21
- package/templates/shopify-theme/scripts/sync-tokens.mjs +0 -32
- package/templates/shopify-theme/sections/baseline-components.liquid +0 -81
- package/templates/shopify-theme/skills-lock.json +0 -23
- package/templates/shopify-theme/snippets/lucide.liquid +0 -34
- package/templates/shopify-theme/snippets/pagination.liquid +0 -44
- package/templates/shopify-theme/templates/collection.json +0 -13
- package/templates/shopify-theme/templates/gift_card.liquid +0 -5
- package/templates/shopify-theme/templates/index.json +0 -135
- package/templates/shopify-theme/templates/list-collections.json +0 -13
- package/templates/shopify-theme/templates/product.json +0 -13
- package/templates/wordpress/.claude/CLAUDE.md +0 -37
- package/templates/wordpress/.claude/skills/wp-block-development/SKILL.md +0 -174
- package/templates/wordpress/.claude/skills/wp-block-development/references/attributes-and-serialization.md +0 -22
- package/templates/wordpress/.claude/skills/wp-block-development/references/block-json.md +0 -49
- package/templates/wordpress/.claude/skills/wp-block-development/references/creating-new-blocks.md +0 -46
- package/templates/wordpress/.claude/skills/wp-block-development/references/debugging.md +0 -36
- package/templates/wordpress/.claude/skills/wp-block-development/references/deprecations.md +0 -24
- package/templates/wordpress/.claude/skills/wp-block-development/references/dynamic-rendering.md +0 -23
- package/templates/wordpress/.claude/skills/wp-block-development/references/inner-blocks.md +0 -25
- package/templates/wordpress/.claude/skills/wp-block-development/references/registration.md +0 -30
- package/templates/wordpress/.claude/skills/wp-block-development/references/supports-and-wrappers.md +0 -18
- package/templates/wordpress/.claude/skills/wp-block-development/references/tooling-and-testing.md +0 -21
- package/templates/wordpress/.claude/skills/wp-block-development/scripts/list_blocks.mjs +0 -121
- package/templates/wordpress/.claude/skills/wp-block-themes/SKILL.md +0 -116
- package/templates/wordpress/.claude/skills/wp-block-themes/references/creating-new-block-theme.md +0 -37
- package/templates/wordpress/.claude/skills/wp-block-themes/references/debugging.md +0 -24
- package/templates/wordpress/.claude/skills/wp-block-themes/references/patterns.md +0 -18
- package/templates/wordpress/.claude/skills/wp-block-themes/references/style-variations.md +0 -14
- package/templates/wordpress/.claude/skills/wp-block-themes/references/templates-and-parts.md +0 -16
- package/templates/wordpress/.claude/skills/wp-block-themes/references/theme-json.md +0 -59
- package/templates/wordpress/.claude/skills/wp-block-themes/scripts/detect_block_themes.mjs +0 -117
- package/templates/wordpress/.claude/skills/wp-performance/SKILL.md +0 -146
- package/templates/wordpress/.claude/skills/wp-performance/references/autoload-options.md +0 -24
- package/templates/wordpress/.claude/skills/wp-performance/references/cron.md +0 -20
- package/templates/wordpress/.claude/skills/wp-performance/references/database.md +0 -20
- package/templates/wordpress/.claude/skills/wp-performance/references/http-api.md +0 -15
- package/templates/wordpress/.claude/skills/wp-performance/references/measurement.md +0 -21
- package/templates/wordpress/.claude/skills/wp-performance/references/object-cache.md +0 -24
- package/templates/wordpress/.claude/skills/wp-performance/references/query-monitor-headless.md +0 -38
- package/templates/wordpress/.claude/skills/wp-performance/references/server-timing.md +0 -22
- package/templates/wordpress/.claude/skills/wp-performance/references/wp-cli-doctor.md +0 -24
- package/templates/wordpress/.claude/skills/wp-performance/references/wp-cli-profile.md +0 -32
- package/templates/wordpress/.claude/skills/wp-performance/scripts/perf_inspect.mjs +0 -128
- package/templates/wordpress/.claude/skills/wp-plugin-development/SKILL.md +0 -112
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/data-and-cron.md +0 -19
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/debugging.md +0 -19
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/lifecycle.md +0 -33
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/security.md +0 -29
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/settings-api.md +0 -22
- package/templates/wordpress/.claude/skills/wp-plugin-development/references/structure.md +0 -16
- package/templates/wordpress/.claude/skills/wp-plugin-development/scripts/detect_plugins.mjs +0 -122
- package/templates/wordpress/.claude/skills/wp-rest-api/SKILL.md +0 -114
- package/templates/wordpress/.claude/skills/wp-rest-api/references/authentication.md +0 -18
- package/templates/wordpress/.claude/skills/wp-rest-api/references/custom-content-types.md +0 -20
- package/templates/wordpress/.claude/skills/wp-rest-api/references/discovery-and-params.md +0 -20
- package/templates/wordpress/.claude/skills/wp-rest-api/references/responses-and-fields.md +0 -30
- package/templates/wordpress/.claude/skills/wp-rest-api/references/routes-and-endpoints.md +0 -36
- package/templates/wordpress/.claude/skills/wp-rest-api/references/schema.md +0 -22
- package/templates/wordpress/.ddev/docker-compose.packages.yaml +0 -14
- package/templates/wordpress/.ddev/docker-compose.redis.yaml +0 -11
- package/templates/wordpress/.env.example +0 -33
- package/templates/wordpress/CLAUDE.md +0 -34
- package/templates/wordpress/_gitignore +0 -33
- package/templates/wordpress/composer.lock +0 -1594
- package/templates/wordpress/package.json +0 -13
- package/templates/wordpress/scripts/seed.sh +0 -64
- package/templates/wordpress/skills-lock.json +0 -35
- package/templates/wordpress/wp-config.php +0 -89
- package/templates/wordpress/wp-content/index.php +0 -2
- package/templates/wordpress/wp-content/mu-plugins/baseline-bootstrap.php +0 -26
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/ba28zZ49PAkXhE7PW5kyT9/Design-System?node-id=332-47
|
|
2
|
+
// source=registry/src/ui/button/button.tsx
|
|
3
|
+
// component=Button
|
|
4
|
+
// Code Connect template (v2, parserless). Spec: components/button/spec.md. Vocabulary: ADR-0013.
|
|
5
|
+
// Figma property VALUES are identical to the code enums, so every getEnum map is an identity map.
|
|
6
|
+
import figma from "figma";
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// BASELINE_ICONS_START (generated by tokens/icons.mjs from tokens/icons/vocabulary.json; do not edit)
|
|
10
|
+
const BASELINE_SYSTEM_ICONS: Record<string, string> = {
|
|
11
|
+
"brands/amazon": "brand-amazon",
|
|
12
|
+
"brands/americanexpress": "brand-americanexpress",
|
|
13
|
+
"brands/apple": "brand-apple",
|
|
14
|
+
"brands/applepay": "brand-applepay",
|
|
15
|
+
"brands/bluesky": "brand-bluesky",
|
|
16
|
+
"brands/discord": "brand-discord",
|
|
17
|
+
"brands/facebook": "brand-facebook",
|
|
18
|
+
"brands/github": "brand-github",
|
|
19
|
+
"brands/google": "brand-google",
|
|
20
|
+
"brands/googlepay": "brand-googlepay",
|
|
21
|
+
"brands/instagram": "brand-instagram",
|
|
22
|
+
"brands/linkedin": "brand-linkedin",
|
|
23
|
+
"brands/mastercard": "brand-mastercard",
|
|
24
|
+
"brands/paypal": "brand-paypal",
|
|
25
|
+
"brands/pinterest": "brand-pinterest",
|
|
26
|
+
"brands/reddit": "brand-reddit",
|
|
27
|
+
"brands/shopify": "brand-shopify",
|
|
28
|
+
"brands/snapchat": "brand-snapchat",
|
|
29
|
+
"brands/spotify": "brand-spotify",
|
|
30
|
+
"brands/telegram": "brand-telegram",
|
|
31
|
+
"brands/threads": "brand-threads",
|
|
32
|
+
"brands/tiktok": "brand-tiktok",
|
|
33
|
+
"brands/tripadvisor": "brand-tripadvisor",
|
|
34
|
+
"brands/vimeo": "brand-vimeo",
|
|
35
|
+
"brands/visa": "brand-visa",
|
|
36
|
+
"brands/whatsapp": "brand-whatsapp",
|
|
37
|
+
"brands/wordpress": "brand-wordpress",
|
|
38
|
+
"brands/x": "brand-x",
|
|
39
|
+
"brands/yelp": "brand-yelp",
|
|
40
|
+
"brands/youtube": "brand-youtube",
|
|
41
|
+
"lucide/arrow-down": "arrow-down",
|
|
42
|
+
"lucide/arrow-left": "arrow-left",
|
|
43
|
+
"lucide/arrow-right": "arrow-right",
|
|
44
|
+
"lucide/arrow-up": "arrow-up",
|
|
45
|
+
"lucide/arrow-up-down": "arrow-up-down",
|
|
46
|
+
"lucide/calendar": "calendar",
|
|
47
|
+
"lucide/check": "check",
|
|
48
|
+
"lucide/chevron-down": "chevron-down",
|
|
49
|
+
"lucide/chevron-left": "chevron-left",
|
|
50
|
+
"lucide/chevron-right": "chevron-right",
|
|
51
|
+
"lucide/chevron-up": "chevron-up",
|
|
52
|
+
"lucide/chevrons-left": "chevrons-left",
|
|
53
|
+
"lucide/chevrons-right": "chevrons-right",
|
|
54
|
+
"lucide/chevrons-up-down": "chevrons-up-down",
|
|
55
|
+
"lucide/circle": "circle",
|
|
56
|
+
"lucide/circle-alert": "error",
|
|
57
|
+
"lucide/circle-check": "success",
|
|
58
|
+
"lucide/circle-x": "close-circle",
|
|
59
|
+
"lucide/clock": "clock",
|
|
60
|
+
"lucide/copy": "copy",
|
|
61
|
+
"lucide/download": "download",
|
|
62
|
+
"lucide/ellipsis": "more-horizontal",
|
|
63
|
+
"lucide/ellipsis-vertical": "more-vertical",
|
|
64
|
+
"lucide/external-link": "external-link",
|
|
65
|
+
"lucide/eye": "eye",
|
|
66
|
+
"lucide/eye-off": "eye-off",
|
|
67
|
+
"lucide/file": "file",
|
|
68
|
+
"lucide/funnel": "filter",
|
|
69
|
+
"lucide/grip-vertical": "grip-vertical",
|
|
70
|
+
"lucide/house": "home",
|
|
71
|
+
"lucide/image": "image",
|
|
72
|
+
"lucide/info": "info",
|
|
73
|
+
"lucide/link": "link",
|
|
74
|
+
"lucide/loader-circle": "loader",
|
|
75
|
+
"lucide/lock": "lock",
|
|
76
|
+
"lucide/mail": "mail",
|
|
77
|
+
"lucide/menu": "menu",
|
|
78
|
+
"lucide/minus": "minus",
|
|
79
|
+
"lucide/panel-left": "sidebar",
|
|
80
|
+
"lucide/pause": "pause",
|
|
81
|
+
"lucide/pencil": "edit",
|
|
82
|
+
"lucide/phone": "phone",
|
|
83
|
+
"lucide/play": "play",
|
|
84
|
+
"lucide/plus": "plus",
|
|
85
|
+
"lucide/refresh-cw": "refresh",
|
|
86
|
+
"lucide/search": "search",
|
|
87
|
+
"lucide/settings": "settings",
|
|
88
|
+
"lucide/share-2": "share",
|
|
89
|
+
"lucide/shopping-cart": "cart",
|
|
90
|
+
"lucide/star": "star",
|
|
91
|
+
"lucide/trash-2": "trash",
|
|
92
|
+
"lucide/triangle-alert": "warning",
|
|
93
|
+
"lucide/upload": "upload",
|
|
94
|
+
"lucide/user": "user",
|
|
95
|
+
"lucide/x": "close",
|
|
96
|
+
"material-symbols/add": "plus",
|
|
97
|
+
"material-symbols/arrow-back": "arrow-left",
|
|
98
|
+
"material-symbols/arrow-downward": "arrow-down",
|
|
99
|
+
"material-symbols/arrow-forward": "arrow-right",
|
|
100
|
+
"material-symbols/arrow-upward": "arrow-up",
|
|
101
|
+
"material-symbols/calendar-today": "calendar",
|
|
102
|
+
"material-symbols/call": "phone",
|
|
103
|
+
"material-symbols/cancel": "close-circle",
|
|
104
|
+
"material-symbols/check": "check",
|
|
105
|
+
"material-symbols/check-circle": "success",
|
|
106
|
+
"material-symbols/circle": "circle",
|
|
107
|
+
"material-symbols/close": "close",
|
|
108
|
+
"material-symbols/content-copy": "copy",
|
|
109
|
+
"material-symbols/delete": "trash",
|
|
110
|
+
"material-symbols/description": "file",
|
|
111
|
+
"material-symbols/download": "download",
|
|
112
|
+
"material-symbols/drag-indicator": "grip-vertical",
|
|
113
|
+
"material-symbols/edit": "edit",
|
|
114
|
+
"material-symbols/error": "error",
|
|
115
|
+
"material-symbols/filter-list": "filter",
|
|
116
|
+
"material-symbols/home": "home",
|
|
117
|
+
"material-symbols/image": "image",
|
|
118
|
+
"material-symbols/info": "info",
|
|
119
|
+
"material-symbols/keyboard-arrow-down": "chevron-down",
|
|
120
|
+
"material-symbols/keyboard-arrow-left": "chevron-left",
|
|
121
|
+
"material-symbols/keyboard-arrow-right": "chevron-right",
|
|
122
|
+
"material-symbols/keyboard-arrow-up": "chevron-up",
|
|
123
|
+
"material-symbols/keyboard-double-arrow-left": "chevrons-left",
|
|
124
|
+
"material-symbols/keyboard-double-arrow-right": "chevrons-right",
|
|
125
|
+
"material-symbols/link": "link",
|
|
126
|
+
"material-symbols/lock": "lock",
|
|
127
|
+
"material-symbols/mail": "mail",
|
|
128
|
+
"material-symbols/menu": "menu",
|
|
129
|
+
"material-symbols/more-horiz": "more-horizontal",
|
|
130
|
+
"material-symbols/more-vert": "more-vertical",
|
|
131
|
+
"material-symbols/open-in-new": "external-link",
|
|
132
|
+
"material-symbols/pause": "pause",
|
|
133
|
+
"material-symbols/person": "user",
|
|
134
|
+
"material-symbols/play-arrow": "play",
|
|
135
|
+
"material-symbols/progress-activity": "loader",
|
|
136
|
+
"material-symbols/refresh": "refresh",
|
|
137
|
+
"material-symbols/remove": "minus",
|
|
138
|
+
"material-symbols/schedule": "clock",
|
|
139
|
+
"material-symbols/search": "search",
|
|
140
|
+
"material-symbols/settings": "settings",
|
|
141
|
+
"material-symbols/share": "share",
|
|
142
|
+
"material-symbols/shopping-cart": "cart",
|
|
143
|
+
"material-symbols/star": "star",
|
|
144
|
+
"material-symbols/swap-vert": "arrow-up-down",
|
|
145
|
+
"material-symbols/unfold-more": "chevrons-up-down",
|
|
146
|
+
"material-symbols/upload": "upload",
|
|
147
|
+
"material-symbols/view-sidebar": "sidebar",
|
|
148
|
+
"material-symbols/visibility": "eye",
|
|
149
|
+
"material-symbols/visibility-off": "eye-off",
|
|
150
|
+
"material-symbols/warning": "warning",
|
|
151
|
+
"phosphor/arrow-down": "arrow-down",
|
|
152
|
+
"phosphor/arrow-left": "arrow-left",
|
|
153
|
+
"phosphor/arrow-right": "arrow-right",
|
|
154
|
+
"phosphor/arrow-square-out": "external-link",
|
|
155
|
+
"phosphor/arrow-up": "arrow-up",
|
|
156
|
+
"phosphor/arrows-clockwise": "refresh",
|
|
157
|
+
"phosphor/arrows-down-up": "arrow-up-down",
|
|
158
|
+
"phosphor/calendar": "calendar",
|
|
159
|
+
"phosphor/caret-double-left": "chevrons-left",
|
|
160
|
+
"phosphor/caret-double-right": "chevrons-right",
|
|
161
|
+
"phosphor/caret-down": "chevron-down",
|
|
162
|
+
"phosphor/caret-left": "chevron-left",
|
|
163
|
+
"phosphor/caret-right": "chevron-right",
|
|
164
|
+
"phosphor/caret-up": "chevron-up",
|
|
165
|
+
"phosphor/caret-up-down": "chevrons-up-down",
|
|
166
|
+
"phosphor/check": "check",
|
|
167
|
+
"phosphor/check-circle": "success",
|
|
168
|
+
"phosphor/circle": "circle",
|
|
169
|
+
"phosphor/circle-notch": "loader",
|
|
170
|
+
"phosphor/clock": "clock",
|
|
171
|
+
"phosphor/copy": "copy",
|
|
172
|
+
"phosphor/dots-six-vertical": "grip-vertical",
|
|
173
|
+
"phosphor/dots-three": "more-horizontal",
|
|
174
|
+
"phosphor/dots-three-vertical": "more-vertical",
|
|
175
|
+
"phosphor/download-simple": "download",
|
|
176
|
+
"phosphor/envelope": "mail",
|
|
177
|
+
"phosphor/eye": "eye",
|
|
178
|
+
"phosphor/eye-slash": "eye-off",
|
|
179
|
+
"phosphor/file": "file",
|
|
180
|
+
"phosphor/funnel": "filter",
|
|
181
|
+
"phosphor/gear": "settings",
|
|
182
|
+
"phosphor/house": "home",
|
|
183
|
+
"phosphor/image": "image",
|
|
184
|
+
"phosphor/info": "info",
|
|
185
|
+
"phosphor/link": "link",
|
|
186
|
+
"phosphor/list": "menu",
|
|
187
|
+
"phosphor/lock": "lock",
|
|
188
|
+
"phosphor/magnifying-glass": "search",
|
|
189
|
+
"phosphor/minus": "minus",
|
|
190
|
+
"phosphor/pause": "pause",
|
|
191
|
+
"phosphor/pencil-simple": "edit",
|
|
192
|
+
"phosphor/phone": "phone",
|
|
193
|
+
"phosphor/play": "play",
|
|
194
|
+
"phosphor/plus": "plus",
|
|
195
|
+
"phosphor/share-network": "share",
|
|
196
|
+
"phosphor/shopping-cart": "cart",
|
|
197
|
+
"phosphor/sidebar": "sidebar",
|
|
198
|
+
"phosphor/star": "star",
|
|
199
|
+
"phosphor/trash": "trash",
|
|
200
|
+
"phosphor/upload-simple": "upload",
|
|
201
|
+
"phosphor/user": "user",
|
|
202
|
+
"phosphor/warning": "warning",
|
|
203
|
+
"phosphor/warning-circle": "error",
|
|
204
|
+
"phosphor/x": "close",
|
|
205
|
+
"phosphor/x-circle": "close-circle",
|
|
206
|
+
"remix/add": "plus",
|
|
207
|
+
"remix/alert": "warning",
|
|
208
|
+
"remix/arrow-down": "arrow-down",
|
|
209
|
+
"remix/arrow-down-s": "chevron-down",
|
|
210
|
+
"remix/arrow-left": "arrow-left",
|
|
211
|
+
"remix/arrow-left-double": "chevrons-left",
|
|
212
|
+
"remix/arrow-left-s": "chevron-left",
|
|
213
|
+
"remix/arrow-right": "arrow-right",
|
|
214
|
+
"remix/arrow-right-double": "chevrons-right",
|
|
215
|
+
"remix/arrow-right-s": "chevron-right",
|
|
216
|
+
"remix/arrow-up": "arrow-up",
|
|
217
|
+
"remix/arrow-up-down": "arrow-up-down",
|
|
218
|
+
"remix/arrow-up-s": "chevron-up",
|
|
219
|
+
"remix/calendar": "calendar",
|
|
220
|
+
"remix/check": "check",
|
|
221
|
+
"remix/checkbox-blank-circle": "circle",
|
|
222
|
+
"remix/checkbox-circle": "success",
|
|
223
|
+
"remix/close": "close",
|
|
224
|
+
"remix/close-circle": "close-circle",
|
|
225
|
+
"remix/delete-bin": "trash",
|
|
226
|
+
"remix/download-2": "download",
|
|
227
|
+
"remix/draggable": "grip-vertical",
|
|
228
|
+
"remix/error-warning": "error",
|
|
229
|
+
"remix/expand-up-down": "chevrons-up-down",
|
|
230
|
+
"remix/external-link": "external-link",
|
|
231
|
+
"remix/eye": "eye",
|
|
232
|
+
"remix/eye-off": "eye-off",
|
|
233
|
+
"remix/file": "file",
|
|
234
|
+
"remix/file-copy": "copy",
|
|
235
|
+
"remix/filter": "filter",
|
|
236
|
+
"remix/home": "home",
|
|
237
|
+
"remix/image": "image",
|
|
238
|
+
"remix/information": "info",
|
|
239
|
+
"remix/layout-left": "sidebar",
|
|
240
|
+
"remix/link": "link",
|
|
241
|
+
"remix/loader-4": "loader",
|
|
242
|
+
"remix/lock": "lock",
|
|
243
|
+
"remix/mail": "mail",
|
|
244
|
+
"remix/menu": "menu",
|
|
245
|
+
"remix/more": "more-horizontal",
|
|
246
|
+
"remix/more-2": "more-vertical",
|
|
247
|
+
"remix/pause": "pause",
|
|
248
|
+
"remix/pencil": "edit",
|
|
249
|
+
"remix/phone": "phone",
|
|
250
|
+
"remix/play": "play",
|
|
251
|
+
"remix/refresh": "refresh",
|
|
252
|
+
"remix/search": "search",
|
|
253
|
+
"remix/settings-3": "settings",
|
|
254
|
+
"remix/share": "share",
|
|
255
|
+
"remix/shopping-cart": "cart",
|
|
256
|
+
"remix/star": "star",
|
|
257
|
+
"remix/subtract": "minus",
|
|
258
|
+
"remix/time": "clock",
|
|
259
|
+
"remix/upload-2": "upload",
|
|
260
|
+
"remix/user": "user",
|
|
261
|
+
"tabler/alert-circle": "error",
|
|
262
|
+
"tabler/alert-triangle": "warning",
|
|
263
|
+
"tabler/arrow-down": "arrow-down",
|
|
264
|
+
"tabler/arrow-left": "arrow-left",
|
|
265
|
+
"tabler/arrow-right": "arrow-right",
|
|
266
|
+
"tabler/arrow-up": "arrow-up",
|
|
267
|
+
"tabler/arrows-sort": "arrow-up-down",
|
|
268
|
+
"tabler/calendar": "calendar",
|
|
269
|
+
"tabler/check": "check",
|
|
270
|
+
"tabler/chevron-down": "chevron-down",
|
|
271
|
+
"tabler/chevron-left": "chevron-left",
|
|
272
|
+
"tabler/chevron-right": "chevron-right",
|
|
273
|
+
"tabler/chevron-up": "chevron-up",
|
|
274
|
+
"tabler/chevrons-left": "chevrons-left",
|
|
275
|
+
"tabler/chevrons-right": "chevrons-right",
|
|
276
|
+
"tabler/circle": "circle",
|
|
277
|
+
"tabler/circle-check": "success",
|
|
278
|
+
"tabler/circle-x": "close-circle",
|
|
279
|
+
"tabler/clock": "clock",
|
|
280
|
+
"tabler/copy": "copy",
|
|
281
|
+
"tabler/dots": "more-horizontal",
|
|
282
|
+
"tabler/dots-vertical": "more-vertical",
|
|
283
|
+
"tabler/download": "download",
|
|
284
|
+
"tabler/external-link": "external-link",
|
|
285
|
+
"tabler/eye": "eye",
|
|
286
|
+
"tabler/eye-off": "eye-off",
|
|
287
|
+
"tabler/file": "file",
|
|
288
|
+
"tabler/filter": "filter",
|
|
289
|
+
"tabler/grip-vertical": "grip-vertical",
|
|
290
|
+
"tabler/home": "home",
|
|
291
|
+
"tabler/info-circle": "info",
|
|
292
|
+
"tabler/layout-sidebar": "sidebar",
|
|
293
|
+
"tabler/link": "link",
|
|
294
|
+
"tabler/loader-2": "loader",
|
|
295
|
+
"tabler/lock": "lock",
|
|
296
|
+
"tabler/mail": "mail",
|
|
297
|
+
"tabler/menu-2": "menu",
|
|
298
|
+
"tabler/minus": "minus",
|
|
299
|
+
"tabler/pencil": "edit",
|
|
300
|
+
"tabler/phone": "phone",
|
|
301
|
+
"tabler/photo": "image",
|
|
302
|
+
"tabler/player-pause": "pause",
|
|
303
|
+
"tabler/player-play": "play",
|
|
304
|
+
"tabler/plus": "plus",
|
|
305
|
+
"tabler/refresh": "refresh",
|
|
306
|
+
"tabler/search": "search",
|
|
307
|
+
"tabler/selector": "chevrons-up-down",
|
|
308
|
+
"tabler/settings": "settings",
|
|
309
|
+
"tabler/share": "share",
|
|
310
|
+
"tabler/shopping-cart": "cart",
|
|
311
|
+
"tabler/star": "star",
|
|
312
|
+
"tabler/trash": "trash",
|
|
313
|
+
"tabler/upload": "upload",
|
|
314
|
+
"tabler/user": "user",
|
|
315
|
+
"tabler/x": "close"
|
|
316
|
+
};
|
|
317
|
+
const BASELINE_ICON_PREFIXES: Record<string, string> = {
|
|
318
|
+
"lucide": "lucide",
|
|
319
|
+
"material-symbols": "material-symbols",
|
|
320
|
+
"phosphor": "ph",
|
|
321
|
+
"remix": "ri",
|
|
322
|
+
"tabler": "tabler"
|
|
323
|
+
};
|
|
324
|
+
const BASELINE_ICON_SUFFIXES: Record<string, string> = {
|
|
325
|
+
"lucide": "",
|
|
326
|
+
"material-symbols": "-rounded",
|
|
327
|
+
"phosphor": "",
|
|
328
|
+
"remix": "-fill",
|
|
329
|
+
"tabler": "-filled"
|
|
330
|
+
};
|
|
331
|
+
// BASELINE_ICONS_END
|
|
332
|
+
|
|
333
|
+
// "<Set>/<icon>" glyph -> <Icon name="…"/> for a system icon, <Icon className="icon-[set--name]"/> for a content icon
|
|
334
|
+
const kebab = (s: string) => s.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
335
|
+
function iconCode(layerName: string, extra = "") {
|
|
336
|
+
const placeholder = instance.findInstance(layerName, { traverseInstances: true });
|
|
337
|
+
if (!placeholder || placeholder.type !== "INSTANCE") return undefined;
|
|
338
|
+
const glyph = placeholder.children.find((c) => c.type === "INSTANCE");
|
|
339
|
+
if (!glyph || glyph.type !== "INSTANCE") return undefined;
|
|
340
|
+
const slash = glyph.name.indexOf("/");
|
|
341
|
+
const set = slash < 0 ? "" : kebab(glyph.name.slice(0, slash));
|
|
342
|
+
const name = kebab(slash < 0 ? glyph.name : glyph.name.slice(slash + 1));
|
|
343
|
+
const system = BASELINE_SYSTEM_ICONS[set + "/" + name];
|
|
344
|
+
if (system) return figma.code`<Icon name="${system}"${extra} />`;
|
|
345
|
+
const prefix = BASELINE_ICON_PREFIXES[set] ?? set;
|
|
346
|
+
return figma.code`<Icon className="icon-[${prefix}--${name}${BASELINE_ICON_SUFFIXES[set] ?? ""}]"${extra} />`;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const label = instance.getString("Label");
|
|
350
|
+
const variant = instance.getEnum("Variant", {
|
|
351
|
+
default: "default",
|
|
352
|
+
secondary: "secondary",
|
|
353
|
+
outline: "outline",
|
|
354
|
+
ghost: "ghost",
|
|
355
|
+
link: "link",
|
|
356
|
+
destructive: "destructive",
|
|
357
|
+
});
|
|
358
|
+
// icon sizes are their own Figma component since 2026-10-02 (Icon Button, icon-button.figma.ts)
|
|
359
|
+
const size = instance.getEnum("Size", { xs: "xs", sm: "sm", md: "md", lg: "lg" });
|
|
360
|
+
// hover / focus are CSS states. disabled is a prop; loading is a composition (no loading prop since 2026-10-02):
|
|
361
|
+
// a Spinner on the icon's side (the start when Icon=none) and disabled
|
|
362
|
+
const state = instance.getEnum("State", {
|
|
363
|
+
default: "default",
|
|
364
|
+
hover: "default",
|
|
365
|
+
focus: "default",
|
|
366
|
+
disabled: "disabled",
|
|
367
|
+
loading: "loading",
|
|
368
|
+
});
|
|
369
|
+
// Show booleans are slot conveniences: each maps to a CHILD, never to a prop (ADR-0013)
|
|
370
|
+
// Icon (none | start | end, 2026-10-02) replaced Show Left / Right Icon: one "Icon" layer on the side it names
|
|
371
|
+
const iconSide = instance.getEnum("Icon", { none: "none", start: "start", end: "end" });
|
|
372
|
+
const showKbd = instance.getBoolean("Show Keyboard Shortcut");
|
|
373
|
+
// No count: Count left the Figma component on 2026-10-01. A count is a Badge the designer places over the Button,
|
|
374
|
+
// which Code Connect maps on its own; in code it is a Badge child with positioning classes (button.tsx).
|
|
375
|
+
|
|
376
|
+
const loading = state === "loading";
|
|
377
|
+
const leftIcon = loading
|
|
378
|
+
? iconSide !== "end" ? figma.code`<Spinner data-icon="inline-start" />` : undefined
|
|
379
|
+
: iconSide === "start" ? iconCode("Icon", ' data-icon="inline-start"') : undefined;
|
|
380
|
+
const rightIcon = loading
|
|
381
|
+
? iconSide === "end" ? figma.code`<Spinner data-icon="inline-end" />` : undefined
|
|
382
|
+
: iconSide === "end" ? iconCode("Icon", ' data-icon="inline-end"') : undefined;
|
|
383
|
+
|
|
384
|
+
let kbd;
|
|
385
|
+
const kbdGroup = showKbd ? instance.findInstance("Kbd Group", { traverseInstances: true }) : null;
|
|
386
|
+
if (kbdGroup && kbdGroup.type === "INSTANCE") kbd = kbdGroup.executeTemplate().example;
|
|
387
|
+
|
|
388
|
+
export default {
|
|
389
|
+
example: figma.code`
|
|
390
|
+
<Button
|
|
391
|
+
${variant !== "default" ? figma.code`variant="${variant}"` : ""}
|
|
392
|
+
${size !== "md" ? figma.code`size="${size}"` : ""}
|
|
393
|
+
${state !== "default" ? "disabled" : ""}
|
|
394
|
+
>
|
|
395
|
+
${leftIcon ? figma.code`${leftIcon}` : ""}
|
|
396
|
+
${label}
|
|
397
|
+
${kbd ? figma.code`${kbd}` : ""}
|
|
398
|
+
${rightIcon ? figma.code`${rightIcon}` : ""}
|
|
399
|
+
</Button>
|
|
400
|
+
`,
|
|
401
|
+
imports: [
|
|
402
|
+
'import { Button } from "@/components/ui/button"',
|
|
403
|
+
'import { Icon } from "@/components/ui/icon"',
|
|
404
|
+
...(loading ? ['import { Spinner } from "@/components/ui/spinner"'] : []),
|
|
405
|
+
],
|
|
406
|
+
id: "button",
|
|
407
|
+
metadata: { nestable: true },
|
|
408
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/ba28zZ49PAkXhE7PW5kyT9/Design-System?node-id=4358-14597
|
|
2
|
+
// source=registry/src/ui/card/card.tsx
|
|
3
|
+
// component=Card
|
|
4
|
+
// Code Connect template (v2, parserless). Spec: components/card/spec.md.
|
|
5
|
+
import figma from "figma";
|
|
6
|
+
const instance = figma.selectedInstance;
|
|
7
|
+
|
|
8
|
+
const size = instance.getEnum("Size", { md: "md", sm: "sm" });
|
|
9
|
+
// Show booleans map to CHILDREN, never to props (ADR-0013). Since 2026-10-02 every part lives on the Card itself: the
|
|
10
|
+
// header's Title / Description are text properties, Actions / Content / Footer are slots on the root.
|
|
11
|
+
const showMedia = instance.getBoolean("Show Media");
|
|
12
|
+
const showHeader = instance.getBoolean("Show Header");
|
|
13
|
+
const showFooter = instance.getBoolean("Show Footer");
|
|
14
|
+
const title = instance.getString("Title");
|
|
15
|
+
const description = instance.getBoolean("Show Description") ? instance.getString("Description") : "";
|
|
16
|
+
const showAction = instance.getBoolean("Show Actions");
|
|
17
|
+
const bordered = instance.getBoolean("Header Border");
|
|
18
|
+
const vertical = instance.getEnum("Footer Orientation", { horizontal: false, vertical: true }) === true;
|
|
19
|
+
|
|
20
|
+
// a slot (found by layer name at any depth) rendered as its instances' own templates
|
|
21
|
+
function slot(name: string, node: any = instance): any {
|
|
22
|
+
for (const child of node?.children ?? []) {
|
|
23
|
+
if (child.name === name && child.type !== "INSTANCE" && child.type !== "TEXT") return child;
|
|
24
|
+
const hit = child.type === "INSTANCE" ? undefined : slot(name, child);
|
|
25
|
+
if (hit) return hit;
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const parts = (name: string) =>
|
|
30
|
+
(slot(name)?.children ?? [])
|
|
31
|
+
.filter((c: any) => c.type === "INSTANCE")
|
|
32
|
+
.map((c: any) => {
|
|
33
|
+
try {
|
|
34
|
+
return c.executeTemplate().example;
|
|
35
|
+
} catch {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
.filter(Boolean);
|
|
40
|
+
const actions = parts("Actions");
|
|
41
|
+
const content = parts("Content");
|
|
42
|
+
const footerParts = parts("Footer");
|
|
43
|
+
|
|
44
|
+
const header = showHeader
|
|
45
|
+
? figma.code`
|
|
46
|
+
<CardHeader${bordered ? figma.code` className="border-b"` : ""}>
|
|
47
|
+
<CardTitle>${title}</CardTitle>
|
|
48
|
+
${description ? figma.code`<CardDescription>${description}</CardDescription>` : ""}
|
|
49
|
+
${showAction ? figma.code`<CardAction>${actions.length ? actions : figma.code`<Button variant="link">Action</Button>`}</CardAction>` : ""}
|
|
50
|
+
</CardHeader>`
|
|
51
|
+
: figma.code``;
|
|
52
|
+
const footer = showFooter
|
|
53
|
+
? figma.code`
|
|
54
|
+
<CardFooter${vertical ? figma.code` className="flex-col"` : ""}>
|
|
55
|
+
${footerParts.length ? footerParts : figma.code`<Button>Action</Button>`}
|
|
56
|
+
</CardFooter>`
|
|
57
|
+
: figma.code``;
|
|
58
|
+
|
|
59
|
+
export default {
|
|
60
|
+
example: figma.code`
|
|
61
|
+
<Card${size !== "md" ? figma.code` size="${size}"` : ""}>
|
|
62
|
+
${showMedia ? figma.code`<img src="/image.jpg" alt="" className="aspect-video w-full object-cover" />` : ""}
|
|
63
|
+
${header}
|
|
64
|
+
<CardContent>${content.length ? content : "…"}</CardContent>
|
|
65
|
+
${footer}
|
|
66
|
+
</Card>
|
|
67
|
+
`,
|
|
68
|
+
imports: [
|
|
69
|
+
'import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"',
|
|
70
|
+
'import { Button } from "@/components/ui/button"',
|
|
71
|
+
],
|
|
72
|
+
id: "card",
|
|
73
|
+
metadata: { nestable: true },
|
|
74
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/ba28zZ49PAkXhE7PW5kyT9/Design-System?node-id=4557-180
|
|
2
|
+
// source=registry/src/ui/carousel/carousel.tsx
|
|
3
|
+
// component=Carousel
|
|
4
|
+
// Code Connect template (v2, parserless). Spec: components/carousel/spec.md.
|
|
5
|
+
// The Content slot holds the author's Carousel Items, so the snippet shows the shape: items around their content.
|
|
6
|
+
import figma from "figma";
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
const vertical = instance.getEnum("Orientation", { horizontal: false, vertical: true });
|
|
10
|
+
const controls = instance.getBoolean("Show Controls");
|
|
11
|
+
const dots = instance.getBoolean("Show Dots");
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
example: figma.code`<Carousel${vertical ? ' orientation="vertical"' : ""} className="w-full max-w-xs">
|
|
15
|
+
<CarouselContent>
|
|
16
|
+
<CarouselItem>…</CarouselItem>
|
|
17
|
+
<CarouselItem>…</CarouselItem>
|
|
18
|
+
<CarouselItem>…</CarouselItem>
|
|
19
|
+
</CarouselContent>${controls ? figma.code`
|
|
20
|
+
<CarouselPrevious />
|
|
21
|
+
<CarouselNext />` : ""}${dots ? figma.code`
|
|
22
|
+
<CarouselDots />` : ""}
|
|
23
|
+
</Carousel>`,
|
|
24
|
+
imports: ['import { Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel"'],
|
|
25
|
+
id: "carousel",
|
|
26
|
+
metadata: { nestable: true },
|
|
27
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/ba28zZ49PAkXhE7PW5kyT9/Design-System?node-id=472-96
|
|
2
|
+
// source=registry/src/ui/checkbox/checkbox.tsx
|
|
3
|
+
// component=Checkbox
|
|
4
|
+
// Code Connect template (v2, parserless). Spec: components/checkbox/spec.md.
|
|
5
|
+
// Figma property VALUES are lower-kebab and identical to the code enums, so every getEnum map is an identity map.
|
|
6
|
+
import figma from "figma";
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Checked carries the third state as a value, because a Figma boolean cannot express one. In code `true` and
|
|
10
|
+
// `false` are the `checked` attribute and `indeterminate` is its own prop.
|
|
11
|
+
const checked = instance.getEnum("Checked", {
|
|
12
|
+
false: "false",
|
|
13
|
+
true: "true",
|
|
14
|
+
indeterminate: "indeterminate",
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// State carries only what code consumes. focus-visible is a CSS pseudo-state and is not an axis.
|
|
18
|
+
const state = instance.getEnum("State", { default: "default", invalid: "invalid", disabled: "disabled" });
|
|
19
|
+
|
|
20
|
+
const attrs = [
|
|
21
|
+
checked === "true" ? " defaultChecked" : "",
|
|
22
|
+
checked === "indeterminate" ? " indeterminate" : "",
|
|
23
|
+
state === "invalid" ? " aria-invalid" : "",
|
|
24
|
+
state === "disabled" ? " disabled" : "",
|
|
25
|
+
].join("");
|
|
26
|
+
|
|
27
|
+
// A checkbox is never placed without a label, so the snippet shows the unit a designer actually needs rather
|
|
28
|
+
// than a bare control. Swap Checkbox into a Field in Figma and Field's own template renders the wrapper.
|
|
29
|
+
export default {
|
|
30
|
+
example: figma.code`<Checkbox id="checkbox"${attrs} />`,
|
|
31
|
+
imports: ['import { Checkbox } from "@/components/ui/checkbox"'],
|
|
32
|
+
id: "checkbox",
|
|
33
|
+
metadata: { nestable: true },
|
|
34
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/ba28zZ49PAkXhE7PW5kyT9/Design-System?node-id=1817-1656
|
|
2
|
+
// source=registry/src/ui/columns/columns.tsx
|
|
3
|
+
// component=Columns
|
|
4
|
+
// Code Connect template (v2, parserless) for Columns/1. Spec: components/columns/spec.md. Device is Figma's
|
|
5
|
+
// viewport preview, not a prop: the code collapses by breakpoint. The gap is a per-instance binding.
|
|
6
|
+
import figma from "figma";
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
const columns = 1;
|
|
10
|
+
|
|
11
|
+
// a slot (found by layer name at any depth) rendered as its instances' own templates; loose layers become "…"
|
|
12
|
+
function slot(name: string, node: any = instance): any {
|
|
13
|
+
for (const child of node?.children ?? []) {
|
|
14
|
+
if (child.name === name && child.type !== "INSTANCE" && child.type !== "TEXT") return child;
|
|
15
|
+
const hit = child.type === "INSTANCE" ? undefined : slot(name, child);
|
|
16
|
+
if (hit) return hit;
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const parts = (name: string) => {
|
|
21
|
+
const out = (slot(name)?.children ?? [])
|
|
22
|
+
.filter((c: any) => c.type === "INSTANCE")
|
|
23
|
+
.map((c: any) => {
|
|
24
|
+
try {
|
|
25
|
+
return c.executeTemplate().example;
|
|
26
|
+
} catch {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
.filter(Boolean);
|
|
31
|
+
return out.length ? out : "…";
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
example: figma.code`
|
|
36
|
+
<Columns columns={${columns}}>
|
|
37
|
+
<Column>${parts("Column 1")}</Column>
|
|
38
|
+
</Columns>
|
|
39
|
+
`,
|
|
40
|
+
imports: ['import { Column, Columns } from "@/components/ui/columns"'],
|
|
41
|
+
id: "columns-1",
|
|
42
|
+
metadata: { nestable: true },
|
|
43
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// url=https://www.figma.com/design/ba28zZ49PAkXhE7PW5kyT9/Design-System?node-id=2282-9253
|
|
2
|
+
// source=registry/src/ui/columns/columns.tsx
|
|
3
|
+
// component=Columns
|
|
4
|
+
// Code Connect template (v2, parserless) for Columns/2. Spec: components/columns/spec.md. Device is Figma's
|
|
5
|
+
// viewport preview, not a prop: the code collapses by breakpoint. The gap is a per-instance binding.
|
|
6
|
+
import figma from "figma";
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Layout is Figma's ratio as tracks + spans (1:2 = 3 tracks, spans 1 and 2), as the Figma grid itself is built.
|
|
10
|
+
const ratio = instance.getEnum("Layout", { "1:1": [2, 1, 1], "1:2": [3, 1, 2], "2:1": [3, 2, 1], "2:3": [5, 2, 3], "3:2": [5, 3, 2] }) as number[];
|
|
11
|
+
const [columns, a, b] = ratio;
|
|
12
|
+
const invert = instance.getEnum("Invert Order", { False: false, True: true }) === true;
|
|
13
|
+
const cell = (span: number, slotName: string) =>
|
|
14
|
+
span > 1 ? figma.code`<Column span={${span}}>${parts(slotName)}</Column>` : figma.code`<Column>${parts(slotName)}</Column>`;
|
|
15
|
+
|
|
16
|
+
// a slot (found by layer name at any depth) rendered as its instances' own templates; loose layers become "…"
|
|
17
|
+
function slot(name: string, node: any = instance): any {
|
|
18
|
+
for (const child of node?.children ?? []) {
|
|
19
|
+
if (child.name === name && child.type !== "INSTANCE" && child.type !== "TEXT") return child;
|
|
20
|
+
const hit = child.type === "INSTANCE" ? undefined : slot(name, child);
|
|
21
|
+
if (hit) return hit;
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const parts = (name: string) => {
|
|
26
|
+
const out = (slot(name)?.children ?? [])
|
|
27
|
+
.filter((c: any) => c.type === "INSTANCE")
|
|
28
|
+
.map((c: any) => {
|
|
29
|
+
try {
|
|
30
|
+
return c.executeTemplate().example;
|
|
31
|
+
} catch {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
.filter(Boolean);
|
|
36
|
+
return out.length ? out : "…";
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
example: figma.code`
|
|
41
|
+
<Columns columns={${columns}}${invert ? figma.code` invertOrder` : ""}>
|
|
42
|
+
${cell(a, "Column 1")}
|
|
43
|
+
${cell(b, "Column 2")}
|
|
44
|
+
</Columns>
|
|
45
|
+
`,
|
|
46
|
+
imports: ['import { Column, Columns } from "@/components/ui/columns"'],
|
|
47
|
+
id: "columns-2",
|
|
48
|
+
metadata: { nestable: true },
|
|
49
|
+
};
|