ui-lab-registry 0.3.44 → 0.3.45
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/dist/components/Anchor/examples/01-inline-text.d.ts +6 -0
- package/dist/components/Anchor/examples/01-inline-text.d.ts.map +1 -0
- package/dist/components/Anchor/examples/01-inline-text.js +10 -0
- package/dist/components/Anchor/examples/01-inline-text.js.map +1 -0
- package/dist/components/Anchor/examples/02-underline-variants.d.ts +6 -0
- package/dist/components/Anchor/examples/02-underline-variants.d.ts.map +1 -0
- package/dist/components/Anchor/examples/02-underline-variants.js +10 -0
- package/dist/components/Anchor/examples/02-underline-variants.js.map +1 -0
- package/dist/components/Anchor/examples/03-preview-tooltip.d.ts +6 -0
- package/dist/components/Anchor/examples/03-preview-tooltip.d.ts.map +1 -0
- package/dist/components/Anchor/examples/03-preview-tooltip.js +10 -0
- package/dist/components/Anchor/examples/03-preview-tooltip.js.map +1 -0
- package/dist/components/Anchor/examples/04-breadcrumb.d.ts +6 -0
- package/dist/components/Anchor/examples/04-breadcrumb.d.ts.map +1 -0
- package/dist/components/Anchor/examples/04-breadcrumb.js +15 -0
- package/dist/components/Anchor/examples/04-breadcrumb.js.map +1 -0
- package/dist/components/Anchor/examples/index.d.ts +8 -1
- package/dist/components/Anchor/examples/index.d.ts.map +1 -1
- package/dist/components/Anchor/examples/index.js +8 -1
- package/dist/components/Anchor/examples/index.js.map +1 -1
- package/dist/components/Anchor/examples.json +19 -4
- package/dist/components/Anchor/index.d.ts.map +1 -1
- package/dist/components/Anchor/index.js +8 -2
- package/dist/components/Anchor/index.js.map +1 -1
- package/dist/components/Badge/examples/01-status-badges.d.ts +6 -0
- package/dist/components/Badge/examples/01-status-badges.d.ts.map +1 -0
- package/dist/components/Badge/examples/01-status-badges.js +10 -0
- package/dist/components/Badge/examples/01-status-badges.js.map +1 -0
- package/dist/components/Badge/examples/02-icon-position.d.ts +6 -0
- package/dist/components/Badge/examples/02-icon-position.d.ts.map +1 -0
- package/dist/components/Badge/examples/02-icon-position.js +11 -0
- package/dist/components/Badge/examples/02-icon-position.js.map +1 -0
- package/dist/components/Badge/examples/02-variants-and-sizes.d.ts.map +1 -1
- package/dist/components/Badge/examples/02-variants-and-sizes.js +3 -3
- package/dist/components/Badge/examples/02-variants-and-sizes.js.map +1 -1
- package/dist/components/Badge/examples/03-selectable-tags.d.ts +6 -0
- package/dist/components/Badge/examples/03-selectable-tags.d.ts.map +1 -0
- package/dist/components/Badge/examples/03-selectable-tags.js +21 -0
- package/dist/components/Badge/examples/03-selectable-tags.js.map +1 -0
- package/dist/components/Badge/examples/04-dismissible.d.ts +6 -0
- package/dist/components/Badge/examples/04-dismissible.d.ts.map +1 -0
- package/dist/components/Badge/examples/04-dismissible.js +14 -0
- package/dist/components/Badge/examples/04-dismissible.js.map +1 -0
- package/dist/components/Badge/examples/05-semantic-colors.d.ts +6 -0
- package/dist/components/Badge/examples/05-semantic-colors.d.ts.map +1 -0
- package/dist/components/Badge/examples/05-semantic-colors.js +10 -0
- package/dist/components/Badge/examples/05-semantic-colors.js.map +1 -0
- package/dist/components/Badge/examples/index.d.ts +10 -4
- package/dist/components/Badge/examples/index.d.ts.map +1 -1
- package/dist/components/Badge/examples/index.js +10 -4
- package/dist/components/Badge/examples/index.js.map +1 -1
- package/dist/components/Badge/examples.json +24 -9
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +12 -15
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Banner/examples/01-variants.d.ts +6 -0
- package/dist/components/Banner/examples/01-variants.d.ts.map +1 -0
- package/dist/components/Banner/examples/01-variants.js +10 -0
- package/dist/components/Banner/examples/01-variants.js.map +1 -0
- package/dist/components/Banner/examples/02-dismissible.d.ts +6 -0
- package/dist/components/Banner/examples/02-dismissible.d.ts.map +1 -0
- package/dist/components/Banner/examples/02-dismissible.js +13 -0
- package/dist/components/Banner/examples/02-dismissible.js.map +1 -0
- package/dist/components/Banner/examples/03-form-feedback.d.ts +6 -0
- package/dist/components/Banner/examples/03-form-feedback.d.ts.map +1 -0
- package/dist/components/Banner/examples/03-form-feedback.js +21 -0
- package/dist/components/Banner/examples/03-form-feedback.js.map +1 -0
- package/dist/components/Banner/examples/04-settings-panel.d.ts +6 -0
- package/dist/components/Banner/examples/04-settings-panel.d.ts.map +1 -0
- package/dist/components/Banner/examples/04-settings-panel.js +10 -0
- package/dist/components/Banner/examples/04-settings-panel.js.map +1 -0
- package/dist/components/Banner/examples/05-body-only.d.ts +6 -0
- package/dist/components/Banner/examples/05-body-only.d.ts.map +1 -0
- package/dist/components/Banner/examples/05-body-only.js +10 -0
- package/dist/components/Banner/examples/05-body-only.js.map +1 -0
- package/dist/components/Banner/examples/index.d.ts +10 -2
- package/dist/components/Banner/examples/index.d.ts.map +1 -1
- package/dist/components/Banner/examples/index.js +10 -2
- package/dist/components/Banner/examples/index.js.map +1 -1
- package/dist/components/Banner/examples.json +24 -4
- package/dist/components/Banner/index.d.ts.map +1 -1
- package/dist/components/Banner/index.js +13 -16
- package/dist/components/Banner/index.js.map +1 -1
- package/dist/components/Button/examples/01-variants.d.ts.map +1 -1
- package/dist/components/Button/examples/01-variants.js +12 -4
- package/dist/components/Button/examples/01-variants.js.map +1 -1
- package/dist/components/Button/examples/02-multi-actions.d.ts.map +1 -1
- package/dist/components/Button/examples/02-multi-actions.js.map +1 -1
- package/dist/components/Button/examples/04-sub-stack-actions.js +1 -1
- package/dist/components/Button/examples/04-sub-stack-actions.js.map +1 -1
- package/dist/components/Button/examples/06-icons.d.ts +6 -0
- package/dist/components/Button/examples/06-icons.d.ts.map +1 -0
- package/dist/components/Button/examples/06-icons.js +11 -0
- package/dist/components/Button/examples/06-icons.js.map +1 -0
- package/dist/components/Button/examples/07-split-button.d.ts +6 -0
- package/dist/components/Button/examples/07-split-button.d.ts.map +1 -0
- package/dist/components/Button/examples/07-split-button.js +20 -0
- package/dist/components/Button/examples/07-split-button.js.map +1 -0
- package/dist/components/Button/examples/08-button-group.d.ts +6 -0
- package/dist/components/Button/examples/08-button-group.d.ts.map +1 -0
- package/dist/components/Button/examples/08-button-group.js +14 -0
- package/dist/components/Button/examples/08-button-group.js.map +1 -0
- package/dist/components/Button/examples/index.d.ts +6 -0
- package/dist/components/Button/examples/index.d.ts.map +1 -1
- package/dist/components/Button/examples/index.js +6 -0
- package/dist/components/Button/examples/index.js.map +1 -1
- package/dist/components/Button/examples.json +19 -4
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +6 -0
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Card/examples/01-notification.d.ts +6 -0
- package/dist/components/Card/examples/01-notification.d.ts.map +1 -0
- package/dist/components/Card/examples/01-notification.js +13 -0
- package/dist/components/Card/examples/01-notification.js.map +1 -0
- package/dist/components/Card/examples/02-settings-panel.d.ts +6 -0
- package/dist/components/Card/examples/02-settings-panel.d.ts.map +1 -0
- package/dist/components/Card/examples/02-settings-panel.js +18 -0
- package/dist/components/Card/examples/02-settings-panel.js.map +1 -0
- package/dist/components/Card/examples/03-task-progress.d.ts +6 -0
- package/dist/components/Card/examples/03-task-progress.d.ts.map +1 -0
- package/dist/components/Card/examples/03-task-progress.js +17 -0
- package/dist/components/Card/examples/03-task-progress.js.map +1 -0
- package/dist/components/Card/examples/index.d.ts +6 -2
- package/dist/components/Card/examples/index.d.ts.map +1 -1
- package/dist/components/Card/examples/index.js +6 -2
- package/dist/components/Card/examples/index.js.map +1 -1
- package/dist/components/Card/examples.json +14 -4
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/index.js +6 -2
- package/dist/components/Card/index.js.map +1 -1
- package/dist/components/Checkbox/examples/01-basic-states.d.ts +6 -0
- package/dist/components/Checkbox/examples/01-basic-states.d.ts.map +1 -0
- package/dist/components/Checkbox/examples/01-basic-states.js +10 -0
- package/dist/components/Checkbox/examples/01-basic-states.js.map +1 -0
- package/dist/components/Checkbox/examples/02-helper-text.d.ts +6 -0
- package/dist/components/Checkbox/examples/02-helper-text.d.ts.map +1 -0
- package/dist/components/Checkbox/examples/02-helper-text.js +10 -0
- package/dist/components/Checkbox/examples/02-helper-text.js.map +1 -0
- package/dist/components/Checkbox/examples/03-controlled.d.ts +6 -0
- package/dist/components/Checkbox/examples/03-controlled.d.ts.map +1 -0
- package/dist/components/Checkbox/examples/03-controlled.js +13 -0
- package/dist/components/Checkbox/examples/03-controlled.js.map +1 -0
- package/dist/components/Checkbox/examples/04-group.d.ts +6 -0
- package/dist/components/Checkbox/examples/04-group.d.ts.map +1 -0
- package/dist/components/Checkbox/examples/04-group.js +25 -0
- package/dist/components/Checkbox/examples/04-group.js.map +1 -0
- package/dist/components/Checkbox/examples/05-indeterminate.d.ts +6 -0
- package/dist/components/Checkbox/examples/05-indeterminate.d.ts.map +1 -0
- package/dist/components/Checkbox/examples/05-indeterminate.js +26 -0
- package/dist/components/Checkbox/examples/05-indeterminate.js.map +1 -0
- package/dist/components/Checkbox/examples/06-consent-form.d.ts +6 -0
- package/dist/components/Checkbox/examples/06-consent-form.d.ts.map +1 -0
- package/dist/components/Checkbox/examples/06-consent-form.js +14 -0
- package/dist/components/Checkbox/examples/06-consent-form.js.map +1 -0
- package/dist/components/Checkbox/examples/index.d.ts +12 -4
- package/dist/components/Checkbox/examples/index.d.ts.map +1 -1
- package/dist/components/Checkbox/examples/index.js +12 -4
- package/dist/components/Checkbox/examples/index.js.map +1 -1
- package/dist/components/Checkbox/examples.json +29 -9
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +13 -16
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Color/examples/01-basic-color-picker.d.ts +6 -0
- package/dist/components/Color/examples/01-basic-color-picker.d.ts.map +1 -0
- package/dist/components/Color/examples/01-basic-color-picker.js +11 -0
- package/dist/components/Color/examples/01-basic-color-picker.js.map +1 -0
- package/dist/components/Color/examples/02-color-picker-opacity.d.ts +6 -0
- package/dist/components/Color/examples/02-color-picker-opacity.d.ts.map +1 -0
- package/dist/components/Color/examples/02-color-picker-opacity.js +13 -0
- package/dist/components/Color/examples/02-color-picker-opacity.js.map +1 -0
- package/dist/components/Color/examples/03-color-picker-preview.d.ts +6 -0
- package/dist/components/Color/examples/03-color-picker-preview.d.ts.map +1 -0
- package/dist/components/Color/examples/03-color-picker-preview.js +13 -0
- package/dist/components/Color/examples/03-color-picker-preview.js.map +1 -0
- package/dist/components/Color/examples/04-color-slider-primitive.d.ts +6 -0
- package/dist/components/Color/examples/04-color-slider-primitive.d.ts.map +1 -0
- package/dist/components/Color/examples/04-color-slider-primitive.js +16 -0
- package/dist/components/Color/examples/04-color-slider-primitive.js.map +1 -0
- package/dist/components/Color/examples/index.d.ts +8 -3
- package/dist/components/Color/examples/index.d.ts.map +1 -1
- package/dist/components/Color/examples/index.js +8 -3
- package/dist/components/Color/examples/index.js.map +1 -1
- package/dist/components/Color/examples.json +18 -8
- package/dist/components/Color/index.d.ts.map +1 -1
- package/dist/components/Color/index.js +8 -4
- package/dist/components/Color/index.js.map +1 -1
- package/dist/components/Expand/examples/01-basic.d.ts +6 -0
- package/dist/components/Expand/examples/01-basic.d.ts.map +1 -0
- package/dist/components/Expand/examples/01-basic.js +10 -0
- package/dist/components/Expand/examples/01-basic.js.map +1 -0
- package/dist/components/Expand/examples/02-accordion.d.ts +6 -0
- package/dist/components/Expand/examples/02-accordion.d.ts.map +1 -0
- package/dist/components/Expand/examples/02-accordion.js +30 -0
- package/dist/components/Expand/examples/02-accordion.js.map +1 -0
- package/dist/components/Expand/examples/03-custom-trigger.d.ts +6 -0
- package/dist/components/Expand/examples/03-custom-trigger.d.ts.map +1 -0
- package/dist/components/Expand/examples/03-custom-trigger.js +11 -0
- package/dist/components/Expand/examples/03-custom-trigger.js.map +1 -0
- package/dist/components/Expand/examples/04-directions.d.ts +6 -0
- package/dist/components/Expand/examples/04-directions.d.ts.map +1 -0
- package/dist/components/Expand/examples/04-directions.js +10 -0
- package/dist/components/Expand/examples/04-directions.js.map +1 -0
- package/dist/components/Expand/examples/05-settings-panel.d.ts +6 -0
- package/dist/components/Expand/examples/05-settings-panel.d.ts.map +1 -0
- package/dist/components/Expand/examples/05-settings-panel.js +11 -0
- package/dist/components/Expand/examples/05-settings-panel.js.map +1 -0
- package/dist/components/Expand/examples/06-disabled.d.ts +6 -0
- package/dist/components/Expand/examples/06-disabled.d.ts.map +1 -0
- package/dist/components/Expand/examples/06-disabled.js +10 -0
- package/dist/components/Expand/examples/06-disabled.js.map +1 -0
- package/dist/components/Expand/examples/07-inline-info.d.ts +6 -0
- package/dist/components/Expand/examples/07-inline-info.d.ts.map +1 -0
- package/dist/components/Expand/examples/07-inline-info.js +11 -0
- package/dist/components/Expand/examples/07-inline-info.js.map +1 -0
- package/dist/components/Expand/examples/index.d.ts +14 -2
- package/dist/components/Expand/examples/index.d.ts.map +1 -1
- package/dist/components/Expand/examples/index.js +14 -2
- package/dist/components/Expand/examples/index.js.map +1 -1
- package/dist/components/Expand/examples.json +34 -4
- package/dist/components/Expand/index.d.ts.map +1 -1
- package/dist/components/Expand/index.js +14 -2
- package/dist/components/Expand/index.js.map +1 -1
- package/dist/components/Flex/examples/01-axis-control.d.ts +11 -0
- package/dist/components/Flex/examples/01-axis-control.d.ts.map +1 -0
- package/dist/components/Flex/examples/01-axis-control.js +149 -0
- package/dist/components/Flex/examples/01-axis-control.js.map +1 -0
- package/dist/components/Flex/examples/02-wrap-overflow.d.ts +11 -0
- package/dist/components/Flex/examples/02-wrap-overflow.d.ts.map +1 -0
- package/dist/components/Flex/examples/02-wrap-overflow.js +147 -0
- package/dist/components/Flex/examples/02-wrap-overflow.js.map +1 -0
- package/dist/components/Flex/examples/03-container-query-reflow.d.ts +11 -0
- package/dist/components/Flex/examples/03-container-query-reflow.d.ts.map +1 -0
- package/dist/components/Flex/examples/03-container-query-reflow.js +151 -0
- package/dist/components/Flex/examples/03-container-query-reflow.js.map +1 -0
- package/dist/components/Flex/examples/index.d.ts +6 -2
- package/dist/components/Flex/examples/index.d.ts.map +1 -1
- package/dist/components/Flex/examples/index.js +6 -2
- package/dist/components/Flex/examples/index.js.map +1 -1
- package/dist/components/Flex/examples.json +14 -4
- package/dist/components/Flex/index.d.ts.map +1 -1
- package/dist/components/Flex/index.js +12 -8
- package/dist/components/Flex/index.js.map +1 -1
- package/dist/components/Gallery/examples/01-grid-composition.d.ts +11 -0
- package/dist/components/Gallery/examples/01-grid-composition.d.ts.map +1 -0
- package/dist/components/Gallery/examples/01-grid-composition.js +95 -0
- package/dist/components/Gallery/examples/01-grid-composition.js.map +1 -0
- package/dist/components/Gallery/examples/02-item-orientation.d.ts +11 -0
- package/dist/components/Gallery/examples/02-item-orientation.d.ts.map +1 -0
- package/dist/components/Gallery/examples/02-item-orientation.js +106 -0
- package/dist/components/Gallery/examples/02-item-orientation.js.map +1 -0
- package/dist/components/Gallery/examples/03-span-layout.d.ts +11 -0
- package/dist/components/Gallery/examples/03-span-layout.d.ts.map +1 -0
- package/dist/components/Gallery/examples/03-span-layout.js +95 -0
- package/dist/components/Gallery/examples/03-span-layout.js.map +1 -0
- package/dist/components/Gallery/examples/index.d.ts +6 -2
- package/dist/components/Gallery/examples/index.d.ts.map +1 -1
- package/dist/components/Gallery/examples/index.js +6 -2
- package/dist/components/Gallery/examples/index.js.map +1 -1
- package/dist/components/Gallery/examples.json +14 -4
- package/dist/components/Gallery/index.d.ts.map +1 -1
- package/dist/components/Gallery/index.js +6 -2
- package/dist/components/Gallery/index.js.map +1 -1
- package/dist/components/Grid/examples/02-track-placement.d.ts +11 -0
- package/dist/components/Grid/examples/02-track-placement.d.ts.map +1 -0
- package/dist/components/Grid/examples/02-track-placement.js +181 -0
- package/dist/components/Grid/examples/02-track-placement.js.map +1 -0
- package/dist/components/Grid/examples/03-editorial-spans.d.ts +11 -0
- package/dist/components/Grid/examples/03-editorial-spans.d.ts.map +1 -0
- package/dist/components/Grid/examples/03-editorial-spans.js +167 -0
- package/dist/components/Grid/examples/03-editorial-spans.js.map +1 -0
- package/dist/components/Grid/examples/04-responsive-card-rail.d.ts +11 -0
- package/dist/components/Grid/examples/04-responsive-card-rail.d.ts.map +1 -0
- package/dist/components/Grid/examples/04-responsive-card-rail.js +126 -0
- package/dist/components/Grid/examples/04-responsive-card-rail.js.map +1 -0
- package/dist/components/Grid/examples/index.d.ts +6 -0
- package/dist/components/Grid/examples/index.d.ts.map +1 -1
- package/dist/components/Grid/examples/index.js +6 -0
- package/dist/components/Grid/examples/index.js.map +1 -1
- package/dist/components/Grid/examples.json +15 -0
- package/dist/components/Grid/index.d.ts.map +1 -1
- package/dist/components/Grid/index.js +6 -0
- package/dist/components/Grid/index.js.map +1 -1
- package/dist/components/Group/examples/02-create-project.d.ts +6 -0
- package/dist/components/Group/examples/02-create-project.d.ts.map +1 -0
- package/dist/components/Group/examples/02-create-project.js +11 -0
- package/dist/components/Group/examples/02-create-project.js.map +1 -0
- package/dist/components/Group/examples/03-filter-bar.d.ts +6 -0
- package/dist/components/Group/examples/03-filter-bar.d.ts.map +1 -0
- package/dist/components/Group/examples/03-filter-bar.js +14 -0
- package/dist/components/Group/examples/03-filter-bar.js.map +1 -0
- package/dist/components/Group/examples/04-documentation-search.d.ts +6 -0
- package/dist/components/Group/examples/04-documentation-search.d.ts.map +1 -0
- package/dist/components/Group/examples/04-documentation-search.js +11 -0
- package/dist/components/Group/examples/04-documentation-search.js.map +1 -0
- package/dist/components/Group/examples/05-email-signup.d.ts +6 -0
- package/dist/components/Group/examples/05-email-signup.d.ts.map +1 -0
- package/dist/components/Group/examples/05-email-signup.js +11 -0
- package/dist/components/Group/examples/05-email-signup.js.map +1 -0
- package/dist/components/Group/examples/06-copy-command.d.ts +6 -0
- package/dist/components/Group/examples/06-copy-command.d.ts.map +1 -0
- package/dist/components/Group/examples/06-copy-command.js +11 -0
- package/dist/components/Group/examples/06-copy-command.js.map +1 -0
- package/dist/components/Group/examples/07-delete-confirmation.d.ts +6 -0
- package/dist/components/Group/examples/07-delete-confirmation.d.ts.map +1 -0
- package/dist/components/Group/examples/07-delete-confirmation.js +11 -0
- package/dist/components/Group/examples/07-delete-confirmation.js.map +1 -0
- package/dist/components/Group/examples/08-slider-integration.d.ts +6 -0
- package/dist/components/Group/examples/08-slider-integration.d.ts.map +1 -0
- package/dist/components/Group/examples/08-slider-integration.js +19 -0
- package/dist/components/Group/examples/08-slider-integration.js.map +1 -0
- package/dist/components/Group/examples/index.d.ts +14 -0
- package/dist/components/Group/examples/index.d.ts.map +1 -1
- package/dist/components/Group/examples/index.js +14 -0
- package/dist/components/Group/examples/index.js.map +1 -1
- package/dist/components/Group/examples.json +35 -0
- package/dist/components/Group/index.d.ts.map +1 -1
- package/dist/components/Group/index.js +14 -0
- package/dist/components/Group/index.js.map +1 -1
- package/dist/components/Input/examples/03-sign-in.d.ts +6 -0
- package/dist/components/Input/examples/03-sign-in.d.ts.map +1 -0
- package/dist/components/Input/examples/03-sign-in.js +22 -0
- package/dist/components/Input/examples/03-sign-in.js.map +1 -0
- package/dist/components/Input/examples/04-search.d.ts +6 -0
- package/dist/components/Input/examples/04-search.d.ts.map +1 -0
- package/dist/components/Input/examples/04-search.js +16 -0
- package/dist/components/Input/examples/04-search.js.map +1 -0
- package/dist/components/Input/examples/05-user-handle.d.ts +6 -0
- package/dist/components/Input/examples/05-user-handle.d.ts.map +1 -0
- package/dist/components/Input/examples/05-user-handle.js +27 -0
- package/dist/components/Input/examples/05-user-handle.js.map +1 -0
- package/dist/components/Input/examples/06-api-key.d.ts +6 -0
- package/dist/components/Input/examples/06-api-key.d.ts.map +1 -0
- package/dist/components/Input/examples/06-api-key.js +35 -0
- package/dist/components/Input/examples/06-api-key.js.map +1 -0
- package/dist/components/Input/examples/07-url-validation.d.ts +6 -0
- package/dist/components/Input/examples/07-url-validation.d.ts.map +1 -0
- package/dist/components/Input/examples/07-url-validation.js +23 -0
- package/dist/components/Input/examples/07-url-validation.js.map +1 -0
- package/dist/components/Input/examples/08-quantity.d.ts +6 -0
- package/dist/components/Input/examples/08-quantity.d.ts.map +1 -0
- package/dist/components/Input/examples/08-quantity.js +13 -0
- package/dist/components/Input/examples/08-quantity.js.map +1 -0
- package/dist/components/Input/examples/index.d.ts +12 -0
- package/dist/components/Input/examples/index.d.ts.map +1 -1
- package/dist/components/Input/examples/index.js +12 -0
- package/dist/components/Input/examples/index.js.map +1 -1
- package/dist/components/Input/examples.json +30 -0
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +12 -0
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/List/examples/02-review-queue.d.ts +6 -0
- package/dist/components/List/examples/02-review-queue.d.ts.map +1 -0
- package/dist/components/List/examples/02-review-queue.js +32 -0
- package/dist/components/List/examples/02-review-queue.js.map +1 -0
- package/dist/components/List/examples/03-notification-rules.d.ts +6 -0
- package/dist/components/List/examples/03-notification-rules.d.ts.map +1 -0
- package/dist/components/List/examples/03-notification-rules.js +40 -0
- package/dist/components/List/examples/03-notification-rules.js.map +1 -0
- package/dist/components/List/examples/04-quota-editor.d.ts +6 -0
- package/dist/components/List/examples/04-quota-editor.d.ts.map +1 -0
- package/dist/components/List/examples/04-quota-editor.js +40 -0
- package/dist/components/List/examples/04-quota-editor.js.map +1 -0
- package/dist/components/List/examples/05-permissions-matrix.d.ts +6 -0
- package/dist/components/List/examples/05-permissions-matrix.d.ts.map +1 -0
- package/dist/components/List/examples/05-permissions-matrix.js +39 -0
- package/dist/components/List/examples/05-permissions-matrix.js.map +1 -0
- package/dist/components/List/examples/index.d.ts +8 -0
- package/dist/components/List/examples/index.d.ts.map +1 -1
- package/dist/components/List/examples/index.js +8 -0
- package/dist/components/List/examples/index.js.map +1 -1
- package/dist/components/List/examples.json +20 -0
- package/dist/components/List/index.d.ts.map +1 -1
- package/dist/components/List/index.js +10 -2
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Menu/examples/03-toolbar-dropdown.d.ts +6 -0
- package/dist/components/Menu/examples/03-toolbar-dropdown.d.ts.map +1 -0
- package/dist/components/Menu/examples/03-toolbar-dropdown.js +11 -0
- package/dist/components/Menu/examples/03-toolbar-dropdown.js.map +1 -0
- package/dist/components/Menu/examples/04-table-row-actions.d.ts +6 -0
- package/dist/components/Menu/examples/04-table-row-actions.d.ts.map +1 -0
- package/dist/components/Menu/examples/04-table-row-actions.js +16 -0
- package/dist/components/Menu/examples/04-table-row-actions.js.map +1 -0
- package/dist/components/Menu/examples/05-context-menu.d.ts +6 -0
- package/dist/components/Menu/examples/05-context-menu.d.ts.map +1 -0
- package/dist/components/Menu/examples/05-context-menu.js +10 -0
- package/dist/components/Menu/examples/05-context-menu.js.map +1 -0
- package/dist/components/Menu/examples/06-view-options.d.ts +6 -0
- package/dist/components/Menu/examples/06-view-options.d.ts.map +1 -0
- package/dist/components/Menu/examples/06-view-options.js +15 -0
- package/dist/components/Menu/examples/06-view-options.js.map +1 -0
- package/dist/components/Menu/examples/index.d.ts +8 -0
- package/dist/components/Menu/examples/index.d.ts.map +1 -1
- package/dist/components/Menu/examples/index.js +8 -0
- package/dist/components/Menu/examples/index.js.map +1 -1
- package/dist/components/Menu/examples.json +20 -0
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +8 -0
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Modal/examples/02-form-modal.js +1 -1
- package/dist/components/Modal/examples/02-form-modal.js.map +1 -1
- package/dist/components/Modal/examples/03-delete-confirmation.d.ts +6 -0
- package/dist/components/Modal/examples/03-delete-confirmation.d.ts.map +1 -0
- package/dist/components/Modal/examples/03-delete-confirmation.js +13 -0
- package/dist/components/Modal/examples/03-delete-confirmation.js.map +1 -0
- package/dist/components/Modal/examples/04-create-api-key.d.ts +6 -0
- package/dist/components/Modal/examples/04-create-api-key.d.ts.map +1 -0
- package/dist/components/Modal/examples/04-create-api-key.js +14 -0
- package/dist/components/Modal/examples/04-create-api-key.js.map +1 -0
- package/dist/components/Modal/examples/05-notification-settings.d.ts +6 -0
- package/dist/components/Modal/examples/05-notification-settings.d.ts.map +1 -0
- package/dist/components/Modal/examples/05-notification-settings.js +19 -0
- package/dist/components/Modal/examples/05-notification-settings.js.map +1 -0
- package/dist/components/Modal/examples/index.d.ts +6 -0
- package/dist/components/Modal/examples/index.d.ts.map +1 -1
- package/dist/components/Modal/examples/index.js +6 -0
- package/dist/components/Modal/examples/index.js.map +1 -1
- package/dist/components/Modal/examples.json +16 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +8 -0
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Panel/examples/01-sidebar-toggle.d.ts +6 -0
- package/dist/components/Panel/examples/01-sidebar-toggle.d.ts.map +1 -0
- package/dist/components/Panel/examples/01-sidebar-toggle.js +10 -0
- package/dist/components/Panel/examples/01-sidebar-toggle.js.map +1 -0
- package/dist/components/Panel/examples/index.d.ts +3 -0
- package/dist/components/Panel/examples/index.d.ts.map +1 -0
- package/dist/components/Panel/examples/index.js +3 -0
- package/dist/components/Panel/examples/index.js.map +1 -0
- package/dist/components/Panel/examples.json +7 -0
- package/dist/components/Panel/index.d.ts +1 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +8 -0
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Path/examples/01-basic-path.js +2 -2
- package/dist/components/Path/examples/01-basic-path.js.map +1 -1
- package/dist/components/Path/examples/02-custom-separator.d.ts +6 -0
- package/dist/components/Path/examples/02-custom-separator.d.ts.map +1 -0
- package/dist/components/Path/examples/02-custom-separator.js +11 -0
- package/dist/components/Path/examples/02-custom-separator.js.map +1 -0
- package/dist/components/Path/examples/03-collapsed-breadcrumb.d.ts +6 -0
- package/dist/components/Path/examples/03-collapsed-breadcrumb.d.ts.map +1 -0
- package/dist/components/Path/examples/03-collapsed-breadcrumb.js +16 -0
- package/dist/components/Path/examples/03-collapsed-breadcrumb.js.map +1 -0
- package/dist/components/Path/examples/index.d.ts +4 -0
- package/dist/components/Path/examples/index.d.ts.map +1 -1
- package/dist/components/Path/examples/index.js +4 -0
- package/dist/components/Path/examples/index.js.map +1 -1
- package/dist/components/Path/examples.json +11 -1
- package/dist/components/Path/index.d.ts.map +1 -1
- package/dist/components/Path/index.js +11 -7
- package/dist/components/Path/index.js.map +1 -1
- package/dist/components/Popover/examples/01-basic-popover.d.ts.map +1 -1
- package/dist/components/Popover/examples/01-basic-popover.js +5 -4
- package/dist/components/Popover/examples/01-basic-popover.js.map +1 -1
- package/dist/components/Popover/examples/02-toggleable-options.d.ts +6 -0
- package/dist/components/Popover/examples/02-toggleable-options.d.ts.map +1 -0
- package/dist/components/Popover/examples/02-toggleable-options.js +23 -0
- package/dist/components/Popover/examples/02-toggleable-options.js.map +1 -0
- package/dist/components/Popover/examples/03-table-row-actions.d.ts +6 -0
- package/dist/components/Popover/examples/03-table-row-actions.d.ts.map +1 -0
- package/dist/components/Popover/examples/03-table-row-actions.js +17 -0
- package/dist/components/Popover/examples/03-table-row-actions.js.map +1 -0
- package/dist/components/Popover/examples/04-input-form.d.ts +6 -0
- package/dist/components/Popover/examples/04-input-form.d.ts.map +1 -0
- package/dist/components/Popover/examples/04-input-form.js +14 -0
- package/dist/components/Popover/examples/04-input-form.js.map +1 -0
- package/dist/components/Popover/examples/05-arrow-positions.d.ts +6 -0
- package/dist/components/Popover/examples/05-arrow-positions.d.ts.map +1 -0
- package/dist/components/Popover/examples/05-arrow-positions.js +11 -0
- package/dist/components/Popover/examples/05-arrow-positions.js.map +1 -0
- package/dist/components/Popover/examples/index.d.ts +8 -0
- package/dist/components/Popover/examples/index.d.ts.map +1 -1
- package/dist/components/Popover/examples/index.js +8 -0
- package/dist/components/Popover/examples/index.js.map +1 -1
- package/dist/components/Popover/examples.json +23 -3
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +8 -0
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Progress/examples/01-basic-progress.d.ts.map +1 -1
- package/dist/components/Progress/examples/01-basic-progress.js +20 -5
- package/dist/components/Progress/examples/01-basic-progress.js.map +1 -1
- package/dist/components/Progress/examples/02-storage-quota.d.ts +6 -0
- package/dist/components/Progress/examples/02-storage-quota.d.ts.map +1 -0
- package/dist/components/Progress/examples/02-storage-quota.js +12 -0
- package/dist/components/Progress/examples/02-storage-quota.js.map +1 -0
- package/dist/components/Progress/examples/03-onboarding-steps.d.ts +6 -0
- package/dist/components/Progress/examples/03-onboarding-steps.d.ts.map +1 -0
- package/dist/components/Progress/examples/03-onboarding-steps.js +14 -0
- package/dist/components/Progress/examples/03-onboarding-steps.js.map +1 -0
- package/dist/components/Progress/examples/04-indeterminate.d.ts +6 -0
- package/dist/components/Progress/examples/04-indeterminate.d.ts.map +1 -0
- package/dist/components/Progress/examples/04-indeterminate.js +19 -0
- package/dist/components/Progress/examples/04-indeterminate.js.map +1 -0
- package/dist/components/Progress/examples/05-skill-levels.d.ts +6 -0
- package/dist/components/Progress/examples/05-skill-levels.d.ts.map +1 -0
- package/dist/components/Progress/examples/05-skill-levels.js +15 -0
- package/dist/components/Progress/examples/05-skill-levels.js.map +1 -0
- package/dist/components/Progress/examples/index.d.ts +8 -0
- package/dist/components/Progress/examples/index.d.ts.map +1 -1
- package/dist/components/Progress/examples/index.js +8 -0
- package/dist/components/Progress/examples/index.js.map +1 -1
- package/dist/components/Progress/examples.json +23 -3
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +11 -14
- package/dist/components/Progress/index.js.map +1 -1
- package/dist/components/Scroll/examples/01-basic-scroll.d.ts.map +1 -1
- package/dist/components/Scroll/examples/01-basic-scroll.js +29 -3
- package/dist/components/Scroll/examples/01-basic-scroll.js.map +1 -1
- package/dist/components/Scroll/examples/02-settings-panel.d.ts +6 -0
- package/dist/components/Scroll/examples/02-settings-panel.d.ts.map +1 -0
- package/dist/components/Scroll/examples/02-settings-panel.js +21 -0
- package/dist/components/Scroll/examples/02-settings-panel.js.map +1 -0
- package/dist/components/Scroll/examples/03-horizontal-tags.d.ts +6 -0
- package/dist/components/Scroll/examples/03-horizontal-tags.d.ts.map +1 -0
- package/dist/components/Scroll/examples/03-horizontal-tags.js +24 -0
- package/dist/components/Scroll/examples/03-horizontal-tags.js.map +1 -0
- package/dist/components/Scroll/examples/index.d.ts +4 -0
- package/dist/components/Scroll/examples/index.d.ts.map +1 -1
- package/dist/components/Scroll/examples/index.js +4 -0
- package/dist/components/Scroll/examples/index.js.map +1 -1
- package/dist/components/Scroll/examples.json +13 -3
- package/dist/components/Scroll/index.d.ts.map +1 -1
- package/dist/components/Scroll/index.js +4 -0
- package/dist/components/Scroll/index.js.map +1 -1
- package/dist/components/Select/examples/03-country-select.d.ts +6 -0
- package/dist/components/Select/examples/03-country-select.d.ts.map +1 -0
- package/dist/components/Select/examples/03-country-select.js +28 -0
- package/dist/components/Select/examples/03-country-select.js.map +1 -0
- package/dist/components/Select/examples/index.d.ts +2 -0
- package/dist/components/Select/examples/index.d.ts.map +1 -1
- package/dist/components/Select/examples/index.js +2 -0
- package/dist/components/Select/examples/index.js.map +1 -1
- package/dist/components/Select/examples.json +5 -0
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +2 -0
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Slider/examples/01-basic-slider.d.ts.map +1 -1
- package/dist/components/Slider/examples/01-basic-slider.js +7 -4
- package/dist/components/Slider/examples/01-basic-slider.js.map +1 -1
- package/dist/components/Slider/examples/02-settings-panel.d.ts +6 -0
- package/dist/components/Slider/examples/02-settings-panel.d.ts.map +1 -0
- package/dist/components/Slider/examples/02-settings-panel.js +20 -0
- package/dist/components/Slider/examples/02-settings-panel.js.map +1 -0
- package/dist/components/Slider/examples/03-price-range.d.ts +6 -0
- package/dist/components/Slider/examples/03-price-range.d.ts.map +1 -0
- package/dist/components/Slider/examples/03-price-range.js +13 -0
- package/dist/components/Slider/examples/03-price-range.js.map +1 -0
- package/dist/components/Slider/examples/04-step-slider.d.ts +6 -0
- package/dist/components/Slider/examples/04-step-slider.d.ts.map +1 -0
- package/dist/components/Slider/examples/04-step-slider.js +13 -0
- package/dist/components/Slider/examples/04-step-slider.js.map +1 -0
- package/dist/components/Slider/examples/05-disabled-state.d.ts +6 -0
- package/dist/components/Slider/examples/05-disabled-state.d.ts.map +1 -0
- package/dist/components/Slider/examples/05-disabled-state.js +10 -0
- package/dist/components/Slider/examples/05-disabled-state.js.map +1 -0
- package/dist/components/Slider/examples/06-vertical-mixer.d.ts +6 -0
- package/dist/components/Slider/examples/06-vertical-mixer.d.ts.map +1 -0
- package/dist/components/Slider/examples/06-vertical-mixer.js +17 -0
- package/dist/components/Slider/examples/06-vertical-mixer.js.map +1 -0
- package/dist/components/Slider/examples/index.d.ts +10 -0
- package/dist/components/Slider/examples/index.d.ts.map +1 -1
- package/dist/components/Slider/examples/index.js +10 -0
- package/dist/components/Slider/examples/index.js.map +1 -1
- package/dist/components/Slider/examples.json +28 -3
- package/dist/components/Slider/index.d.ts.map +1 -1
- package/dist/components/Slider/index.js +10 -0
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Switch/examples/01-basic-switch.d.ts.map +1 -1
- package/dist/components/Switch/examples/01-basic-switch.js +7 -4
- package/dist/components/Switch/examples/01-basic-switch.js.map +1 -1
- package/dist/components/Switch/examples/02-settings-panel.d.ts +6 -0
- package/dist/components/Switch/examples/02-settings-panel.d.ts.map +1 -0
- package/dist/components/Switch/examples/02-settings-panel.js +20 -0
- package/dist/components/Switch/examples/02-settings-panel.js.map +1 -0
- package/dist/components/Switch/examples/03-disabled-state.d.ts +6 -0
- package/dist/components/Switch/examples/03-disabled-state.d.ts.map +1 -0
- package/dist/components/Switch/examples/03-disabled-state.js +10 -0
- package/dist/components/Switch/examples/03-disabled-state.js.map +1 -0
- package/dist/components/Switch/examples/04-small-size.d.ts +6 -0
- package/dist/components/Switch/examples/04-small-size.d.ts.map +1 -0
- package/dist/components/Switch/examples/04-small-size.js +13 -0
- package/dist/components/Switch/examples/04-small-size.js.map +1 -0
- package/dist/components/Switch/examples/05-controlled-toggle.d.ts +6 -0
- package/dist/components/Switch/examples/05-controlled-toggle.d.ts.map +1 -0
- package/dist/components/Switch/examples/05-controlled-toggle.js +13 -0
- package/dist/components/Switch/examples/05-controlled-toggle.js.map +1 -0
- package/dist/components/Switch/examples/index.d.ts +8 -0
- package/dist/components/Switch/examples/index.d.ts.map +1 -1
- package/dist/components/Switch/examples/index.js +8 -0
- package/dist/components/Switch/examples/index.js.map +1 -1
- package/dist/components/Switch/examples.json +23 -3
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.js +8 -0
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Tabs/examples/03-underline-tabs.d.ts +6 -0
- package/dist/components/Tabs/examples/03-underline-tabs.d.ts.map +1 -0
- package/dist/components/Tabs/examples/03-underline-tabs.js +13 -0
- package/dist/components/Tabs/examples/03-underline-tabs.js.map +1 -0
- package/dist/components/Tabs/examples/04-vertical-underline-tabs.d.ts +6 -0
- package/dist/components/Tabs/examples/04-vertical-underline-tabs.d.ts.map +1 -0
- package/dist/components/Tabs/examples/04-vertical-underline-tabs.js +13 -0
- package/dist/components/Tabs/examples/04-vertical-underline-tabs.js.map +1 -0
- package/dist/components/Tabs/examples/index.d.ts +4 -0
- package/dist/components/Tabs/examples/index.d.ts.map +1 -1
- package/dist/components/Tabs/examples/index.js +4 -0
- package/dist/components/Tabs/examples/index.js.map +1 -1
- package/dist/components/Tabs/examples.json +10 -0
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +4 -0
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Textarea/examples/01-basic-textarea.d.ts.map +1 -1
- package/dist/components/Textarea/examples/01-basic-textarea.js +8 -5
- package/dist/components/Textarea/examples/01-basic-textarea.js.map +1 -1
- package/dist/components/Textarea/examples/02-bio-settings.d.ts +6 -0
- package/dist/components/Textarea/examples/02-bio-settings.d.ts.map +1 -0
- package/dist/components/Textarea/examples/02-bio-settings.js +13 -0
- package/dist/components/Textarea/examples/02-bio-settings.js.map +1 -0
- package/dist/components/Textarea/examples/03-error-state.d.ts +6 -0
- package/dist/components/Textarea/examples/03-error-state.d.ts.map +1 -0
- package/dist/components/Textarea/examples/03-error-state.js +14 -0
- package/dist/components/Textarea/examples/03-error-state.js.map +1 -0
- package/dist/components/Textarea/examples/04-disabled-readonly.d.ts +6 -0
- package/dist/components/Textarea/examples/04-disabled-readonly.d.ts.map +1 -0
- package/dist/components/Textarea/examples/04-disabled-readonly.js +10 -0
- package/dist/components/Textarea/examples/04-disabled-readonly.js.map +1 -0
- package/dist/components/Textarea/examples/05-scrolling.d.ts +6 -0
- package/dist/components/Textarea/examples/05-scrolling.d.ts.map +1 -0
- package/dist/components/Textarea/examples/05-scrolling.js +13 -0
- package/dist/components/Textarea/examples/05-scrolling.js.map +1 -0
- package/dist/components/Textarea/examples/index.d.ts +8 -0
- package/dist/components/Textarea/examples/index.d.ts.map +1 -1
- package/dist/components/Textarea/examples/index.js +8 -0
- package/dist/components/Textarea/examples/index.js.map +1 -1
- package/dist/components/Textarea/examples.json +23 -3
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +8 -0
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/index.js.map +1 -1
- package/dist/generated-data.d.ts.map +1 -1
- package/dist/generated-data.js +999 -429
- package/dist/generated-data.js.map +1 -1
- package/dist/generated-styles.d.ts.map +1 -1
- package/dist/generated-styles.js +1135 -203
- package/dist/generated-styles.js.map +1 -1
- package/dist/generated-styles.json +1135 -203
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/patterns/data/badge-row/variations/main/index.js +1 -1
- package/dist/patterns/data/badge-row/variations/main/index.js.map +1 -1
- package/dist/patterns/data/badge-row/variations/mixed/index.js +1 -1
- package/dist/patterns/data/badge-row/variations/mixed/index.js.map +1 -1
- package/dist/patterns/data/badge-row/variations/outline/index.js +1 -1
- package/dist/patterns/data/badge-row/variations/outline/index.js.map +1 -1
- package/dist/patterns/data/data-table-row/variations/expandable/index.js +1 -1
- package/dist/patterns/data/data-table-row/variations/expandable/index.js.map +1 -1
- package/dist/patterns/data/data-table-row/variations/main/index.js +1 -1
- package/dist/patterns/data/data-table-row/variations/main/index.js.map +1 -1
- package/dist/patterns/data/data-table-row/variations/selectable/index.js +1 -1
- package/dist/patterns/data/data-table-row/variations/selectable/index.js.map +1 -1
- package/dist/patterns/interaction/tab-content-header/variations/with-badge/index.js +1 -1
- package/dist/patterns/interaction/tab-content-header/variations/with-badge/index.js.map +1 -1
- package/dist/patterns/layout/split-row/variations/main/index.js +1 -1
- package/dist/patterns/layout/split-row/variations/main/index.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +536 -61
- package/dist/registry.js.map +1 -1
- package/dist/types.d.ts +18 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/load-component-examples.d.ts +4 -7
- package/dist/utils/load-component-examples.d.ts.map +1 -1
- package/dist/utils/load-component-examples.js +4 -7
- package/dist/utils/load-component-examples.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Anchor/examples/01-inline-text.tsx +22 -0
- package/src/components/Anchor/examples/02-underline-variants.tsx +24 -0
- package/src/components/Anchor/examples/03-preview-tooltip.tsx +27 -0
- package/src/components/Anchor/examples/04-breadcrumb.tsx +29 -0
- package/src/components/Anchor/examples/index.ts +11 -1
- package/src/components/Anchor/examples.json +19 -4
- package/src/components/Anchor/index.tsx +8 -2
- package/src/components/Badge/examples/01-status-badges.tsx +17 -0
- package/src/components/Badge/examples/02-icon-position.tsx +18 -0
- package/src/components/Badge/examples/03-selectable-tags.tsx +40 -0
- package/src/components/Badge/examples/04-dismissible.tsx +37 -0
- package/src/components/Badge/examples/05-semantic-colors.tsx +18 -0
- package/src/components/Badge/examples/index.ts +13 -4
- package/src/components/Badge/examples.json +24 -9
- package/src/components/Badge/index.tsx +11 -15
- package/src/components/Banner/examples/01-variants.tsx +33 -0
- package/src/components/Banner/examples/02-dismissible.tsx +31 -0
- package/src/components/Banner/examples/03-form-feedback.tsx +47 -0
- package/src/components/Banner/examples/04-settings-panel.tsx +21 -0
- package/src/components/Banner/examples/05-body-only.tsx +22 -0
- package/src/components/Banner/examples/index.ts +14 -2
- package/src/components/Banner/examples.json +24 -4
- package/src/components/Banner/index.tsx +12 -16
- package/src/components/Button/examples/01-variants.tsx +18 -52
- package/src/components/Button/examples/02-multi-actions.tsx +0 -1
- package/src/components/Button/examples/04-sub-stack-actions.tsx +1 -1
- package/src/components/Button/examples/06-icons.tsx +25 -0
- package/src/components/Button/examples/07-split-button.tsx +47 -0
- package/src/components/Button/examples/08-button-group.tsx +30 -0
- package/src/components/Button/examples/index.ts +6 -0
- package/src/components/Button/examples.json +19 -4
- package/src/components/Button/index.tsx +6 -0
- package/src/components/Card/examples/01-notification.tsx +37 -0
- package/src/components/Card/examples/02-settings-panel.tsx +48 -0
- package/src/components/Card/examples/03-task-progress.tsx +43 -0
- package/src/components/Card/examples/index.ts +8 -2
- package/src/components/Card/examples.json +14 -4
- package/src/components/Card/index.tsx +6 -2
- package/src/components/Card/metadata.json +42 -0
- package/src/components/Checkbox/examples/01-basic-states.tsx +17 -0
- package/src/components/Checkbox/examples/02-helper-text.tsx +26 -0
- package/src/components/Checkbox/examples/03-controlled.tsx +28 -0
- package/src/components/Checkbox/examples/04-group.tsx +49 -0
- package/src/components/Checkbox/examples/05-indeterminate.tsx +56 -0
- package/src/components/Checkbox/examples/06-consent-form.tsx +35 -0
- package/src/components/Checkbox/examples/index.ts +16 -4
- package/src/components/Checkbox/examples.json +29 -9
- package/src/components/Checkbox/index.tsx +12 -16
- package/src/components/Color/examples/01-basic-color-picker.tsx +18 -0
- package/src/components/Color/examples/02-color-picker-opacity.tsx +29 -0
- package/src/components/Color/examples/03-color-picker-preview.tsx +27 -0
- package/src/components/Color/examples/04-color-slider-primitive.tsx +47 -0
- package/src/components/Color/examples/index.ts +11 -3
- package/src/components/Color/examples.json +18 -8
- package/src/components/Color/index.tsx +8 -4
- package/src/components/Expand/examples/01-basic.tsx +18 -0
- package/src/components/Expand/examples/02-accordion.tsx +46 -0
- package/src/components/Expand/examples/03-custom-trigger.tsx +30 -0
- package/src/components/Expand/examples/04-directions.tsx +33 -0
- package/src/components/Expand/examples/05-settings-panel.tsx +54 -0
- package/src/components/Expand/examples/06-disabled.tsx +19 -0
- package/src/components/Expand/examples/07-inline-info.tsx +29 -0
- package/src/components/Expand/examples/index.ts +20 -2
- package/src/components/Expand/examples.json +34 -4
- package/src/components/Expand/index.tsx +14 -2
- package/src/components/Flex/examples/01-axis-control.tsx +199 -0
- package/src/components/Flex/examples/02-wrap-overflow.tsx +183 -0
- package/src/components/Flex/examples/03-container-query-reflow.tsx +198 -0
- package/src/components/Flex/examples/index.ts +8 -2
- package/src/components/Flex/examples.json +14 -4
- package/src/components/Flex/index.tsx +12 -8
- package/src/components/Gallery/examples/01-grid-composition.tsx +121 -0
- package/src/components/Gallery/examples/02-item-orientation.tsx +133 -0
- package/src/components/Gallery/examples/03-span-layout.tsx +130 -0
- package/src/components/Gallery/examples/index.ts +8 -2
- package/src/components/Gallery/examples.json +14 -4
- package/src/components/Gallery/index.tsx +6 -2
- package/src/components/Grid/examples/02-track-placement.tsx +210 -0
- package/src/components/Grid/examples/03-editorial-spans.tsx +196 -0
- package/src/components/Grid/examples/04-responsive-card-rail.tsx +153 -0
- package/src/components/Grid/examples/index.ts +6 -0
- package/src/components/Grid/examples.json +15 -0
- package/src/components/Grid/index.tsx +6 -0
- package/src/components/Group/examples/02-create-project.tsx +19 -0
- package/src/components/Group/examples/03-filter-bar.tsx +34 -0
- package/src/components/Group/examples/04-documentation-search.tsx +21 -0
- package/src/components/Group/examples/05-email-signup.tsx +21 -0
- package/src/components/Group/examples/06-copy-command.tsx +17 -0
- package/src/components/Group/examples/07-delete-confirmation.tsx +19 -0
- package/src/components/Group/examples/08-slider-integration.tsx +30 -0
- package/src/components/Group/examples/index.ts +14 -0
- package/src/components/Group/examples.json +35 -0
- package/src/components/Group/index.tsx +14 -0
- package/src/components/Input/examples/03-sign-in.tsx +41 -0
- package/src/components/Input/examples/04-search.tsx +31 -0
- package/src/components/Input/examples/05-user-handle.tsx +40 -0
- package/src/components/Input/examples/06-api-key.tsx +48 -0
- package/src/components/Input/examples/07-url-validation.tsx +36 -0
- package/src/components/Input/examples/08-quantity.tsx +26 -0
- package/src/components/Input/examples/index.ts +12 -0
- package/src/components/Input/examples.json +30 -0
- package/src/components/Input/index.tsx +12 -0
- package/src/components/List/examples/02-review-queue.tsx +54 -0
- package/src/components/List/examples/03-notification-rules.tsx +80 -0
- package/src/components/List/examples/04-quota-editor.tsx +71 -0
- package/src/components/List/examples/05-permissions-matrix.tsx +91 -0
- package/src/components/List/examples/index.ts +8 -0
- package/src/components/List/examples.json +20 -0
- package/src/components/List/index.tsx +10 -2
- package/src/components/Menu/examples/03-toolbar-dropdown.tsx +35 -0
- package/src/components/Menu/examples/04-table-row-actions.tsx +60 -0
- package/src/components/Menu/examples/05-context-menu.tsx +36 -0
- package/src/components/Menu/examples/06-view-options.tsx +39 -0
- package/src/components/Menu/examples/index.ts +8 -0
- package/src/components/Menu/examples.json +20 -0
- package/src/components/Menu/index.tsx +8 -0
- package/src/components/Modal/examples/02-form-modal.tsx +1 -1
- package/src/components/Modal/examples/03-delete-confirmation.tsx +42 -0
- package/src/components/Modal/examples/04-create-api-key.tsx +54 -0
- package/src/components/Modal/examples/05-notification-settings.tsx +58 -0
- package/src/components/Modal/examples/index.ts +6 -0
- package/src/components/Modal/examples.json +16 -1
- package/src/components/Modal/index.tsx +8 -0
- package/src/components/Modal/metadata.json +41 -1
- package/src/components/Panel/examples/01-sidebar-toggle.tsx +20 -0
- package/src/components/Panel/examples/index.ts +2 -0
- package/src/components/Panel/examples.json +7 -1
- package/src/components/Panel/index.tsx +9 -0
- package/src/components/Path/examples/01-basic-path.tsx +5 -5
- package/src/components/Path/examples/02-custom-separator.tsx +17 -0
- package/src/components/Path/examples/03-collapsed-breadcrumb.tsx +37 -0
- package/src/components/Path/examples/index.ts +4 -0
- package/src/components/Path/examples.json +11 -1
- package/src/components/Path/index.tsx +15 -11
- package/src/components/Popover/examples/01-basic-popover.tsx +24 -5
- package/src/components/Popover/examples/02-toggleable-options.tsx +58 -0
- package/src/components/Popover/examples/03-table-row-actions.tsx +64 -0
- package/src/components/Popover/examples/04-input-form.tsx +46 -0
- package/src/components/Popover/examples/05-arrow-positions.tsx +27 -0
- package/src/components/Popover/examples/index.ts +8 -0
- package/src/components/Popover/examples.json +23 -3
- package/src/components/Popover/index.tsx +8 -0
- package/src/components/Progress/examples/01-basic-progress.tsx +34 -5
- package/src/components/Progress/examples/02-storage-quota.tsx +22 -0
- package/src/components/Progress/examples/03-onboarding-steps.tsx +34 -0
- package/src/components/Progress/examples/04-indeterminate.tsx +33 -0
- package/src/components/Progress/examples/05-skill-levels.tsx +22 -0
- package/src/components/Progress/examples/index.ts +8 -0
- package/src/components/Progress/examples.json +23 -3
- package/src/components/Progress/index.tsx +10 -14
- package/src/components/Scroll/examples/01-basic-scroll.tsx +45 -12
- package/src/components/Scroll/examples/02-settings-panel.tsx +40 -0
- package/src/components/Scroll/examples/03-horizontal-tags.tsx +38 -0
- package/src/components/Scroll/examples/index.ts +4 -0
- package/src/components/Scroll/examples.json +13 -3
- package/src/components/Scroll/index.tsx +4 -0
- package/src/components/Select/examples/03-country-select.tsx +55 -0
- package/src/components/Select/examples/index.ts +2 -0
- package/src/components/Select/examples.json +5 -0
- package/src/components/Select/index.tsx +2 -0
- package/src/components/Slider/examples/01-basic-slider.tsx +19 -4
- package/src/components/Slider/examples/02-settings-panel.tsx +33 -0
- package/src/components/Slider/examples/03-price-range.tsx +34 -0
- package/src/components/Slider/examples/04-step-slider.tsx +35 -0
- package/src/components/Slider/examples/05-disabled-state.tsx +21 -0
- package/src/components/Slider/examples/06-vertical-mixer.tsx +34 -0
- package/src/components/Slider/examples/index.ts +10 -0
- package/src/components/Slider/examples.json +28 -3
- package/src/components/Slider/index.tsx +10 -0
- package/src/components/Switch/examples/01-basic-switch.tsx +20 -4
- package/src/components/Switch/examples/02-settings-panel.tsx +32 -0
- package/src/components/Switch/examples/03-disabled-state.tsx +21 -0
- package/src/components/Switch/examples/04-small-size.tsx +25 -0
- package/src/components/Switch/examples/05-controlled-toggle.tsx +32 -0
- package/src/components/Switch/examples/index.ts +8 -0
- package/src/components/Switch/examples.json +23 -3
- package/src/components/Switch/index.tsx +8 -0
- package/src/components/Table/index.tsx +0 -1
- package/src/components/Tabs/examples/03-underline-tabs.tsx +23 -0
- package/src/components/Tabs/examples/04-vertical-underline-tabs.tsx +23 -0
- package/src/components/Tabs/examples/index.ts +4 -0
- package/src/components/Tabs/examples.json +10 -0
- package/src/components/Tabs/index.tsx +4 -0
- package/src/components/Textarea/examples/01-basic-textarea.tsx +21 -8
- package/src/components/Textarea/examples/02-bio-settings.tsx +30 -0
- package/src/components/Textarea/examples/03-error-state.tsx +31 -0
- package/src/components/Textarea/examples/04-disabled-readonly.tsx +25 -0
- package/src/components/Textarea/examples/05-scrolling.tsx +26 -0
- package/src/components/Textarea/examples/index.ts +8 -0
- package/src/components/Textarea/examples.json +23 -3
- package/src/components/Textarea/index.tsx +8 -0
- package/src/components/Toast/index.tsx +1 -4
- package/src/generated-data.ts +999 -429
- package/src/generated-styles.ts +1135 -203
- package/src/index.ts +2 -0
- package/src/patterns/data/badge-row/variations/main/index.tsx +1 -1
- package/src/patterns/data/badge-row/variations/mixed/index.tsx +1 -1
- package/src/patterns/data/badge-row/variations/outline/index.tsx +1 -1
- package/src/patterns/data/data-table-row/variations/expandable/index.tsx +1 -1
- package/src/patterns/data/data-table-row/variations/main/index.tsx +1 -1
- package/src/patterns/data/data-table-row/variations/selectable/index.tsx +1 -1
- package/src/patterns/interaction/tab-content-header/variations/with-badge/index.tsx +1 -1
- package/src/patterns/layout/split-row/variations/main/index.tsx +1 -1
- package/src/registry.ts +536 -61
- package/src/types.ts +20 -1
- package/src/utils/load-component-examples.ts +8 -7
- package/src/components/Anchor/examples/01-basic-anchor.tsx +0 -18
- package/src/components/Badge/examples/01-basic-badge.tsx +0 -11
- package/src/components/Badge/examples/02-variants-and-sizes.tsx +0 -71
- package/src/components/Banner/examples/01-basic-banner.tsx +0 -15
- package/src/components/Card/examples/01-basic-card.tsx +0 -22
- package/src/components/Checkbox/examples/01-basic-checkbox.tsx +0 -21
- package/src/components/Checkbox/examples/02-checkbox-group-with-descriptions.tsx +0 -59
- package/src/components/Color/examples/01-basic-color.tsx +0 -25
- package/src/components/Color/examples/02-opacity-slider.tsx +0 -26
- package/src/components/Color/examples/03-format-switching.tsx +0 -46
- package/src/components/Expand/examples/01-basic-expand.tsx +0 -18
- package/src/components/Flex/examples/01-basic-flex.tsx +0 -17
- package/src/components/Gallery/examples/01-basic-gallery.tsx +0 -28
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Gallery, Frame } from 'ui-lab-components';
|
|
4
|
+
const FRAME_STYLE = {
|
|
5
|
+
common: { '--frame-fill': 'var(--background-900)', '--frame-stroke-color': 'var(--background-600)' },
|
|
6
|
+
archived: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-700)' },
|
|
7
|
+
experimental: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-800)' },
|
|
8
|
+
};
|
|
9
|
+
export const metadata = {
|
|
10
|
+
title: 'Item Orientation',
|
|
11
|
+
description: 'Gallery items can be oriented vertically (stacked view + body) or horizontally (side-by-side view + body).',
|
|
12
|
+
};
|
|
13
|
+
export const controls = [
|
|
14
|
+
{
|
|
15
|
+
name: 'orientation',
|
|
16
|
+
label: 'Orientation',
|
|
17
|
+
type: 'select',
|
|
18
|
+
options: [
|
|
19
|
+
{ label: 'Vertical', value: 'vertical' },
|
|
20
|
+
{ label: 'Horizontal', value: 'horizontal' },
|
|
21
|
+
],
|
|
22
|
+
defaultValue: 'vertical',
|
|
23
|
+
},
|
|
24
|
+
{ name: 'columns', label: 'Columns (vertical only)', type: 'stepper', defaultValue: 2, min: 1, max: 4, step: 1 },
|
|
25
|
+
{
|
|
26
|
+
name: 'gap',
|
|
27
|
+
label: 'Gap Token',
|
|
28
|
+
type: 'select',
|
|
29
|
+
options: [
|
|
30
|
+
{ label: 'Extra Small', value: 'xs' },
|
|
31
|
+
{ label: 'Small', value: 'sm' },
|
|
32
|
+
{ label: 'Medium', value: 'md' },
|
|
33
|
+
{ label: 'Large', value: 'lg' },
|
|
34
|
+
],
|
|
35
|
+
defaultValue: 'sm',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'aspectRatio',
|
|
39
|
+
label: 'View Aspect Ratio (vertical only)',
|
|
40
|
+
type: 'select',
|
|
41
|
+
options: [
|
|
42
|
+
{ label: '1:1', value: '1/1' },
|
|
43
|
+
{ label: '4:3', value: '4/3' },
|
|
44
|
+
{ label: '3:4', value: '3/4' },
|
|
45
|
+
{ label: '16:9', value: '16/9' },
|
|
46
|
+
],
|
|
47
|
+
defaultValue: '4/3',
|
|
48
|
+
},
|
|
49
|
+
{ name: 'itemCount', label: 'Items', type: 'stepper', defaultValue: 4, min: 4, max: 12, step: 1 },
|
|
50
|
+
];
|
|
51
|
+
export const previewLayout = 'start';
|
|
52
|
+
export const resizable = true;
|
|
53
|
+
const ORIENTATION_ITEMS = [
|
|
54
|
+
{ id: 'o1', title: 'Waveform Study', description: '12:34 · Electronic', tier: 'common' },
|
|
55
|
+
{ id: 'o2', title: 'Threshold', description: '8:02 · Ambient', tier: 'common' },
|
|
56
|
+
{ id: 'o3', title: 'Parallel Lines', description: '5:47 · Minimal', tier: 'common' },
|
|
57
|
+
{ id: 'o4', title: 'Resonance', description: '9:15 · Drone', tier: 'common' },
|
|
58
|
+
{ id: 'o5', title: 'Liminal Space', description: '11:20 · Experimental', tier: 'common' },
|
|
59
|
+
{ id: 'o6', title: 'Undertow', description: '7:45 · Ambient', tier: 'common' },
|
|
60
|
+
{ id: 'o7', title: 'Archive Vol. I', description: 'Archived · 2019 sessions', tier: 'archived' },
|
|
61
|
+
{ id: 'o8', title: 'Archive Vol. II', description: 'Archived · Rough cuts', tier: 'archived' },
|
|
62
|
+
{ id: 'o9', title: 'Archive Vol. III', description: 'Archived · Unmixed', tier: 'archived' },
|
|
63
|
+
{ id: 'o10', title: 'Session X-01', description: 'Experimental · Unreleased draft', tier: 'experimental' },
|
|
64
|
+
{ id: 'o11', title: 'Session X-02', description: 'Experimental · Internal', tier: 'experimental' },
|
|
65
|
+
{ id: 'o12', title: 'Session X-03', description: 'Experimental · Do not distribute', tier: 'experimental' },
|
|
66
|
+
];
|
|
67
|
+
function getGap(value) {
|
|
68
|
+
if (value === 'xs' || value === 'sm' || value === 'lg' || value === 'xl')
|
|
69
|
+
return value;
|
|
70
|
+
return 'md';
|
|
71
|
+
}
|
|
72
|
+
function getInt(value, min, max, fallback) {
|
|
73
|
+
const n = Number(value);
|
|
74
|
+
if (Number.isNaN(n))
|
|
75
|
+
return fallback;
|
|
76
|
+
return Math.min(max, Math.max(min, Math.round(n)));
|
|
77
|
+
}
|
|
78
|
+
function getAspectRatio(value) {
|
|
79
|
+
if (typeof value === 'string' && value.includes('/'))
|
|
80
|
+
return value;
|
|
81
|
+
return '4/3';
|
|
82
|
+
}
|
|
83
|
+
function getOrientation(value) {
|
|
84
|
+
return value === 'horizontal' ? 'horizontal' : 'vertical';
|
|
85
|
+
}
|
|
86
|
+
function itemClassName(tier) {
|
|
87
|
+
if (tier === 'archived')
|
|
88
|
+
return 'opacity-60';
|
|
89
|
+
if (tier === 'experimental')
|
|
90
|
+
return 'opacity-35';
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
export function renderPreview(props) {
|
|
94
|
+
const orientation = getOrientation(props.orientation);
|
|
95
|
+
const columns = getInt(props.columns, 1, 4, 2);
|
|
96
|
+
const gap = getGap(props.gap);
|
|
97
|
+
const ratio = getAspectRatio(props.aspectRatio);
|
|
98
|
+
const count = getInt(props.itemCount, 4, 12, 4);
|
|
99
|
+
const items = ORIENTATION_ITEMS.slice(0, count);
|
|
100
|
+
const resolvedColumns = orientation === 'horizontal' ? 1 : columns;
|
|
101
|
+
return (_jsx(Gallery, { columns: resolvedColumns, gap: gap, className: "w-full", children: items.map((item) => (_jsxs(Gallery.Item, { orientation: orientation, className: itemClassName(item.tier), "aria-disabled": item.tier === 'experimental' ? true : undefined, children: [_jsx(Gallery.View, { aspectRatio: orientation === 'horizontal' ? '1/1' : ratio, children: _jsx(Frame, { pathStroke: item.tier === 'experimental' ? 'dotted' : 'dashed', style: FRAME_STYLE[item.tier], className: "w-full h-full" }) }), _jsxs(Gallery.Body, { children: [_jsx("span", { children: item.title }), _jsx("span", { children: item.description })] })] }, item.id))) }));
|
|
102
|
+
}
|
|
103
|
+
export default function Example() {
|
|
104
|
+
return renderPreview({ orientation: 'vertical', columns: 2, gap: 'sm', aspectRatio: '4/3', itemCount: 4 });
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=02-item-orientation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"02-item-orientation.js","sourceRoot":"","sources":["../../../../src/components/Gallery/examples/02-item-orientation.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAOlD,MAAM,WAAW,GAA0C;IACzD,MAAM,EAAE,EAAE,cAAc,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAyB;IAC3H,QAAQ,EAAE,EAAE,cAAc,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAA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AAe,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAiB,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,aACvJ,KAAC,OAAO,CAAC,IAAI,IAAC,WAAW,EAAE,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,YACrE,KAAC,KAAK,IAAC,UAAU,EAAE,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,EAAC,eAAe,GAAG,GACrH,EACf,MAAC,OAAO,CAAC,IAAI,eACX,yBAAO,IAAI,CAAC,KAAK,GAAQ,EACzB,yBAAO,IAAI,CAAC,WAAW,GAAQ,IAClB,KAPE,IAAI,CAAC,EAAE,CAQX,CAChB,CAAC,GACM,CACX,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,OAAO;IAC7B,OAAO,aAAa,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7G,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ControlDef } from '@/types';
|
|
2
|
+
export declare const metadata: {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const controls: ControlDef[];
|
|
7
|
+
export declare const previewLayout: "start";
|
|
8
|
+
export declare const resizable = true;
|
|
9
|
+
export declare function renderPreview(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default function Example(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=03-span-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"03-span-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/Gallery/examples/03-span-layout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAWzC,eAAO,MAAM,QAAQ;;;CAGpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,UAAU,EA6BhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAG,OAAgB,CAAC;AAC9C,eAAO,MAAM,SAAS,OAAO,CAAC;AAuC9B,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,2CAiC3D;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,4CAE9B"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Gallery, Frame } from 'ui-lab-components';
|
|
4
|
+
const FRAME_STYLE = {
|
|
5
|
+
common: { '--frame-fill': 'var(--background-900)', '--frame-stroke-color': 'var(--background-600)' },
|
|
6
|
+
archived: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-700)' },
|
|
7
|
+
experimental: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-800)' },
|
|
8
|
+
};
|
|
9
|
+
export const metadata = {
|
|
10
|
+
title: 'Span Layout',
|
|
11
|
+
description: 'A featured item spans multiple columns and rows to create an editorial grid layout.',
|
|
12
|
+
};
|
|
13
|
+
export const controls = [
|
|
14
|
+
{ name: 'columns', label: 'Columns', type: 'stepper', defaultValue: 3, min: 2, max: 6, step: 1 },
|
|
15
|
+
{
|
|
16
|
+
name: 'gap',
|
|
17
|
+
label: 'Gap Token',
|
|
18
|
+
type: 'select',
|
|
19
|
+
options: [
|
|
20
|
+
{ label: 'Extra Small', value: 'xs' },
|
|
21
|
+
{ label: 'Small', value: 'sm' },
|
|
22
|
+
{ label: 'Medium', value: 'md' },
|
|
23
|
+
{ label: 'Large', value: 'lg' },
|
|
24
|
+
],
|
|
25
|
+
defaultValue: 'md',
|
|
26
|
+
},
|
|
27
|
+
{ name: 'featuredColumnSpan', label: 'Featured Column Span', type: 'stepper', defaultValue: 2, min: 1, max: 4, step: 1 },
|
|
28
|
+
{ name: 'featuredRowSpan', label: 'Featured Row Span', type: 'stepper', defaultValue: 2, min: 1, max: 3, step: 1 },
|
|
29
|
+
{
|
|
30
|
+
name: 'featuredAspect',
|
|
31
|
+
label: 'Featured Aspect Ratio',
|
|
32
|
+
type: 'select',
|
|
33
|
+
options: [
|
|
34
|
+
{ label: '4:3', value: '4/3' },
|
|
35
|
+
{ label: '16:9', value: '16/9' },
|
|
36
|
+
{ label: '21:9', value: '21/9' },
|
|
37
|
+
{ label: '1:1', value: '1/1' },
|
|
38
|
+
],
|
|
39
|
+
defaultValue: '16/9',
|
|
40
|
+
},
|
|
41
|
+
{ name: 'itemCount', label: 'Items', type: 'stepper', defaultValue: 5, min: 3, max: 12, step: 1 },
|
|
42
|
+
];
|
|
43
|
+
export const previewLayout = 'start';
|
|
44
|
+
export const resizable = true;
|
|
45
|
+
const SPAN_ITEMS = [
|
|
46
|
+
{ id: 's1', title: "Editor's Pick", description: 'Featured collection — Spring 2024', tier: 'common' },
|
|
47
|
+
{ id: 's2', title: 'Series No. 1', description: 'Monochrome', tier: 'common' },
|
|
48
|
+
{ id: 's3', title: 'Series No. 2', description: 'Landscape', tier: 'common' },
|
|
49
|
+
{ id: 's4', title: 'Series No. 3', description: 'Portrait', tier: 'common' },
|
|
50
|
+
{ id: 's5', title: 'Series No. 4', description: 'Abstract', tier: 'common' },
|
|
51
|
+
{ id: 's6', title: 'Series No. 5', description: 'Documentary', tier: 'common' },
|
|
52
|
+
{ id: 's7', title: 'Hidden Vol. I', description: 'Archived · Unlisted', tier: 'archived' },
|
|
53
|
+
{ id: 's8', title: 'Hidden Vol. II', description: 'Archived · Private', tier: 'archived' },
|
|
54
|
+
{ id: 's9', title: 'Hidden Vol. III', description: 'Archived · Limited print', tier: 'archived' },
|
|
55
|
+
{ id: 's10', title: 'Vault A', description: 'Experimental · Access restricted', tier: 'experimental' },
|
|
56
|
+
{ id: 's11', title: 'Vault B', description: 'Experimental · Internal preview', tier: 'experimental' },
|
|
57
|
+
{ id: 's12', title: 'Vault C', description: 'Experimental · Embargoed', tier: 'experimental' },
|
|
58
|
+
];
|
|
59
|
+
function getGap(value) {
|
|
60
|
+
if (value === 'xs' || value === 'sm' || value === 'lg' || value === 'xl')
|
|
61
|
+
return value;
|
|
62
|
+
return 'md';
|
|
63
|
+
}
|
|
64
|
+
function getInt(value, min, max, fallback) {
|
|
65
|
+
const n = Number(value);
|
|
66
|
+
if (Number.isNaN(n))
|
|
67
|
+
return fallback;
|
|
68
|
+
return Math.min(max, Math.max(min, Math.round(n)));
|
|
69
|
+
}
|
|
70
|
+
function getAspectRatio(value) {
|
|
71
|
+
if (typeof value === 'string' && value.includes('/'))
|
|
72
|
+
return value;
|
|
73
|
+
return '4/3';
|
|
74
|
+
}
|
|
75
|
+
function itemClassName(tier) {
|
|
76
|
+
if (tier === 'archived')
|
|
77
|
+
return 'opacity-60';
|
|
78
|
+
if (tier === 'experimental')
|
|
79
|
+
return 'opacity-35';
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
export function renderPreview(props) {
|
|
83
|
+
const columns = getInt(props.columns, 2, 6, 3);
|
|
84
|
+
const gap = getGap(props.gap);
|
|
85
|
+
const colSpan = Math.min(getInt(props.featuredColumnSpan, 1, 4, 2), columns);
|
|
86
|
+
const rowSpan = getInt(props.featuredRowSpan, 1, 3, 2);
|
|
87
|
+
const featuredRatio = getAspectRatio(props.featuredAspect);
|
|
88
|
+
const count = getInt(props.itemCount, 3, 12, 5);
|
|
89
|
+
const [featured, ...rest] = SPAN_ITEMS.slice(0, count);
|
|
90
|
+
return (_jsxs(Gallery, { columns: columns, gap: gap, className: "w-full", children: [_jsxs(Gallery.Item, { columnSpan: colSpan, rowSpan: rowSpan, children: [_jsx(Gallery.View, { aspectRatio: featuredRatio, children: _jsx(Frame, { pathStroke: "dashed", style: FRAME_STYLE.common, className: "w-full h-full" }) }), _jsxs(Gallery.Body, { children: [_jsx("span", { children: featured.title }), _jsx("span", { children: featured.description })] })] }), rest.map((item) => (_jsxs(Gallery.Item, { className: itemClassName(item.tier), "aria-disabled": item.tier === 'experimental' ? true : undefined, children: [_jsx(Gallery.View, { aspectRatio: "4/3", children: _jsx(Frame, { pathStroke: item.tier === 'experimental' ? 'dotted' : 'dashed', style: FRAME_STYLE[item.tier], className: "w-full h-full" }) }), _jsxs(Gallery.Body, { children: [_jsx("span", { children: item.title }), _jsx("span", { children: item.description })] })] }, item.id)))] }));
|
|
91
|
+
}
|
|
92
|
+
export default function Example() {
|
|
93
|
+
return renderPreview({ columns: 3, gap: 'md', featuredColumnSpan: 2, featuredRowSpan: 2, featuredAspect: '16/9', itemCount: 5 });
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=03-span-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"03-span-layout.js","sourceRoot":"","sources":["../../../../src/components/Gallery/examples/03-span-layout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAOlD,MAAM,WAAW,GAA0C;IACzD,MAAM,EAAE,EAAE,cAAc,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAyB;IAC3H,QAAQ,EAAE,EAAE,cAAc,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAyB;IAC7H,YAAY,EAAE,EAAE,cAAc,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAyB;CAClI,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EA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1 } from './01-grid-composition.js';
|
|
2
|
+
export { metadata as metadata1 } from './01-grid-composition.js';
|
|
3
|
+
export { default as Example2 } from './02-item-orientation.js';
|
|
4
|
+
export { metadata as metadata2 } from './02-item-orientation.js';
|
|
5
|
+
export { default as Example3 } from './03-span-layout.js';
|
|
6
|
+
export { metadata as metadata3 } from './03-span-layout.js';
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Gallery/examples/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Gallery/examples/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
export { default as Example1 } from './01-
|
|
2
|
-
export { metadata as metadata1 } from './01-
|
|
1
|
+
export { default as Example1 } from './01-grid-composition.js';
|
|
2
|
+
export { metadata as metadata1 } from './01-grid-composition.js';
|
|
3
|
+
export { default as Example2 } from './02-item-orientation.js';
|
|
4
|
+
export { metadata as metadata2 } from './02-item-orientation.js';
|
|
5
|
+
export { default as Example3 } from './03-span-layout.js';
|
|
6
|
+
export { metadata as metadata3 } from './03-span-layout.js';
|
|
3
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Gallery/examples/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Gallery/examples/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"01-
|
|
3
|
-
"title": "
|
|
4
|
-
"description": "
|
|
5
|
-
"code": "
|
|
2
|
+
"01-grid-composition": {
|
|
3
|
+
"title": "Grid Composition",
|
|
4
|
+
"description": "Gallery items arranged in a configurable grid with consistent gap and aspect ratio.",
|
|
5
|
+
"code": "\"use client\";\n\nimport React from 'react'\nimport { Gallery, Frame } from 'ui-lab-components'\nimport type { GalleryProps } from 'ui-lab-components'\nimport type { ControlDef } from '@/types'\n\ntype GalleryGap = NonNullable<GalleryProps['gap']>;\ntype ItemTier = 'common' | 'archived' | 'experimental';\n\nconst FRAME_STYLE: Record<ItemTier, React.CSSProperties> = {\n common: { '--frame-fill': 'var(--background-900)', '--frame-stroke-color': 'var(--background-600)' } as React.CSSProperties,\n archived: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-700)' } as React.CSSProperties,\n experimental: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-800)' } as React.CSSProperties,\n};\n\nexport const controls: ControlDef[] = [\n { name: 'columns', label: 'Columns', type: 'stepper', defaultValue: 3, min: 1, max: 6, step: 1 },\n {\n name: 'gap',\n label: 'Gap Token',\n type: 'select',\n options: [\n { label: 'Extra Small', value: 'xs' },\n { label: 'Small', value: 'sm' },\n { label: 'Medium', value: 'md' },\n { label: 'Large', value: 'lg' },\n { label: 'Extra Large', value: 'xl' },\n ],\n defaultValue: 'md',\n },\n {\n name: 'aspectRatio',\n label: 'Aspect Ratio',\n type: 'select',\n options: [\n { label: '1:1', value: '1/1' },\n { label: '4:3', value: '4/3' },\n { label: '3:4', value: '3/4' },\n { label: '16:9', value: '16/9' },\n ],\n defaultValue: '4/3',\n },\n { name: 'itemCount', label: 'Items', type: 'stepper', defaultValue: 4, min: 4, max: 12, step: 1 },\n { name: 'responsive', label: 'Container-Query Responsive', type: 'toggle', defaultValue: false },\n];\n\nexport const previewLayout = 'start' as const;\nexport const resizable = true;\n\nconst GRID_ITEMS = [\n { id: 'g1', title: 'Brand Kit', description: 'Identity · Updated 2d ago', tier: 'common' as ItemTier },\n { id: 'g2', title: 'Icon Set', description: 'UI Assets · 142 icons', tier: 'common' as ItemTier },\n { id: 'g3', title: 'Type Scale', description: 'Typography · 8 weights', tier: 'common' as ItemTier },\n { id: 'g4', title: 'Color Tokens', description: 'Design System · v3.2', tier: 'common' as ItemTier },\n { id: 'g5', title: 'Grid Spec', description: 'Layout · 12-column', tier: 'common' as ItemTier },\n { id: 'g6', title: 'Motion Guide', description: 'Animation · 24 presets', tier: 'common' as ItemTier },\n { id: 'g7', title: 'Legacy Icons', description: 'Archived · v1.4', tier: 'archived' as ItemTier },\n { id: 'g8', title: 'Old Palette', description: 'Archived · 2021', tier: 'archived' as ItemTier },\n { id: 'g9', title: 'Beta Components', description: 'Archived · Pre-release', tier: 'archived' as ItemTier },\n { id: 'g10', title: 'Prototype A', description: 'Experimental · Do not ship', tier: 'experimental' as ItemTier },\n { id: 'g11', title: 'Prototype B', description: 'Experimental · Internal only', tier: 'experimental' as ItemTier },\n { id: 'g12', title: 'Prototype C', description: 'Experimental · Unreleased', tier: 'experimental' as ItemTier },\n];\n\nfunction getGap(value: unknown): GalleryGap {\n if (value === 'xs' || value === 'sm' || value === 'lg' || value === 'xl') return value;\n return 'md';\n}\n\nfunction getInt(value: unknown, min: number, max: number, fallback: number) {\n const n = Number(value);\n if (Number.isNaN(n)) return fallback;\n return Math.min(max, Math.max(min, Math.round(n)));\n}\n\nfunction getAspectRatio(value: unknown): string {\n if (typeof value === 'string' && value.includes('/')) return value;\n return '4/3';\n}\n\nfunction itemClassName(tier: ItemTier) {\n if (tier === 'archived') return 'opacity-60';\n if (tier === 'experimental') return 'opacity-35';\n return undefined;\n}\n\nexport function renderPreview(props: Record<string, unknown>) {\n const columns = getInt(props.columns, 1, 6, 3);\n const gap = getGap(props.gap);\n const ratio = getAspectRatio(props.aspectRatio);\n const count = getInt(props.itemCount, 4, 12, 4);\n const responsive = Boolean(props.responsive);\n const items = GRID_ITEMS.slice(0, count);\n const resolvedColumns: GalleryProps['columns'] = responsive ? { sm: 1, md: Math.min(2, columns), lg: columns } : columns;\n\n return (\n <Gallery columns={resolvedColumns} gap={gap} responsive={responsive} className=\"w-full\">\n {items.map((item) => (\n <Gallery.Item key={item.id} className={itemClassName(item.tier)} aria-disabled={item.tier === 'experimental' ? true : undefined}>\n <Gallery.View aspectRatio={ratio}>\n <Frame pathStroke={item.tier === 'experimental' ? 'dotted' : 'dashed'} style={FRAME_STYLE[item.tier]} className=\"w-full h-full\" />\n </Gallery.View>\n <Gallery.Body>\n <span>{item.title}</span>\n <span>{item.description}</span>\n </Gallery.Body>\n </Gallery.Item>\n ))}\n </Gallery>\n );\n}\n\nexport default function Example() {\n return renderPreview({ columns: 3, gap: 'md', aspectRatio: '4/3', itemCount: 4, responsive: false });\n}"
|
|
6
|
+
},
|
|
7
|
+
"02-item-orientation": {
|
|
8
|
+
"title": "Item Orientation",
|
|
9
|
+
"description": "Gallery items can be oriented vertically (stacked view + body) or horizontally (side-by-side view + body).",
|
|
10
|
+
"code": "\"use client\";\n\nimport React from 'react'\nimport { Gallery, Frame } from 'ui-lab-components'\nimport type { GalleryProps } from 'ui-lab-components'\nimport type { ControlDef } from '@/types'\n\ntype GalleryGap = NonNullable<GalleryProps['gap']>;\ntype ItemTier = 'common' | 'archived' | 'experimental';\n\nconst FRAME_STYLE: Record<ItemTier, React.CSSProperties> = {\n common: { '--frame-fill': 'var(--background-900)', '--frame-stroke-color': 'var(--background-600)' } as React.CSSProperties,\n archived: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-700)' } as React.CSSProperties,\n experimental: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-800)' } as React.CSSProperties,\n};\n\nexport const controls: ControlDef[] = [\n {\n name: 'orientation',\n label: 'Orientation',\n type: 'select',\n options: [\n { label: 'Vertical', value: 'vertical' },\n { label: 'Horizontal', value: 'horizontal' },\n ],\n defaultValue: 'vertical',\n },\n { name: 'columns', label: 'Columns (vertical only)', type: 'stepper', defaultValue: 2, min: 1, max: 4, step: 1 },\n {\n name: 'gap',\n label: 'Gap Token',\n type: 'select',\n options: [\n { label: 'Extra Small', value: 'xs' },\n { label: 'Small', value: 'sm' },\n { label: 'Medium', value: 'md' },\n { label: 'Large', value: 'lg' },\n ],\n defaultValue: 'sm',\n },\n {\n name: 'aspectRatio',\n label: 'View Aspect Ratio (vertical only)',\n type: 'select',\n options: [\n { label: '1:1', value: '1/1' },\n { label: '4:3', value: '4/3' },\n { label: '3:4', value: '3/4' },\n { label: '16:9', value: '16/9' },\n ],\n defaultValue: '4/3',\n },\n { name: 'itemCount', label: 'Items', type: 'stepper', defaultValue: 4, min: 4, max: 12, step: 1 },\n];\n\nexport const previewLayout = 'start' as const;\nexport const resizable = true;\n\nconst ORIENTATION_ITEMS = [\n { id: 'o1', title: 'Waveform Study', description: '12:34 · Electronic', tier: 'common' as ItemTier },\n { id: 'o2', title: 'Threshold', description: '8:02 · Ambient', tier: 'common' as ItemTier },\n { id: 'o3', title: 'Parallel Lines', description: '5:47 · Minimal', tier: 'common' as ItemTier },\n { id: 'o4', title: 'Resonance', description: '9:15 · Drone', tier: 'common' as ItemTier },\n { id: 'o5', title: 'Liminal Space', description: '11:20 · Experimental', tier: 'common' as ItemTier },\n { id: 'o6', title: 'Undertow', description: '7:45 · Ambient', tier: 'common' as ItemTier },\n { id: 'o7', title: 'Archive Vol. I', description: 'Archived · 2019 sessions', tier: 'archived' as ItemTier },\n { id: 'o8', title: 'Archive Vol. II', description: 'Archived · Rough cuts', tier: 'archived' as ItemTier },\n { id: 'o9', title: 'Archive Vol. III', description: 'Archived · Unmixed', tier: 'archived' as ItemTier },\n { id: 'o10', title: 'Session X-01', description: 'Experimental · Unreleased draft', tier: 'experimental' as ItemTier },\n { id: 'o11', title: 'Session X-02', description: 'Experimental · Internal', tier: 'experimental' as ItemTier },\n { id: 'o12', title: 'Session X-03', description: 'Experimental · Do not distribute', tier: 'experimental' as ItemTier },\n];\n\nfunction getGap(value: unknown): GalleryGap {\n if (value === 'xs' || value === 'sm' || value === 'lg' || value === 'xl') return value;\n return 'md';\n}\n\nfunction getInt(value: unknown, min: number, max: number, fallback: number) {\n const n = Number(value);\n if (Number.isNaN(n)) return fallback;\n return Math.min(max, Math.max(min, Math.round(n)));\n}\n\nfunction getAspectRatio(value: unknown): string {\n if (typeof value === 'string' && value.includes('/')) return value;\n return '4/3';\n}\n\nfunction getOrientation(value: unknown): 'vertical' | 'horizontal' {\n return value === 'horizontal' ? 'horizontal' : 'vertical';\n}\n\nfunction itemClassName(tier: ItemTier) {\n if (tier === 'archived') return 'opacity-60';\n if (tier === 'experimental') return 'opacity-35';\n return undefined;\n}\n\nexport function renderPreview(props: Record<string, unknown>) {\n const orientation = getOrientation(props.orientation);\n const columns = getInt(props.columns, 1, 4, 2);\n const gap = getGap(props.gap);\n const ratio = getAspectRatio(props.aspectRatio);\n const count = getInt(props.itemCount, 4, 12, 4);\n const items = ORIENTATION_ITEMS.slice(0, count);\n const resolvedColumns: GalleryProps['columns'] = orientation === 'horizontal' ? 1 : columns;\n\n return (\n <Gallery columns={resolvedColumns} gap={gap} className=\"w-full\">\n {items.map((item) => (\n <Gallery.Item key={item.id} orientation={orientation} className={itemClassName(item.tier)} aria-disabled={item.tier === 'experimental' ? true : undefined}>\n <Gallery.View aspectRatio={orientation === 'horizontal' ? '1/1' : ratio}>\n <Frame pathStroke={item.tier === 'experimental' ? 'dotted' : 'dashed'} style={FRAME_STYLE[item.tier]} className=\"w-full h-full\" />\n </Gallery.View>\n <Gallery.Body>\n <span>{item.title}</span>\n <span>{item.description}</span>\n </Gallery.Body>\n </Gallery.Item>\n ))}\n </Gallery>\n );\n}\n\nexport default function Example() {\n return renderPreview({ orientation: 'vertical', columns: 2, gap: 'sm', aspectRatio: '4/3', itemCount: 4 });\n}"
|
|
11
|
+
},
|
|
12
|
+
"03-span-layout": {
|
|
13
|
+
"title": "Span Layout",
|
|
14
|
+
"description": "A featured item spans multiple columns and rows to create an editorial grid layout.",
|
|
15
|
+
"code": "\"use client\";\n\nimport React from 'react'\nimport { Gallery, Frame } from 'ui-lab-components'\nimport type { GalleryProps } from 'ui-lab-components'\nimport type { ControlDef } from '@/types'\n\ntype GalleryGap = NonNullable<GalleryProps['gap']>;\ntype ItemTier = 'common' | 'archived' | 'experimental';\n\nconst FRAME_STYLE: Record<ItemTier, React.CSSProperties> = {\n common: { '--frame-fill': 'var(--background-900)', '--frame-stroke-color': 'var(--background-600)' } as React.CSSProperties,\n archived: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-700)' } as React.CSSProperties,\n experimental: { '--frame-fill': 'var(--background-950)', '--frame-stroke-color': 'var(--background-800)' } as React.CSSProperties,\n};\n\nexport const controls: ControlDef[] = [\n { name: 'columns', label: 'Columns', type: 'stepper', defaultValue: 3, min: 2, max: 6, step: 1 },\n {\n name: 'gap',\n label: 'Gap Token',\n type: 'select',\n options: [\n { label: 'Extra Small', value: 'xs' },\n { label: 'Small', value: 'sm' },\n { label: 'Medium', value: 'md' },\n { label: 'Large', value: 'lg' },\n ],\n defaultValue: 'md',\n },\n { name: 'featuredColumnSpan', label: 'Featured Column Span', type: 'stepper', defaultValue: 2, min: 1, max: 4, step: 1 },\n { name: 'featuredRowSpan', label: 'Featured Row Span', type: 'stepper', defaultValue: 2, min: 1, max: 3, step: 1 },\n {\n name: 'featuredAspect',\n label: 'Featured Aspect Ratio',\n type: 'select',\n options: [\n { label: '4:3', value: '4/3' },\n { label: '16:9', value: '16/9' },\n { label: '21:9', value: '21/9' },\n { label: '1:1', value: '1/1' },\n ],\n defaultValue: '16/9',\n },\n { name: 'itemCount', label: 'Items', type: 'stepper', defaultValue: 5, min: 3, max: 12, step: 1 },\n];\n\nexport const previewLayout = 'start' as const;\nexport const resizable = true;\n\nconst SPAN_ITEMS = [\n { id: 's1', title: \"Editor's Pick\", description: 'Featured collection — Spring 2024', tier: 'common' as ItemTier },\n { id: 's2', title: 'Series No. 1', description: 'Monochrome', tier: 'common' as ItemTier },\n { id: 's3', title: 'Series No. 2', description: 'Landscape', tier: 'common' as ItemTier },\n { id: 's4', title: 'Series No. 3', description: 'Portrait', tier: 'common' as ItemTier },\n { id: 's5', title: 'Series No. 4', description: 'Abstract', tier: 'common' as ItemTier },\n { id: 's6', title: 'Series No. 5', description: 'Documentary', tier: 'common' as ItemTier },\n { id: 's7', title: 'Hidden Vol. I', description: 'Archived · Unlisted', tier: 'archived' as ItemTier },\n { id: 's8', title: 'Hidden Vol. II', description: 'Archived · Private', tier: 'archived' as ItemTier },\n { id: 's9', title: 'Hidden Vol. III', description: 'Archived · Limited print', tier: 'archived' as ItemTier },\n { id: 's10', title: 'Vault A', description: 'Experimental · Access restricted', tier: 'experimental' as ItemTier },\n { id: 's11', title: 'Vault B', description: 'Experimental · Internal preview', tier: 'experimental' as ItemTier },\n { id: 's12', title: 'Vault C', description: 'Experimental · Embargoed', tier: 'experimental' as ItemTier },\n];\n\nfunction getGap(value: unknown): GalleryGap {\n if (value === 'xs' || value === 'sm' || value === 'lg' || value === 'xl') return value;\n return 'md';\n}\n\nfunction getInt(value: unknown, min: number, max: number, fallback: number) {\n const n = Number(value);\n if (Number.isNaN(n)) return fallback;\n return Math.min(max, Math.max(min, Math.round(n)));\n}\n\nfunction getAspectRatio(value: unknown): string {\n if (typeof value === 'string' && value.includes('/')) return value;\n return '4/3';\n}\n\nfunction itemClassName(tier: ItemTier) {\n if (tier === 'archived') return 'opacity-60';\n if (tier === 'experimental') return 'opacity-35';\n return undefined;\n}\n\nexport function renderPreview(props: Record<string, unknown>) {\n const columns = getInt(props.columns, 2, 6, 3);\n const gap = getGap(props.gap);\n const colSpan = Math.min(getInt(props.featuredColumnSpan, 1, 4, 2), columns);\n const rowSpan = getInt(props.featuredRowSpan, 1, 3, 2);\n const featuredRatio = getAspectRatio(props.featuredAspect);\n const count = getInt(props.itemCount, 3, 12, 5);\n const [featured, ...rest] = SPAN_ITEMS.slice(0, count);\n\n return (\n <Gallery columns={columns} gap={gap} className=\"w-full\">\n <Gallery.Item columnSpan={colSpan} rowSpan={rowSpan}>\n <Gallery.View aspectRatio={featuredRatio}>\n <Frame pathStroke=\"dashed\" style={FRAME_STYLE.common} className=\"w-full h-full\" />\n </Gallery.View>\n <Gallery.Body>\n <span>{featured.title}</span>\n <span>{featured.description}</span>\n </Gallery.Body>\n </Gallery.Item>\n {rest.map((item) => (\n <Gallery.Item key={item.id} className={itemClassName(item.tier)} aria-disabled={item.tier === 'experimental' ? true : undefined}>\n <Gallery.View aspectRatio=\"4/3\">\n <Frame pathStroke={item.tier === 'experimental' ? 'dotted' : 'dashed'} style={FRAME_STYLE[item.tier]} className=\"w-full h-full\" />\n </Gallery.View>\n <Gallery.Body>\n <span>{item.title}</span>\n <span>{item.description}</span>\n </Gallery.Body>\n </Gallery.Item>\n ))}\n </Gallery>\n );\n}\n\nexport default function Example() {\n return renderPreview({ columns: 3, gap: 'md', featuredColumnSpan: 2, featuredRowSpan: 2, featuredAspect: '16/9', itemCount: 5 });\n}"
|
|
6
16
|
}
|
|
7
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AActD,QAAA,MAAM,eAAe,EAAE,UAAU,EAyBhC,CAAC;AAiCF,eAAO,MAAM,aAAa,EAAE,eA0E3B,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Gallery } from 'ui-lab-components';
|
|
3
|
-
import Example1, { metadata as metadata1 } from './examples/01-
|
|
3
|
+
import Example1, { metadata as metadata1, controls as controls1, renderPreview as renderPreview1, previewLayout as previewLayout1, resizable as resizable1 } from './examples/01-grid-composition.js';
|
|
4
|
+
import Example2, { metadata as metadata2, controls as controls2, renderPreview as renderPreview2, previewLayout as previewLayout2, resizable as resizable2 } from './examples/02-item-orientation.js';
|
|
5
|
+
import Example3, { metadata as metadata3, controls as controls3, renderPreview as renderPreview3, previewLayout as previewLayout3, resizable as resizable3 } from './examples/03-span-layout.js';
|
|
4
6
|
import examplesJson from './examples.json' with { type: 'json' };
|
|
5
7
|
import { loadComponentExamples } from '../../utils/load-component-examples.js';
|
|
6
8
|
const examplesData = [
|
|
7
|
-
{ id: '01-
|
|
9
|
+
{ id: '01-grid-composition', Component: Example1, metadata: metadata1, controls: controls1, renderPreview: renderPreview1, previewLayout: previewLayout1, resizable: resizable1 },
|
|
10
|
+
{ id: '02-item-orientation', Component: Example2, metadata: metadata2, controls: controls2, renderPreview: renderPreview2, previewLayout: previewLayout2, resizable: resizable2 },
|
|
11
|
+
{ id: '03-span-layout', Component: Example3, metadata: metadata3, controls: controls3, renderPreview: renderPreview3, previewLayout: previewLayout3, resizable: resizable3 },
|
|
8
12
|
];
|
|
9
13
|
const galleryControls = [
|
|
10
14
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Gallery/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,QAAQ,EAAE,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Gallery/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,QAAQ,EAAE,EAAE,QAAQ,IAAI,SAAS,EAAE,QAAQ,IAAI,SAAS,EAAE,aAAa,IAAI,cAAc,EAAE,aAAa,IAAI,cAAc,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACtM,OAAO,QAAQ,EAAE,EAAE,QAAQ,IAAI,SAAS,EAAE,QAAQ,IAAI,SAAS,EAAE,aAAa,IAAI,cAAc,EAAE,aAAa,IAAI,cAAc,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACtM,OAAO,QAAQ,EAAE,EAAE,QAAQ,IAAI,SAAS,EAAE,QAAQ,IAAI,SAAS,EAAE,aAAa,IAAI,cAAc,EAAE,aAAa,IAAI,cAAc,EAAE,SAAS,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACjM,OAAO,YAAY,MAAM,iBAAiB,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IAAe,IAAI,EAAE,IAAI,CAAC,IAAI,aACzC,KAAC,OAAO,CAAC,IAAI,IAAC,WAAW,EAAC,MAAM,YAC9B,cAAK,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,GAAI,GAC5B,EACf,KAAC,OAAO,CAAC,IAAI,cACX,2BAAS,IAAI,CAAC,KAAK,GAAU,GAChB,KANE,IAAI,CAAC,EAAE,CAOX,CAChB,CAAC,GACM,CACX;SACF;KACF;CACF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ControlDef } from '@/types';
|
|
2
|
+
export declare const metadata: {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const controls: ControlDef[];
|
|
7
|
+
export declare const previewLayout: "start";
|
|
8
|
+
export declare const resizable = true;
|
|
9
|
+
export declare function renderPreview(props: Record<string, unknown>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default function Example(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=02-track-placement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"02-track-placement.d.ts","sourceRoot":"","sources":["../../../../src/components/Grid/examples/02-track-placement.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAUzC,eAAO,MAAM,QAAQ;;;CAGpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,UAAU,EA4EhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAG,OAAgB,CAAC;AAC9C,eAAO,MAAM,SAAS,OAAO,CAAC;AAqF9B,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,2CAqB3D;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,4CAE9B"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Grid, Frame } from 'ui-lab-components';
|
|
4
|
+
const BASE_CELL_STYLE = {
|
|
5
|
+
'--frame-fill': 'var(--background-900)',
|
|
6
|
+
'--frame-stroke-color': 'var(--background-600)',
|
|
7
|
+
};
|
|
8
|
+
export const metadata = {
|
|
9
|
+
title: 'Track Placement',
|
|
10
|
+
description: 'Adjust columns, gap, alignment, and auto-placement flow to explore the CSS Grid track model.',
|
|
11
|
+
};
|
|
12
|
+
export const controls = [
|
|
13
|
+
{
|
|
14
|
+
name: 'columns',
|
|
15
|
+
label: 'Columns',
|
|
16
|
+
type: 'select',
|
|
17
|
+
options: [
|
|
18
|
+
{ label: '1 Column', value: '1' },
|
|
19
|
+
{ label: '2 Columns', value: '2' },
|
|
20
|
+
{ label: '3 Columns', value: '3' },
|
|
21
|
+
{ label: '4 Columns', value: '4' },
|
|
22
|
+
{ label: '5 Columns', value: '5' },
|
|
23
|
+
{ label: '6 Columns', value: '6' },
|
|
24
|
+
{ label: 'Auto Fit', value: 'auto-fit' },
|
|
25
|
+
{ label: 'Auto Fill', value: 'auto-fill' },
|
|
26
|
+
],
|
|
27
|
+
defaultValue: '3',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'gap',
|
|
31
|
+
label: 'Gap Token',
|
|
32
|
+
type: 'select',
|
|
33
|
+
options: [
|
|
34
|
+
{ label: 'Extra Small', value: 'xs' },
|
|
35
|
+
{ label: 'Small', value: 'sm' },
|
|
36
|
+
{ label: 'Medium', value: 'md' },
|
|
37
|
+
{ label: 'Large', value: 'lg' },
|
|
38
|
+
{ label: 'Extra Large', value: 'xl' },
|
|
39
|
+
],
|
|
40
|
+
defaultValue: 'md',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'justifyItems',
|
|
44
|
+
label: 'Inline Alignment',
|
|
45
|
+
type: 'select',
|
|
46
|
+
options: [
|
|
47
|
+
{ label: 'Stretch', value: 'stretch' },
|
|
48
|
+
{ label: 'Start', value: 'start' },
|
|
49
|
+
{ label: 'Center', value: 'center' },
|
|
50
|
+
{ label: 'End', value: 'end' },
|
|
51
|
+
],
|
|
52
|
+
defaultValue: 'stretch',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'alignItems',
|
|
56
|
+
label: 'Block Alignment',
|
|
57
|
+
type: 'select',
|
|
58
|
+
options: [
|
|
59
|
+
{ label: 'Stretch', value: 'stretch' },
|
|
60
|
+
{ label: 'Start', value: 'start' },
|
|
61
|
+
{ label: 'Center', value: 'center' },
|
|
62
|
+
{ label: 'End', value: 'end' },
|
|
63
|
+
{ label: 'Baseline', value: 'baseline' },
|
|
64
|
+
],
|
|
65
|
+
defaultValue: 'stretch',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'autoFlow',
|
|
69
|
+
label: 'Auto Placement',
|
|
70
|
+
type: 'select',
|
|
71
|
+
options: [
|
|
72
|
+
{ label: 'Row', value: 'row' },
|
|
73
|
+
{ label: 'Column', value: 'column' },
|
|
74
|
+
{ label: 'Row Dense', value: 'row-dense' },
|
|
75
|
+
{ label: 'Column Dense', value: 'column-dense' },
|
|
76
|
+
],
|
|
77
|
+
defaultValue: 'row',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'frameCount',
|
|
81
|
+
label: 'Panels',
|
|
82
|
+
type: 'stepper',
|
|
83
|
+
defaultValue: 6,
|
|
84
|
+
min: 4,
|
|
85
|
+
max: 12,
|
|
86
|
+
step: 1,
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
export const previewLayout = 'start';
|
|
90
|
+
export const resizable = true;
|
|
91
|
+
function getColumns(value) {
|
|
92
|
+
if (value === '1' || value === '2' || value === '4' || value === '5' || value === '6' || value === 'auto-fit' || value === 'auto-fill')
|
|
93
|
+
return value;
|
|
94
|
+
return '3';
|
|
95
|
+
}
|
|
96
|
+
function toColumns(value) {
|
|
97
|
+
if (value === 'auto-fit' || value === 'auto-fill')
|
|
98
|
+
return value;
|
|
99
|
+
return Number(value);
|
|
100
|
+
}
|
|
101
|
+
function getApproxColumnCount(value) {
|
|
102
|
+
if (value === 'auto-fit' || value === 'auto-fill')
|
|
103
|
+
return 4;
|
|
104
|
+
return Number(value);
|
|
105
|
+
}
|
|
106
|
+
function getGap(value) {
|
|
107
|
+
if (value === 'xs' || value === 'sm' || value === 'lg' || value === 'xl')
|
|
108
|
+
return value;
|
|
109
|
+
return 'md';
|
|
110
|
+
}
|
|
111
|
+
function getJustifyItems(value) {
|
|
112
|
+
if (value === 'start' || value === 'center' || value === 'end')
|
|
113
|
+
return value;
|
|
114
|
+
return 'stretch';
|
|
115
|
+
}
|
|
116
|
+
function getAlignItems(value) {
|
|
117
|
+
if (value === 'start' || value === 'center' || value === 'end' || value === 'baseline')
|
|
118
|
+
return value;
|
|
119
|
+
return 'stretch';
|
|
120
|
+
}
|
|
121
|
+
function getAutoFlow(value) {
|
|
122
|
+
if (value === 'column' || value === 'row-dense' || value === 'column-dense')
|
|
123
|
+
return value;
|
|
124
|
+
return 'row';
|
|
125
|
+
}
|
|
126
|
+
function getFrameCount(value, min, max, fallback) {
|
|
127
|
+
const n = typeof value === 'number' ? value : Number(value);
|
|
128
|
+
if (Number.isNaN(n))
|
|
129
|
+
return fallback;
|
|
130
|
+
return Math.min(max, Math.max(min, Math.round(n)));
|
|
131
|
+
}
|
|
132
|
+
function span(trackCount, desired) {
|
|
133
|
+
return `span ${Math.max(1, Math.min(desired, trackCount))}`;
|
|
134
|
+
}
|
|
135
|
+
function getSpecs(trackCount, frameCount) {
|
|
136
|
+
if (trackCount <= 2) {
|
|
137
|
+
const pattern = [{ minHeight: '5rem' }, { minHeight: '3rem' }, { minHeight: '4.5rem' }];
|
|
138
|
+
return [
|
|
139
|
+
{ minHeight: '3rem' },
|
|
140
|
+
{ minHeight: '8rem' },
|
|
141
|
+
...Array.from({ length: Math.max(frameCount - 2, 0) }, (_, i) => ({ minHeight: pattern[i % pattern.length].minHeight })),
|
|
142
|
+
].map(s => ({ style: { width: '100%', ...s } }));
|
|
143
|
+
}
|
|
144
|
+
if (trackCount === 3) {
|
|
145
|
+
const pattern = [
|
|
146
|
+
{ width: '100%', minHeight: '6rem', gridColumn: 'span 2' },
|
|
147
|
+
{ width: '100%', minHeight: '3rem' },
|
|
148
|
+
{ width: '100%', minHeight: '4.5rem' },
|
|
149
|
+
];
|
|
150
|
+
return [
|
|
151
|
+
{ style: { width: '100%', minHeight: '9rem', gridColumn: 'span 1', gridRow: 'span 2' } },
|
|
152
|
+
{ style: { width: '100%', minHeight: '5rem', gridColumn: 'span 2' } },
|
|
153
|
+
{ style: { width: '100%', minHeight: '3rem' } },
|
|
154
|
+
{ style: { width: '100%', minHeight: '3rem' } },
|
|
155
|
+
...Array.from({ length: Math.max(frameCount - 4, 0) }, (_, i) => ({ style: pattern[i % pattern.length] })),
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
const pattern = [
|
|
159
|
+
{ width: '100%', minHeight: '6.5rem', gridColumn: span(trackCount, 2) },
|
|
160
|
+
{ width: '100%', minHeight: '3rem' },
|
|
161
|
+
{ width: '100%', minHeight: '4rem' },
|
|
162
|
+
{ width: '100%', minHeight: '5rem', gridColumn: span(trackCount, 2) },
|
|
163
|
+
];
|
|
164
|
+
return [
|
|
165
|
+
{ style: { width: '100%', minHeight: '10rem', gridRow: 'span 2' } },
|
|
166
|
+
{ style: { width: '100%', minHeight: '6rem', gridColumn: span(trackCount - 1, trackCount - 1) } },
|
|
167
|
+
{ style: { width: '100%', minHeight: '3rem' } },
|
|
168
|
+
{ style: { width: '100%', minHeight: '3rem' } },
|
|
169
|
+
...Array.from({ length: Math.max(frameCount - 4, 0) }, (_, i) => ({ style: pattern[i % pattern.length] })),
|
|
170
|
+
];
|
|
171
|
+
}
|
|
172
|
+
export function renderPreview(props) {
|
|
173
|
+
const columns = getColumns(props.columns);
|
|
174
|
+
const frameCount = getFrameCount(props.frameCount, 4, 12, 6);
|
|
175
|
+
const specs = getSpecs(getApproxColumnCount(columns), frameCount);
|
|
176
|
+
return (_jsx(Grid, { columns: toColumns(columns), gap: getGap(props.gap), justifyItems: getJustifyItems(props.justifyItems), alignItems: getAlignItems(props.alignItems), autoFlow: getAutoFlow(props.autoFlow), className: "w-full", children: specs.map((spec, index) => (_jsx(Frame, { pathStroke: "dashed", style: { ...BASE_CELL_STYLE, ...spec.style }, className: "w-full h-full", children: _jsx("div", { className: "size-full" }) }, index))) }));
|
|
177
|
+
}
|
|
178
|
+
export default function Example() {
|
|
179
|
+
return renderPreview({ columns: '3', gap: 'md', justifyItems: 'stretch', alignItems: 'stretch', autoFlow: 'row', frameCount: 6 });
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=02-track-placement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"02-track-placement.js","sourceRoot":"","sources":["../../../../src/components/Grid/examples/02-track-placement.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAO/C,MAAM,eAAe,GAAG;IACtB,cAAc,EAAE,uBAAuB;IACvC,sBAAsB,EAAE,uBAAuB;CACzB,CAAC;AAEzB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,8FAA8F;CAC5G,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE;YACjC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE;YAClC,EAAE,KAAK,EAAE,WAAW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