@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,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
View,
|
|
3
|
+
type ImageSourcePropType,
|
|
4
|
+
type StyleProp,
|
|
5
|
+
type ViewStyle,
|
|
6
|
+
} from 'react-native';
|
|
7
|
+
import { Button } from '../../components/button/button';
|
|
8
|
+
import { Photo } from '../../components/photo/photo';
|
|
9
|
+
import { formatPrice } from '../../components/price/price';
|
|
10
|
+
import { Text } from '../../components/text/text';
|
|
11
|
+
import { CloseGlyph, PlusGlyph } from '../../internal/glyphs';
|
|
12
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
13
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
14
|
+
import { makeStyles } from '../../utils/styles';
|
|
15
|
+
|
|
16
|
+
export type SampleProduct = {
|
|
17
|
+
name: string;
|
|
18
|
+
price: number;
|
|
19
|
+
image?: ImageSourcePropType;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type ProductListEmptyProps = {
|
|
23
|
+
/** 첫 상품 등록 */
|
|
24
|
+
onAdd: () => void;
|
|
25
|
+
/** 기본 '첫 상품 등록' */
|
|
26
|
+
addLabel?: string;
|
|
27
|
+
/** AI가 만든 초안이 있으면 예시 카드로 먼저 보여준다 */
|
|
28
|
+
sample?: SampleProduct;
|
|
29
|
+
onEditSample?: () => void;
|
|
30
|
+
/** 예시를 지우면 등록 타일로 바뀐다 (부모가 sample을 비운다) */
|
|
31
|
+
onDismissSample?: () => void;
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const useStyles = makeStyles((t) => ({
|
|
36
|
+
grid: {
|
|
37
|
+
flexDirection: 'row',
|
|
38
|
+
flexWrap: 'wrap',
|
|
39
|
+
gap: t.space[3],
|
|
40
|
+
padding: t.space[4],
|
|
41
|
+
},
|
|
42
|
+
tile: {
|
|
43
|
+
width: '47%',
|
|
44
|
+
aspectRatio: 1,
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
gap: t.space[3],
|
|
48
|
+
borderRadius: t.radius.lg,
|
|
49
|
+
borderWidth: 1.5,
|
|
50
|
+
borderStyle: 'dashed',
|
|
51
|
+
borderColor: t.colors.mutedForeground,
|
|
52
|
+
backgroundColor: t.colors.background,
|
|
53
|
+
},
|
|
54
|
+
pressed: { backgroundColor: t.colors.muted },
|
|
55
|
+
card: {
|
|
56
|
+
margin: t.space[4],
|
|
57
|
+
overflow: 'hidden',
|
|
58
|
+
borderRadius: t.radius.lg,
|
|
59
|
+
borderWidth: 1.5,
|
|
60
|
+
borderStyle: 'dashed',
|
|
61
|
+
borderColor: t.colors.mutedForeground,
|
|
62
|
+
},
|
|
63
|
+
media: { height: 180, backgroundColor: t.colors.muted },
|
|
64
|
+
badge: {
|
|
65
|
+
position: 'absolute',
|
|
66
|
+
top: t.space[3],
|
|
67
|
+
left: t.space[3],
|
|
68
|
+
paddingHorizontal: 10,
|
|
69
|
+
paddingVertical: t.space[1],
|
|
70
|
+
borderRadius: t.radius.full,
|
|
71
|
+
backgroundColor: t.colors.foreground,
|
|
72
|
+
},
|
|
73
|
+
badgeLabel: { color: t.colors.background, fontSize: 14 },
|
|
74
|
+
body: { gap: t.space[1], padding: t.space[4] },
|
|
75
|
+
actions: { flexDirection: 'row', gap: t.space[2], marginTop: t.space[3] },
|
|
76
|
+
edit: { flex: 1, height: 48 },
|
|
77
|
+
dismiss: { width: 48, height: 48, paddingHorizontal: 0 },
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
/** 상품 목록이 비었을 때: 예시 초안이 있으면 예시 카드, 없으면 등록 타일 */
|
|
81
|
+
export function ProductListEmpty({
|
|
82
|
+
onAdd,
|
|
83
|
+
addLabel = '첫 상품 등록',
|
|
84
|
+
sample,
|
|
85
|
+
onEditSample,
|
|
86
|
+
onDismissSample,
|
|
87
|
+
style,
|
|
88
|
+
}: ProductListEmptyProps) {
|
|
89
|
+
const t = useTheme();
|
|
90
|
+
const s = useStyles();
|
|
91
|
+
|
|
92
|
+
if (sample) {
|
|
93
|
+
return (
|
|
94
|
+
<View
|
|
95
|
+
style={[s.card, style]}
|
|
96
|
+
accessibilityLabel={`예시 상품, ${sample.name}, 손님에게 안 보여요`}
|
|
97
|
+
>
|
|
98
|
+
<View style={s.media}>
|
|
99
|
+
{sample.image ? (
|
|
100
|
+
<Photo source={sample.image} radius={0} style={s.media} />
|
|
101
|
+
) : null}
|
|
102
|
+
<View style={s.badge}>
|
|
103
|
+
<Text variant="caption" weight="semibold" style={s.badgeLabel}>
|
|
104
|
+
예시 · 손님에게 안 보여요
|
|
105
|
+
</Text>
|
|
106
|
+
</View>
|
|
107
|
+
</View>
|
|
108
|
+
<View style={s.body}>
|
|
109
|
+
<Text weight="semibold">{sample.name}</Text>
|
|
110
|
+
<Text weight="bold">{formatPrice(sample.price)}</Text>
|
|
111
|
+
<View style={s.actions}>
|
|
112
|
+
<Button style={s.edit} onPress={onEditSample ?? onAdd}>
|
|
113
|
+
내 상품으로 수정
|
|
114
|
+
</Button>
|
|
115
|
+
{onDismissSample ? (
|
|
116
|
+
<Button
|
|
117
|
+
variant="outline"
|
|
118
|
+
accessibilityLabel="예시 지우고 새로 등록"
|
|
119
|
+
style={s.dismiss}
|
|
120
|
+
onPress={onDismissSample}
|
|
121
|
+
>
|
|
122
|
+
<CloseGlyph color={t.colors.foreground} size={t.iconSize.sm} />
|
|
123
|
+
</Button>
|
|
124
|
+
) : null}
|
|
125
|
+
</View>
|
|
126
|
+
</View>
|
|
127
|
+
</View>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<View style={[s.grid, style]}>
|
|
133
|
+
<PressableBase
|
|
134
|
+
accessibilityLabel={`등록된 상품이 없어요. ${addLabel}`}
|
|
135
|
+
pressedStyle={s.pressed}
|
|
136
|
+
onPress={onAdd}
|
|
137
|
+
style={s.tile}
|
|
138
|
+
>
|
|
139
|
+
<PlusGlyph color={t.colors.foreground} size={40} />
|
|
140
|
+
<Text weight="semibold">{addLabel}</Text>
|
|
141
|
+
</PressableBase>
|
|
142
|
+
</View>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import {
|
|
2
|
+
View,
|
|
3
|
+
type ImageSourcePropType,
|
|
4
|
+
type StyleProp,
|
|
5
|
+
type ViewStyle,
|
|
6
|
+
} from 'react-native';
|
|
7
|
+
import { Button } from '../../components/button/button';
|
|
8
|
+
import { Photo } from '../../components/photo/photo';
|
|
9
|
+
import { Text } from '../../components/text/text';
|
|
10
|
+
import { PressableBase } from '../../internal/pressable-base';
|
|
11
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
12
|
+
import { makeStyles } from '../../utils/styles';
|
|
13
|
+
|
|
14
|
+
export type ReviewRowProps = {
|
|
15
|
+
/** 가린 이름. 예) '김*지' */
|
|
16
|
+
author: string;
|
|
17
|
+
/** 1~5 */
|
|
18
|
+
rating: number;
|
|
19
|
+
content: string;
|
|
20
|
+
photos?: readonly ImageSourcePropType[];
|
|
21
|
+
reply?: string;
|
|
22
|
+
/** 답글이 없을 때 '답글 달기' 버튼 */
|
|
23
|
+
onReply?: () => void;
|
|
24
|
+
/** 오른쪽 위 더보기 버튼 (답글 수정 · 숨기기 등) */
|
|
25
|
+
onMore?: () => void;
|
|
26
|
+
style?: StyleProp<ViewStyle>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type HiddenReviewsRowProps = {
|
|
30
|
+
count: number;
|
|
31
|
+
onShow: () => void;
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const useStyles = makeStyles((t) => ({
|
|
36
|
+
root: { gap: 10, paddingVertical: t.space[4] },
|
|
37
|
+
head: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
38
|
+
stars: { letterSpacing: 1 },
|
|
39
|
+
author: { flexShrink: 1, fontSize: 14 },
|
|
40
|
+
more: {
|
|
41
|
+
width: 44,
|
|
42
|
+
height: 44,
|
|
43
|
+
marginVertical: -t.space[3],
|
|
44
|
+
marginLeft: 'auto',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
},
|
|
48
|
+
dots: { flexDirection: 'row', gap: 3 },
|
|
49
|
+
dot: { width: 3.5, height: 3.5, borderRadius: 2 },
|
|
50
|
+
photos: { flexDirection: 'row', gap: t.space[2] },
|
|
51
|
+
photo: { width: 72 },
|
|
52
|
+
reply: {
|
|
53
|
+
gap: t.space[1],
|
|
54
|
+
marginLeft: t.space[3],
|
|
55
|
+
paddingVertical: t.space[3],
|
|
56
|
+
paddingHorizontal: 14,
|
|
57
|
+
borderRadius: 10,
|
|
58
|
+
backgroundColor: t.colors.muted,
|
|
59
|
+
},
|
|
60
|
+
replyTitle: { fontSize: 13, lineHeight: 18 },
|
|
61
|
+
replyButton: { alignSelf: 'flex-start' },
|
|
62
|
+
hidden: {
|
|
63
|
+
flexDirection: 'row',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
gap: t.space[2],
|
|
66
|
+
minHeight: 52,
|
|
67
|
+
paddingLeft: 14,
|
|
68
|
+
paddingRight: t.space[2],
|
|
69
|
+
borderRadius: 10,
|
|
70
|
+
backgroundColor: t.colors.muted,
|
|
71
|
+
},
|
|
72
|
+
hiddenLabel: { flex: 1 },
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
/** 별점을 ★로 그린다. 빈 별은 border 색 */
|
|
76
|
+
function Stars({ rating, size }: { rating: number; size?: number }) {
|
|
77
|
+
const t = useTheme();
|
|
78
|
+
const s = useStyles();
|
|
79
|
+
const n = Math.max(0, Math.min(5, Math.round(rating)));
|
|
80
|
+
return (
|
|
81
|
+
<Text
|
|
82
|
+
accessibilityRole="image"
|
|
83
|
+
accessibilityLabel={`별점 ${n}점`}
|
|
84
|
+
style={[
|
|
85
|
+
s.stars,
|
|
86
|
+
{ color: t.colors.warning },
|
|
87
|
+
size ? { fontSize: size, lineHeight: size + 4 } : null,
|
|
88
|
+
]}
|
|
89
|
+
>
|
|
90
|
+
{'★'.repeat(n)}
|
|
91
|
+
<Text style={{ color: t.colors.border }}>{'★'.repeat(5 - n)}</Text>
|
|
92
|
+
</Text>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** 리뷰 한 건과 사장님 답글 */
|
|
97
|
+
export function ReviewRow({
|
|
98
|
+
author,
|
|
99
|
+
rating,
|
|
100
|
+
content,
|
|
101
|
+
photos = [],
|
|
102
|
+
reply,
|
|
103
|
+
onReply,
|
|
104
|
+
onMore,
|
|
105
|
+
style,
|
|
106
|
+
}: ReviewRowProps) {
|
|
107
|
+
const t = useTheme();
|
|
108
|
+
const s = useStyles();
|
|
109
|
+
return (
|
|
110
|
+
<View style={[s.root, style]}>
|
|
111
|
+
<View style={s.head}>
|
|
112
|
+
<Stars rating={rating} />
|
|
113
|
+
<Text weight="semibold" numberOfLines={1} style={s.author}>
|
|
114
|
+
{author}
|
|
115
|
+
</Text>
|
|
116
|
+
{onMore ? (
|
|
117
|
+
<PressableBase
|
|
118
|
+
accessibilityLabel="더보기"
|
|
119
|
+
onPress={onMore}
|
|
120
|
+
style={s.more}
|
|
121
|
+
>
|
|
122
|
+
<View style={s.dots}>
|
|
123
|
+
{[0, 1, 2].map((i) => (
|
|
124
|
+
<View
|
|
125
|
+
key={i}
|
|
126
|
+
style={[s.dot, { backgroundColor: t.colors.mutedForeground }]}
|
|
127
|
+
/>
|
|
128
|
+
))}
|
|
129
|
+
</View>
|
|
130
|
+
</PressableBase>
|
|
131
|
+
) : null}
|
|
132
|
+
</View>
|
|
133
|
+
<Text>{content}</Text>
|
|
134
|
+
{photos.length ? (
|
|
135
|
+
<View style={s.photos}>
|
|
136
|
+
{photos.slice(0, 4).map((p, i) => (
|
|
137
|
+
<View key={i} style={s.photo}>
|
|
138
|
+
<Photo
|
|
139
|
+
source={p}
|
|
140
|
+
radius={t.radius.sm}
|
|
141
|
+
accessibilityLabel={`리뷰 사진 ${i + 1}`}
|
|
142
|
+
/>
|
|
143
|
+
</View>
|
|
144
|
+
))}
|
|
145
|
+
</View>
|
|
146
|
+
) : null}
|
|
147
|
+
{reply ? (
|
|
148
|
+
<View style={s.reply}>
|
|
149
|
+
<Text weight="bold" style={s.replyTitle}>
|
|
150
|
+
사장님
|
|
151
|
+
</Text>
|
|
152
|
+
<Text>{reply}</Text>
|
|
153
|
+
</View>
|
|
154
|
+
) : onReply ? (
|
|
155
|
+
<Button
|
|
156
|
+
size="sm"
|
|
157
|
+
variant="outline"
|
|
158
|
+
onPress={onReply}
|
|
159
|
+
style={s.replyButton}
|
|
160
|
+
>
|
|
161
|
+
답글 달기
|
|
162
|
+
</Button>
|
|
163
|
+
) : null}
|
|
164
|
+
</View>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** 숨긴 리뷰를 한 줄로 접어 둔다 */
|
|
169
|
+
export function HiddenReviewsRow({
|
|
170
|
+
count,
|
|
171
|
+
onShow,
|
|
172
|
+
style,
|
|
173
|
+
}: HiddenReviewsRowProps) {
|
|
174
|
+
const s = useStyles();
|
|
175
|
+
return (
|
|
176
|
+
<View style={[s.hidden, style]}>
|
|
177
|
+
<Text style={s.hiddenLabel}>숨긴 리뷰 {count}개</Text>
|
|
178
|
+
<Button size="sm" variant="ghost" onPress={onShow}>
|
|
179
|
+
다시 보이기
|
|
180
|
+
</Button>
|
|
181
|
+
</View>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type ReviewSummaryProps = {
|
|
186
|
+
/** 평균 별점 */
|
|
187
|
+
average: number;
|
|
188
|
+
/** 5점부터 1점까지 리뷰 수 */
|
|
189
|
+
distribution: readonly [number, number, number, number, number];
|
|
190
|
+
style?: StyleProp<ViewStyle>;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const useSummaryStyles = makeStyles((t) => ({
|
|
194
|
+
root: { flexDirection: 'row', alignItems: 'center', gap: t.space[5] },
|
|
195
|
+
score: { alignItems: 'center', gap: t.space[1] },
|
|
196
|
+
average: { fontSize: 36, lineHeight: 40, fontVariant: ['tabular-nums'] },
|
|
197
|
+
bars: { flex: 1, gap: t.space[1] },
|
|
198
|
+
bar: { flexDirection: 'row', alignItems: 'center', gap: t.space[2] },
|
|
199
|
+
digit: { width: 8, fontVariant: ['tabular-nums'] },
|
|
200
|
+
track: {
|
|
201
|
+
flex: 1,
|
|
202
|
+
height: 6,
|
|
203
|
+
borderRadius: 3,
|
|
204
|
+
overflow: 'hidden',
|
|
205
|
+
backgroundColor: t.colors.muted,
|
|
206
|
+
},
|
|
207
|
+
fill: { height: 6, borderRadius: 3, backgroundColor: t.colors.warning },
|
|
208
|
+
}));
|
|
209
|
+
|
|
210
|
+
/** 평균 별점과 점수별 분포 막대 */
|
|
211
|
+
export function ReviewSummary({
|
|
212
|
+
average,
|
|
213
|
+
distribution,
|
|
214
|
+
style,
|
|
215
|
+
}: ReviewSummaryProps) {
|
|
216
|
+
const s = useSummaryStyles();
|
|
217
|
+
const total = distribution.reduce((a, b) => a + b, 0);
|
|
218
|
+
const shown = average.toFixed(1);
|
|
219
|
+
return (
|
|
220
|
+
<View style={[s.root, style]}>
|
|
221
|
+
<View
|
|
222
|
+
accessible
|
|
223
|
+
accessibilityLabel={`별점 평균 ${shown}, 리뷰 ${total}개`}
|
|
224
|
+
style={s.score}
|
|
225
|
+
>
|
|
226
|
+
<Text weight="bold" style={s.average}>
|
|
227
|
+
{shown}
|
|
228
|
+
</Text>
|
|
229
|
+
<Stars rating={average} size={13} />
|
|
230
|
+
</View>
|
|
231
|
+
<View
|
|
232
|
+
accessible
|
|
233
|
+
accessibilityLabel={distribution
|
|
234
|
+
.map((n, i) => `${5 - i}점 ${n}개`)
|
|
235
|
+
.join(', ')}
|
|
236
|
+
style={s.bars}
|
|
237
|
+
>
|
|
238
|
+
{distribution.map((n, i) => (
|
|
239
|
+
<View key={i} style={s.bar}>
|
|
240
|
+
<Text variant="caption" tone="muted" style={s.digit}>
|
|
241
|
+
{5 - i}
|
|
242
|
+
</Text>
|
|
243
|
+
<View style={s.track}>
|
|
244
|
+
<View
|
|
245
|
+
style={[
|
|
246
|
+
s.fill,
|
|
247
|
+
{ width: `${total ? Math.round((n / total) * 100) : 0}%` },
|
|
248
|
+
]}
|
|
249
|
+
/>
|
|
250
|
+
</View>
|
|
251
|
+
</View>
|
|
252
|
+
))}
|
|
253
|
+
</View>
|
|
254
|
+
</View>
|
|
255
|
+
);
|
|
256
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { EmptyState } from '../../components/empty-state/empty-state';
|
|
3
|
+
import { formatPrice } from '../../components/price/price';
|
|
4
|
+
import { SegmentedTabs } from '../../components/segmented-tabs/segmented-tabs';
|
|
5
|
+
import { Skeleton } from '../../components/skeleton/skeleton';
|
|
6
|
+
import { Text } from '../../components/text/text';
|
|
7
|
+
import { makeStyles } from '../../utils/styles';
|
|
8
|
+
import { LineChart, type ChartDatum } from '../../charts/line-chart';
|
|
9
|
+
import { Card } from '../internal/card';
|
|
10
|
+
import { changeRate, formatManwon } from '../internal/format';
|
|
11
|
+
|
|
12
|
+
export type SalesPeriod = 'today' | 'week' | 'month';
|
|
13
|
+
|
|
14
|
+
export type SalesChartProps = {
|
|
15
|
+
period: SalesPeriod;
|
|
16
|
+
onPeriodChange: (period: SalesPeriod) => void;
|
|
17
|
+
/** 순매출 (환불 차감 후) */
|
|
18
|
+
total: number;
|
|
19
|
+
/** 직전 같은 기간 순매출 */
|
|
20
|
+
previousTotal?: number;
|
|
21
|
+
/** 기간 중 환불 합계 */
|
|
22
|
+
refundTotal?: number;
|
|
23
|
+
/** 추이 차트. 두 점 이상이면 그린다 */
|
|
24
|
+
data?: readonly ChartDatum[];
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
style?: StyleProp<ViewStyle>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const PERIODS = [
|
|
30
|
+
{ value: 'today', label: '오늘' },
|
|
31
|
+
{ value: 'week', label: '7일' },
|
|
32
|
+
{ value: 'month', label: '30일' },
|
|
33
|
+
] as const;
|
|
34
|
+
|
|
35
|
+
const useStyles = makeStyles((t) => ({
|
|
36
|
+
row: {
|
|
37
|
+
flexDirection: 'row',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
justifyContent: 'space-between',
|
|
40
|
+
minHeight: 44,
|
|
41
|
+
},
|
|
42
|
+
divided: { borderBottomWidth: 1, borderBottomColor: t.colors.border },
|
|
43
|
+
net: { minHeight: 56 },
|
|
44
|
+
netValue: { flexDirection: 'row', alignItems: 'baseline', gap: t.space[2] },
|
|
45
|
+
down: { color: t.colors.info },
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
/** 기간별 총매출 · 환불 · 순매출 */
|
|
49
|
+
export function SalesChart({
|
|
50
|
+
period,
|
|
51
|
+
onPeriodChange,
|
|
52
|
+
total,
|
|
53
|
+
previousTotal,
|
|
54
|
+
refundTotal = 0,
|
|
55
|
+
data = [],
|
|
56
|
+
loading,
|
|
57
|
+
style,
|
|
58
|
+
}: SalesChartProps) {
|
|
59
|
+
const s = useStyles();
|
|
60
|
+
const rate =
|
|
61
|
+
previousTotal !== undefined ? changeRate(total, previousTotal) : null;
|
|
62
|
+
const up = rate !== null && rate >= 0;
|
|
63
|
+
const empty = !loading && total === 0 && refundTotal === 0;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<Card style={style}>
|
|
67
|
+
<SegmentedTabs<SalesPeriod>
|
|
68
|
+
items={PERIODS}
|
|
69
|
+
value={period}
|
|
70
|
+
onValueChange={onPeriodChange}
|
|
71
|
+
/>
|
|
72
|
+
{loading ? (
|
|
73
|
+
<>
|
|
74
|
+
<Skeleton height={44} />
|
|
75
|
+
<Skeleton height={44} />
|
|
76
|
+
<Skeleton height={56} />
|
|
77
|
+
</>
|
|
78
|
+
) : empty ? (
|
|
79
|
+
<EmptyState variant="section" title="이 기간 매출이 없어요" />
|
|
80
|
+
) : (
|
|
81
|
+
<>
|
|
82
|
+
<View>
|
|
83
|
+
<View style={s.row}>
|
|
84
|
+
<Text tone="muted">총매출</Text>
|
|
85
|
+
<Text>{formatPrice(total + refundTotal)}</Text>
|
|
86
|
+
</View>
|
|
87
|
+
<View style={[s.row, s.divided]}>
|
|
88
|
+
<Text tone="muted">환불</Text>
|
|
89
|
+
<Text>
|
|
90
|
+
{refundTotal > 0 ? '−' : ''}
|
|
91
|
+
{formatPrice(refundTotal)}
|
|
92
|
+
</Text>
|
|
93
|
+
</View>
|
|
94
|
+
<View style={[s.row, s.net]}>
|
|
95
|
+
<Text weight="bold">순매출</Text>
|
|
96
|
+
<View style={s.netValue}>
|
|
97
|
+
{rate !== null ? (
|
|
98
|
+
<Text
|
|
99
|
+
weight="bold"
|
|
100
|
+
tone={up ? 'destructive' : 'default'}
|
|
101
|
+
style={!up && s.down}
|
|
102
|
+
accessibilityLabel={`직전 기간보다 ${Math.abs(rate).toFixed(1)}% ${up ? '증가' : '감소'}`}
|
|
103
|
+
>
|
|
104
|
+
{up ? '▲' : '▼'} {Math.abs(rate).toFixed(1)}%
|
|
105
|
+
</Text>
|
|
106
|
+
) : null}
|
|
107
|
+
<Text variant="title" weight="bold">
|
|
108
|
+
{formatPrice(total)}
|
|
109
|
+
</Text>
|
|
110
|
+
</View>
|
|
111
|
+
</View>
|
|
112
|
+
</View>
|
|
113
|
+
{data.length > 1 ? (
|
|
114
|
+
<LineChart data={data} formatY={formatManwon} height={180} />
|
|
115
|
+
) : null}
|
|
116
|
+
</>
|
|
117
|
+
)}
|
|
118
|
+
</Card>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { Button } from '../../components/button/button';
|
|
3
|
+
import { Text } from '../../components/text/text';
|
|
4
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
5
|
+
import { makeStyles } from '../../utils/styles';
|
|
6
|
+
|
|
7
|
+
export type ServiceState = 'paymentFailed' | 'grace' | 'suspended' | 'closed';
|
|
8
|
+
|
|
9
|
+
export type ServiceStateBannerProps = {
|
|
10
|
+
state: ServiceState;
|
|
11
|
+
/** 유예 남은 일수 (grace) */
|
|
12
|
+
daysLeft?: number;
|
|
13
|
+
actionLabel?: string;
|
|
14
|
+
onAction?: () => void;
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function title(state: ServiceState, daysLeft?: number) {
|
|
19
|
+
switch (state) {
|
|
20
|
+
case 'paymentFailed':
|
|
21
|
+
return '구독 결제에 실패했어요';
|
|
22
|
+
case 'grace':
|
|
23
|
+
return `${daysLeft ?? 0}일 뒤 사이트가 멈춰요`;
|
|
24
|
+
case 'suspended':
|
|
25
|
+
return '사이트가 멈췄어요';
|
|
26
|
+
case 'closed':
|
|
27
|
+
return '해지된 사이트예요';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const useStyles = makeStyles((t) => ({
|
|
32
|
+
root: { gap: t.space[2], padding: t.space[4], borderRadius: t.radius.md },
|
|
33
|
+
start: { alignSelf: 'flex-start' },
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
/** 결제 실패 · 유예 · 정지 · 해지 상태 안내 */
|
|
37
|
+
export function ServiceStateBanner({
|
|
38
|
+
state,
|
|
39
|
+
daysLeft,
|
|
40
|
+
actionLabel,
|
|
41
|
+
onAction,
|
|
42
|
+
style,
|
|
43
|
+
}: ServiceStateBannerProps) {
|
|
44
|
+
const t = useTheme();
|
|
45
|
+
const s = useStyles();
|
|
46
|
+
const severe = state === 'suspended' || state === 'closed';
|
|
47
|
+
const [bg, fg] = severe
|
|
48
|
+
? [t.colors.destructive, t.colors.destructiveForeground]
|
|
49
|
+
: [t.colors.warning, t.colors.warningForeground];
|
|
50
|
+
return (
|
|
51
|
+
<View
|
|
52
|
+
accessibilityRole="alert"
|
|
53
|
+
style={[s.root, { backgroundColor: bg }, style]}
|
|
54
|
+
>
|
|
55
|
+
<Text weight="bold" style={{ color: fg }}>
|
|
56
|
+
{title(state, daysLeft)}
|
|
57
|
+
</Text>
|
|
58
|
+
{onAction ? (
|
|
59
|
+
<Button size="sm" variant="outline" onPress={onAction} style={s.start}>
|
|
60
|
+
{actionLabel ??
|
|
61
|
+
(state === 'closed' ? '다시 시작하기' : '결제 수단 확인')}
|
|
62
|
+
</Button>
|
|
63
|
+
) : null}
|
|
64
|
+
</View>
|
|
65
|
+
);
|
|
66
|
+
}
|