@atelier-ui/mcp 0.0.0-stage → 0.4.12
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 +25 -2
- package/bin/atelier-mcp.mjs +9 -0
- package/package.json +45 -4
- package/snapshot/knowledge/components.json +1 -0
- package/snapshot/knowledge/patterns.json +1 -0
- package/snapshot/knowledge/tokens.json +1 -0
- package/snapshot/manifests/components.json +355 -0
- package/snapshot/manifests/docs.json +37 -0
- package/snapshot/services/addon-docs/mdx/foundation-colors--docs.json +18 -0
- package/snapshot/services/addon-docs/mdx/foundation-spacing--docs.json +18 -0
- package/snapshot/services/addon-docs/mdx/foundation-typography--docs.json +18 -0
- package/snapshot/services/addon-docs/mdx/introduction--docs.json +18 -0
- package/snapshot/services/core/docgen/components-ai-atlchat.json +158 -0
- package/snapshot/services/core/docgen/components-display-atlavatar.json +144 -0
- package/snapshot/services/core/docgen/components-display-atlbadge.json +97 -0
- package/snapshot/services/core/docgen/components-display-atlcard.json +103 -0
- package/snapshot/services/core/docgen/components-display-atlcodeblock.json +165 -0
- package/snapshot/services/core/docgen/components-display-atlicon.json +172 -0
- package/snapshot/services/core/docgen/components-display-atlprogress.json +177 -0
- package/snapshot/services/core/docgen/components-display-atlskeleton.json +125 -0
- package/snapshot/services/core/docgen/components-display-atltable.json +100 -0
- package/snapshot/services/core/docgen/components-feedback-atlaccordiongroup.json +105 -0
- package/snapshot/services/core/docgen/components-feedback-atlalert.json +124 -0
- package/snapshot/services/core/docgen/components-inputs-atlbutton.json +153 -0
- package/snapshot/services/core/docgen/components-inputs-atlcheckbox.json +226 -0
- package/snapshot/services/core/docgen/components-inputs-atlcombobox.json +244 -0
- package/snapshot/services/core/docgen/components-inputs-atlinput.json +302 -0
- package/snapshot/services/core/docgen/components-inputs-atlradio.json +114 -0
- package/snapshot/services/core/docgen/components-inputs-atlradiogroup.json +243 -0
- package/snapshot/services/core/docgen/components-inputs-atlselect.json +257 -0
- package/snapshot/services/core/docgen/components-inputs-atltextarea.json +311 -0
- package/snapshot/services/core/docgen/components-inputs-atltoggle.json +209 -0
- package/snapshot/services/core/docgen/components-navigation-atlbreadcrumbs.json +55 -0
- package/snapshot/services/core/docgen/components-navigation-atlmenu.json +45 -0
- package/snapshot/services/core/docgen/components-navigation-atlpagination.json +193 -0
- package/snapshot/services/core/docgen/components-navigation-atlstepper.json +156 -0
- package/snapshot/services/core/docgen/components-navigation-atltabgroup.json +79 -0
- package/snapshot/services/core/docgen/components-overlay-atldialog.json +216 -0
- package/snapshot/services/core/docgen/components-overlay-atldrawer.json +190 -0
- package/snapshot/services/core/docgen/components-overlay-atltoast.json +145 -0
- package/snapshot/services/core/docgen/components-overlay-atltooltip.json +128 -0
- package/snapshot/services/core/docgen/cookbook.json +3 -0
- package/snapshot/services/core/docgen/showcase-all-components.json +191 -0
- package/snapshot/services/core/docgen/showcase-kitchen-sink.json +20 -0
- package/snapshot/services/core/story-docs/components-ai-atlchat.json +73 -0
- package/snapshot/services/core/story-docs/components-display-atlavatar.json +61 -0
- package/snapshot/services/core/story-docs/components-display-atlbadge.json +61 -0
- package/snapshot/services/core/story-docs/components-display-atlcard.json +61 -0
- package/snapshot/services/core/story-docs/components-display-atlcodeblock.json +41 -0
- package/snapshot/services/core/story-docs/components-display-atlicon.json +52 -0
- package/snapshot/services/core/story-docs/components-display-atlprogress.json +41 -0
- package/snapshot/services/core/story-docs/components-display-atlskeleton.json +46 -0
- package/snapshot/services/core/story-docs/components-display-atltable.json +65 -0
- package/snapshot/services/core/story-docs/components-feedback-atlaccordiongroup.json +56 -0
- package/snapshot/services/core/story-docs/components-feedback-atlalert.json +51 -0
- package/snapshot/services/core/story-docs/components-inputs-atlbutton.json +76 -0
- package/snapshot/services/core/story-docs/components-inputs-atlcheckbox.json +57 -0
- package/snapshot/services/core/story-docs/components-inputs-atlcombobox.json +41 -0
- package/snapshot/services/core/story-docs/components-inputs-atlinput.json +70 -0
- package/snapshot/services/core/story-docs/components-inputs-atlradio.json +35 -0
- package/snapshot/services/core/story-docs/components-inputs-atlradiogroup.json +59 -0
- package/snapshot/services/core/story-docs/components-inputs-atlselect.json +65 -0
- package/snapshot/services/core/story-docs/components-inputs-atltextarea.json +65 -0
- package/snapshot/services/core/story-docs/components-inputs-atltoggle.json +52 -0
- package/snapshot/services/core/story-docs/components-navigation-atlbreadcrumbs.json +37 -0
- package/snapshot/services/core/story-docs/components-navigation-atlmenu.json +37 -0
- package/snapshot/services/core/story-docs/components-navigation-atlpagination.json +41 -0
- package/snapshot/services/core/story-docs/components-navigation-atlstepper.json +37 -0
- package/snapshot/services/core/story-docs/components-navigation-atltabgroup.json +47 -0
- package/snapshot/services/core/story-docs/components-overlay-atldialog.json +59 -0
- package/snapshot/services/core/story-docs/components-overlay-atldrawer.json +59 -0
- package/snapshot/services/core/story-docs/components-overlay-atltoast.json +56 -0
- package/snapshot/services/core/story-docs/components-overlay-atltooltip.json +42 -0
- package/snapshot/services/core/story-docs/cookbook.json +39 -0
- package/snapshot/services/core/story-docs/showcase-all-components.json +17 -0
- package/snapshot/services/core/story-docs/showcase-kitchen-sink.json +17 -0
- package/src/instructions.mjs +29 -0
- package/src/knowledge.mjs +24 -0
- package/src/layer-composition.mjs +77 -0
- package/src/layer-purpose.mjs +70 -0
- package/src/layer-tokens.mjs +133 -0
- package/src/layers.mjs +80 -0
- package/src/manifest-provider.mjs +58 -0
- package/src/server.mjs +71 -0
- package/src/version-check.mjs +50 -0
- package/storybook/.atelier-inputs.json +1 -0
- package/storybook/angular-logo.jpg +0 -0
- package/storybook/artelier-logo.png +0 -0
- package/storybook/assets/Color-6AOWCN3U-BRruRKIt.js +1 -0
- package/storybook/assets/DocsRenderer-JROSPFPF-BqCGyKpa.js +10 -0
- package/storybook/assets/WithTooltip-CDUNV5IS-B5RANF3w.js +9 -0
- package/storybook/assets/_a11y-module-chunk-kh2BWFEb.js +20 -0
- package/storybook/assets/_array-chunk-jnVVFUvi.js +1 -0
- package/storybook/assets/_focus-key-manager-chunk-Czlxh_qX.js +1 -0
- package/storybook/assets/_focus-monitor-chunk-CHxlrCHn.js +1 -0
- package/storybook/assets/_id-generator-chunk-B9zuB3qN.js +1 -0
- package/storybook/assets/_list-key-manager-chunk-K-6zSVll.js +1 -0
- package/storybook/assets/_overlay-module-chunk-CwW5mIh4.js +140 -0
- package/storybook/assets/_style-loader-chunk-CjoWl1jk.js +1 -0
- package/storybook/assets/_unique-selection-dispatcher-chunk-Xqv9LIWR.js +1 -0
- package/storybook/assets/a11y-dev-warn-BbRozqAf.js +1 -0
- package/storybook/assets/angular-platform-ChS-QjTV.js +23 -0
- package/storybook/assets/async-CzUT0aHo.js +1 -0
- package/storybook/assets/atl-accordion-dZ-zVPC1.js +37 -0
- package/storybook/assets/atl-accordion.stories-CTKEKqfF.js +379 -0
- package/storybook/assets/atl-alert-BnnQXl74.js +18 -0
- package/storybook/assets/atl-alert.stories-WOsUlWre.js +88 -0
- package/storybook/assets/atl-avatar-NUYXSZhH.js +20 -0
- package/storybook/assets/atl-avatar.stories-GM0sQR9h.js +281 -0
- package/storybook/assets/atl-badge-BUEz7duN.js +6 -0
- package/storybook/assets/atl-badge.stories-BZ-58GLo.js +102 -0
- package/storybook/assets/atl-breadcrumbs-nQEvjjLz.js +22 -0
- package/storybook/assets/atl-breadcrumbs.stories-CFFrRRcs.js +161 -0
- package/storybook/assets/atl-button-BzQndwCt.js +6 -0
- package/storybook/assets/atl-button.stories-D8MwkQrM.js +138 -0
- package/storybook/assets/atl-card-WY9a7AGL.js +1 -0
- package/storybook/assets/atl-card.stories-DqUwE2Lw.js +195 -0
- package/storybook/assets/atl-chat.stories-BhfNwpcy.js +717 -0
- package/storybook/assets/atl-checkbox-C-oNMpz8.js +25 -0
- package/storybook/assets/atl-checkbox.stories-tfTegOD3.js +60 -0
- package/storybook/assets/atl-code-block-CWbd7cP-.js +34 -0
- package/storybook/assets/atl-code-block.stories-BPKM1keU.js +104 -0
- package/storybook/assets/atl-combobox.stories-DUHRpNOg.js +153 -0
- package/storybook/assets/atl-dialog-B2-2GVTo.js +27 -0
- package/storybook/assets/atl-dialog.stories-DGZaeKea.js +442 -0
- package/storybook/assets/atl-drawer-87lAgOgh.js +27 -0
- package/storybook/assets/atl-drawer.stories-Bo48zu1P.js +377 -0
- package/storybook/assets/atl-icon-ChO59f9V.js +16 -0
- package/storybook/assets/atl-icon.stories-D__7KUC6.js +114 -0
- package/storybook/assets/atl-input-CiyTZXDL.js +32 -0
- package/storybook/assets/atl-input.stories-CAorMMo9.js +95 -0
- package/storybook/assets/atl-menu-CyZvGLYl.js +6 -0
- package/storybook/assets/atl-menu.stories-DW8fQ-KN.js +168 -0
- package/storybook/assets/atl-option-o6FHvhn_.js +67 -0
- package/storybook/assets/atl-pagination-BFumZjwB.js +75 -0
- package/storybook/assets/atl-pagination.stories-hcbOcm5L.js +136 -0
- package/storybook/assets/atl-progress-CEvOvPrm.js +5 -0
- package/storybook/assets/atl-progress.stories-IPzUxTop.js +130 -0
- package/storybook/assets/atl-radio-C-KjJXL1.js +25 -0
- package/storybook/assets/atl-radio-group.stories-B-LXwjaI.js +135 -0
- package/storybook/assets/atl-radio.stories-BPeNuZ5i.js +70 -0
- package/storybook/assets/atl-select.stories-BlnLgKMb.js +133 -0
- package/storybook/assets/atl-showcase.stories-DEEN9_7E.js +563 -0
- package/storybook/assets/atl-skeleton-LlrKrRul.js +1 -0
- package/storybook/assets/atl-skeleton.stories-BjntxCgy.js +109 -0
- package/storybook/assets/atl-stepper.stories-TlX9iAtl.js +259 -0
- package/storybook/assets/atl-table-9yowirTt.js +71 -0
- package/storybook/assets/atl-table.stories-Da-Cdx4f.js +699 -0
- package/storybook/assets/atl-tabs-C3TYjTt4.js +34 -0
- package/storybook/assets/atl-tabs.stories-fnuIid_J.js +220 -0
- package/storybook/assets/atl-textarea-CaajGH3D.js +60 -0
- package/storybook/assets/atl-textarea.stories-BHLuood4.js +71 -0
- package/storybook/assets/atl-toast-C8wfEw8o.js +23 -0
- package/storybook/assets/atl-toast.stories-DuabFeLE.js +141 -0
- package/storybook/assets/atl-toggle-DufKJw7U.js +29 -0
- package/storybook/assets/atl-toggle.stories-C9TIh6EI.js +49 -0
- package/storybook/assets/atl-tooltip-DHtMg2_a.js +1 -0
- package/storybook/assets/atl-tooltip.stories-BtN7RqXO.js +126 -0
- package/storybook/assets/auditTime-D5qIDf8P.js +1 -0
- package/storybook/assets/axe-DB4aLaTh.js +20 -0
- package/storybook/assets/blocks-CwmsPXDF.js +192 -0
- package/storybook/assets/chunk-242VQQM5-D6GShWaB.js +1 -0
- package/storybook/assets/chunk-7PIQR4A3-BhwBlWeH.js +1 -0
- package/storybook/assets/chunk-DRQKCCAG-BwzuojA1.js +1 -0
- package/storybook/assets/chunk-IMSF75WX-CZt3_hro.js +6 -0
- package/storybook/assets/chunk-QQBDHPVZ-0u620C8G.js +1 -0
- package/storybook/assets/chunk-RDNWKK3U-DhgVKaEi.js +15 -0
- package/storybook/assets/chunk-UAWMPV5J-CVFtGjk9.js +1 -0
- package/storybook/assets/chunk-W22LQPXL-nedkz_O_.js +18 -0
- package/storybook/assets/colors-BtTAbCUR.js +34 -0
- package/storybook/assets/components-DUcVPgtb.js +92 -0
- package/storybook/assets/cookbook.stories-Cvcwdpgq.js +913 -0
- package/storybook/assets/debounceTime-CPR6CVzN.js +1 -0
- package/storybook/assets/dist-BfbfS1eq.js +28 -0
- package/storybook/assets/empty-C9s5w39U.js +1 -0
- package/storybook/assets/filter-CCMzlFeO.js +1 -0
- package/storybook/assets/formatter-L2YTDE3Q-De5wWUxX.js +1 -0
- package/storybook/assets/iframe-BYbOm3Rx.js +1 -0
- package/storybook/assets/iframe-BvjIbyPm.css +1 -0
- package/storybook/assets/iframe-h-GGOSFN.js +1131 -0
- package/storybook/assets/introduction-bzJGqrr1.js +51 -0
- package/storybook/assets/kitchen-sink.stories-DgdRp06g.js +155 -0
- package/storybook/assets/matchers-JIUQ3HVY-1Tc8fpol.js +28 -0
- package/storybook/assets/preload-helper-BLE838kL.js +1 -0
- package/storybook/assets/radio.metadata-D1zBdRKO.js +1 -0
- package/storybook/assets/react-CFS0r9Lk.js +1 -0
- package/storybook/assets/react-NI1vexfW.js +1 -0
- package/storybook/assets/rolldown-runtime-D_-wTCJc.js +1 -0
- package/storybook/assets/spacing-CVdkEC7L.js +23 -0
- package/storybook/assets/syntaxhighlighter-4REYKNEV-CaO5n5UG.js +6 -0
- package/storybook/assets/theming-6wiCKx_Z.js +39 -0
- package/storybook/assets/typography-B6Dotum2.js +49 -0
- package/storybook/favicon-wrapper.svg +46 -0
- package/storybook/favicon.svg +1 -0
- package/storybook/iframe.html +756 -0
- package/storybook/index.html +170 -0
- package/storybook/index.json +1 -0
- package/storybook/manifests/components.html +12595 -0
- package/storybook/manifests/components.json +355 -0
- package/storybook/manifests/docs.json +37 -0
- package/storybook/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/nunito-sans-bold.woff2 +0 -0
- package/storybook/nunito-sans-italic.woff2 +0 -0
- package/storybook/nunito-sans-regular.woff2 +0 -0
- package/storybook/package.json +32 -0
- package/storybook/project.json +1 -0
- package/storybook/react-logo.png +0 -0
- package/storybook/sb-addons/a11y-2/manager-bundle.js +57 -0
- package/storybook/sb-addons/designs-3/register-panel-bundle.js +1009 -0
- package/storybook/sb-addons/designs-3/register-panel-bundle.js.LEGAL.txt +8 -0
- package/storybook/sb-addons/docs-4/manager-bundle.js +18 -0
- package/storybook/sb-addons/libs-angular-storybook-6/manager-bundle.js +3 -0
- package/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +632 -0
- package/storybook/sb-addons/themes-5/manager-bundle.js +3 -0
- package/storybook/sb-addons/vitest-1/manager-bundle.js +3 -0
- package/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook/sb-common-assets/favicon.svg +1 -0
- package/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook/sb-manager/globals-runtime.js +79132 -0
- package/storybook/sb-manager/globals.js +24 -0
- package/storybook/sb-manager/manager-stores.js +23 -0
- package/storybook/sb-manager/runtime.js +28317 -0
- package/storybook/services/addon-docs/mdx/foundation-colors--docs.json +18 -0
- package/storybook/services/addon-docs/mdx/foundation-spacing--docs.json +18 -0
- package/storybook/services/addon-docs/mdx/foundation-typography--docs.json +18 -0
- package/storybook/services/addon-docs/mdx/introduction--docs.json +18 -0
- package/storybook/services/core/docgen/components-ai-atlchat.json +158 -0
- package/storybook/services/core/docgen/components-display-atlavatar.json +144 -0
- package/storybook/services/core/docgen/components-display-atlbadge.json +97 -0
- package/storybook/services/core/docgen/components-display-atlcard.json +103 -0
- package/storybook/services/core/docgen/components-display-atlcodeblock.json +165 -0
- package/storybook/services/core/docgen/components-display-atlicon.json +172 -0
- package/storybook/services/core/docgen/components-display-atlprogress.json +177 -0
- package/storybook/services/core/docgen/components-display-atlskeleton.json +125 -0
- package/storybook/services/core/docgen/components-display-atltable.json +100 -0
- package/storybook/services/core/docgen/components-feedback-atlaccordiongroup.json +105 -0
- package/storybook/services/core/docgen/components-feedback-atlalert.json +124 -0
- package/storybook/services/core/docgen/components-inputs-atlbutton.json +153 -0
- package/storybook/services/core/docgen/components-inputs-atlcheckbox.json +226 -0
- package/storybook/services/core/docgen/components-inputs-atlcombobox.json +244 -0
- package/storybook/services/core/docgen/components-inputs-atlinput.json +302 -0
- package/storybook/services/core/docgen/components-inputs-atlradio.json +114 -0
- package/storybook/services/core/docgen/components-inputs-atlradiogroup.json +243 -0
- package/storybook/services/core/docgen/components-inputs-atlselect.json +257 -0
- package/storybook/services/core/docgen/components-inputs-atltextarea.json +311 -0
- package/storybook/services/core/docgen/components-inputs-atltoggle.json +209 -0
- package/storybook/services/core/docgen/components-navigation-atlbreadcrumbs.json +55 -0
- package/storybook/services/core/docgen/components-navigation-atlmenu.json +45 -0
- package/storybook/services/core/docgen/components-navigation-atlpagination.json +193 -0
- package/storybook/services/core/docgen/components-navigation-atlstepper.json +156 -0
- package/storybook/services/core/docgen/components-navigation-atltabgroup.json +79 -0
- package/storybook/services/core/docgen/components-overlay-atldialog.json +216 -0
- package/storybook/services/core/docgen/components-overlay-atldrawer.json +190 -0
- package/storybook/services/core/docgen/components-overlay-atltoast.json +145 -0
- package/storybook/services/core/docgen/components-overlay-atltooltip.json +128 -0
- package/storybook/services/core/docgen/cookbook.json +3 -0
- package/storybook/services/core/docgen/showcase-all-components.json +191 -0
- package/storybook/services/core/docgen/showcase-kitchen-sink.json +20 -0
- package/storybook/services/core/story-docs/components-ai-atlchat.json +73 -0
- package/storybook/services/core/story-docs/components-display-atlavatar.json +61 -0
- package/storybook/services/core/story-docs/components-display-atlbadge.json +61 -0
- package/storybook/services/core/story-docs/components-display-atlcard.json +61 -0
- package/storybook/services/core/story-docs/components-display-atlcodeblock.json +41 -0
- package/storybook/services/core/story-docs/components-display-atlicon.json +52 -0
- package/storybook/services/core/story-docs/components-display-atlprogress.json +41 -0
- package/storybook/services/core/story-docs/components-display-atlskeleton.json +46 -0
- package/storybook/services/core/story-docs/components-display-atltable.json +65 -0
- package/storybook/services/core/story-docs/components-feedback-atlaccordiongroup.json +56 -0
- package/storybook/services/core/story-docs/components-feedback-atlalert.json +51 -0
- package/storybook/services/core/story-docs/components-inputs-atlbutton.json +76 -0
- package/storybook/services/core/story-docs/components-inputs-atlcheckbox.json +57 -0
- package/storybook/services/core/story-docs/components-inputs-atlcombobox.json +41 -0
- package/storybook/services/core/story-docs/components-inputs-atlinput.json +70 -0
- package/storybook/services/core/story-docs/components-inputs-atlradio.json +35 -0
- package/storybook/services/core/story-docs/components-inputs-atlradiogroup.json +59 -0
- package/storybook/services/core/story-docs/components-inputs-atlselect.json +65 -0
- package/storybook/services/core/story-docs/components-inputs-atltextarea.json +65 -0
- package/storybook/services/core/story-docs/components-inputs-atltoggle.json +52 -0
- package/storybook/services/core/story-docs/components-navigation-atlbreadcrumbs.json +37 -0
- package/storybook/services/core/story-docs/components-navigation-atlmenu.json +37 -0
- package/storybook/services/core/story-docs/components-navigation-atlpagination.json +41 -0
- package/storybook/services/core/story-docs/components-navigation-atlstepper.json +37 -0
- package/storybook/services/core/story-docs/components-navigation-atltabgroup.json +47 -0
- package/storybook/services/core/story-docs/components-overlay-atldialog.json +59 -0
- package/storybook/services/core/story-docs/components-overlay-atldrawer.json +59 -0
- package/storybook/services/core/story-docs/components-overlay-atltoast.json +56 -0
- package/storybook/services/core/story-docs/components-overlay-atltooltip.json +42 -0
- package/storybook/services/core/story-docs/cookbook.json +39 -0
- package/storybook/services/core/story-docs/showcase-all-components.json +17 -0
- package/storybook/services/core/story-docs/showcase-kitchen-sink.json +17 -0
- package/storybook/vite-inject-mocker-entry.js +2 -0
- package/storybook/vue-logo.jpeg +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-D_-wTCJc.js";import{A as t,M as n,Mt as r,O as i,P as a,R as o,S as s,W as c,et as l,hn as u,k as d,q as f,xn as p,z as m}from"./angular-platform-ChS-QjTV.js";var h;function init_atl_checkbox(){return(init_atl_checkbox=e((()=>{h=`.atl-checkbox,.atl-checkbox *{box-sizing:border-box}.atl-checkbox{font-family:var(--ui-font-family);font-size:var(--ui-font-size-md);line-height:var(--ui-line-height-tight);display:block}.atl-checkbox>label{align-items:center;gap:var(--ui-spacing-3);cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--ui-color-text);min-height:var(--ui-row-height-sm);line-height:var(--ui-line-height-tight);padding-block:0;display:inline-flex}.atl-checkbox>label>input[type=checkbox]{appearance:none;border:var(--ui-border-width-thick) solid var(--ui-color-border-strong);border-radius:var(--ui-radius-sm);background-color:var(--ui-color-input-bg);cursor:pointer;width:1.25rem;height:1.25rem;transition:border-color var(--ui-transition-fast), background-color var(--ui-transition-fast), box-shadow var(--ui-transition-fast);outline:none;flex-shrink:0;margin:0;position:relative}.atl-checkbox>label>input[type=checkbox]:hover:not(:disabled){border-color:var(--ui-color-primary);background-color:var(--ui-color-primary-light)}.atl-checkbox>label>input[type=checkbox]:focus-visible{box-shadow:var(--ui-focus-ring);border-color:var(--ui-color-primary)}.atl-checkbox>label>input[type=checkbox]:checked{background-color:var(--ui-color-primary);border-color:var(--ui-color-primary)}.atl-checkbox>label>input[type=checkbox]:checked:after{content:"";border:var(--ui-border-width-thick) solid var(--ui-color-text-on-primary);width:.35rem;height:.6rem;animation:atl-checkbox-check-pop var(--ui-duration-normal) var(--ui-ease-spring);border-top:none;border-left:none;margin:auto;position:absolute;inset:0;transform:rotate(45deg)translate(-1px,-1px)}.atl-checkbox>label>input[type=checkbox]:indeterminate{background-color:var(--ui-color-primary);border-color:var(--ui-color-primary)}.atl-checkbox>label>input[type=checkbox]:indeterminate:after{content:"";background-color:var(--ui-color-text-on-primary);width:.5rem;height:2px;animation:atl-checkbox-check-pop var(--ui-duration-normal) var(--ui-ease-spring);margin:auto;position:absolute;inset:0}.atl-checkbox.is-invalid>label>input[type=checkbox],.atl-checkbox.is-invalid>label>input[type=checkbox]:hover:not(:disabled){border-color:var(--ui-color-input-border-invalid)}.atl-checkbox.is-invalid>label>input[type=checkbox]:focus-visible{border-color:var(--ui-color-input-border-invalid);box-shadow:var(--ui-focus-ring-danger)}.atl-checkbox.is-disabled{opacity:var(--ui-opacity-disabled);cursor:not-allowed}.atl-checkbox.is-disabled>label,.atl-checkbox.is-disabled>label>input[type=checkbox]{cursor:not-allowed}.atl-checkbox>.errors{margin-top:var(--ui-spacing-2)}.atl-checkbox>.errors>.error-message{font-size:var(--ui-font-size-sm);color:var(--ui-color-error-text);line-height:var(--ui-line-height-normal);margin:0}@keyframes atl-checkbox-check-pop{0%{transform:rotate(45deg)translate(-1px,-1px)scale(0)}60%{transform:rotate(45deg)translate(-1px,-1px)scale(1.15)}to{transform:rotate(45deg)translate(-1px,-1px)scale(1)}}`})))()}var g,_;function init_atl_checkbox$1(){return(init_atl_checkbox$1=e((()=>{p(),init_atl_checkbox(),i(),g=0,_=class AtlCheckbox{checked=t(!1);touched=t(!1);indeterminate=d(!1);disabled=d(!1);invalid=d(!1);required=d(!1);name=d(``);errors=d([]);id=d(``);generatedId=`atl-checkbox-${g++}`;inputId=a(()=>this.id()||this.generatedId);errorId=`atl-checkbox-errors-${g++}`;nativeInput=n(`nativeInput`);showErrors=a(()=>this.errors().length>0);hostClasses=a(()=>{let e=[];return this.checked()&&e.push(`is-checked`),this.disabled()&&e.push(`is-disabled`),this.invalid()&&e.push(`is-invalid`),this.touched()&&e.push(`is-touched`),e.join(` `)});constructor(){r(()=>{let e=this.nativeInput()?.nativeElement;e&&(e.indeterminate=this.indeterminate())})}onChange(e){let t=e.target;this.checked.set(t.checked)}static ctorParameters=()=>[];static propDecorators={checked:[{type:c,args:[{isSignal:!0,alias:`checked`,required:!1}]},{type:f,args:[`checkedChange`]}],touched:[{type:c,args:[{isSignal:!0,alias:`touched`,required:!1}]},{type:f,args:[`touchedChange`]}],indeterminate:[{type:c,args:[{isSignal:!0,alias:`indeterminate`,required:!1,transform:void 0}]}],disabled:[{type:c,args:[{isSignal:!0,alias:`disabled`,required:!1,transform:void 0}]}],invalid:[{type:c,args:[{isSignal:!0,alias:`invalid`,required:!1,transform:void 0}]}],required:[{type:c,args:[{isSignal:!0,alias:`required`,required:!1,transform:void 0}]}],name:[{type:c,args:[{isSignal:!0,alias:`name`,required:!1,transform:void 0}]}],errors:[{type:c,args:[{isSignal:!0,alias:`errors`,required:!1,transform:void 0}]}],id:[{type:c,args:[{isSignal:!0,alias:`id`,required:!1,transform:void 0}]}],nativeInput:[{type:s,args:[`nativeInput`,{isSignal:!0}]}]}},_=u([m({selector:`atl-checkbox`,standalone:!0,changeDetection:o.OnPush,template:`
|
|
2
|
+
<label [attr.for]="inputId()">
|
|
3
|
+
<input
|
|
4
|
+
#nativeInput
|
|
5
|
+
type="checkbox"
|
|
6
|
+
[id]="inputId()"
|
|
7
|
+
[checked]="checked()"
|
|
8
|
+
(change)="onChange($event)"
|
|
9
|
+
(blur)="touched.set(true)"
|
|
10
|
+
[disabled]="disabled()"
|
|
11
|
+
[attr.name]="name() || null"
|
|
12
|
+
[attr.aria-invalid]="invalid() || null"
|
|
13
|
+
[attr.aria-required]="required() || null"
|
|
14
|
+
[attr.aria-describedby]="showErrors() ? errorId : null"
|
|
15
|
+
/>
|
|
16
|
+
<ng-content />
|
|
17
|
+
</label>
|
|
18
|
+
@if (showErrors()) {
|
|
19
|
+
<div class="errors" [id]="errorId" aria-live="polite">
|
|
20
|
+
@for (error of errors(); track error.kind) {
|
|
21
|
+
<p class="error-message">{{ error.message }}</p>
|
|
22
|
+
}
|
|
23
|
+
</div>
|
|
24
|
+
}
|
|
25
|
+
`,encapsulation:l.None,host:{class:`atl-checkbox`,"[attr.id]":`null`,"[class]":`hostClasses()`},styles:[h]})],_)})))()}export{init_atl_checkbox$1 as n,_ as t};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-D_-wTCJc.js";import{n as t,t as n}from"./dist-BfbfS1eq.js";import{n as r,t as i}from"./atl-checkbox-C-oNMpz8.js";var a;function init_checkbox_metadata(){return(init_checkbox_metadata=e((()=>{a={specNames:[`AtlCheckboxSpec`],purpose:'Binary or tri-state toggle bound to a form field. Renders an `<input type="checkbox">` with optional indeterminate state.',whenToUse:[`Opting into a single boolean choice (terms accepted, remember me, subscribe).`,`Selecting zero or more items from a list — each row is its own checkbox.`,`Driving a "select all" header that flips to indeterminate when only some children are checked.`],antiPatterns:[{pattern:`Switching a setting on/off where the change applies immediately.`,useInstead:`AtlToggle — communicates the "switch" affordance and instant effect to assistive tech.`},{pattern:`Picking exactly one option from a small set.`,useInstead:`AtlRadioGroup — radios enforce single-select and announce the group.`}],relatedComponents:[`AtlToggleSpec`,`AtlRadioSpec`,`AtlRadioGroupSpec`],variantMatrix:[{checked:!1},{checked:!0},{indeterminate:!0},{checked:!0,disabled:!0},{checked:!1,invalid:!0},{checked:!1,required:!0}],accessibility:{role:`checkbox`,keyboardBehavior:'Receives focus via Tab. Space toggles checked. `indeterminate` is conveyed via `aria-checked="mixed"` and clears on the next user toggle. Disabled removes the control from activation.'}}})))()}var o;function init_checkbox_contract(){return(init_checkbox_contract=e((()=>{o={component:`AtlCheckbox`,figmaNodeId:`55:36`,axisMap:[{figmaAxis:`selection`,codeProp:`checked`,values:{unchecked:!1,checked:!0,indeterminate:!1},reason:`Figma draws three mutually exclusive selection states on one axis (2026-04-27 restructure); code represents them as two orthogonal booleans, checked and indeterminate.`},{figmaAxis:`selection`,codeProp:`indeterminate`,values:{unchecked:!1,checked:!1,indeterminate:!0},reason:`Same axis as the checked mapping above — the other half of the checked/indeterminate pair.`}],probes:[{part:`box`,selector:`input[type='checkbox']`,reason:`the .atl-checkbox root only sets typography and line-height for the row it wraps — the box's border/background/radius are painted on the native input[type='checkbox'] (a bare-element rule in all three frameworks' CSS, unprefixed even in React/Vue, so one relative selector resolves under every framework's component root).`}]}})))()}function figmaNode(e){return{type:`figma`,url:`${s}?node-id=${e}`}}var s,c,l,u,d,f,p,m,h,g,_,v;function init_atl_checkbox_stories(){return(init_atl_checkbox_stories=e((()=>{n(),r(),init_checkbox_metadata(),init_checkbox_contract(),s=`https://www.figma.com/design/QMnDD8uZQPldPrlCwZZ58T/Atelier-UI`,c={title:`Components/Inputs/AtlCheckbox`,component:i,tags:[`autodocs`],render:e=>({props:e,template:`<atl-checkbox ${t(e)}>Accept terms</atl-checkbox>`}),argTypes:{checked:{control:`boolean`},disabled:{control:`boolean`},invalid:{control:`boolean`},required:{control:`boolean`},indeterminate:{control:`boolean`}},args:{checked:!1,disabled:!1,invalid:!1,required:!1,indeterminate:!1},parameters:{design:figmaNode(`55-36`),docs:{description:{component:a.purpose}},contract:o}},l={parameters:{design:figmaNode(`55-32`)}},u={args:{checked:!0},parameters:{design:figmaNode(`55-33`)}},d={args:{disabled:!0}},f={args:{disabled:!0,checked:!0}},p={args:{invalid:!0}},m={args:{invalid:!0},render:e=>({props:{...e,errors:[{kind:`required`,message:`You must accept the terms`}],touched:!0},template:`<atl-checkbox ${t(e)} [errors]="errors" [touched]="touched">Accept terms</atl-checkbox>`})},h={args:{required:!0}},g={args:{indeterminate:!0},render:e=>({props:e,template:`<atl-checkbox ${t(e)}>Select all</atl-checkbox>`}),parameters:{design:figmaNode(`55-34`)}},_={render:e=>({props:e,template:`<atl-checkbox ${t(e)}>Playground label</atl-checkbox>`})},v=[`Default`,`Checked`,`Disabled`,`DisabledChecked`,`Invalid`,`WithErrors`,`Required`,`Indeterminate`,`Playground`],l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
2
|
+
parameters: {
|
|
3
|
+
design: figmaNode('55-32')
|
|
4
|
+
}
|
|
5
|
+
}`,...l.parameters?.docs?.source}}},u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
|
|
6
|
+
args: {
|
|
7
|
+
checked: true
|
|
8
|
+
},
|
|
9
|
+
parameters: {
|
|
10
|
+
design: figmaNode('55-33')
|
|
11
|
+
}
|
|
12
|
+
}`,...u.parameters?.docs?.source}}},d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
13
|
+
args: {
|
|
14
|
+
disabled: true
|
|
15
|
+
}
|
|
16
|
+
}`,...d.parameters?.docs?.source}}},f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
|
|
17
|
+
args: {
|
|
18
|
+
disabled: true,
|
|
19
|
+
checked: true
|
|
20
|
+
}
|
|
21
|
+
}`,...f.parameters?.docs?.source}}},p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
22
|
+
args: {
|
|
23
|
+
invalid: true
|
|
24
|
+
}
|
|
25
|
+
}`,...p.parameters?.docs?.source}}},m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
|
|
26
|
+
args: {
|
|
27
|
+
invalid: true
|
|
28
|
+
},
|
|
29
|
+
render: args => ({
|
|
30
|
+
props: {
|
|
31
|
+
...args,
|
|
32
|
+
errors: [{
|
|
33
|
+
kind: 'required',
|
|
34
|
+
message: 'You must accept the terms'
|
|
35
|
+
}],
|
|
36
|
+
touched: true
|
|
37
|
+
},
|
|
38
|
+
template: \`<atl-checkbox \${argsToTemplate(args)} [errors]="errors" [touched]="touched">Accept terms</atl-checkbox>\`
|
|
39
|
+
})
|
|
40
|
+
}`,...m.parameters?.docs?.source}}},h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
41
|
+
args: {
|
|
42
|
+
required: true
|
|
43
|
+
}
|
|
44
|
+
}`,...h.parameters?.docs?.source}}},g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
45
|
+
args: {
|
|
46
|
+
indeterminate: true
|
|
47
|
+
},
|
|
48
|
+
render: args => ({
|
|
49
|
+
props: args,
|
|
50
|
+
template: \`<atl-checkbox \${argsToTemplate(args)}>Select all</atl-checkbox>\`
|
|
51
|
+
}),
|
|
52
|
+
parameters: {
|
|
53
|
+
design: figmaNode('55-34')
|
|
54
|
+
}
|
|
55
|
+
}`,...g.parameters?.docs?.source}}},_.parameters={..._.parameters,docs:{..._.parameters?.docs,source:{originalSource:`{
|
|
56
|
+
render: args => ({
|
|
57
|
+
props: args,
|
|
58
|
+
template: \`<atl-checkbox \${argsToTemplate(args)}>Playground label</atl-checkbox>\`
|
|
59
|
+
})
|
|
60
|
+
}`,..._.parameters?.docs?.source}}}})))()}init_atl_checkbox_stories();export{u as Checked,l as Default,d as Disabled,f as DisabledChecked,g as Indeterminate,p as Invalid,_ as Playground,h as Required,m as WithErrors,v as __namedExportsOrder,c as default};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-D_-wTCJc.js";import{Lt as t,O as n,P as r,R as i,W as a,et as o,hn as s,k as c,xn as l,z as u}from"./angular-platform-ChS-QjTV.js";import{n as d,t as f}from"./atl-icon-ChO59f9V.js";var p;function init_atl_code_block(){return(init_atl_code_block=e((()=>{p=`.atl-code-block,.atl-code-block *{box-sizing:border-box}.atl-code-block{border:var(--ui-border-width) solid var(--ui-color-border);border-radius:var(--ui-radius-lg);font-family:var(--ui-font-family);line-height:var(--ui-line-height-tight);display:block;overflow:hidden}.atl-code-block>.code-block-header{line-height:var(--ui-line-height-tight);padding:0 var(--ui-spacing-4);background:var(--ui-color-surface-raised);border-bottom:var(--ui-border-width) solid var(--ui-color-border);min-height:var(--ui-control-height-md);justify-content:space-between;align-items:center;display:flex}.atl-code-block>.code-block-header>.code-block-label{font-family:var(--ui-font-mono);font-size:var(--ui-font-size-xs);font-weight:var(--ui-font-weight-semibold);letter-spacing:.03em;color:var(--ui-color-text-muted);text-transform:lowercase;-webkit-user-select:none;user-select:none}.atl-code-block>.code-block-header>.code-block-copy{align-items:center;gap:var(--ui-spacing-1);padding:var(--ui-spacing-1) var(--ui-spacing-2);border:var(--ui-border-width) solid var(--ui-color-border);border-radius:var(--ui-radius-sm);color:var(--ui-color-text-muted);font-family:inherit;font-size:var(--ui-font-size-xs);font-weight:var(--ui-font-weight-medium);cursor:pointer;transition:color var(--ui-transition-fast), background var(--ui-transition-fast), border-color var(--ui-transition-fast);white-space:nowrap;background:0 0;display:inline-flex}.atl-code-block>.code-block-header>.code-block-copy:hover{color:var(--ui-color-text);background:var(--ui-color-surface);border-color:var(--ui-color-input-border)}.atl-code-block>.code-block-header>.code-block-copy:focus-visible{box-shadow:var(--ui-focus-ring);outline:none}.atl-code-block>.code-block-body{background:var(--ui-color-surface);overflow-x:auto}.atl-code-block>.code-block-body>.code-block-pre{padding:var(--ui-spacing-4);font:var(--ui-type-code);color:var(--ui-color-text);white-space:pre;tab-size:2;margin:0}.atl-code-block>.code-block-body>.code-block-pre>code>.code-line{display:flex}.atl-code-block>.code-block-body>.code-block-pre>code>.code-line>.code-line-number{min-width:2rem;padding-right:var(--ui-spacing-3);color:var(--ui-color-text-muted);text-align:right;-webkit-user-select:none;user-select:none;border-right:var(--ui-border-width) solid var(--ui-color-border);margin-right:var(--ui-spacing-3);opacity:.6;flex-shrink:0;display:inline-block}.atl-code-block>.code-block-body>.code-block-pre>code>.code-line>.code-line-text{flex:1}`})))()}var m;function init_atl_code_block$1(){return(init_atl_code_block$1=e((()=>{l(),init_atl_code_block(),n(),d(),m=class AtlCodeBlock{code=c(``);language=c(`text`);filename=c(``);copyable=c(!0);showLineNumbers=c(!1);copied=t(!1);displayLabel=r(()=>this.filename()||this.language());lines=r(()=>this.code().split(`
|
|
2
|
+
`));copy(){navigator.clipboard.writeText(this.code()).then(()=>{this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1800)})}static propDecorators={code:[{type:a,args:[{isSignal:!0,alias:`code`,required:!1,transform:void 0}]}],language:[{type:a,args:[{isSignal:!0,alias:`language`,required:!1,transform:void 0}]}],filename:[{type:a,args:[{isSignal:!0,alias:`filename`,required:!1,transform:void 0}]}],copyable:[{type:a,args:[{isSignal:!0,alias:`copyable`,required:!1,transform:void 0}]}],showLineNumbers:[{type:a,args:[{isSignal:!0,alias:`showLineNumbers`,required:!1,transform:void 0}]}]}},m=s([u({selector:`atl-code-block`,standalone:!0,imports:[f],changeDetection:i.OnPush,template:`
|
|
3
|
+
<div class="code-block-header">
|
|
4
|
+
<span class="code-block-label">{{ displayLabel() }}</span>
|
|
5
|
+
@if (copyable()) {
|
|
6
|
+
<button
|
|
7
|
+
class="code-block-copy"
|
|
8
|
+
type="button"
|
|
9
|
+
[attr.aria-label]="copied() ? 'Copied' : 'Copy code'"
|
|
10
|
+
(click)="copy()"
|
|
11
|
+
>
|
|
12
|
+
@if (copied()) {
|
|
13
|
+
<atl-icon name="check" size="sm" />
|
|
14
|
+
Copied
|
|
15
|
+
} @else {
|
|
16
|
+
<atl-icon name="copy" size="sm" />
|
|
17
|
+
Copy
|
|
18
|
+
}
|
|
19
|
+
</button>
|
|
20
|
+
}
|
|
21
|
+
</div>
|
|
22
|
+
<div class="code-block-body">
|
|
23
|
+
<pre class="code-block-pre"><code>@if (showLineNumbers()) {
|
|
24
|
+
@for (line of lines(); track $index) {
|
|
25
|
+
<span class="code-line">
|
|
26
|
+
<span class="code-line-number">{{ $index + 1 }}</span>
|
|
27
|
+
<span class="code-line-text">{{ line }}</span>
|
|
28
|
+
</span>
|
|
29
|
+
}
|
|
30
|
+
} @else {
|
|
31
|
+
{{ code() }}
|
|
32
|
+
}</code></pre>
|
|
33
|
+
</div>
|
|
34
|
+
`,encapsulation:o.None,host:{class:`atl-code-block`},styles:[p]})],m)})))()}export{init_atl_code_block$1 as n,m as t};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-D_-wTCJc.js";import{n as t,t as n}from"./dist-BfbfS1eq.js";import{n as r,t as i}from"./atl-code-block-CWbd7cP-.js";var a;function init_code_block_contract(){return(init_code_block_contract=e((()=>{a={component:`AtlCodeBlock`,figmaNodeId:`420:286`,figmaOnly:[{name:`variant`,reason:'Master description: "Variant `variant`: default | with-filename | with-line-numbers | no-copy" documents PROP COMBINATIONS (filename set, showLineNumbers true, copyable false), not a single code enum — AtlCodeBlockProps has no variant field; the underlying flags are independent booleans (filename presence, showLineNumbers, copyable).'}]}})))()}function figmaNode(e){return{type:`figma`,url:`${l}?node-id=${e}`}}var o,s,c,l,u,d,f,p,m,h,g,_;function init_atl_code_block_stories(){return(init_atl_code_block_stories=e((()=>{n(),r(),init_code_block_contract(),o=`import { AtlButton } from '@atelier-ui/angular';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
template: \`<button atl-button variant="primary" [loading]="saving">Save</button>\`,
|
|
5
|
+
})
|
|
6
|
+
export class MyComponent {
|
|
7
|
+
saving = false;
|
|
8
|
+
}`,s=`{
|
|
9
|
+
"name": "my-app",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@atelier-ui/angular": "^0.0.11"
|
|
12
|
+
}
|
|
13
|
+
}`,c=`npm install @atelier-ui/angular
|
|
14
|
+
npx nx generate @atelier-ui/generators:atl-component-angular --name=my-widget`,l=`https://www.figma.com/design/QMnDD8uZQPldPrlCwZZ58T/Atelier-UI`,u={title:`Components/Display/AtlCodeBlock`,component:i,tags:[`autodocs`],argTypes:{copyable:{control:`boolean`},showLineNumbers:{control:`boolean`},language:{control:`text`},filename:{control:`text`},code:{control:`text`}},parameters:{design:figmaNode(`420-286`),a11y:{config:{rules:[{id:`scrollable-region-focusable`,enabled:!1}]}},contract:a}},d={args:{code:o,language:`typescript`,filename:``,copyable:!0,showLineNumbers:!1},render:e=>({props:e,template:`<atl-code-block ${t(e)} style="max-width:600px" />`}),parameters:{design:figmaNode(`420-186`)}},f={args:{code:o,language:`typescript`,filename:`my-component.ts`,copyable:!0,showLineNumbers:!1},render:e=>({props:e,template:`<atl-code-block ${t(e)} style="max-width:600px" />`}),parameters:{design:figmaNode(`420-209`)}},p={args:{code:o,language:`typescript`,filename:`my-component.ts`,copyable:!0,showLineNumbers:!0},render:e=>({props:e,template:`<atl-code-block ${t(e)} style="max-width:600px" />`}),parameters:{design:figmaNode(`420-232`)}},m={args:{code:s,language:`json`,filename:`package.json`,copyable:!0,showLineNumbers:!1},render:e=>({props:e,template:`<atl-code-block ${t(e)} style="max-width:600px" />`}),parameters:{design:figmaNode(`420-209`)}},h={args:{code:c,language:`shell`,filename:``,copyable:!0,showLineNumbers:!1},render:e=>({props:e,template:`<atl-code-block ${t(e)} style="max-width:600px" />`}),parameters:{design:figmaNode(`420-186`)}},g={args:{code:o,language:`typescript`,filename:``,copyable:!1,showLineNumbers:!1},render:e=>({props:e,template:`<atl-code-block ${t(e)} style="max-width:600px" />`}),parameters:{design:figmaNode(`420-263`)}},_=[`Default`,`WithFilename`,`WithLineNumbers`,`Json`,`Shell`,`NoCopyButton`],d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
15
|
+
args: {
|
|
16
|
+
code: SAMPLE_TS,
|
|
17
|
+
language: 'typescript',
|
|
18
|
+
filename: '',
|
|
19
|
+
copyable: true,
|
|
20
|
+
showLineNumbers: false
|
|
21
|
+
},
|
|
22
|
+
render: args => ({
|
|
23
|
+
props: args,
|
|
24
|
+
template: \`<atl-code-block \${argsToTemplate(args)} style="max-width:600px" />\`
|
|
25
|
+
}),
|
|
26
|
+
parameters: {
|
|
27
|
+
design: figmaNode('420-186')
|
|
28
|
+
}
|
|
29
|
+
}`,...d.parameters?.docs?.source}}},f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
|
|
30
|
+
args: {
|
|
31
|
+
code: SAMPLE_TS,
|
|
32
|
+
language: 'typescript',
|
|
33
|
+
filename: 'my-component.ts',
|
|
34
|
+
copyable: true,
|
|
35
|
+
showLineNumbers: false
|
|
36
|
+
},
|
|
37
|
+
render: args => ({
|
|
38
|
+
props: args,
|
|
39
|
+
template: \`<atl-code-block \${argsToTemplate(args)} style="max-width:600px" />\`
|
|
40
|
+
}),
|
|
41
|
+
parameters: {
|
|
42
|
+
design: figmaNode('420-209')
|
|
43
|
+
}
|
|
44
|
+
}`,...f.parameters?.docs?.source}}},p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
45
|
+
args: {
|
|
46
|
+
code: SAMPLE_TS,
|
|
47
|
+
language: 'typescript',
|
|
48
|
+
filename: 'my-component.ts',
|
|
49
|
+
copyable: true,
|
|
50
|
+
showLineNumbers: true
|
|
51
|
+
},
|
|
52
|
+
render: args => ({
|
|
53
|
+
props: args,
|
|
54
|
+
template: \`<atl-code-block \${argsToTemplate(args)} style="max-width:600px" />\`
|
|
55
|
+
}),
|
|
56
|
+
parameters: {
|
|
57
|
+
design: figmaNode('420-232')
|
|
58
|
+
}
|
|
59
|
+
}`,...p.parameters?.docs?.source}}},m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
|
|
60
|
+
args: {
|
|
61
|
+
code: SAMPLE_JSON,
|
|
62
|
+
language: 'json',
|
|
63
|
+
filename: 'package.json',
|
|
64
|
+
copyable: true,
|
|
65
|
+
showLineNumbers: false
|
|
66
|
+
},
|
|
67
|
+
render: args => ({
|
|
68
|
+
props: args,
|
|
69
|
+
template: \`<atl-code-block \${argsToTemplate(args)} style="max-width:600px" />\`
|
|
70
|
+
}),
|
|
71
|
+
parameters: {
|
|
72
|
+
design: figmaNode('420-209')
|
|
73
|
+
}
|
|
74
|
+
}`,...m.parameters?.docs?.source}}},h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
|
|
75
|
+
args: {
|
|
76
|
+
code: SAMPLE_SHELL,
|
|
77
|
+
language: 'shell',
|
|
78
|
+
filename: '',
|
|
79
|
+
copyable: true,
|
|
80
|
+
showLineNumbers: false
|
|
81
|
+
},
|
|
82
|
+
render: args => ({
|
|
83
|
+
props: args,
|
|
84
|
+
template: \`<atl-code-block \${argsToTemplate(args)} style="max-width:600px" />\`
|
|
85
|
+
}),
|
|
86
|
+
parameters: {
|
|
87
|
+
design: figmaNode('420-186')
|
|
88
|
+
}
|
|
89
|
+
}`,...h.parameters?.docs?.source}}},g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
|
|
90
|
+
args: {
|
|
91
|
+
code: SAMPLE_TS,
|
|
92
|
+
language: 'typescript',
|
|
93
|
+
filename: '',
|
|
94
|
+
copyable: false,
|
|
95
|
+
showLineNumbers: false
|
|
96
|
+
},
|
|
97
|
+
render: args => ({
|
|
98
|
+
props: args,
|
|
99
|
+
template: \`<atl-code-block \${argsToTemplate(args)} style="max-width:600px" />\`
|
|
100
|
+
}),
|
|
101
|
+
parameters: {
|
|
102
|
+
design: figmaNode('420-263')
|
|
103
|
+
}
|
|
104
|
+
}`,...g.parameters?.docs?.source}}}})))()}init_atl_code_block_stories();export{d as Default,m as Json,g as NoCopyButton,h as Shell,f as WithFilename,p as WithLineNumbers,_ as __namedExportsOrder,u as default};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-D_-wTCJc.js";import{A as t,Ft as n,Lt as r,M as i,O as a,P as o,R as s,S as c,V as l,W as u,et as d,hn as f,k as p,q as m,xn as h,z as g}from"./angular-platform-ChS-QjTV.js";import{n as _,t as v}from"./atl-icon-ChO59f9V.js";import{n as y,t as b}from"./dist-BfbfS1eq.js";var x;function init_atl_combobox(){return(init_atl_combobox=e((()=>{x=`:is(.atl-combobox,.atl-combobox-error-message,.atl-combobox-errors,.atl-combobox-icon,.atl-combobox-input,.atl-combobox-no-results,.atl-combobox-option,.atl-combobox-panel,.atl-combobox-wrapper),:is(.atl-combobox,.atl-combobox-error-message,.atl-combobox-errors,.atl-combobox-icon,.atl-combobox-input,.atl-combobox-no-results,.atl-combobox-option,.atl-combobox-panel,.atl-combobox-wrapper) *{box-sizing:border-box}.atl-combobox{font-family:var(--ui-font-family);line-height:var(--ui-line-height-tight);font-size:var(--ui-font-size-md);display:block;position:relative}.atl-combobox-wrapper{align-items:center;display:flex;position:relative}.atl-combobox-input{width:100%;min-height:var(--ui-control-height-md);box-sizing:border-box;line-height:var(--ui-line-height-tight);padding:calc(( var(--ui-control-height-md) - var(--ui-line-height-tight) * var(--ui-font-size-md) ) / 2 - var(--ui-border-width)) calc(var(--ui-spacing-4) + 1.25rem + var(--ui-spacing-5)) calc(( var(--ui-control-height-md) - var(--ui-line-height-tight) * var(--ui-font-size-md) ) / 2 - var(--ui-border-width)) var(--ui-spacing-4);font-family:inherit;font-size:inherit;color:var(--ui-color-text);background-color:var(--ui-color-input-bg);border:var(--ui-border-width) solid var(--ui-color-input-border);border-radius:var(--ui-radius-md);transition:border-color var(--ui-transition-fast), box-shadow var(--ui-transition-fast), background-color var(--ui-transition-fast);cursor:text;outline:none}.atl-combobox-input::placeholder{color:var(--ui-color-placeholder)}.atl-combobox-input:hover:not(:disabled){border-color:var(--ui-color-input-border-hover)}.atl-combobox-input:focus-visible,.atl-combobox.is-open .atl-combobox-input{border-color:var(--ui-color-input-border-focus);box-shadow:var(--ui-focus-ring)}.atl-combobox.is-invalid .atl-combobox-input{border-color:var(--ui-color-input-border-invalid)}.atl-combobox.is-invalid .atl-combobox-input:focus-visible{border-color:var(--ui-color-input-border-invalid);box-shadow:var(--ui-focus-ring-danger)}.atl-combobox.is-disabled{opacity:var(--ui-opacity-disabled);cursor:not-allowed}.atl-combobox.is-disabled .atl-combobox-input{cursor:not-allowed}.atl-combobox-icon{pointer-events:none;color:var(--ui-color-text-muted);transition:transform var(--ui-transition-fast);align-items:center;display:flex;position:absolute;inset-inline-end:var(--ui-spacing-4)}.atl-combobox.is-open .atl-combobox-icon{transform:rotate(180deg)}.atl-combobox-panel{left:0;top:calc(100% + var(--ui-spacing-2));width:100%;max-height:16rem;padding:var(--ui-spacing-2) 0;background-color:var(--ui-color-surface-raised);border:var(--ui-border-width) solid var(--ui-color-border);border-radius:var(--ui-radius-md);box-shadow:var(--ui-shadow-lg);z-index:var(--ui-z-dropdown);margin:0;list-style:none;position:absolute;overflow-y:auto}.atl-combobox-option{min-height:var(--ui-row-height-sm);line-height:var(--ui-line-height-tight);padding-block:0;padding-inline:var(--ui-spacing-4);cursor:pointer;color:var(--ui-color-text);font-size:var(--ui-font-size-md);transition:background-color var(--ui-transition-fast);justify-content:space-between;align-items:center;display:flex}.atl-combobox-option:hover:not(.is-disabled){background-color:var(--ui-color-surface-sunken)}.atl-combobox-option.is-active{background-color:var(--ui-color-primary-light);color:var(--ui-color-primary)}.atl-combobox-option.is-selected{font-weight:var(--ui-font-weight-semibold)}.atl-combobox-option.is-disabled{opacity:var(--ui-opacity-disabled);cursor:not-allowed}.atl-combobox-option>.atl-combobox-check{color:var(--ui-color-primary);flex-shrink:0}.atl-combobox-no-results{padding:var(--ui-spacing-4);text-align:center;color:var(--ui-color-text-muted);font-size:var(--ui-font-size-sm)}.atl-combobox-errors{margin-top:var(--ui-spacing-2)}.atl-combobox-error-message{font-size:var(--ui-font-size-sm);color:var(--ui-color-error-text);line-height:var(--ui-line-height-normal);margin:0}.atl-combobox.is-readonly .atl-combobox-input{cursor:default;border-color:#0000}.atl-combobox.is-invalid>.atl-combobox-wrapper>.invalid-icon{top:50%;color:var(--ui-color-danger);pointer-events:none;position:absolute;inset-inline-end:calc(var(--ui-spacing-4) + var(--ui-spacing-5));transform:translateY(-50%)}`})))()}var S,C;function init_atl_combobox$1(){return(init_atl_combobox$1=e((()=>{h(),init_atl_combobox(),a(),_(),S=0,C=class AtlCombobox{value=t(``);touched=t(!1);options=p([]);placeholder=p(``);disabled=p(!1);readonly=p(!1);invalid=p(!1);required=p(!1);name=p(``);errors=p([]);query=r(``);isOpen=r(!1);activeIndex=r(-1);panelRef=i(`panel`);inputEl=i(`inputEl`);inputId=`atl-combobox-input-${S}`;panelId=`atl-combobox-panel-${S}`;errorId=`atl-combobox-errors-${S++}`;filteredOptions=o(()=>{let e=this.query().toLowerCase();return e?this.options().filter(t=>t.label.toLowerCase().includes(e)):this.options()});activeOptionId=o(()=>{let e=this.activeIndex();return e>=0?this.optionId(e):null});showErrors=o(()=>this.errors().length>0);hostClasses=o(()=>{let e=[];return this.isOpen()&&e.push(`is-open`),this.disabled()&&e.push(`is-disabled`),this.readonly()&&e.push(`is-readonly`),this.invalid()&&e.push(`is-invalid`),this.touched()&&e.push(`is-touched`),e.join(` `)});outsideClickHandler=null;elementRef=n(l);optionId(e){return`${this.panelId}-option-${e}`}onInput(e){let t=e.target.value;this.query.set(t),this.activeIndex.set(-1),t===``&&this.value.set(``),this.isOpen()||this.open()}onFocus(){!this.disabled()&&!this.readonly()&&this.open()}onBlur(){let e=this.options().find(e=>e.value===this.value());this.query.set(e?.label??``),this.touched.set(!0)}onOptionSelect(e){e.disabled||this.disabled()||this.readonly()||(this.value.set(e.value),this.query.set(e.label),this.touched.set(!0),this.close(),this.inputEl()?.nativeElement.focus())}onKeydown(e){if(!(this.disabled()||this.readonly()))switch(e.key){case`Enter`:{let t=this.activeIndex();if(this.isOpen()&&t>=0){e.preventDefault();let n=this.filteredOptions()[t];this.onOptionSelect(n)}break}case`Escape`:{e.preventDefault();let t=this.options().find(e=>e.value===this.value());this.query.set(t?.label??``),this.close();break}case`Tab`:this.close();break;case`ArrowDown`:case`ArrowUp`:{if(!this.isOpen()){this.open();break}e.preventDefault();let t=this.filteredOptions(),n=t.map((e,t)=>t).filter(e=>!t[e].disabled);if(n.length===0)break;let r=n.indexOf(this.activeIndex()),i=n.length,a=e.key===`ArrowDown`?(r+1)%i:(r-1+i)%i;this.activeIndex.set(n[a]);break}}}open(){let e=this.panelRef();!e||this.isOpen()||this.readonly()||(e.nativeElement.showPopover(),this.isOpen.set(!0),this.activeIndex.set(-1),this.outsideClickHandler=e=>{this.elementRef.nativeElement.contains(e.target)||this.close()},document.addEventListener(`click`,this.outsideClickHandler))}close(){let e=this.panelRef();if(e&&this.isOpen()){try{e.nativeElement.hidePopover()}catch{}this.isOpen.set(!1),this.activeIndex.set(-1),this.outsideClickHandler&&=(document.removeEventListener(`click`,this.outsideClickHandler),null)}}static propDecorators={value:[{type:u,args:[{isSignal:!0,alias:`value`,required:!1}]},{type:m,args:[`valueChange`]}],touched:[{type:u,args:[{isSignal:!0,alias:`touched`,required:!1}]},{type:m,args:[`touchedChange`]}],options:[{type:u,args:[{isSignal:!0,alias:`options`,required:!1,transform:void 0}]}],placeholder:[{type:u,args:[{isSignal:!0,alias:`placeholder`,required:!1,transform:void 0}]}],disabled:[{type:u,args:[{isSignal:!0,alias:`disabled`,required:!1,transform:void 0}]}],readonly:[{type:u,args:[{isSignal:!0,alias:`readonly`,required:!1,transform:void 0}]}],invalid:[{type:u,args:[{isSignal:!0,alias:`invalid`,required:!1,transform:void 0}]}],required:[{type:u,args:[{isSignal:!0,alias:`required`,required:!1,transform:void 0}]}],name:[{type:u,args:[{isSignal:!0,alias:`name`,required:!1,transform:void 0}]}],errors:[{type:u,args:[{isSignal:!0,alias:`errors`,required:!1,transform:void 0}]}],panelRef:[{type:c,args:[`panel`,{isSignal:!0}]}],inputEl:[{type:c,args:[`inputEl`,{isSignal:!0}]}]}},C=f([g({selector:`atl-combobox`,standalone:!0,imports:[v],changeDetection:s.OnPush,template:`
|
|
2
|
+
<div class="atl-combobox-wrapper">
|
|
3
|
+
<input
|
|
4
|
+
#inputEl
|
|
5
|
+
class="atl-combobox-input"
|
|
6
|
+
type="text"
|
|
7
|
+
autocomplete="off"
|
|
8
|
+
role="combobox"
|
|
9
|
+
[id]="inputId"
|
|
10
|
+
[attr.aria-expanded]="isOpen()"
|
|
11
|
+
[attr.aria-controls]="panelId"
|
|
12
|
+
aria-autocomplete="list"
|
|
13
|
+
[attr.aria-activedescendant]="activeOptionId()"
|
|
14
|
+
[attr.aria-invalid]="invalid() || null"
|
|
15
|
+
[attr.aria-describedby]="showErrors() ? errorId : null"
|
|
16
|
+
[attr.disabled]="disabled() || null"
|
|
17
|
+
[attr.required]="required() || null"
|
|
18
|
+
[attr.name]="name() || null"
|
|
19
|
+
[placeholder]="placeholder()"
|
|
20
|
+
[readOnly]="readonly()"
|
|
21
|
+
[value]="query()"
|
|
22
|
+
(input)="onInput($event)"
|
|
23
|
+
(focus)="onFocus()"
|
|
24
|
+
(blur)="onBlur()"
|
|
25
|
+
(keydown)="onKeydown($event)"
|
|
26
|
+
/>
|
|
27
|
+
@if (invalid()) {
|
|
28
|
+
<atl-icon name="danger" size="sm" class="invalid-icon" />
|
|
29
|
+
}
|
|
30
|
+
<span class="atl-combobox-icon" aria-hidden="true">
|
|
31
|
+
<atl-icon name="chevron-down" size="sm" />
|
|
32
|
+
</span>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<ul
|
|
36
|
+
#panel
|
|
37
|
+
[id]="panelId"
|
|
38
|
+
popover="manual"
|
|
39
|
+
role="listbox"
|
|
40
|
+
class="atl-combobox-panel"
|
|
41
|
+
[attr.aria-labelledby]="inputId"
|
|
42
|
+
>
|
|
43
|
+
@for (option of filteredOptions(); track option.value; let i = $index) {
|
|
44
|
+
<li
|
|
45
|
+
[id]="optionId(i)"
|
|
46
|
+
role="option"
|
|
47
|
+
class="atl-combobox-option"
|
|
48
|
+
[class.is-active]="activeIndex() === i"
|
|
49
|
+
[class.is-selected]="option.value === value()"
|
|
50
|
+
[class.is-disabled]="option.disabled"
|
|
51
|
+
[attr.aria-selected]="option.value === value()"
|
|
52
|
+
[attr.aria-disabled]="option.disabled || null"
|
|
53
|
+
(mousedown)="onOptionSelect(option)"
|
|
54
|
+
(mouseenter)="activeIndex.set(i)"
|
|
55
|
+
>
|
|
56
|
+
<span>{{ option.label }}</span>
|
|
57
|
+
@if (option.value === value()) {
|
|
58
|
+
<atl-icon name="check" size="sm" class="atl-combobox-check" />
|
|
59
|
+
}
|
|
60
|
+
</li>
|
|
61
|
+
}
|
|
62
|
+
@if (filteredOptions().length === 0) {
|
|
63
|
+
<li
|
|
64
|
+
class="atl-combobox-no-results"
|
|
65
|
+
role="option"
|
|
66
|
+
aria-selected="false"
|
|
67
|
+
aria-disabled="true"
|
|
68
|
+
>
|
|
69
|
+
No results found.
|
|
70
|
+
</li>
|
|
71
|
+
}
|
|
72
|
+
</ul>
|
|
73
|
+
|
|
74
|
+
@if (showErrors()) {
|
|
75
|
+
<div class="atl-combobox-errors" [id]="errorId" aria-live="polite">
|
|
76
|
+
@for (error of errors(); track error.kind) {
|
|
77
|
+
<p class="atl-combobox-error-message">{{ error.message }}</p>
|
|
78
|
+
}
|
|
79
|
+
</div>
|
|
80
|
+
}
|
|
81
|
+
`,encapsulation:d.None,host:{class:`atl-combobox`,"[class]":`hostClasses()`},styles:[x]})],C)})))()}var w;function init_combobox_metadata(){return(init_combobox_metadata=e((()=>{w={specNames:[`AtlComboboxSpec`],purpose:`Searchable picker. Renders a text input plus a filtered option list so users can type to narrow a long set of choices.`,whenToUse:[`Picking one value from a list long enough that scrolling beats scanning (countries, currencies, users).`,`Letting the user type a few characters to filter options instead of opening every group.`,`Driving an autocomplete where the available values are known upfront, not free text.`],antiPatterns:[{pattern:`Accepting any freeform string the user types.`,useInstead:`AtlInput — combobox commits to a value from the option list.`},{pattern:`Picking from a list short enough to fit a native dropdown.`,useInstead:`AtlSelect — no search overhead, inherits native mobile UI.`},{pattern:`Selecting many values at once.`,useInstead:`A multi-select combobox (not in this spec) or a list of AtlCheckbox rows.`}],relatedComponents:[`AtlSelectSpec`,`AtlInputSpec`],variantMatrix:[{state:`default`},{state:`filtered`},{state:`selected`},{disabled:!0},{invalid:!0},{required:!0}],accessibility:{role:`combobox`,relatedRoles:[`listbox`],keyboard:[{key:`Type`,action:`Filter the options. The list opens (it also opens when the input receives focus) and updates in place.`},{key:`Arrow Down / Up`,action:`Open the list when closed; once open, move between the enabled filtered options, wrapping at the ends.`},{key:`Enter`,action:`Select the highlighted option.`},{key:`Escape`,action:`Close the list and restore the input to the selected option’s label.`},{key:`Tab`,action:`Close the list and move focus on.`}],notes:[`The input has aria-autocomplete="list" and aria-expanded reflects the open state.`,`The highlighted option is exposed through aria-activedescendant, so screen readers announce it without moving focus out of the text input.`]}}})))()}var T;function init_combobox_contract(){return(init_combobox_contract=e((()=>{T={component:`AtlCombobox`,figmaNodeId:`421:339`,figmaOnly:[{name:`state=open`,reason:"atl-combobox.tsx tracks `isOpen` as internal component state (useState), not a settable/observable prop — the .atl-combobox.is-open CSS class is real (atl-combobox.css:96,132), but it is driven by user interaction, not the public API this stage checks."},{name:`state=filtered`,reason:`UNEXPLAINED — grep-verified 2026-09-10: no root-level .is-filtered class or distinguishable state exists in atl-combobox.css; decide in tasks/todo.md`},{name:`state=selected`,reason:`UNEXPLAINED — grep-verified 2026-09-10: atl-combobox.css only has a PER-OPTION .atl-combobox-option.is-selected rule, not a root-level combobox state; decide in tasks/todo.md`}],axisMap:[{figmaAxis:`state`,codeProp:`invalid`,values:{invalid:!0},reason:`AtlFormFieldSpec.invalid is a real boolean prop (libs/spec/src/index.ts) — the master's 'invalid' state value maps to it directly.`}],probes:[{part:`control`,selector:`input[role='combobox']`,reason:`the .atl-combobox root only sets display/font/line-height — background-color, border and border-radius are painted on the nested text input. The selector names the one attribute all three frameworks set explicitly on that element, role='combobox' (atl-combobox.tsx / .vue / .ts all set it verbatim, not left to an implicit ARIA role), rather than its class: Angular's input used to be 'combobox-input' against 'atl-combobox-input' in React/Vue, which ADR-0148 removed, but the attribute is the element this probe means whatever the class is called.`}]}})))()}function figmaNode(e){return{type:`figma`,url:`${O}?node-id=${e}`}}var E,D,O,k,A,j,M,N,P,F,I;function init_atl_combobox_stories(){return(init_atl_combobox_stories=e((()=>{b(),init_atl_combobox$1(),init_combobox_metadata(),init_combobox_contract(),E=[{value:`apple`,label:`Apple`},{value:`banana`,label:`Banana`},{value:`cherry`,label:`Cherry`},{value:`date`,label:`Date`},{value:`elderberry`,label:`Elderberry`},{value:`fig`,label:`Fig`},{value:`grape`,label:`Grape`},{value:`honeydew`,label:`Honeydew`,disabled:!0}],D=[{value:`de`,label:`Germany`},{value:`fr`,label:`France`},{value:`gb`,label:`United Kingdom`},{value:`us`,label:`United States`},{value:`ca`,label:`Canada`},{value:`au`,label:`Australia`},{value:`jp`,label:`Japan`}],O=`https://www.figma.com/design/QMnDD8uZQPldPrlCwZZ58T/Atelier-UI`,k={title:`Components/Inputs/AtlCombobox`,component:C,tags:[`autodocs`],argTypes:{disabled:{control:`boolean`},invalid:{control:`boolean`},required:{control:`boolean`},placeholder:{control:`text`}},parameters:{design:figmaNode(`421-339`),docs:{description:{component:w.purpose}},contract:T}},A={args:{options:E,placeholder:`Search fruit…`,disabled:!1,invalid:!1},render:e=>({props:e,template:`<atl-combobox ${y(e)} />`}),parameters:{design:figmaNode(`421-291`)}},j={args:{options:E,value:`cherry`,placeholder:`Search fruit…`},render:e=>({props:e,template:`<atl-combobox ${y(e)} />`}),parameters:{design:figmaNode(`421-324`)}},M={args:{options:D,placeholder:`Search country…`},render:e=>({props:e,template:`<atl-combobox ${y(e)} />`}),parameters:{design:figmaNode(`421-291`)}},N={args:{options:E,value:`banana`,disabled:!0,placeholder:`Search fruit…`},render:e=>({props:e,template:`<atl-combobox ${y(e)} />`})},P={args:{options:E,invalid:!0,placeholder:`Search fruit…`},render:e=>({props:e,template:`<atl-combobox ${y(e)} />`})},F={args:{options:E,placeholder:`Search fruit… (Honeydew is disabled)`},render:e=>({props:e,template:`<atl-combobox ${y(e)} />`}),parameters:{design:figmaNode(`421-295`)}},I=[`Default`,`WithPreselection`,`Countries`,`Disabled`,`Invalid`,`WithDisabledOption`],A.parameters={...A.parameters,docs:{...A.parameters?.docs,source:{originalSource:`{
|
|
82
|
+
args: {
|
|
83
|
+
options: FRUITS,
|
|
84
|
+
placeholder: 'Search fruit…',
|
|
85
|
+
disabled: false,
|
|
86
|
+
invalid: false
|
|
87
|
+
},
|
|
88
|
+
render: args => ({
|
|
89
|
+
props: args,
|
|
90
|
+
template: \`<atl-combobox \${argsToTemplate(args)} />\`
|
|
91
|
+
}),
|
|
92
|
+
parameters: {
|
|
93
|
+
design: figmaNode('421-291')
|
|
94
|
+
}
|
|
95
|
+
}`,...A.parameters?.docs?.source}}},j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
|
|
96
|
+
args: {
|
|
97
|
+
options: FRUITS,
|
|
98
|
+
value: 'cherry',
|
|
99
|
+
placeholder: 'Search fruit…'
|
|
100
|
+
},
|
|
101
|
+
render: args => ({
|
|
102
|
+
props: args,
|
|
103
|
+
template: \`<atl-combobox \${argsToTemplate(args)} />\`
|
|
104
|
+
}),
|
|
105
|
+
parameters: {
|
|
106
|
+
design: figmaNode('421-324')
|
|
107
|
+
}
|
|
108
|
+
}`,...j.parameters?.docs?.source}}},M.parameters={...M.parameters,docs:{...M.parameters?.docs,source:{originalSource:`{
|
|
109
|
+
args: {
|
|
110
|
+
options: COUNTRIES,
|
|
111
|
+
placeholder: 'Search country…'
|
|
112
|
+
},
|
|
113
|
+
render: args => ({
|
|
114
|
+
props: args,
|
|
115
|
+
template: \`<atl-combobox \${argsToTemplate(args)} />\`
|
|
116
|
+
}),
|
|
117
|
+
parameters: {
|
|
118
|
+
design: figmaNode('421-291')
|
|
119
|
+
}
|
|
120
|
+
}`,...M.parameters?.docs?.source}}},N.parameters={...N.parameters,docs:{...N.parameters?.docs,source:{originalSource:`{
|
|
121
|
+
args: {
|
|
122
|
+
options: FRUITS,
|
|
123
|
+
value: 'banana',
|
|
124
|
+
disabled: true,
|
|
125
|
+
placeholder: 'Search fruit…'
|
|
126
|
+
},
|
|
127
|
+
render: args => ({
|
|
128
|
+
props: args,
|
|
129
|
+
template: \`<atl-combobox \${argsToTemplate(args)} />\`
|
|
130
|
+
})
|
|
131
|
+
}`,...N.parameters?.docs?.source}}},P.parameters={...P.parameters,docs:{...P.parameters?.docs,source:{originalSource:`{
|
|
132
|
+
args: {
|
|
133
|
+
options: FRUITS,
|
|
134
|
+
invalid: true,
|
|
135
|
+
placeholder: 'Search fruit…'
|
|
136
|
+
},
|
|
137
|
+
render: args => ({
|
|
138
|
+
props: args,
|
|
139
|
+
template: \`<atl-combobox \${argsToTemplate(args)} />\`
|
|
140
|
+
})
|
|
141
|
+
}`,...P.parameters?.docs?.source}}},F.parameters={...F.parameters,docs:{...F.parameters?.docs,source:{originalSource:`{
|
|
142
|
+
args: {
|
|
143
|
+
options: FRUITS,
|
|
144
|
+
placeholder: 'Search fruit… (Honeydew is disabled)'
|
|
145
|
+
},
|
|
146
|
+
render: args => ({
|
|
147
|
+
props: args,
|
|
148
|
+
template: \`<atl-combobox \${argsToTemplate(args)} />\`
|
|
149
|
+
}),
|
|
150
|
+
parameters: {
|
|
151
|
+
design: figmaNode('421-295')
|
|
152
|
+
}
|
|
153
|
+
}`,...F.parameters?.docs?.source}}}})))()}init_atl_combobox_stories();export{M as Countries,A as Default,N as Disabled,P as Invalid,F as WithDisabledOption,j as WithPreselection,I as __namedExportsOrder,k as default};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-D_-wTCJc.js";import{A as t,Dt as n,Et as r,Ft as i,Lt as a,M as o,Mt as s,O as c,P as l,R as u,S as d,W as f,et as p,hn as m,k as h,q as g,tt as _,xn as v,z as y}from"./angular-platform-ChS-QjTV.js";import{n as b,t as x}from"./_a11y-module-chunk-kh2BWFEb.js";import{n as S,t as C}from"./atl-icon-ChO59f9V.js";import{n as w,t as T}from"./a11y-dev-warn-BbRozqAf.js";var E;function init_atl_dialog(){return(init_atl_dialog=e((()=>{E=`:is(.atl-dialog,.atl-dialog-content,.atl-dialog-footer,.atl-dialog-header),:is(.atl-dialog,.atl-dialog-content,.atl-dialog-footer,.atl-dialog-header) *{box-sizing:border-box}.atl-dialog{all:unset;box-sizing:border-box;font-family:var(--ui-font-family);line-height:var(--ui-line-height-normal);width:fit-content;max-width:100vw;height:fit-content;max-height:calc(100dvh - var(--ui-spacing-8));border-radius:var(--ui-radius-lg);background:var(--ui-color-surface);box-shadow:var(--ui-shadow-xl,0 20px 60px #0000004d);color:var(--ui-color-text);opacity:0;transition:opacity var(--ui-duration-slow) var(--ui-ease-out,ease-out), transform var(--ui-duration-slow) var(--ui-ease-out,ease-out), display var(--ui-duration-slow) allow-discrete, overlay var(--ui-duration-slow) allow-discrete;flex-direction:column;margin:auto;display:none;position:fixed;inset:0;overflow:hidden;transform:scale(.95)}.atl-dialog[open]{opacity:1;display:flex;transform:scale(1)}@starting-style{.atl-dialog[open]{opacity:0;transform:scale(.95)}}.atl-dialog::backdrop{background:var(--ui-color-overlay);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);transition:opacity var(--ui-duration-slow) var(--ui-ease-out,ease-out), display var(--ui-duration-slow) allow-discrete, overlay var(--ui-duration-slow) allow-discrete}@starting-style{.atl-dialog[open]::backdrop{opacity:0}}@media (prefers-color-scheme:dark){.atl-dialog::backdrop{background:var(--ui-color-overlay)}}[data-theme=dark] .atl-dialog::backdrop{background:var(--ui-color-overlay)}.atl-dialog>.panel{width:100%;max-height:inherit;flex-direction:column;display:flex;overflow:hidden}.atl-dialog.size-sm,.atl-dialog>.panel.size-sm{width:min(24rem,90vw)}.atl-dialog.size-md,.atl-dialog>.panel.size-md{width:min(36rem,90vw)}.atl-dialog.size-lg,.atl-dialog>.panel.size-lg{width:min(48rem,90vw)}.atl-dialog.size-xl,.atl-dialog>.panel.size-xl{width:min(64rem,90vw)}.atl-dialog.size-full,.atl-dialog>.panel.size-full{border-radius:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0}.atl-dialog-header{padding:var(--ui-spacing-5) var(--ui-spacing-6);border-bottom:var(--ui-border-width) solid var(--ui-color-border);font-size:var(--ui-font-size-xl);font-weight:var(--ui-font-weight-semibold);letter-spacing:var(--ui-letter-spacing-tight);color:var(--ui-color-text);flex-shrink:0;justify-content:space-between;align-items:center;display:flex}.atl-dialog-content{padding:var(--ui-spacing-6);color:var(--ui-color-text);flex:1;display:block;overflow-y:auto}.atl-dialog-footer{justify-content:flex-end;align-items:center;gap:var(--ui-spacing-3);padding:var(--ui-spacing-5) var(--ui-spacing-6);border-top:var(--ui-border-width) solid var(--ui-color-border);flex-shrink:0;display:flex}.atl-dialog-header>.close-btn{width:var(--ui-control-height-sm);height:var(--ui-control-height-sm);margin-left:var(--ui-spacing-3);border-radius:var(--ui-radius-sm);cursor:pointer;color:var(--ui-color-text-muted);transition:background-color var(--ui-transition-fast), color var(--ui-transition-fast);background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}.atl-dialog-header>.close-btn:hover{background-color:var(--ui-color-surface-sunken);color:var(--ui-color-text)}.atl-dialog-header>.close-btn:focus-visible{box-shadow:var(--ui-focus-ring);outline:none}`})))()}var D;function init_atl_dialog_token(){return(init_atl_dialog_token=e((()=>{c(),D=new r(`ATL_DIALOG`)})))()}var O,k,A,j,M;function init_atl_dialog$1(){return(init_atl_dialog$1=e((()=>{v(),init_atl_dialog(),c(),b(),init_atl_dialog_token(),T(),S(),O=0,k=class AtlDialog{open=t(!1);closeOnBackdrop=h(!0);size=h(`md`);ariaLabel=h(``,{alias:`aria-label`});ariaLabelledby=h(``,{alias:`aria-labelledby`});headerId=`atl-dialog-header-${O}`;dialogId=`atl-dialog-${O++}`;dialogRef=o(`dialogEl`);triggerEl=a(null);injector=i(n);warnedUnnamed=!1;panelClass=l(()=>`panel size-${this.size()}`);hostClasses=l(()=>this.open()?`is-open`:``);constructor(){s(()=>{let e=this.dialogRef()?.nativeElement;e&&(this.open()?(this.triggerEl.set(document.activeElement),e.showModal(),this.warnIfUnnamed(e)):(e.open&&e.close(),this.triggerEl()?.focus(),this.triggerEl.set(null)))})}warnIfUnnamed(e){w()&&!this.warnedUnnamed&&(this.warnedUnnamed=!0,_(()=>{this.ariaLabel()===``&&this.ariaLabelledby()===``&&e.querySelector(`[id="${this.headerId}"]`)===null&&console.warn(`[AtlDialog] opened with no accessible name — add an <atl-dialog-header> or set [aria-label] / [aria-labelledby] so screen readers announce its purpose.`,e)},{injector:this.injector}))}onCancel(e){e.preventDefault(),this.open.set(!1)}onBackdropClick(e){this.closeOnBackdrop()&&e.target===this.dialogRef()?.nativeElement&&this.open.set(!1)}static ctorParameters=()=>[];static propDecorators={open:[{type:f,args:[{isSignal:!0,alias:`open`,required:!1}]},{type:g,args:[`openChange`]}],closeOnBackdrop:[{type:f,args:[{isSignal:!0,alias:`closeOnBackdrop`,required:!1,transform:void 0}]}],size:[{type:f,args:[{isSignal:!0,alias:`size`,required:!1,transform:void 0}]}],ariaLabel:[{type:f,args:[{isSignal:!0,alias:`aria-label`,required:!1,transform:void 0}]}],ariaLabelledby:[{type:f,args:[{isSignal:!0,alias:`aria-labelledby`,required:!1,transform:void 0}]}],dialogRef:[{type:d,args:[`dialogEl`,{isSignal:!0}]}]}},k=m([y({selector:`atl-dialog`,standalone:!0,imports:[x],changeDetection:u.OnPush,providers:[{provide:D,useFactory:e=>({headerId:e.headerId,close:()=>e.open.set(!1)}),deps:[k]}],template:`
|
|
2
|
+
<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->
|
|
3
|
+
<dialog
|
|
4
|
+
#dialogEl
|
|
5
|
+
class="atl-dialog"
|
|
6
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
7
|
+
[attr.aria-labelledby]="ariaLabel() ? null : ariaLabelledby() || headerId"
|
|
8
|
+
aria-modal="true"
|
|
9
|
+
[cdkTrapFocus]="open()"
|
|
10
|
+
(cancel)="onCancel($event)"
|
|
11
|
+
(click)="onBackdropClick($event)"
|
|
12
|
+
>
|
|
13
|
+
<div [class]="panelClass()">
|
|
14
|
+
<ng-content />
|
|
15
|
+
</div>
|
|
16
|
+
</dialog>
|
|
17
|
+
`,encapsulation:p.None,host:{"[class]":`hostClasses()`,"[attr.aria-label]":`null`,"[attr.aria-labelledby]":`null`},styles:[E]})],k),A=class AtlDialogHeader{context=i(D)},A=m([y({selector:`atl-dialog-header`,standalone:!0,imports:[C],changeDetection:u.OnPush,template:`
|
|
18
|
+
<ng-content />
|
|
19
|
+
<button
|
|
20
|
+
class="close-btn"
|
|
21
|
+
type="button"
|
|
22
|
+
aria-label="Close dialog"
|
|
23
|
+
(click)="context.close()"
|
|
24
|
+
>
|
|
25
|
+
<atl-icon name="close" size="sm" />
|
|
26
|
+
</button>
|
|
27
|
+
`,host:{class:`atl-dialog-header`,"[attr.id]":`context.headerId`}})],A),j=class AtlDialogContent{},j=m([y({selector:`atl-dialog-content`,standalone:!0,changeDetection:u.OnPush,template:`<ng-content />`,host:{class:`atl-dialog-content`}})],j),M=class AtlDialogFooter{},M=m([y({selector:`atl-dialog-footer`,standalone:!0,changeDetection:u.OnPush,template:`<ng-content />`,host:{class:`atl-dialog-footer`}})],M)})))()}export{init_atl_dialog$1 as a,A as i,j as n,M as r,k as t};
|