@ezpg/app-ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +20 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js +90 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js.map +1 -0
- package/lib/module/blocks/brand-profile-card/index.js +4 -0
- package/lib/module/blocks/brand-profile-card/index.js.map +1 -0
- package/lib/module/blocks/claim-row/claim-row.js +107 -0
- package/lib/module/blocks/claim-row/claim-row.js.map +1 -0
- package/lib/module/blocks/claim-row/index.js +4 -0
- package/lib/module/blocks/claim-row/index.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +124 -0
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -0
- package/lib/module/blocks/color-swatch-picker/index.js +4 -0
- package/lib/module/blocks/color-swatch-picker/index.js.map +1 -0
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +142 -0
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -0
- package/lib/module/blocks/copy-variant-picker/index.js +4 -0
- package/lib/module/blocks/copy-variant-picker/index.js.map +1 -0
- package/lib/module/blocks/credit-wallet/credit-wallet.js +123 -0
- package/lib/module/blocks/credit-wallet/credit-wallet.js.map +1 -0
- package/lib/module/blocks/credit-wallet/index.js +4 -0
- package/lib/module/blocks/credit-wallet/index.js.map +1 -0
- package/lib/module/blocks/image-grid/image-grid.js +273 -0
- package/lib/module/blocks/image-grid/image-grid.js.map +1 -0
- package/lib/module/blocks/image-grid/index.js +4 -0
- package/lib/module/blocks/image-grid/index.js.map +1 -0
- package/lib/module/blocks/index.js +22 -0
- package/lib/module/blocks/index.js.map +1 -0
- package/lib/module/blocks/internal/card.js +41 -0
- package/lib/module/blocks/internal/card.js.map +1 -0
- package/lib/module/blocks/internal/format.js +25 -0
- package/lib/module/blocks/internal/format.js.map +1 -0
- package/lib/module/blocks/invoice-row/index.js +4 -0
- package/lib/module/blocks/invoice-row/index.js.map +1 -0
- package/lib/module/blocks/invoice-row/invoice-row.js +101 -0
- package/lib/module/blocks/invoice-row/invoice-row.js.map +1 -0
- package/lib/module/blocks/logo-candidate-grid/index.js +4 -0
- package/lib/module/blocks/logo-candidate-grid/index.js.map +1 -0
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js +117 -0
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/index.js +4 -0
- package/lib/module/blocks/oauth-buttons/index.js.map +1 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +102 -0
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -0
- package/lib/module/blocks/option-editor/index.js +4 -0
- package/lib/module/blocks/option-editor/index.js.map +1 -0
- package/lib/module/blocks/option-editor/option-editor.js +133 -0
- package/lib/module/blocks/option-editor/option-editor.js.map +1 -0
- package/lib/module/blocks/order-card/index.js +4 -0
- package/lib/module/blocks/order-card/index.js.map +1 -0
- package/lib/module/blocks/order-card/order-card.js +156 -0
- package/lib/module/blocks/order-card/order-card.js.map +1 -0
- package/lib/module/blocks/plan-card/index.js +4 -0
- package/lib/module/blocks/plan-card/index.js.map +1 -0
- package/lib/module/blocks/plan-card/plan-card.js +134 -0
- package/lib/module/blocks/plan-card/plan-card.js.map +1 -0
- package/lib/module/blocks/product-list-empty/index.js +4 -0
- package/lib/module/blocks/product-list-empty/index.js.map +1 -0
- package/lib/module/blocks/product-list-empty/product-list-empty.js +155 -0
- package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -0
- package/lib/module/blocks/review-row/index.js +4 -0
- package/lib/module/blocks/review-row/index.js.map +1 -0
- package/lib/module/blocks/review-row/review-row.js +284 -0
- package/lib/module/blocks/review-row/review-row.js.map +1 -0
- package/lib/module/blocks/sales-chart/index.js +4 -0
- package/lib/module/blocks/sales-chart/index.js.map +1 -0
- package/lib/module/blocks/sales-chart/sales-chart.js +126 -0
- package/lib/module/blocks/sales-chart/sales-chart.js.map +1 -0
- package/lib/module/blocks/service-state-banner/index.js +4 -0
- package/lib/module/blocks/service-state-banner/index.js.map +1 -0
- package/lib/module/blocks/service-state-banner/service-state-banner.js +64 -0
- package/lib/module/blocks/service-state-banner/service-state-banner.js.map +1 -0
- package/lib/module/blocks/shipping-tracking-row/index.js +4 -0
- package/lib/module/blocks/shipping-tracking-row/index.js.map +1 -0
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js +116 -0
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js.map +1 -0
- package/lib/module/blocks/site-preview-frame/index.js +4 -0
- package/lib/module/blocks/site-preview-frame/index.js.map +1 -0
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js +111 -0
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -0
- package/lib/module/blocks/stat-card/index.js +4 -0
- package/lib/module/blocks/stat-card/index.js.map +1 -0
- package/lib/module/blocks/stat-card/stat-card.js +71 -0
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -0
- package/lib/module/blocks/step-screen/index.js +4 -0
- package/lib/module/blocks/step-screen/index.js.map +1 -0
- package/lib/module/blocks/step-screen/step-screen.js +134 -0
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -0
- package/lib/module/blocks/supply-item-card/index.js +4 -0
- package/lib/module/blocks/supply-item-card/index.js.map +1 -0
- package/lib/module/blocks/supply-item-card/supply-item-card.js +151 -0
- package/lib/module/blocks/supply-item-card/supply-item-card.js.map +1 -0
- package/lib/module/charts/index.js +5 -0
- package/lib/module/charts/index.js.map +1 -0
- package/lib/module/charts/line-chart.js +115 -0
- package/lib/module/charts/line-chart.js.map +1 -0
- package/lib/module/charts/scale.js +45 -0
- package/lib/module/charts/scale.js.map +1 -0
- package/lib/module/charts/sparkline.js +50 -0
- package/lib/module/charts/sparkline.js.map +1 -0
- package/lib/module/charts/summary.js +11 -0
- package/lib/module/charts/summary.js.map +1 -0
- package/lib/module/charts.js +5 -0
- package/lib/module/charts.js.map +1 -0
- package/lib/module/components/button/button.js +122 -0
- package/lib/module/components/button/button.js.map +1 -0
- package/lib/module/components/button/index.js +4 -0
- package/lib/module/components/button/index.js.map +1 -0
- package/lib/module/components/checkbox/checkbox.js +72 -0
- package/lib/module/components/checkbox/checkbox.js.map +1 -0
- package/lib/module/components/checkbox/index.js +4 -0
- package/lib/module/components/checkbox/index.js.map +1 -0
- package/lib/module/components/chip/chip.js +68 -0
- package/lib/module/components/chip/chip.js.map +1 -0
- package/lib/module/components/chip/index.js +4 -0
- package/lib/module/components/chip/index.js.map +1 -0
- package/lib/module/components/chip-group/chip-group.js +55 -0
- package/lib/module/components/chip-group/chip-group.js.map +1 -0
- package/lib/module/components/chip-group/index.js +4 -0
- package/lib/module/components/chip-group/index.js.map +1 -0
- package/lib/module/components/dialog/dialog.js +118 -0
- package/lib/module/components/dialog/dialog.js.map +1 -0
- package/lib/module/components/dialog/index.js +4 -0
- package/lib/module/components/dialog/index.js.map +1 -0
- package/lib/module/components/divider/divider.js +21 -0
- package/lib/module/components/divider/divider.js.map +1 -0
- package/lib/module/components/divider/index.js +4 -0
- package/lib/module/components/divider/index.js.map +1 -0
- package/lib/module/components/empty-state/empty-state.js +126 -0
- package/lib/module/components/empty-state/empty-state.js.map +1 -0
- package/lib/module/components/empty-state/index.js +4 -0
- package/lib/module/components/empty-state/index.js.map +1 -0
- package/lib/module/components/field/field.js +123 -0
- package/lib/module/components/field/field.js.map +1 -0
- package/lib/module/components/field/index.js +4 -0
- package/lib/module/components/field/index.js.map +1 -0
- package/lib/module/components/list-row/index.js +4 -0
- package/lib/module/components/list-row/index.js.map +1 -0
- package/lib/module/components/list-row/list-row.js +97 -0
- package/lib/module/components/list-row/list-row.js.map +1 -0
- package/lib/module/components/photo/index.js +4 -0
- package/lib/module/components/photo/index.js.map +1 -0
- package/lib/module/components/photo/photo.js +68 -0
- package/lib/module/components/photo/photo.js.map +1 -0
- package/lib/module/components/price/index.js +4 -0
- package/lib/module/components/price/index.js.map +1 -0
- package/lib/module/components/price/price.js +72 -0
- package/lib/module/components/price/price.js.map +1 -0
- package/lib/module/components/search-field/index.js +4 -0
- package/lib/module/components/search-field/index.js.map +1 -0
- package/lib/module/components/search-field/search-field.js +35 -0
- package/lib/module/components/search-field/search-field.js.map +1 -0
- package/lib/module/components/segmented-tabs/index.js +4 -0
- package/lib/module/components/segmented-tabs/index.js.map +1 -0
- package/lib/module/components/segmented-tabs/segmented-tabs.js +74 -0
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -0
- package/lib/module/components/sheet/index.js +4 -0
- package/lib/module/components/sheet/index.js.map +1 -0
- package/lib/module/components/sheet/sheet.js +97 -0
- package/lib/module/components/sheet/sheet.js.map +1 -0
- package/lib/module/components/skeleton/index.js +4 -0
- package/lib/module/components/skeleton/index.js.map +1 -0
- package/lib/module/components/skeleton/skeleton.js +49 -0
- package/lib/module/components/skeleton/skeleton.js.map +1 -0
- package/lib/module/components/status-badge/index.js +4 -0
- package/lib/module/components/status-badge/index.js.map +1 -0
- package/lib/module/components/status-badge/status-badge.js +48 -0
- package/lib/module/components/status-badge/status-badge.js.map +1 -0
- package/lib/module/components/switch/index.js +4 -0
- package/lib/module/components/switch/index.js.map +1 -0
- package/lib/module/components/switch/switch.js +26 -0
- package/lib/module/components/switch/switch.js.map +1 -0
- package/lib/module/components/text/index.js +4 -0
- package/lib/module/components/text/index.js.map +1 -0
- package/lib/module/components/text/text.js +56 -0
- package/lib/module/components/text/text.js.map +1 -0
- package/lib/module/components/toast/index.js +4 -0
- package/lib/module/components/toast/index.js.map +1 -0
- package/lib/module/components/toast/toast.js +203 -0
- package/lib/module/components/toast/toast.js.map +1 -0
- package/lib/module/components/wizard-steps/index.js +4 -0
- package/lib/module/components/wizard-steps/index.js.map +1 -0
- package/lib/module/components/wizard-steps/wizard-steps.js +69 -0
- package/lib/module/components/wizard-steps/wizard-steps.js.map +1 -0
- package/lib/module/index.js +31 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/glyphs.js +200 -0
- package/lib/module/internal/glyphs.js.map +1 -0
- package/lib/module/internal/icon.js +8 -0
- package/lib/module/internal/icon.js.map +1 -0
- package/lib/module/internal/overlay.js +60 -0
- package/lib/module/internal/overlay.js.map +1 -0
- package/lib/module/internal/pressable-base.js +40 -0
- package/lib/module/internal/pressable-base.js.map +1 -0
- package/lib/module/internal/use-reduced-motion.js +31 -0
- package/lib/module/internal/use-reduced-motion.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/sortable/index.js +6 -0
- package/lib/module/sortable/index.js.map +1 -0
- package/lib/module/sortable/move.js +11 -0
- package/lib/module/sortable/move.js.map +1 -0
- package/lib/module/sortable/sortable-grid.js +86 -0
- package/lib/module/sortable/sortable-grid.js.map +1 -0
- package/lib/module/sortable/sortable-list.js +16 -0
- package/lib/module/sortable/sortable-list.js.map +1 -0
- package/lib/module/sortable.js +6 -0
- package/lib/module/sortable.js.map +1 -0
- package/lib/module/theme/create-theme.js +56 -0
- package/lib/module/theme/create-theme.js.map +1 -0
- package/lib/module/theme/theme-provider.js +26 -0
- package/lib/module/theme/theme-provider.js.map +1 -0
- package/lib/module/theme/tokens.js +123 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/utils/color.js +30 -0
- package/lib/module/utils/color.js.map +1 -0
- package/lib/module/utils/styles.js +22 -0
- package/lib/module/utils/styles.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts +15 -0
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/brand-profile-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/brand-profile-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts +22 -0
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/claim-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/claim-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +16 -0
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -0
- package/lib/typescript/src/blocks/color-swatch-picker/index.d.ts +2 -0
- package/lib/typescript/src/blocks/color-swatch-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts +22 -0
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts.map +1 -0
- package/lib/typescript/src/blocks/copy-variant-picker/index.d.ts +2 -0
- package/lib/typescript/src/blocks/copy-variant-picker/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts +14 -0
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts.map +1 -0
- package/lib/typescript/src/blocks/credit-wallet/index.d.ts +2 -0
- package/lib/typescript/src/blocks/credit-wallet/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts +24 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/index.d.ts +2 -0
- package/lib/typescript/src/blocks/image-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/index.d.ts +20 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/internal/card.d.ts +10 -0
- package/lib/typescript/src/blocks/internal/card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/internal/format.d.ts +7 -0
- package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -0
- package/lib/typescript/src/blocks/invoice-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/invoice-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts +22 -0
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/index.d.ts +2 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts +17 -0
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts +2 -0
- package/lib/typescript/src/blocks/oauth-buttons/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +20 -0
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -0
- package/lib/typescript/src/blocks/option-editor/index.d.ts +2 -0
- package/lib/typescript/src/blocks/option-editor/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts +20 -0
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts.map +1 -0
- package/lib/typescript/src/blocks/order-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/order-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/order-card/order-card.d.ts +44 -0
- package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/plan-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/plan-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts +36 -0
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/product-list-empty/index.d.ts +2 -0
- package/lib/typescript/src/blocks/product-list-empty/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts +21 -0
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -0
- package/lib/typescript/src/blocks/review-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/review-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/review-row/review-row.d.ts +34 -0
- package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/sales-chart/index.d.ts +2 -0
- package/lib/typescript/src/blocks/sales-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts +20 -0
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts.map +1 -0
- package/lib/typescript/src/blocks/service-state-banner/index.d.ts +2 -0
- package/lib/typescript/src/blocks/service-state-banner/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts +13 -0
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts.map +1 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/index.d.ts +2 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts +12 -0
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-preview-frame/index.d.ts +2 -0
- package/lib/typescript/src/blocks/site-preview-frame/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts +18 -0
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stat-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/stat-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +17 -0
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -0
- package/lib/typescript/src/blocks/step-screen/index.d.ts +2 -0
- package/lib/typescript/src/blocks/step-screen/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +26 -0
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -0
- package/lib/typescript/src/blocks/supply-item-card/index.d.ts +2 -0
- package/lib/typescript/src/blocks/supply-item-card/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts +30 -0
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts.map +1 -0
- package/lib/typescript/src/charts/index.d.ts +3 -0
- package/lib/typescript/src/charts/index.d.ts.map +1 -0
- package/lib/typescript/src/charts/line-chart.d.ts +21 -0
- package/lib/typescript/src/charts/line-chart.d.ts.map +1 -0
- package/lib/typescript/src/charts/scale.d.ts +13 -0
- package/lib/typescript/src/charts/scale.d.ts.map +1 -0
- package/lib/typescript/src/charts/sparkline.d.ts +15 -0
- package/lib/typescript/src/charts/sparkline.d.ts.map +1 -0
- package/lib/typescript/src/charts/summary.d.ts +3 -0
- package/lib/typescript/src/charts/summary.d.ts.map +1 -0
- package/lib/typescript/src/charts.d.ts +3 -0
- package/lib/typescript/src/charts.d.ts.map +1 -0
- package/lib/typescript/src/components/button/button.d.ts +18 -0
- package/lib/typescript/src/components/button/button.d.ts.map +1 -0
- package/lib/typescript/src/components/button/index.d.ts +2 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/checkbox/checkbox.d.ts +8 -0
- package/lib/typescript/src/components/checkbox/checkbox.d.ts.map +1 -0
- package/lib/typescript/src/components/checkbox/index.d.ts +2 -0
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/chip.d.ts +9 -0
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -0
- package/lib/typescript/src/components/chip/index.d.ts +2 -0
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +27 -0
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -0
- package/lib/typescript/src/components/chip-group/index.d.ts +2 -0
- package/lib/typescript/src/components/chip-group/index.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/dialog.d.ts +20 -0
- package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -0
- package/lib/typescript/src/components/dialog/index.d.ts +2 -0
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -0
- package/lib/typescript/src/components/divider/divider.d.ts +9 -0
- package/lib/typescript/src/components/divider/divider.d.ts.map +1 -0
- package/lib/typescript/src/components/divider/index.d.ts +2 -0
- package/lib/typescript/src/components/divider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/empty-state.d.ts +26 -0
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -0
- package/lib/typescript/src/components/empty-state/index.d.ts +2 -0
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
- package/lib/typescript/src/components/field/field.d.ts +15 -0
- package/lib/typescript/src/components/field/field.d.ts.map +1 -0
- package/lib/typescript/src/components/field/index.d.ts +2 -0
- package/lib/typescript/src/components/field/index.d.ts.map +1 -0
- package/lib/typescript/src/components/list-row/index.d.ts +2 -0
- package/lib/typescript/src/components/list-row/index.d.ts.map +1 -0
- package/lib/typescript/src/components/list-row/list-row.d.ts +15 -0
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -0
- package/lib/typescript/src/components/photo/index.d.ts +2 -0
- package/lib/typescript/src/components/photo/index.d.ts.map +1 -0
- package/lib/typescript/src/components/photo/photo.d.ts +15 -0
- package/lib/typescript/src/components/photo/photo.d.ts.map +1 -0
- package/lib/typescript/src/components/price/index.d.ts +2 -0
- package/lib/typescript/src/components/price/index.d.ts.map +1 -0
- package/lib/typescript/src/components/price/price.d.ts +15 -0
- package/lib/typescript/src/components/price/price.d.ts.map +1 -0
- package/lib/typescript/src/components/search-field/index.d.ts +2 -0
- package/lib/typescript/src/components/search-field/index.d.ts.map +1 -0
- package/lib/typescript/src/components/search-field/search-field.d.ts +9 -0
- package/lib/typescript/src/components/search-field/search-field.d.ts.map +1 -0
- package/lib/typescript/src/components/segmented-tabs/index.d.ts +2 -0
- package/lib/typescript/src/components/segmented-tabs/index.d.ts.map +1 -0
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts +14 -0
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -0
- package/lib/typescript/src/components/sheet/index.d.ts +2 -0
- package/lib/typescript/src/components/sheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/sheet/sheet.d.ts +17 -0
- package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/index.d.ts +2 -0
- package/lib/typescript/src/components/skeleton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +13 -0
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -0
- package/lib/typescript/src/components/status-badge/index.d.ts +2 -0
- package/lib/typescript/src/components/status-badge/index.d.ts.map +1 -0
- package/lib/typescript/src/components/status-badge/status-badge.d.ts +10 -0
- package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/index.d.ts +2 -0
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -0
- package/lib/typescript/src/components/switch/switch.d.ts +9 -0
- package/lib/typescript/src/components/switch/switch.d.ts.map +1 -0
- package/lib/typescript/src/components/text/index.d.ts +2 -0
- package/lib/typescript/src/components/text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/text/text.d.ts +16 -0
- package/lib/typescript/src/components/text/text.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/index.d.ts +2 -0
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/toast.d.ts +30 -0
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -0
- package/lib/typescript/src/components/wizard-steps/index.d.ts +2 -0
- package/lib/typescript/src/components/wizard-steps/index.d.ts.map +1 -0
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts +11 -0
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +31 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/internal/glyphs.d.ts +12 -0
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -0
- package/lib/typescript/src/internal/icon.d.ts +9 -0
- package/lib/typescript/src/internal/icon.d.ts.map +1 -0
- package/lib/typescript/src/internal/overlay.d.ts +16 -0
- package/lib/typescript/src/internal/overlay.d.ts.map +1 -0
- package/lib/typescript/src/internal/pressable-base.d.ts +13 -0
- package/lib/typescript/src/internal/pressable-base.d.ts.map +1 -0
- package/lib/typescript/src/internal/use-reduced-motion.d.ts +3 -0
- package/lib/typescript/src/internal/use-reduced-motion.d.ts.map +1 -0
- package/lib/typescript/src/sortable/index.d.ts +4 -0
- package/lib/typescript/src/sortable/index.d.ts.map +1 -0
- package/lib/typescript/src/sortable/move.d.ts +3 -0
- package/lib/typescript/src/sortable/move.d.ts.map +1 -0
- package/lib/typescript/src/sortable/sortable-grid.d.ts +37 -0
- package/lib/typescript/src/sortable/sortable-grid.d.ts.map +1 -0
- package/lib/typescript/src/sortable/sortable-list.d.ts +5 -0
- package/lib/typescript/src/sortable/sortable-list.d.ts.map +1 -0
- package/lib/typescript/src/sortable.d.ts +4 -0
- package/lib/typescript/src/sortable.d.ts.map +1 -0
- package/lib/typescript/src/theme/create-theme.d.ts +8 -0
- package/lib/typescript/src/theme/create-theme.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme-provider.d.ts +13 -0
- package/lib/typescript/src/theme/theme-provider.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens.d.ts +4 -0
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +90 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/color.d.ts +5 -0
- package/lib/typescript/src/utils/color.d.ts.map +1 -0
- package/lib/typescript/src/utils/styles.d.ts +13 -0
- package/lib/typescript/src/utils/styles.d.ts.map +1 -0
- package/package.json +109 -3
- package/src/blocks/brand-profile-card/brand-profile-card.tsx +87 -0
- package/src/blocks/brand-profile-card/index.ts +4 -0
- package/src/blocks/claim-row/claim-row.tsx +112 -0
- package/src/blocks/claim-row/index.ts +6 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +119 -0
- package/src/blocks/color-swatch-picker/index.ts +5 -0
- package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +140 -0
- package/src/blocks/copy-variant-picker/index.ts +5 -0
- package/src/blocks/credit-wallet/credit-wallet.tsx +105 -0
- package/src/blocks/credit-wallet/index.ts +1 -0
- package/src/blocks/image-grid/image-grid.tsx +279 -0
- package/src/blocks/image-grid/index.ts +1 -0
- package/src/blocks/index.tsx +19 -0
- package/src/blocks/internal/card.tsx +42 -0
- package/src/blocks/internal/format.ts +22 -0
- package/src/blocks/invoice-row/index.ts +5 -0
- package/src/blocks/invoice-row/invoice-row.tsx +122 -0
- package/src/blocks/logo-candidate-grid/index.ts +5 -0
- package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +129 -0
- package/src/blocks/oauth-buttons/index.ts +5 -0
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +109 -0
- package/src/blocks/option-editor/index.ts +5 -0
- package/src/blocks/option-editor/option-editor.tsx +135 -0
- package/src/blocks/order-card/index.ts +11 -0
- package/src/blocks/order-card/order-card.tsx +184 -0
- package/src/blocks/plan-card/index.ts +1 -0
- package/src/blocks/plan-card/plan-card.tsx +147 -0
- package/src/blocks/product-list-empty/index.ts +5 -0
- package/src/blocks/product-list-empty/product-list-empty.tsx +144 -0
- package/src/blocks/review-row/index.ts +8 -0
- package/src/blocks/review-row/review-row.tsx +256 -0
- package/src/blocks/sales-chart/index.ts +5 -0
- package/src/blocks/sales-chart/sales-chart.tsx +120 -0
- package/src/blocks/service-state-banner/index.ts +5 -0
- package/src/blocks/service-state-banner/service-state-banner.tsx +66 -0
- package/src/blocks/shipping-tracking-row/index.ts +5 -0
- package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +93 -0
- package/src/blocks/site-preview-frame/index.ts +5 -0
- package/src/blocks/site-preview-frame/site-preview-frame.tsx +121 -0
- package/src/blocks/stat-card/index.ts +1 -0
- package/src/blocks/stat-card/stat-card.tsx +77 -0
- package/src/blocks/step-screen/index.ts +5 -0
- package/src/blocks/step-screen/step-screen.tsx +137 -0
- package/src/blocks/supply-item-card/index.ts +6 -0
- package/src/blocks/supply-item-card/supply-item-card.tsx +145 -0
- package/src/charts/index.ts +2 -0
- package/src/charts/line-chart.tsx +177 -0
- package/src/charts/scale.ts +49 -0
- package/src/charts/sparkline.tsx +64 -0
- package/src/charts/summary.ts +11 -0
- package/src/charts.tsx +2 -0
- package/src/components/button/button.tsx +119 -0
- package/src/components/button/index.ts +6 -0
- package/src/components/checkbox/checkbox.tsx +79 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/chip.tsx +73 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/chip-group/chip-group.tsx +86 -0
- package/src/components/chip-group/index.ts +5 -0
- package/src/components/dialog/dialog.tsx +131 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/divider/divider.tsx +26 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/empty-state/empty-state.tsx +152 -0
- package/src/components/empty-state/index.ts +5 -0
- package/src/components/field/field.tsx +151 -0
- package/src/components/field/index.ts +1 -0
- package/src/components/list-row/index.ts +1 -0
- package/src/components/list-row/list-row.tsx +115 -0
- package/src/components/photo/index.ts +1 -0
- package/src/components/photo/photo.tsx +87 -0
- package/src/components/price/index.ts +1 -0
- package/src/components/price/price.tsx +84 -0
- package/src/components/search-field/index.ts +1 -0
- package/src/components/search-field/search-field.tsx +46 -0
- package/src/components/segmented-tabs/index.ts +5 -0
- package/src/components/segmented-tabs/segmented-tabs.tsx +81 -0
- package/src/components/sheet/index.ts +1 -0
- package/src/components/sheet/sheet.tsx +121 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/skeleton.tsx +73 -0
- package/src/components/status-badge/index.ts +5 -0
- package/src/components/status-badge/status-badge.tsx +54 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/switch.tsx +26 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.tsx +54 -0
- package/src/components/toast/index.ts +9 -0
- package/src/components/toast/toast.tsx +248 -0
- package/src/components/wizard-steps/index.ts +1 -0
- package/src/components/wizard-steps/wizard-steps.tsx +54 -0
- package/src/index.tsx +56 -0
- package/src/internal/glyphs.tsx +158 -0
- package/src/internal/icon.tsx +10 -0
- package/src/internal/overlay.tsx +59 -0
- package/src/internal/pressable-base.tsx +55 -0
- package/src/internal/use-reduced-motion.ts +32 -0
- package/src/sortable/index.ts +8 -0
- package/src/sortable/move.ts +19 -0
- package/src/sortable/sortable-grid.tsx +97 -0
- package/src/sortable/sortable-list.tsx +11 -0
- package/src/sortable.tsx +3 -0
- package/src/theme/create-theme.ts +67 -0
- package/src/theme/theme-provider.tsx +37 -0
- package/src/theme/tokens.ts +91 -0
- package/src/types/index.ts +80 -0
- package/src/utils/color.ts +47 -0
- package/src/utils/styles.ts +30 -0
- package/README.md +0 -3
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Animated, Modal, Text, View } from 'react-native';
|
|
2
|
+
import { Backdrop, useOverlayTransition } from '../../internal/overlay';
|
|
3
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
4
|
+
import { makeStyles } from '../../utils/styles';
|
|
5
|
+
import { Button } from '../button/button';
|
|
6
|
+
import { ToastHost } from '../toast/toast';
|
|
7
|
+
|
|
8
|
+
export type DialogProps = {
|
|
9
|
+
open: boolean;
|
|
10
|
+
onOpenChange: (open: boolean) => void;
|
|
11
|
+
title: string;
|
|
12
|
+
/** 확인을 눌렀을 때. 닫는 것은 부모가 onOpenChange로 정한다 */
|
|
13
|
+
onConfirm: () => void;
|
|
14
|
+
/** 기본 '확인' */
|
|
15
|
+
confirmLabel?: string;
|
|
16
|
+
/** 기본 '취소' */
|
|
17
|
+
cancelLabel?: string;
|
|
18
|
+
/** 되돌릴 수 없는 작업이면 확인 버튼을 destructive로 */
|
|
19
|
+
destructive?: boolean;
|
|
20
|
+
/** 확인 버튼을 로딩 상태로 */
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
/** false면 배경 · 뒤로가기로 닫히지 않는다. 기본 true */
|
|
23
|
+
dismissible?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const useStyles = makeStyles((t) => ({
|
|
27
|
+
root: { flex: 1, justifyContent: 'center', padding: t.space[6] },
|
|
28
|
+
panel: {
|
|
29
|
+
alignSelf: 'center',
|
|
30
|
+
width: '100%',
|
|
31
|
+
maxWidth: 360,
|
|
32
|
+
paddingTop: 28,
|
|
33
|
+
paddingHorizontal: t.space[5],
|
|
34
|
+
paddingBottom: t.space[5],
|
|
35
|
+
gap: t.space[5],
|
|
36
|
+
borderRadius: 16,
|
|
37
|
+
backgroundColor: t.colors.background,
|
|
38
|
+
boxShadow: t.shadow.md,
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
fontFamily: t.fontFamily,
|
|
42
|
+
fontSize: 18,
|
|
43
|
+
lineHeight: 26,
|
|
44
|
+
fontWeight: '700',
|
|
45
|
+
textAlign: 'center',
|
|
46
|
+
color: t.colors.foreground,
|
|
47
|
+
},
|
|
48
|
+
actions: { flexDirection: 'row', gap: t.space[2] },
|
|
49
|
+
action: { flex: 1, borderRadius: t.radius.lg },
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
/** 확인 · 취소를 묻는 대화상자. 제목 한 줄로 무엇을 하는지 말한다 */
|
|
53
|
+
export function Dialog({
|
|
54
|
+
open,
|
|
55
|
+
onOpenChange,
|
|
56
|
+
title,
|
|
57
|
+
onConfirm,
|
|
58
|
+
confirmLabel = '확인',
|
|
59
|
+
cancelLabel = '취소',
|
|
60
|
+
destructive = false,
|
|
61
|
+
loading = false,
|
|
62
|
+
dismissible = true,
|
|
63
|
+
}: DialogProps) {
|
|
64
|
+
const t = useTheme();
|
|
65
|
+
const s = useStyles();
|
|
66
|
+
const { mounted, progress } = useOverlayTransition(open);
|
|
67
|
+
|
|
68
|
+
const close = () => {
|
|
69
|
+
if (dismissible && !loading) onOpenChange(false);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<Modal
|
|
74
|
+
visible={mounted}
|
|
75
|
+
transparent
|
|
76
|
+
animationType="none"
|
|
77
|
+
statusBarTranslucent
|
|
78
|
+
navigationBarTranslucent
|
|
79
|
+
onRequestClose={close}
|
|
80
|
+
>
|
|
81
|
+
<Backdrop progress={progress} onPress={close} label={cancelLabel} />
|
|
82
|
+
<View pointerEvents="box-none" style={s.root}>
|
|
83
|
+
<Animated.View
|
|
84
|
+
accessibilityViewIsModal
|
|
85
|
+
accessibilityRole="alert"
|
|
86
|
+
style={[
|
|
87
|
+
s.panel,
|
|
88
|
+
{
|
|
89
|
+
opacity: progress,
|
|
90
|
+
transform: [
|
|
91
|
+
{
|
|
92
|
+
scale: progress.interpolate({
|
|
93
|
+
inputRange: [0, 1],
|
|
94
|
+
outputRange: [0.96, 1],
|
|
95
|
+
}),
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
]}
|
|
100
|
+
>
|
|
101
|
+
<Text
|
|
102
|
+
accessibilityRole="header"
|
|
103
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
104
|
+
style={s.title}
|
|
105
|
+
>
|
|
106
|
+
{title}
|
|
107
|
+
</Text>
|
|
108
|
+
<View style={s.actions}>
|
|
109
|
+
<Button
|
|
110
|
+
variant="secondary"
|
|
111
|
+
style={s.action}
|
|
112
|
+
disabled={loading}
|
|
113
|
+
onPress={() => onOpenChange(false)}
|
|
114
|
+
>
|
|
115
|
+
{cancelLabel}
|
|
116
|
+
</Button>
|
|
117
|
+
<Button
|
|
118
|
+
variant={destructive ? 'destructive' : 'solid'}
|
|
119
|
+
style={s.action}
|
|
120
|
+
loading={loading}
|
|
121
|
+
onPress={onConfirm}
|
|
122
|
+
>
|
|
123
|
+
{confirmLabel}
|
|
124
|
+
</Button>
|
|
125
|
+
</View>
|
|
126
|
+
</Animated.View>
|
|
127
|
+
</View>
|
|
128
|
+
<ToastHost />
|
|
129
|
+
</Modal>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dialog, type DialogProps } from './dialog';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
3
|
+
|
|
4
|
+
export type DividerProps = {
|
|
5
|
+
/** 왼쪽 들여쓰기(px). ListRow의 leading 뒤부터 긋을 때 쓴다 */
|
|
6
|
+
inset?: number;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/** 가로 구분선. 목록에서는 FlatList의 ItemSeparatorComponent로 쓴다 */
|
|
11
|
+
export function Divider({ inset = 0, style }: DividerProps) {
|
|
12
|
+
const t = useTheme();
|
|
13
|
+
return (
|
|
14
|
+
<View
|
|
15
|
+
accessible={false}
|
|
16
|
+
style={[
|
|
17
|
+
{
|
|
18
|
+
height: StyleSheet.hairlineWidth,
|
|
19
|
+
marginLeft: inset,
|
|
20
|
+
backgroundColor: t.colors.border,
|
|
21
|
+
},
|
|
22
|
+
style,
|
|
23
|
+
]}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Divider, type DividerProps } from './divider';
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { Text, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { AlertGlyph, SearchGlyph } from '../../internal/glyphs';
|
|
3
|
+
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
4
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
5
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
6
|
+
import { makeStyles } from '../../utils/styles';
|
|
7
|
+
import { Button } from '../button/button';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* - default: 목록 전체가 비었을 때
|
|
11
|
+
* - search: 검색 · 필터 결과가 없을 때 (결과 변화를 화면낭독기에 알림)
|
|
12
|
+
* - error: 불러오지 못했을 때
|
|
13
|
+
* - section: 화면 안 한 섹션이 비었을 때 (한 줄)
|
|
14
|
+
*/
|
|
15
|
+
export type EmptyStateVariant = 'default' | 'search' | 'error' | 'section';
|
|
16
|
+
|
|
17
|
+
export type EmptyStateProps = {
|
|
18
|
+
/** 상태를 말하는 한 줄. 예) '아직 주문이 없어요' */
|
|
19
|
+
title: string;
|
|
20
|
+
variant?: EmptyStateVariant;
|
|
21
|
+
/** 기본: search는 검색, error는 경고 아이콘 */
|
|
22
|
+
icon?: IconSlot;
|
|
23
|
+
/** 다음 행동 하나. section에서는 텍스트 링크로 보인다 */
|
|
24
|
+
action?: { label: string; onPress: () => void; icon?: IconSlot };
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const ICON = { screen: 40, section: 20 };
|
|
29
|
+
|
|
30
|
+
const useStyles = makeStyles((t) => ({
|
|
31
|
+
// 시각 중심을 맞추려고 아래쪽을 더 띄운다
|
|
32
|
+
screen: {
|
|
33
|
+
flexGrow: 1,
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
paddingHorizontal: t.space[8],
|
|
37
|
+
paddingTop: t.space[8],
|
|
38
|
+
paddingBottom: t.space[8] + t.space[12] * 2,
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
...t.typography.bodyLg,
|
|
42
|
+
marginTop: t.space[4],
|
|
43
|
+
fontFamily: t.fontFamily,
|
|
44
|
+
fontWeight: '600',
|
|
45
|
+
color: t.colors.foreground,
|
|
46
|
+
textAlign: 'center',
|
|
47
|
+
},
|
|
48
|
+
button: { marginTop: t.space[5], height: 48, paddingHorizontal: t.space[5] },
|
|
49
|
+
section: {
|
|
50
|
+
flexDirection: 'row',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
gap: t.space[3],
|
|
53
|
+
minHeight: 52,
|
|
54
|
+
paddingLeft: t.space[4],
|
|
55
|
+
paddingRight: t.space[1],
|
|
56
|
+
},
|
|
57
|
+
sectionTitle: {
|
|
58
|
+
...t.typography.body,
|
|
59
|
+
flex: 1,
|
|
60
|
+
fontSize: 14,
|
|
61
|
+
fontFamily: t.fontFamily,
|
|
62
|
+
color: t.colors.mutedForeground,
|
|
63
|
+
},
|
|
64
|
+
link: {
|
|
65
|
+
minHeight: t.minTouchSize,
|
|
66
|
+
justifyContent: 'center',
|
|
67
|
+
paddingHorizontal: t.space[3],
|
|
68
|
+
},
|
|
69
|
+
linkLabel: {
|
|
70
|
+
fontSize: 14,
|
|
71
|
+
fontWeight: '600',
|
|
72
|
+
fontFamily: t.fontFamily,
|
|
73
|
+
color: t.colors.foreground,
|
|
74
|
+
},
|
|
75
|
+
}));
|
|
76
|
+
|
|
77
|
+
/** 비어 있거나 불러오지 못한 상태. 설명 문단 없이 아이콘 · 한 줄 · 행동 하나로 보여준다 */
|
|
78
|
+
export function EmptyState({
|
|
79
|
+
title,
|
|
80
|
+
variant = 'default',
|
|
81
|
+
icon,
|
|
82
|
+
action,
|
|
83
|
+
style,
|
|
84
|
+
}: EmptyStateProps) {
|
|
85
|
+
const t = useTheme();
|
|
86
|
+
const s = useStyles();
|
|
87
|
+
const slot =
|
|
88
|
+
icon ??
|
|
89
|
+
(variant === 'search'
|
|
90
|
+
? SearchGlyph
|
|
91
|
+
: variant === 'error'
|
|
92
|
+
? AlertGlyph
|
|
93
|
+
: undefined);
|
|
94
|
+
|
|
95
|
+
if (variant === 'section') {
|
|
96
|
+
return (
|
|
97
|
+
<View style={[s.section, style]}>
|
|
98
|
+
{slot
|
|
99
|
+
? renderIcon(slot, {
|
|
100
|
+
color: t.colors.mutedForeground,
|
|
101
|
+
size: ICON.section,
|
|
102
|
+
})
|
|
103
|
+
: null}
|
|
104
|
+
<Text maxFontSizeMultiplier={t.maxFontScale} style={s.sectionTitle}>
|
|
105
|
+
{title}
|
|
106
|
+
</Text>
|
|
107
|
+
{action ? (
|
|
108
|
+
<PressableBase
|
|
109
|
+
accessibilityRole="link"
|
|
110
|
+
onPress={action.onPress}
|
|
111
|
+
style={s.link}
|
|
112
|
+
>
|
|
113
|
+
<Text maxFontSizeMultiplier={t.maxFontScale} style={s.linkLabel}>
|
|
114
|
+
{action.label}
|
|
115
|
+
</Text>
|
|
116
|
+
</PressableBase>
|
|
117
|
+
) : null}
|
|
118
|
+
</View>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<View
|
|
124
|
+
accessibilityRole={variant === 'error' ? 'alert' : undefined}
|
|
125
|
+
accessibilityLiveRegion={variant === 'default' ? 'none' : 'polite'}
|
|
126
|
+
style={[s.screen, style]}
|
|
127
|
+
>
|
|
128
|
+
{slot
|
|
129
|
+
? renderIcon(slot, {
|
|
130
|
+
color: t.colors.mutedForeground,
|
|
131
|
+
size: ICON.screen,
|
|
132
|
+
})
|
|
133
|
+
: null}
|
|
134
|
+
<Text
|
|
135
|
+
accessibilityRole="header"
|
|
136
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
137
|
+
style={s.title}
|
|
138
|
+
>
|
|
139
|
+
{title}
|
|
140
|
+
</Text>
|
|
141
|
+
{action ? (
|
|
142
|
+
<Button
|
|
143
|
+
leftIcon={action.icon}
|
|
144
|
+
style={s.button}
|
|
145
|
+
onPress={action.onPress}
|
|
146
|
+
>
|
|
147
|
+
{action.label}
|
|
148
|
+
</Button>
|
|
149
|
+
) : null}
|
|
150
|
+
</View>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { useState, type ComponentRef, type Ref } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Text,
|
|
4
|
+
TextInput,
|
|
5
|
+
View,
|
|
6
|
+
type StyleProp,
|
|
7
|
+
type TextInputProps,
|
|
8
|
+
type ViewStyle,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { AlertGlyph } from '../../internal/glyphs';
|
|
11
|
+
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
12
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
13
|
+
import { makeStyles } from '../../utils/styles';
|
|
14
|
+
|
|
15
|
+
export type FieldProps = Omit<TextInputProps, 'style'> & {
|
|
16
|
+
ref?: Ref<ComponentRef<typeof TextInput>>;
|
|
17
|
+
label?: string;
|
|
18
|
+
/** 있으면 오류 상태로 표시하고 입력칸 아래에 보여준다 */
|
|
19
|
+
error?: string;
|
|
20
|
+
leading?: IconSlot;
|
|
21
|
+
trailing?: IconSlot;
|
|
22
|
+
/** 바깥 컨테이너 스타일 */
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const useStyles = makeStyles((t) => ({
|
|
27
|
+
root: { gap: t.space[2] },
|
|
28
|
+
label: {
|
|
29
|
+
fontFamily: t.fontFamily,
|
|
30
|
+
fontSize: 14,
|
|
31
|
+
lineHeight: 20,
|
|
32
|
+
fontWeight: '600',
|
|
33
|
+
color: t.colors.foreground,
|
|
34
|
+
},
|
|
35
|
+
frame: {
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
gap: t.space[2],
|
|
39
|
+
height: 52,
|
|
40
|
+
paddingHorizontal: t.space[4],
|
|
41
|
+
borderRadius: 10,
|
|
42
|
+
borderWidth: 1,
|
|
43
|
+
borderColor: t.colors.input,
|
|
44
|
+
backgroundColor: t.colors.background,
|
|
45
|
+
},
|
|
46
|
+
// 테두리가 두꺼워져도 글자가 밀리지 않게 padding을 줄인다
|
|
47
|
+
focused: {
|
|
48
|
+
borderWidth: 2,
|
|
49
|
+
paddingHorizontal: t.space[4] - 1,
|
|
50
|
+
borderColor: t.colors.primary,
|
|
51
|
+
},
|
|
52
|
+
invalid: {
|
|
53
|
+
borderWidth: 2,
|
|
54
|
+
paddingHorizontal: t.space[4] - 1,
|
|
55
|
+
borderColor: t.colors.destructive,
|
|
56
|
+
},
|
|
57
|
+
disabled: { opacity: t.opacity.disabled, backgroundColor: t.colors.muted },
|
|
58
|
+
input: {
|
|
59
|
+
flex: 1,
|
|
60
|
+
alignSelf: 'stretch',
|
|
61
|
+
paddingVertical: 0,
|
|
62
|
+
fontFamily: t.fontFamily,
|
|
63
|
+
fontSize: 16,
|
|
64
|
+
color: t.colors.foreground,
|
|
65
|
+
},
|
|
66
|
+
error: {
|
|
67
|
+
fontFamily: t.fontFamily,
|
|
68
|
+
fontSize: 13,
|
|
69
|
+
lineHeight: 18,
|
|
70
|
+
paddingLeft: t.space[1],
|
|
71
|
+
color: t.colors.destructive,
|
|
72
|
+
},
|
|
73
|
+
errorLabel: { color: t.colors.destructive },
|
|
74
|
+
}));
|
|
75
|
+
|
|
76
|
+
export function Field({
|
|
77
|
+
label,
|
|
78
|
+
error,
|
|
79
|
+
leading,
|
|
80
|
+
trailing,
|
|
81
|
+
style,
|
|
82
|
+
editable = true,
|
|
83
|
+
onFocus,
|
|
84
|
+
onBlur,
|
|
85
|
+
...input
|
|
86
|
+
}: FieldProps) {
|
|
87
|
+
const t = useTheme();
|
|
88
|
+
const s = useStyles();
|
|
89
|
+
const [focused, setFocused] = useState(false);
|
|
90
|
+
const icon = { color: t.colors.mutedForeground, size: t.iconSize.md };
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<View style={[s.root, style]}>
|
|
94
|
+
{label ? (
|
|
95
|
+
<Text
|
|
96
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
97
|
+
style={[s.label, !!error && s.errorLabel]}
|
|
98
|
+
>
|
|
99
|
+
{label}
|
|
100
|
+
</Text>
|
|
101
|
+
) : null}
|
|
102
|
+
<View
|
|
103
|
+
style={[
|
|
104
|
+
s.frame,
|
|
105
|
+
focused && s.focused,
|
|
106
|
+
!!error && s.invalid,
|
|
107
|
+
!editable && s.disabled,
|
|
108
|
+
]}
|
|
109
|
+
>
|
|
110
|
+
{leading ? renderIcon(leading, icon) : null}
|
|
111
|
+
<TextInput
|
|
112
|
+
placeholderTextColor={t.colors.mutedForeground}
|
|
113
|
+
selectionColor={t.colors.ring}
|
|
114
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
115
|
+
accessibilityLabel={label}
|
|
116
|
+
accessibilityHint={error}
|
|
117
|
+
{...input}
|
|
118
|
+
editable={editable}
|
|
119
|
+
style={s.input}
|
|
120
|
+
onFocus={(e) => {
|
|
121
|
+
setFocused(true);
|
|
122
|
+
onFocus?.(e);
|
|
123
|
+
}}
|
|
124
|
+
onBlur={(e) => {
|
|
125
|
+
setFocused(false);
|
|
126
|
+
onBlur?.(e);
|
|
127
|
+
}}
|
|
128
|
+
/>
|
|
129
|
+
{error ? (
|
|
130
|
+
<AlertGlyph
|
|
131
|
+
filled
|
|
132
|
+
color={t.colors.destructive}
|
|
133
|
+
onColor={t.colors.destructiveForeground}
|
|
134
|
+
size={t.iconSize.md}
|
|
135
|
+
/>
|
|
136
|
+
) : trailing ? (
|
|
137
|
+
renderIcon(trailing, icon)
|
|
138
|
+
) : null}
|
|
139
|
+
</View>
|
|
140
|
+
{error ? (
|
|
141
|
+
<Text
|
|
142
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
143
|
+
accessibilityLiveRegion="polite"
|
|
144
|
+
style={s.error}
|
|
145
|
+
>
|
|
146
|
+
{error}
|
|
147
|
+
</Text>
|
|
148
|
+
) : null}
|
|
149
|
+
</View>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Field, type FieldProps } from './field';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListRow, type ListRowProps } from './list-row';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Text, View } from 'react-native';
|
|
2
|
+
import { ChevronGlyph } from '../../internal/glyphs';
|
|
3
|
+
import { renderIcon, type IconSlot } from '../../internal/icon';
|
|
4
|
+
import {
|
|
5
|
+
PressableBase,
|
|
6
|
+
type PressableBaseProps,
|
|
7
|
+
} from '../../internal/pressable-base';
|
|
8
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
9
|
+
import { makeStyles } from '../../utils/styles';
|
|
10
|
+
|
|
11
|
+
export type ListRowProps = Omit<
|
|
12
|
+
PressableBaseProps,
|
|
13
|
+
'children' | 'touchHeight'
|
|
14
|
+
> & {
|
|
15
|
+
title: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
leading?: IconSlot;
|
|
18
|
+
/** 오른쪽 내용 (Switch, StatusBadge, 값 텍스트 등) */
|
|
19
|
+
trailing?: IconSlot;
|
|
20
|
+
/** 오른쪽 화살표. 기본은 onPress가 있을 때 true */
|
|
21
|
+
chevron?: boolean;
|
|
22
|
+
/** 제목 줄 수. 기본 1 */
|
|
23
|
+
titleLines?: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const useStyles = makeStyles((t) => ({
|
|
27
|
+
row: {
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
gap: t.space[3],
|
|
31
|
+
minHeight: Math.max(t.minTouchSize, 56),
|
|
32
|
+
paddingVertical: t.space[3],
|
|
33
|
+
paddingHorizontal: t.space[4],
|
|
34
|
+
backgroundColor: t.colors.background,
|
|
35
|
+
},
|
|
36
|
+
pressed: { backgroundColor: t.colors.muted },
|
|
37
|
+
body: { flex: 1, gap: 2 },
|
|
38
|
+
title: {
|
|
39
|
+
...t.typography.body,
|
|
40
|
+
fontFamily: t.fontFamily,
|
|
41
|
+
color: t.colors.foreground,
|
|
42
|
+
},
|
|
43
|
+
description: {
|
|
44
|
+
...t.typography.caption,
|
|
45
|
+
fontFamily: t.fontFamily,
|
|
46
|
+
color: t.colors.mutedForeground,
|
|
47
|
+
},
|
|
48
|
+
trailing: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
49
|
+
}));
|
|
50
|
+
|
|
51
|
+
export function ListRow({
|
|
52
|
+
title,
|
|
53
|
+
description,
|
|
54
|
+
leading,
|
|
55
|
+
trailing,
|
|
56
|
+
chevron,
|
|
57
|
+
titleLines = 1,
|
|
58
|
+
onPress,
|
|
59
|
+
style,
|
|
60
|
+
...rest
|
|
61
|
+
}: ListRowProps) {
|
|
62
|
+
const t = useTheme();
|
|
63
|
+
const s = useStyles();
|
|
64
|
+
const icon = { color: t.colors.mutedForeground, size: t.iconSize.md };
|
|
65
|
+
const showChevron = chevron ?? !!onPress;
|
|
66
|
+
|
|
67
|
+
const content = (
|
|
68
|
+
<>
|
|
69
|
+
{leading ? renderIcon(leading, icon) : null}
|
|
70
|
+
<View style={s.body}>
|
|
71
|
+
<Text
|
|
72
|
+
numberOfLines={titleLines}
|
|
73
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
74
|
+
style={s.title}
|
|
75
|
+
>
|
|
76
|
+
{title}
|
|
77
|
+
</Text>
|
|
78
|
+
{description ? (
|
|
79
|
+
<Text
|
|
80
|
+
numberOfLines={2}
|
|
81
|
+
maxFontSizeMultiplier={t.maxFontScale}
|
|
82
|
+
style={s.description}
|
|
83
|
+
>
|
|
84
|
+
{description}
|
|
85
|
+
</Text>
|
|
86
|
+
) : null}
|
|
87
|
+
</View>
|
|
88
|
+
{trailing || showChevron ? (
|
|
89
|
+
<View style={s.trailing}>
|
|
90
|
+
{trailing ? renderIcon(trailing, icon) : null}
|
|
91
|
+
{showChevron ? (
|
|
92
|
+
<ChevronGlyph
|
|
93
|
+
color={t.colors.mutedForeground}
|
|
94
|
+
size={t.iconSize.sm}
|
|
95
|
+
/>
|
|
96
|
+
) : null}
|
|
97
|
+
</View>
|
|
98
|
+
) : null}
|
|
99
|
+
</>
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
if (!onPress) {
|
|
103
|
+
return <View style={[s.row, style]}>{content}</View>;
|
|
104
|
+
}
|
|
105
|
+
return (
|
|
106
|
+
<PressableBase
|
|
107
|
+
{...rest}
|
|
108
|
+
onPress={onPress}
|
|
109
|
+
pressedStyle={s.pressed}
|
|
110
|
+
style={[s.row, style]}
|
|
111
|
+
>
|
|
112
|
+
{content}
|
|
113
|
+
</PressableBase>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Photo, type PhotoProps } from './photo';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useState, type ReactNode } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Image,
|
|
4
|
+
StyleSheet,
|
|
5
|
+
View,
|
|
6
|
+
type ImageProps,
|
|
7
|
+
type ImageSourcePropType,
|
|
8
|
+
type StyleProp,
|
|
9
|
+
type ViewStyle,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
12
|
+
|
|
13
|
+
export type PhotoProps = Omit<ImageProps, 'source' | 'style'> & {
|
|
14
|
+
source: ImageSourcePropType;
|
|
15
|
+
/** 가로 / 세로. 기본 1 */
|
|
16
|
+
aspectRatio?: number;
|
|
17
|
+
/** 기본 radius.md */
|
|
18
|
+
radius?: number;
|
|
19
|
+
/** 불러오지 못했을 때 보여줄 내용 */
|
|
20
|
+
fallback?: ReactNode;
|
|
21
|
+
style?: StyleProp<ViewStyle>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function sourceKey(source: ImageSourcePropType): string {
|
|
25
|
+
if (typeof source === 'number') return String(source);
|
|
26
|
+
if (Array.isArray(source)) return source.map((s) => s.uri ?? '').join('|');
|
|
27
|
+
return (source as { uri?: string }).uri ?? '';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** 로딩 중에는 muted 배경, 실패하면 fallback을 보여주는 이미지 */
|
|
31
|
+
export function Photo(props: PhotoProps) {
|
|
32
|
+
// 주소가 바뀌면 로딩 · 실패 상태를 처음부터 다시 잡는다.
|
|
33
|
+
return <PhotoInner key={sourceKey(props.source)} {...props} />;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function PhotoInner({
|
|
37
|
+
source,
|
|
38
|
+
aspectRatio = 1,
|
|
39
|
+
radius,
|
|
40
|
+
fallback,
|
|
41
|
+
style,
|
|
42
|
+
onLoad,
|
|
43
|
+
onError,
|
|
44
|
+
...rest
|
|
45
|
+
}: PhotoProps) {
|
|
46
|
+
const t = useTheme();
|
|
47
|
+
const [status, setStatus] = useState<'loading' | 'loaded' | 'error'>(
|
|
48
|
+
'loading'
|
|
49
|
+
);
|
|
50
|
+
return (
|
|
51
|
+
<View
|
|
52
|
+
style={[
|
|
53
|
+
styles.frame,
|
|
54
|
+
{
|
|
55
|
+
aspectRatio,
|
|
56
|
+
borderRadius: radius ?? t.radius.md,
|
|
57
|
+
backgroundColor: t.colors.muted,
|
|
58
|
+
},
|
|
59
|
+
style,
|
|
60
|
+
]}
|
|
61
|
+
>
|
|
62
|
+
{status === 'error' ? (
|
|
63
|
+
<View style={styles.center}>{fallback}</View>
|
|
64
|
+
) : (
|
|
65
|
+
<Image
|
|
66
|
+
{...rest}
|
|
67
|
+
source={source}
|
|
68
|
+
resizeMode={rest.resizeMode ?? 'cover'}
|
|
69
|
+
style={StyleSheet.absoluteFill}
|
|
70
|
+
onLoad={(e) => {
|
|
71
|
+
setStatus('loaded');
|
|
72
|
+
onLoad?.(e);
|
|
73
|
+
}}
|
|
74
|
+
onError={(e) => {
|
|
75
|
+
setStatus('error');
|
|
76
|
+
onError?.(e);
|
|
77
|
+
}}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
</View>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const styles = StyleSheet.create({
|
|
85
|
+
frame: { width: '100%', overflow: 'hidden' },
|
|
86
|
+
center: { flex: 1, alignItems: 'center', justifyContent: 'center' },
|
|
87
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { formatPrice, Price, type PriceProps } from './price';
|