@ezpg/app-ui 0.1.0 → 0.2.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 +19 -0
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js +0 -2
- package/lib/module/blocks/brand-profile-card/brand-profile-card.js.map +1 -1
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js +190 -0
- package/lib/module/blocks/bulk-ship-list/bulk-ship-list.js.map +1 -0
- package/lib/module/blocks/bulk-ship-list/index.js +4 -0
- package/lib/module/blocks/bulk-ship-list/index.js.map +1 -0
- package/lib/module/blocks/claim-row/claim-row.js +34 -35
- package/lib/module/blocks/claim-row/claim-row.js.map +1 -1
- package/lib/module/blocks/claim-row/index.js +1 -1
- package/lib/module/blocks/claim-row/index.js.map +1 -1
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js +0 -2
- package/lib/module/blocks/color-swatch-picker/color-swatch-picker.js.map +1 -1
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js +0 -2
- package/lib/module/blocks/copy-variant-picker/copy-variant-picker.js.map +1 -1
- package/lib/module/blocks/credit-wallet/credit-wallet.js +3 -5
- package/lib/module/blocks/credit-wallet/credit-wallet.js.map +1 -1
- package/lib/module/blocks/generation-progress/generation-progress.js +157 -0
- package/lib/module/blocks/generation-progress/generation-progress.js.map +1 -0
- package/lib/module/blocks/generation-progress/index.js +4 -0
- package/lib/module/blocks/generation-progress/index.js.map +1 -0
- package/lib/module/blocks/image-grid/image-grid.js +19 -15
- package/lib/module/blocks/image-grid/image-grid.js.map +1 -1
- package/lib/module/blocks/index.js +3 -0
- package/lib/module/blocks/index.js.map +1 -1
- package/lib/module/blocks/internal/card.js +49 -10
- package/lib/module/blocks/internal/card.js.map +1 -1
- package/lib/module/blocks/internal/format.js +0 -6
- package/lib/module/blocks/internal/format.js.map +1 -1
- package/lib/module/blocks/invoice-row/invoice-row.js +0 -2
- package/lib/module/blocks/invoice-row/invoice-row.js.map +1 -1
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js +0 -2
- package/lib/module/blocks/logo-candidate-grid/logo-candidate-grid.js.map +1 -1
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js +0 -3
- package/lib/module/blocks/oauth-buttons/oauth-buttons.js.map +1 -1
- package/lib/module/blocks/option-editor/option-editor.js +22 -12
- package/lib/module/blocks/option-editor/option-editor.js.map +1 -1
- package/lib/module/blocks/order-card/order-card.js +10 -15
- package/lib/module/blocks/order-card/order-card.js.map +1 -1
- package/lib/module/blocks/plan-card/plan-card.js +9 -5
- package/lib/module/blocks/plan-card/plan-card.js.map +1 -1
- package/lib/module/blocks/product-list-empty/product-list-empty.js +0 -2
- package/lib/module/blocks/product-list-empty/product-list-empty.js.map +1 -1
- package/lib/module/blocks/review-row/review-row.js +0 -8
- package/lib/module/blocks/review-row/review-row.js.map +1 -1
- package/lib/module/blocks/sales-chart/sales-chart.js +0 -2
- package/lib/module/blocks/sales-chart/sales-chart.js.map +1 -1
- package/lib/module/blocks/selection-bar/index.js +4 -0
- package/lib/module/blocks/selection-bar/index.js.map +1 -0
- package/lib/module/blocks/selection-bar/selection-bar.js +69 -0
- package/lib/module/blocks/selection-bar/selection-bar.js.map +1 -0
- package/lib/module/blocks/service-state-banner/service-state-banner.js +11 -5
- package/lib/module/blocks/service-state-banner/service-state-banner.js.map +1 -1
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js +0 -2
- package/lib/module/blocks/shipping-tracking-row/shipping-tracking-row.js.map +1 -1
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js +12 -2
- package/lib/module/blocks/site-preview-frame/site-preview-frame.js.map +1 -1
- package/lib/module/blocks/stat-card/stat-card.js +0 -2
- package/lib/module/blocks/stat-card/stat-card.js.map +1 -1
- package/lib/module/blocks/step-screen/step-screen.js +0 -2
- package/lib/module/blocks/step-screen/step-screen.js.map +1 -1
- package/lib/module/blocks/supply-item-card/supply-item-card.js +0 -6
- package/lib/module/blocks/supply-item-card/supply-item-card.js.map +1 -1
- package/lib/module/charts/line-chart.js +10 -1
- package/lib/module/charts/line-chart.js.map +1 -1
- package/lib/module/charts/scale.js +0 -6
- package/lib/module/charts/scale.js.map +1 -1
- package/lib/module/charts/sparkline.js +0 -1
- package/lib/module/charts/sparkline.js.map +1 -1
- package/lib/module/charts/summary.js +0 -1
- package/lib/module/charts/summary.js.map +1 -1
- package/lib/module/components/button/button.js.map +1 -1
- package/lib/module/components/chip/chip.js +14 -0
- package/lib/module/components/chip/chip.js.map +1 -1
- package/lib/module/components/chip-group/chip-group.js +1 -0
- package/lib/module/components/chip-group/chip-group.js.map +1 -1
- package/lib/module/components/dialog/dialog.js +0 -2
- package/lib/module/components/dialog/dialog.js.map +1 -1
- package/lib/module/components/divider/divider.js +0 -1
- package/lib/module/components/divider/divider.js.map +1 -1
- package/lib/module/components/empty-state/empty-state.js +0 -10
- package/lib/module/components/empty-state/empty-state.js.map +1 -1
- package/lib/module/components/field/field.js +52 -3
- package/lib/module/components/field/field.js.map +1 -1
- package/lib/module/components/list-row/list-row.js.map +1 -1
- package/lib/module/components/photo/photo.js +0 -3
- package/lib/module/components/photo/photo.js.map +1 -1
- package/lib/module/components/price/price.js +0 -2
- package/lib/module/components/price/price.js.map +1 -1
- package/lib/module/components/progress-bar/index.js +4 -0
- package/lib/module/components/progress-bar/index.js.map +1 -0
- package/lib/module/components/progress-bar/progress-bar.js +92 -0
- package/lib/module/components/progress-bar/progress-bar.js.map +1 -0
- package/lib/module/components/search-field/search-field.js.map +1 -1
- package/lib/module/components/segmented-tabs/segmented-tabs.js.map +1 -1
- package/lib/module/components/sheet/sheet.js.map +1 -1
- package/lib/module/components/skeleton/skeleton.js +0 -1
- package/lib/module/components/skeleton/skeleton.js.map +1 -1
- package/lib/module/components/status-badge/status-badge.js.map +1 -1
- package/lib/module/components/switch/switch.js +4 -3
- package/lib/module/components/switch/switch.js.map +1 -1
- package/lib/module/components/text/text.js.map +1 -1
- package/lib/module/components/toast/toast.js +0 -8
- package/lib/module/components/toast/toast.js.map +1 -1
- package/lib/module/components/wizard-steps/wizard-steps.js +0 -2
- package/lib/module/components/wizard-steps/wizard-steps.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/glyphs.js +0 -4
- package/lib/module/internal/glyphs.js.map +1 -1
- package/lib/module/internal/icon.js +0 -2
- package/lib/module/internal/icon.js.map +1 -1
- package/lib/module/internal/overlay.js +0 -5
- package/lib/module/internal/overlay.js.map +1 -1
- package/lib/module/internal/pressable-base.js +0 -1
- package/lib/module/internal/pressable-base.js.map +1 -1
- package/lib/module/internal/use-reduced-motion.js +0 -4
- package/lib/module/internal/use-reduced-motion.js.map +1 -1
- package/lib/module/sortable/move.js +0 -1
- package/lib/module/sortable/move.js.map +1 -1
- package/lib/module/sortable/sortable-grid.js +0 -6
- package/lib/module/sortable/sortable-grid.js.map +1 -1
- package/lib/module/sortable/sortable-list.js +0 -1
- package/lib/module/sortable/sortable-list.js.map +1 -1
- package/lib/module/theme/create-theme.js +0 -6
- package/lib/module/theme/create-theme.js.map +1 -1
- package/lib/module/theme/theme-provider.js +0 -2
- package/lib/module/theme/theme-provider.js.map +1 -1
- package/lib/module/theme/tokens.js +0 -1
- package/lib/module/theme/tokens.js.map +1 -1
- package/lib/module/utils/color.js +0 -5
- package/lib/module/utils/color.js.map +1 -1
- package/lib/module/utils/styles.js +0 -5
- package/lib/module/utils/styles.js.map +1 -1
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts +0 -2
- package/lib/typescript/src/blocks/brand-profile-card/brand-profile-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts +24 -0
- package/lib/typescript/src/blocks/bulk-ship-list/bulk-ship-list.d.ts.map +1 -0
- package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts +2 -0
- package/lib/typescript/src/blocks/bulk-ship-list/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts +5 -12
- package/lib/typescript/src/blocks/claim-row/claim-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/claim-row/index.d.ts +1 -1
- package/lib/typescript/src/blocks/claim-row/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts +0 -2
- package/lib/typescript/src/blocks/color-swatch-picker/color-swatch-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts +0 -4
- package/lib/typescript/src/blocks/copy-variant-picker/copy-variant-picker.d.ts.map +1 -1
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts +1 -3
- package/lib/typescript/src/blocks/credit-wallet/credit-wallet.d.ts.map +1 -1
- package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts +17 -0
- package/lib/typescript/src/blocks/generation-progress/generation-progress.d.ts.map +1 -0
- package/lib/typescript/src/blocks/generation-progress/index.d.ts +2 -0
- package/lib/typescript/src/blocks/generation-progress/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts +0 -6
- package/lib/typescript/src/blocks/image-grid/image-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/index.d.ts +3 -0
- package/lib/typescript/src/blocks/index.d.ts.map +1 -1
- package/lib/typescript/src/blocks/internal/card.d.ts +3 -2
- package/lib/typescript/src/blocks/internal/card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/internal/format.d.ts +0 -3
- package/lib/typescript/src/blocks/internal/format.d.ts.map +1 -1
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts +0 -7
- package/lib/typescript/src/blocks/invoice-row/invoice-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts +0 -2
- package/lib/typescript/src/blocks/logo-candidate-grid/logo-candidate-grid.d.ts.map +1 -1
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts +0 -7
- package/lib/typescript/src/blocks/oauth-buttons/oauth-buttons.d.ts.map +1 -1
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts +3 -5
- package/lib/typescript/src/blocks/option-editor/option-editor.d.ts.map +1 -1
- package/lib/typescript/src/blocks/order-card/order-card.d.ts +4 -12
- package/lib/typescript/src/blocks/order-card/order-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts +2 -13
- package/lib/typescript/src/blocks/plan-card/plan-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts +0 -5
- package/lib/typescript/src/blocks/product-list-empty/product-list-empty.d.ts.map +1 -1
- package/lib/typescript/src/blocks/review-row/review-row.d.ts +0 -9
- package/lib/typescript/src/blocks/review-row/review-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts +0 -5
- package/lib/typescript/src/blocks/sales-chart/sales-chart.d.ts.map +1 -1
- package/lib/typescript/src/blocks/selection-bar/index.d.ts +2 -0
- package/lib/typescript/src/blocks/selection-bar/index.d.ts.map +1 -0
- package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts +12 -0
- package/lib/typescript/src/blocks/selection-bar/selection-bar.d.ts.map +1 -0
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts +3 -4
- package/lib/typescript/src/blocks/service-state-banner/service-state-banner.d.ts.map +1 -1
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts +0 -1
- package/lib/typescript/src/blocks/shipping-tracking-row/shipping-tracking-row.d.ts.map +1 -1
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts +3 -5
- package/lib/typescript/src/blocks/site-preview-frame/site-preview-frame.d.ts.map +1 -1
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts +0 -5
- package/lib/typescript/src/blocks/stat-card/stat-card.d.ts.map +1 -1
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts +0 -6
- package/lib/typescript/src/blocks/step-screen/step-screen.d.ts.map +1 -1
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts +0 -6
- package/lib/typescript/src/blocks/supply-item-card/supply-item-card.d.ts.map +1 -1
- package/lib/typescript/src/charts/line-chart.d.ts +1 -5
- package/lib/typescript/src/charts/line-chart.d.ts.map +1 -1
- package/lib/typescript/src/charts/scale.d.ts +0 -3
- package/lib/typescript/src/charts/scale.d.ts.map +1 -1
- package/lib/typescript/src/charts/sparkline.d.ts +0 -4
- package/lib/typescript/src/charts/sparkline.d.ts.map +1 -1
- package/lib/typescript/src/charts/summary.d.ts +0 -1
- package/lib/typescript/src/charts/summary.d.ts.map +1 -1
- package/lib/typescript/src/components/button/button.d.ts +0 -3
- package/lib/typescript/src/components/button/button.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/chip.d.ts +2 -1
- package/lib/typescript/src/components/chip/chip.d.ts.map +1 -1
- package/lib/typescript/src/components/chip-group/chip-group.d.ts +1 -2
- package/lib/typescript/src/components/chip-group/chip-group.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/dialog.d.ts +0 -7
- package/lib/typescript/src/components/dialog/dialog.d.ts.map +1 -1
- package/lib/typescript/src/components/divider/divider.d.ts +0 -2
- package/lib/typescript/src/components/divider/divider.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/empty-state.d.ts +0 -10
- package/lib/typescript/src/components/empty-state/empty-state.d.ts.map +1 -1
- package/lib/typescript/src/components/field/field.d.ts +3 -3
- package/lib/typescript/src/components/field/field.d.ts.map +1 -1
- package/lib/typescript/src/components/list-row/list-row.d.ts +0 -3
- package/lib/typescript/src/components/list-row/list-row.d.ts.map +1 -1
- package/lib/typescript/src/components/photo/photo.d.ts +0 -4
- package/lib/typescript/src/components/photo/photo.d.ts.map +1 -1
- package/lib/typescript/src/components/price/price.d.ts +0 -3
- package/lib/typescript/src/components/price/price.d.ts.map +1 -1
- package/lib/typescript/src/components/progress-bar/index.d.ts +2 -0
- package/lib/typescript/src/components/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress-bar/progress-bar.d.ts +9 -0
- package/lib/typescript/src/components/progress-bar/progress-bar.d.ts.map +1 -0
- package/lib/typescript/src/components/search-field/search-field.d.ts +0 -1
- package/lib/typescript/src/components/search-field/search-field.d.ts.map +1 -1
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts +0 -1
- package/lib/typescript/src/components/segmented-tabs/segmented-tabs.d.ts.map +1 -1
- package/lib/typescript/src/components/sheet/sheet.d.ts +0 -3
- package/lib/typescript/src/components/sheet/sheet.d.ts.map +1 -1
- package/lib/typescript/src/components/skeleton/skeleton.d.ts +0 -4
- package/lib/typescript/src/components/skeleton/skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/status-badge/status-badge.d.ts +0 -1
- package/lib/typescript/src/components/status-badge/status-badge.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/switch.d.ts.map +1 -1
- package/lib/typescript/src/components/text/text.d.ts +0 -3
- package/lib/typescript/src/components/text/text.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast.d.ts +0 -8
- package/lib/typescript/src/components/toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts +0 -3
- package/lib/typescript/src/components/wizard-steps/wizard-steps.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal/glyphs.d.ts +0 -1
- package/lib/typescript/src/internal/glyphs.d.ts.map +1 -1
- package/lib/typescript/src/internal/icon.d.ts +0 -1
- package/lib/typescript/src/internal/icon.d.ts.map +1 -1
- package/lib/typescript/src/internal/overlay.d.ts +0 -4
- package/lib/typescript/src/internal/overlay.d.ts.map +1 -1
- package/lib/typescript/src/internal/pressable-base.d.ts +0 -3
- package/lib/typescript/src/internal/pressable-base.d.ts.map +1 -1
- package/lib/typescript/src/internal/use-reduced-motion.d.ts +0 -1
- package/lib/typescript/src/internal/use-reduced-motion.d.ts.map +1 -1
- package/lib/typescript/src/sortable/move.d.ts +0 -1
- package/lib/typescript/src/sortable/move.d.ts.map +1 -1
- package/lib/typescript/src/sortable/sortable-grid.d.ts +0 -12
- package/lib/typescript/src/sortable/sortable-grid.d.ts.map +1 -1
- package/lib/typescript/src/sortable/sortable-list.d.ts +0 -1
- package/lib/typescript/src/sortable/sortable-list.d.ts.map +1 -1
- package/lib/typescript/src/theme/create-theme.d.ts +0 -4
- package/lib/typescript/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/src/theme/theme-provider.d.ts +0 -3
- package/lib/typescript/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +0 -7
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/color.d.ts +0 -2
- package/lib/typescript/src/utils/color.d.ts.map +1 -1
- package/lib/typescript/src/utils/styles.d.ts +0 -5
- package/lib/typescript/src/utils/styles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blocks/brand-profile-card/brand-profile-card.tsx +0 -2
- package/src/blocks/bulk-ship-list/bulk-ship-list.tsx +187 -0
- package/src/blocks/bulk-ship-list/index.ts +8 -0
- package/src/blocks/claim-row/claim-row.tsx +67 -54
- package/src/blocks/claim-row/index.ts +1 -0
- package/src/blocks/color-swatch-picker/color-swatch-picker.tsx +0 -2
- package/src/blocks/copy-variant-picker/copy-variant-picker.tsx +0 -4
- package/src/blocks/credit-wallet/credit-wallet.tsx +20 -14
- package/src/blocks/generation-progress/generation-progress.tsx +180 -0
- package/src/blocks/generation-progress/index.ts +6 -0
- package/src/blocks/image-grid/image-grid.tsx +10 -14
- package/src/blocks/index.tsx +3 -0
- package/src/blocks/internal/card.tsx +47 -3
- package/src/blocks/internal/format.ts +0 -3
- package/src/blocks/invoice-row/invoice-row.tsx +0 -7
- package/src/blocks/logo-candidate-grid/logo-candidate-grid.tsx +0 -2
- package/src/blocks/oauth-buttons/oauth-buttons.tsx +0 -8
- package/src/blocks/option-editor/option-editor.tsx +24 -10
- package/src/blocks/order-card/order-card.tsx +20 -28
- package/src/blocks/plan-card/plan-card.tsx +18 -16
- package/src/blocks/product-list-empty/product-list-empty.tsx +0 -5
- package/src/blocks/review-row/review-row.tsx +0 -10
- package/src/blocks/sales-chart/sales-chart.tsx +0 -5
- package/src/blocks/selection-bar/index.ts +1 -0
- package/src/blocks/selection-bar/selection-bar.tsx +63 -0
- package/src/blocks/service-state-banner/service-state-banner.tsx +16 -5
- package/src/blocks/shipping-tracking-row/shipping-tracking-row.tsx +0 -1
- package/src/blocks/site-preview-frame/site-preview-frame.tsx +20 -5
- package/src/blocks/stat-card/stat-card.tsx +0 -5
- package/src/blocks/step-screen/step-screen.tsx +0 -6
- package/src/blocks/supply-item-card/supply-item-card.tsx +0 -6
- package/src/charts/line-chart.tsx +11 -6
- package/src/charts/scale.ts +0 -3
- package/src/charts/sparkline.tsx +0 -4
- package/src/charts/summary.ts +0 -1
- package/src/components/button/button.tsx +0 -3
- package/src/components/chip/chip.tsx +17 -0
- package/src/components/chip-group/chip-group.tsx +2 -2
- package/src/components/dialog/dialog.tsx +0 -7
- package/src/components/divider/divider.tsx +0 -2
- package/src/components/empty-state/empty-state.tsx +0 -11
- package/src/components/field/field.tsx +54 -4
- package/src/components/list-row/list-row.tsx +0 -3
- package/src/components/photo/photo.tsx +0 -5
- package/src/components/price/price.tsx +0 -3
- package/src/components/progress-bar/index.ts +1 -0
- package/src/components/progress-bar/progress-bar.tsx +80 -0
- package/src/components/search-field/search-field.tsx +0 -1
- package/src/components/segmented-tabs/segmented-tabs.tsx +0 -1
- package/src/components/sheet/sheet.tsx +0 -3
- package/src/components/skeleton/skeleton.tsx +0 -4
- package/src/components/status-badge/status-badge.tsx +0 -1
- package/src/components/switch/switch.tsx +5 -3
- package/src/components/text/text.tsx +0 -3
- package/src/components/toast/toast.tsx +0 -11
- package/src/components/wizard-steps/wizard-steps.tsx +0 -3
- package/src/index.tsx +1 -0
- package/src/internal/glyphs.tsx +0 -3
- package/src/internal/icon.tsx +0 -1
- package/src/internal/overlay.tsx +0 -4
- package/src/internal/pressable-base.tsx +0 -3
- package/src/internal/use-reduced-motion.ts +0 -2
- package/src/sortable/move.ts +0 -1
- package/src/sortable/sortable-grid.tsx +0 -12
- package/src/sortable/sortable-list.tsx +0 -1
- package/src/theme/create-theme.ts +0 -5
- package/src/theme/theme-provider.tsx +0 -3
- package/src/theme/tokens.ts +0 -1
- package/src/types/index.ts +0 -7
- package/src/utils/color.ts +0 -3
- package/src/utils/styles.ts +0 -5
|
@@ -10,33 +10,22 @@ import { Card } from '../internal/card';
|
|
|
10
10
|
import { formatDeadline } from '../internal/format';
|
|
11
11
|
|
|
12
12
|
export type OrderStatus =
|
|
13
|
-
| '
|
|
13
|
+
| 'pending_payment'
|
|
14
14
|
| 'paid'
|
|
15
15
|
| 'preparing'
|
|
16
|
-
| '
|
|
16
|
+
| 'shipped'
|
|
17
17
|
| 'delivered'
|
|
18
|
-
| '
|
|
19
|
-
| '
|
|
20
|
-
| 'cancelRequested'
|
|
21
|
-
| 'returnRequested'
|
|
22
|
-
| 'exchangeRequested'
|
|
23
|
-
| 'canceled'
|
|
24
|
-
| 'refunded';
|
|
18
|
+
| 'completed'
|
|
19
|
+
| 'canceled';
|
|
25
20
|
|
|
26
|
-
/** 주문 상태 → 묶음 제목 (OrderSection) */
|
|
27
21
|
export const orderStatusLabel: Record<OrderStatus, string> = {
|
|
28
|
-
|
|
22
|
+
pending_payment: '결제 대기',
|
|
29
23
|
paid: '신규',
|
|
30
24
|
preparing: '배송 준비',
|
|
31
|
-
|
|
25
|
+
shipped: '배송 중',
|
|
32
26
|
delivered: '배송 완료',
|
|
33
|
-
|
|
34
|
-
partiallyCanceled: '부분 취소',
|
|
35
|
-
cancelRequested: '취소 요청',
|
|
36
|
-
returnRequested: '반품 요청',
|
|
37
|
-
exchangeRequested: '교환 요청',
|
|
27
|
+
completed: '구매 확정',
|
|
38
28
|
canceled: '취소',
|
|
39
|
-
refunded: '환불 완료',
|
|
40
29
|
};
|
|
41
30
|
|
|
42
31
|
export type OrderItem = { name: string; option?: string; quantity: number };
|
|
@@ -44,20 +33,18 @@ export type OrderItem = { name: string; option?: string; quantity: number };
|
|
|
44
33
|
export type OrderAction = {
|
|
45
34
|
label: string;
|
|
46
35
|
onPress: () => void;
|
|
47
|
-
/** 기본 'outline' */
|
|
48
36
|
variant?: ButtonVariant;
|
|
49
37
|
loading?: boolean;
|
|
50
38
|
};
|
|
51
39
|
|
|
52
40
|
export type OrderCardProps = {
|
|
53
41
|
items: readonly OrderItem[];
|
|
54
|
-
/** 결제 금액 */
|
|
55
42
|
total: number;
|
|
56
|
-
/** 처리 기한까지 남은 영업일. 임박했을 때만 표시한다 */
|
|
57
43
|
dueInDays?: number;
|
|
58
|
-
/** 없고 기한도 임박하지 않으면 한 줄로 줄여 보여준다 */
|
|
59
44
|
actions?: readonly OrderAction[];
|
|
60
45
|
onPress?: () => void;
|
|
46
|
+
onLongPress?: () => void;
|
|
47
|
+
selected?: boolean;
|
|
61
48
|
style?: StyleProp<ViewStyle>;
|
|
62
49
|
};
|
|
63
50
|
|
|
@@ -78,7 +65,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
78
65
|
section: { gap: t.space[3] },
|
|
79
66
|
}));
|
|
80
67
|
|
|
81
|
-
/** '장미 꽃다발 (중) 외 1건', '튤립 다발 × 2' */
|
|
82
68
|
export function summarizeItems(items: readonly OrderItem[]): string {
|
|
83
69
|
const [first, ...rest] = items;
|
|
84
70
|
if (!first) return '';
|
|
@@ -87,13 +73,14 @@ export function summarizeItems(items: readonly OrderItem[]): string {
|
|
|
87
73
|
return first.quantity > 1 ? `${name} × ${first.quantity}` : name;
|
|
88
74
|
}
|
|
89
75
|
|
|
90
|
-
/** 주문 목록의 한 건. 처리할 일이 없으면 누를 수 있는 한 줄로 보여준다 */
|
|
91
76
|
export function OrderCard({
|
|
92
77
|
items,
|
|
93
78
|
total,
|
|
94
79
|
dueInDays,
|
|
95
80
|
actions = [],
|
|
96
81
|
onPress,
|
|
82
|
+
onLongPress,
|
|
83
|
+
selected,
|
|
97
84
|
style,
|
|
98
85
|
}: OrderCardProps) {
|
|
99
86
|
const t = useTheme();
|
|
@@ -106,6 +93,8 @@ export function OrderCard({
|
|
|
106
93
|
return (
|
|
107
94
|
<Card
|
|
108
95
|
onPress={onPress}
|
|
96
|
+
onLongPress={onLongPress}
|
|
97
|
+
selected={selected}
|
|
109
98
|
accessibilityLabel={label}
|
|
110
99
|
style={[s.compact, style]}
|
|
111
100
|
>
|
|
@@ -123,7 +112,13 @@ export function OrderCard({
|
|
|
123
112
|
}
|
|
124
113
|
|
|
125
114
|
return (
|
|
126
|
-
<Card
|
|
115
|
+
<Card
|
|
116
|
+
onPress={onPress}
|
|
117
|
+
onLongPress={onLongPress}
|
|
118
|
+
selected={selected}
|
|
119
|
+
accessibilityLabel={label}
|
|
120
|
+
style={style}
|
|
121
|
+
>
|
|
127
122
|
<View style={s.row}>
|
|
128
123
|
<Text weight="semibold" style={[s.title, s.grow]} numberOfLines={1}>
|
|
129
124
|
{summary}
|
|
@@ -157,15 +152,12 @@ export function OrderCard({
|
|
|
157
152
|
}
|
|
158
153
|
|
|
159
154
|
export type OrderSectionProps = {
|
|
160
|
-
/** 예) '신규', orderStatusLabel[status] */
|
|
161
155
|
title: string;
|
|
162
|
-
/** 제목 옆 건수 */
|
|
163
156
|
count?: number;
|
|
164
157
|
children: ReactNode;
|
|
165
158
|
style?: StyleProp<ViewStyle>;
|
|
166
159
|
};
|
|
167
160
|
|
|
168
|
-
/** 같은 상태의 주문을 묶는 제목과 목록 */
|
|
169
161
|
export function OrderSection({
|
|
170
162
|
title,
|
|
171
163
|
count,
|
|
@@ -7,32 +7,23 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
7
7
|
import { makeStyles } from '../../utils/styles';
|
|
8
8
|
import { Card } from '../internal/card';
|
|
9
9
|
|
|
10
|
-
export type PlanState =
|
|
10
|
+
export type PlanState =
|
|
11
|
+
'none' | 'trial' | 'active' | 'cancelScheduled' | 'pastDue' | 'suspended';
|
|
11
12
|
|
|
12
13
|
export type PlanCardProps = {
|
|
13
14
|
name: string;
|
|
14
|
-
/** 월 요금 */
|
|
15
15
|
price: number;
|
|
16
|
-
/** 매월 주는 크레딧 */
|
|
17
16
|
monthlyCredits: number;
|
|
18
|
-
|
|
19
|
-
dailyLimit: number;
|
|
17
|
+
dailyLimit: number | null;
|
|
20
18
|
features?: readonly string[];
|
|
21
|
-
/** 지금 쓰는 플랜이면 변경 버튼을 숨긴다 */
|
|
22
19
|
current?: boolean;
|
|
23
|
-
/** 테두리를 굵게 강조 */
|
|
24
20
|
recommended?: boolean;
|
|
25
|
-
/** 지금 구독 상태 (current일 때) */
|
|
26
21
|
state?: PlanState;
|
|
27
|
-
/** 예) '11월 30일' — 해지 예약일 */
|
|
28
22
|
cancelDate?: string;
|
|
29
|
-
/** 바꾸면 오늘 결제할 금액. 넘기면 버튼에 금액을 붙인다 */
|
|
30
23
|
proratedAmount?: number;
|
|
31
|
-
/** 가격 인상 예정 */
|
|
32
24
|
priceChange?: { newPrice: number; effectiveDate: string; consented: boolean };
|
|
33
25
|
onSelect?: () => void;
|
|
34
26
|
onConsent?: () => void;
|
|
35
|
-
/** 기본 '이 플랜으로 변경' */
|
|
36
27
|
actionLabel?: string;
|
|
37
28
|
style?: StyleProp<ViewStyle>;
|
|
38
29
|
};
|
|
@@ -60,6 +51,10 @@ const useStyles = makeStyles((t) => ({
|
|
|
60
51
|
|
|
61
52
|
function stateText(state: PlanState, cancelDate?: string): string | null {
|
|
62
53
|
switch (state) {
|
|
54
|
+
case 'none':
|
|
55
|
+
return '구독 전';
|
|
56
|
+
case 'trial':
|
|
57
|
+
return '체험 중';
|
|
63
58
|
case 'cancelScheduled':
|
|
64
59
|
return cancelDate ? `${cancelDate} 해지` : '해지 신청됨';
|
|
65
60
|
case 'pastDue':
|
|
@@ -71,7 +66,6 @@ function stateText(state: PlanState, cancelDate?: string): string | null {
|
|
|
71
66
|
}
|
|
72
67
|
}
|
|
73
68
|
|
|
74
|
-
/** 구독 플랜 한 장. 섹션 제목('이용 중인 플랜' 등)은 쓰는 쪽에서 붙인다 */
|
|
75
69
|
export function PlanCard({
|
|
76
70
|
name,
|
|
77
71
|
price,
|
|
@@ -93,10 +87,11 @@ export function PlanCard({
|
|
|
93
87
|
const s = useStyles();
|
|
94
88
|
const items = [
|
|
95
89
|
`월 크레딧 ${formatPrice(monthlyCredits, '')}`,
|
|
96
|
-
`하루 생성 ${dailyLimit}회`,
|
|
90
|
+
dailyLimit === null ? '하루 생성 무제한' : `하루 생성 ${dailyLimit}회`,
|
|
97
91
|
...features,
|
|
98
92
|
];
|
|
99
|
-
const
|
|
93
|
+
const notice = state === 'none' || state === 'trial';
|
|
94
|
+
const alert = current || notice ? stateText(state, cancelDate) : null;
|
|
100
95
|
return (
|
|
101
96
|
<Card style={[recommended && s.recommended, style]}>
|
|
102
97
|
<View style={s.head}>
|
|
@@ -115,7 +110,14 @@ export function PlanCard({
|
|
|
115
110
|
</View>
|
|
116
111
|
))}
|
|
117
112
|
</View>
|
|
118
|
-
{alert ?
|
|
113
|
+
{alert ? (
|
|
114
|
+
<Text
|
|
115
|
+
tone={notice ? 'muted' : 'destructive'}
|
|
116
|
+
weight={notice ? 'semibold' : undefined}
|
|
117
|
+
>
|
|
118
|
+
{alert}
|
|
119
|
+
</Text>
|
|
120
|
+
) : null}
|
|
119
121
|
{priceChange ? (
|
|
120
122
|
<View style={s.change}>
|
|
121
123
|
<Text tone="muted">{priceChange.effectiveDate}부터</Text>
|
|
@@ -20,14 +20,10 @@ export type SampleProduct = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export type ProductListEmptyProps = {
|
|
23
|
-
/** 첫 상품 등록 */
|
|
24
23
|
onAdd: () => void;
|
|
25
|
-
/** 기본 '첫 상품 등록' */
|
|
26
24
|
addLabel?: string;
|
|
27
|
-
/** AI가 만든 초안이 있으면 예시 카드로 먼저 보여준다 */
|
|
28
25
|
sample?: SampleProduct;
|
|
29
26
|
onEditSample?: () => void;
|
|
30
|
-
/** 예시를 지우면 등록 타일로 바뀐다 (부모가 sample을 비운다) */
|
|
31
27
|
onDismissSample?: () => void;
|
|
32
28
|
style?: StyleProp<ViewStyle>;
|
|
33
29
|
};
|
|
@@ -77,7 +73,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
77
73
|
dismiss: { width: 48, height: 48, paddingHorizontal: 0 },
|
|
78
74
|
}));
|
|
79
75
|
|
|
80
|
-
/** 상품 목록이 비었을 때: 예시 초안이 있으면 예시 카드, 없으면 등록 타일 */
|
|
81
76
|
export function ProductListEmpty({
|
|
82
77
|
onAdd,
|
|
83
78
|
addLabel = '첫 상품 등록',
|
|
@@ -12,16 +12,12 @@ import { useTheme } from '../../theme/theme-provider';
|
|
|
12
12
|
import { makeStyles } from '../../utils/styles';
|
|
13
13
|
|
|
14
14
|
export type ReviewRowProps = {
|
|
15
|
-
/** 가린 이름. 예) '김*지' */
|
|
16
15
|
author: string;
|
|
17
|
-
/** 1~5 */
|
|
18
16
|
rating: number;
|
|
19
17
|
content: string;
|
|
20
18
|
photos?: readonly ImageSourcePropType[];
|
|
21
19
|
reply?: string;
|
|
22
|
-
/** 답글이 없을 때 '답글 달기' 버튼 */
|
|
23
20
|
onReply?: () => void;
|
|
24
|
-
/** 오른쪽 위 더보기 버튼 (답글 수정 · 숨기기 등) */
|
|
25
21
|
onMore?: () => void;
|
|
26
22
|
style?: StyleProp<ViewStyle>;
|
|
27
23
|
};
|
|
@@ -72,7 +68,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
72
68
|
hiddenLabel: { flex: 1 },
|
|
73
69
|
}));
|
|
74
70
|
|
|
75
|
-
/** 별점을 ★로 그린다. 빈 별은 border 색 */
|
|
76
71
|
function Stars({ rating, size }: { rating: number; size?: number }) {
|
|
77
72
|
const t = useTheme();
|
|
78
73
|
const s = useStyles();
|
|
@@ -93,7 +88,6 @@ function Stars({ rating, size }: { rating: number; size?: number }) {
|
|
|
93
88
|
);
|
|
94
89
|
}
|
|
95
90
|
|
|
96
|
-
/** 리뷰 한 건과 사장님 답글 */
|
|
97
91
|
export function ReviewRow({
|
|
98
92
|
author,
|
|
99
93
|
rating,
|
|
@@ -165,7 +159,6 @@ export function ReviewRow({
|
|
|
165
159
|
);
|
|
166
160
|
}
|
|
167
161
|
|
|
168
|
-
/** 숨긴 리뷰를 한 줄로 접어 둔다 */
|
|
169
162
|
export function HiddenReviewsRow({
|
|
170
163
|
count,
|
|
171
164
|
onShow,
|
|
@@ -183,9 +176,7 @@ export function HiddenReviewsRow({
|
|
|
183
176
|
}
|
|
184
177
|
|
|
185
178
|
export type ReviewSummaryProps = {
|
|
186
|
-
/** 평균 별점 */
|
|
187
179
|
average: number;
|
|
188
|
-
/** 5점부터 1점까지 리뷰 수 */
|
|
189
180
|
distribution: readonly [number, number, number, number, number];
|
|
190
181
|
style?: StyleProp<ViewStyle>;
|
|
191
182
|
};
|
|
@@ -207,7 +198,6 @@ const useSummaryStyles = makeStyles((t) => ({
|
|
|
207
198
|
fill: { height: 6, borderRadius: 3, backgroundColor: t.colors.warning },
|
|
208
199
|
}));
|
|
209
200
|
|
|
210
|
-
/** 평균 별점과 점수별 분포 막대 */
|
|
211
201
|
export function ReviewSummary({
|
|
212
202
|
average,
|
|
213
203
|
distribution,
|
|
@@ -14,13 +14,9 @@ export type SalesPeriod = 'today' | 'week' | 'month';
|
|
|
14
14
|
export type SalesChartProps = {
|
|
15
15
|
period: SalesPeriod;
|
|
16
16
|
onPeriodChange: (period: SalesPeriod) => void;
|
|
17
|
-
/** 순매출 (환불 차감 후) */
|
|
18
17
|
total: number;
|
|
19
|
-
/** 직전 같은 기간 순매출 */
|
|
20
18
|
previousTotal?: number;
|
|
21
|
-
/** 기간 중 환불 합계 */
|
|
22
19
|
refundTotal?: number;
|
|
23
|
-
/** 추이 차트. 두 점 이상이면 그린다 */
|
|
24
20
|
data?: readonly ChartDatum[];
|
|
25
21
|
loading?: boolean;
|
|
26
22
|
style?: StyleProp<ViewStyle>;
|
|
@@ -45,7 +41,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
45
41
|
down: { color: t.colors.info },
|
|
46
42
|
}));
|
|
47
43
|
|
|
48
|
-
/** 기간별 총매출 · 환불 · 순매출 */
|
|
49
44
|
export function SalesChart({
|
|
50
45
|
period,
|
|
51
46
|
onPeriodChange,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectionBar, type SelectionBarProps } from './selection-bar';
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { makeStyles } from '../../utils/styles';
|
|
5
|
+
|
|
6
|
+
export type SelectionBarProps = {
|
|
7
|
+
count: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
actionLabel: string;
|
|
10
|
+
onAction: () => void;
|
|
11
|
+
onClear: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const useStyles = makeStyles((t) => ({
|
|
17
|
+
root: {
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
gap: t.space[2],
|
|
21
|
+
paddingVertical: t.space[3],
|
|
22
|
+
paddingHorizontal: t.space[4],
|
|
23
|
+
borderTopWidth: 1,
|
|
24
|
+
borderTopColor: t.colors.border,
|
|
25
|
+
backgroundColor: t.colors.background,
|
|
26
|
+
boxShadow: t.shadow.md,
|
|
27
|
+
},
|
|
28
|
+
info: { flex: 1, gap: 2 },
|
|
29
|
+
count: { fontVariant: ['tabular-nums'] },
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
export function SelectionBar({
|
|
33
|
+
count,
|
|
34
|
+
max,
|
|
35
|
+
actionLabel,
|
|
36
|
+
onAction,
|
|
37
|
+
onClear,
|
|
38
|
+
disabled,
|
|
39
|
+
style,
|
|
40
|
+
}: SelectionBarProps) {
|
|
41
|
+
const s = useStyles();
|
|
42
|
+
const full = max !== undefined && count >= max;
|
|
43
|
+
return (
|
|
44
|
+
<View accessibilityRole="toolbar" style={[s.root, style]}>
|
|
45
|
+
<View style={s.info} accessibilityLiveRegion="polite">
|
|
46
|
+
<Text weight="bold" style={s.count} numberOfLines={1}>
|
|
47
|
+
{count}건 선택
|
|
48
|
+
</Text>
|
|
49
|
+
{full ? (
|
|
50
|
+
<Text variant="caption" tone="muted" numberOfLines={2}>
|
|
51
|
+
최대 {max}건까지 선택할 수 있어요
|
|
52
|
+
</Text>
|
|
53
|
+
) : null}
|
|
54
|
+
</View>
|
|
55
|
+
<Button variant="ghost" size="sm" onPress={onClear}>
|
|
56
|
+
선택 해제
|
|
57
|
+
</Button>
|
|
58
|
+
<Button size="sm" onPress={onAction} disabled={disabled || count === 0}>
|
|
59
|
+
{actionLabel}
|
|
60
|
+
</Button>
|
|
61
|
+
</View>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -4,12 +4,13 @@ import { Text } from '../../components/text/text';
|
|
|
4
4
|
import { useTheme } from '../../theme/theme-provider';
|
|
5
5
|
import { makeStyles } from '../../utils/styles';
|
|
6
6
|
|
|
7
|
-
export type ServiceState =
|
|
7
|
+
export type ServiceState =
|
|
8
|
+
'paymentFailed' | 'grace' | 'suspended' | 'closed' | 'stopped';
|
|
8
9
|
|
|
9
10
|
export type ServiceStateBannerProps = {
|
|
10
11
|
state: ServiceState;
|
|
11
|
-
/** 유예 남은 일수 (grace) */
|
|
12
12
|
daysLeft?: number;
|
|
13
|
+
reason?: string;
|
|
13
14
|
actionLabel?: string;
|
|
14
15
|
onAction?: () => void;
|
|
15
16
|
style?: StyleProp<ViewStyle>;
|
|
@@ -25,6 +26,8 @@ function title(state: ServiceState, daysLeft?: number) {
|
|
|
25
26
|
return '사이트가 멈췄어요';
|
|
26
27
|
case 'closed':
|
|
27
28
|
return '해지된 사이트예요';
|
|
29
|
+
case 'stopped':
|
|
30
|
+
return '운영 정책에 따라 판매가 중지됐어요';
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
33
|
|
|
@@ -33,17 +36,18 @@ const useStyles = makeStyles((t) => ({
|
|
|
33
36
|
start: { alignSelf: 'flex-start' },
|
|
34
37
|
}));
|
|
35
38
|
|
|
36
|
-
/** 결제 실패 · 유예 · 정지 · 해지 상태 안내 */
|
|
37
39
|
export function ServiceStateBanner({
|
|
38
40
|
state,
|
|
39
41
|
daysLeft,
|
|
42
|
+
reason,
|
|
40
43
|
actionLabel,
|
|
41
44
|
onAction,
|
|
42
45
|
style,
|
|
43
46
|
}: ServiceStateBannerProps) {
|
|
44
47
|
const t = useTheme();
|
|
45
48
|
const s = useStyles();
|
|
46
|
-
const severe =
|
|
49
|
+
const severe =
|
|
50
|
+
state === 'suspended' || state === 'closed' || state === 'stopped';
|
|
47
51
|
const [bg, fg] = severe
|
|
48
52
|
? [t.colors.destructive, t.colors.destructiveForeground]
|
|
49
53
|
: [t.colors.warning, t.colors.warningForeground];
|
|
@@ -55,10 +59,17 @@ export function ServiceStateBanner({
|
|
|
55
59
|
<Text weight="bold" style={{ color: fg }}>
|
|
56
60
|
{title(state, daysLeft)}
|
|
57
61
|
</Text>
|
|
62
|
+
{state === 'stopped' && reason ? (
|
|
63
|
+
<Text style={{ color: fg }}>사유: {reason}</Text>
|
|
64
|
+
) : null}
|
|
58
65
|
{onAction ? (
|
|
59
66
|
<Button size="sm" variant="outline" onPress={onAction} style={s.start}>
|
|
60
67
|
{actionLabel ??
|
|
61
|
-
(state === 'closed'
|
|
68
|
+
(state === 'closed'
|
|
69
|
+
? '다시 시작하기'
|
|
70
|
+
: state === 'stopped'
|
|
71
|
+
? '문의하기'
|
|
72
|
+
: '결제 수단 확인')}
|
|
62
73
|
</Button>
|
|
63
74
|
) : null}
|
|
64
75
|
</View>
|
|
@@ -13,14 +13,13 @@ import { makeStyles } from '../../utils/styles';
|
|
|
13
13
|
export type SitePublishStatus = 'draft' | 'published' | 'unpublishedChanges';
|
|
14
14
|
|
|
15
15
|
export type SitePreviewFrameProps = {
|
|
16
|
-
/** 사이트 화면 이미지 */
|
|
17
16
|
screenshot?: ImageSourcePropType;
|
|
18
|
-
/** 실제 사이트를 띄울 때(WebView 등). screenshot보다 우선 */
|
|
19
17
|
renderPreview?: () => ReactNode;
|
|
20
18
|
status: SitePublishStatus;
|
|
21
19
|
onPublish?: () => void;
|
|
22
20
|
publishing?: boolean;
|
|
23
|
-
|
|
21
|
+
publishDisabled?: boolean;
|
|
22
|
+
blockedReason?: string;
|
|
24
23
|
onRevert?: () => void;
|
|
25
24
|
style?: StyleProp<ViewStyle>;
|
|
26
25
|
};
|
|
@@ -62,15 +61,17 @@ const useStyles = makeStyles((t) => ({
|
|
|
62
61
|
barLabel: { flex: 1 },
|
|
63
62
|
barButton: { paddingHorizontal: t.space[4] },
|
|
64
63
|
actions: { gap: t.space[2] },
|
|
64
|
+
reason: { textAlign: 'center' },
|
|
65
65
|
}));
|
|
66
66
|
|
|
67
|
-
/** 만든 사이트 미리보기와 게시 */
|
|
68
67
|
export function SitePreviewFrame({
|
|
69
68
|
screenshot,
|
|
70
69
|
renderPreview,
|
|
71
70
|
status,
|
|
72
71
|
onPublish,
|
|
73
72
|
publishing,
|
|
73
|
+
publishDisabled,
|
|
74
|
+
blockedReason,
|
|
74
75
|
onRevert,
|
|
75
76
|
style,
|
|
76
77
|
}: SitePreviewFrameProps) {
|
|
@@ -97,6 +98,7 @@ export function SitePreviewFrame({
|
|
|
97
98
|
size="sm"
|
|
98
99
|
onPress={onPublish}
|
|
99
100
|
loading={publishing}
|
|
101
|
+
disabled={publishDisabled}
|
|
100
102
|
style={s.barButton}
|
|
101
103
|
>
|
|
102
104
|
게시
|
|
@@ -106,10 +108,23 @@ export function SitePreviewFrame({
|
|
|
106
108
|
) : null}
|
|
107
109
|
<View style={s.actions}>
|
|
108
110
|
{onPublish && status === 'draft' ? (
|
|
109
|
-
<Button
|
|
111
|
+
<Button
|
|
112
|
+
size="lg"
|
|
113
|
+
onPress={onPublish}
|
|
114
|
+
loading={publishing}
|
|
115
|
+
disabled={publishDisabled}
|
|
116
|
+
>
|
|
110
117
|
사이트 게시하기
|
|
111
118
|
</Button>
|
|
112
119
|
) : null}
|
|
120
|
+
{publishDisabled &&
|
|
121
|
+
blockedReason &&
|
|
122
|
+
onPublish &&
|
|
123
|
+
status !== 'published' ? (
|
|
124
|
+
<Text tone="muted" accessibilityLiveRegion="polite" style={s.reason}>
|
|
125
|
+
{blockedReason}
|
|
126
|
+
</Text>
|
|
127
|
+
) : null}
|
|
113
128
|
{onRevert && status !== 'draft' ? (
|
|
114
129
|
<Button variant="ghost" onPress={onRevert}>
|
|
115
130
|
직전 게시본으로 되돌리기
|
|
@@ -5,13 +5,9 @@ import { makeStyles } from '../../utils/styles';
|
|
|
5
5
|
import { Card } from '../internal/card';
|
|
6
6
|
|
|
7
7
|
export type StatCardProps = {
|
|
8
|
-
/** 예) '오늘 매출' */
|
|
9
8
|
label: string;
|
|
10
|
-
/** 이미 포맷된 값. 예) '1,234,000원', '42건' */
|
|
11
9
|
value: string;
|
|
12
|
-
/** 직전 기간 대비 증감률(%). 오르면 빨강, 내리면 파랑 */
|
|
13
10
|
change?: number | null;
|
|
14
|
-
/** 오른쪽 작은 차트. 예) <Sparkline /> (@ezpg/app-ui/charts) */
|
|
15
11
|
chart?: ReactNode;
|
|
16
12
|
onPress?: () => void;
|
|
17
13
|
style?: StyleProp<ViewStyle>;
|
|
@@ -29,7 +25,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
29
25
|
down: { color: t.colors.info },
|
|
30
26
|
}));
|
|
31
27
|
|
|
32
|
-
/** 핵심 숫자 하나와 증감 */
|
|
33
28
|
export function StatCard({
|
|
34
29
|
label,
|
|
35
30
|
value,
|
|
@@ -16,17 +16,12 @@ export type StepAction = {
|
|
|
16
16
|
|
|
17
17
|
export type StepScreenProps = {
|
|
18
18
|
title: string;
|
|
19
|
-
/** 넘기면 상단에 진행 막대 */
|
|
20
19
|
total?: number;
|
|
21
|
-
/** 0부터 */
|
|
22
20
|
current?: number;
|
|
23
|
-
/** 넘기면 상단에 이전 버튼 */
|
|
24
21
|
onBack?: () => void;
|
|
25
|
-
/** 이전 버튼의 접근성 라벨. 기본 '이전' */
|
|
26
22
|
backLabel?: string;
|
|
27
23
|
primaryAction: StepAction;
|
|
28
24
|
secondaryAction?: StepAction;
|
|
29
|
-
/** 하단 안전 영역 높이 */
|
|
30
25
|
bottomInset?: number;
|
|
31
26
|
children?: ReactNode;
|
|
32
27
|
};
|
|
@@ -63,7 +58,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
63
58
|
},
|
|
64
59
|
}));
|
|
65
60
|
|
|
66
|
-
/** 온보딩 한 단계의 화면 틀: 이전 · 진행 막대 · 제목 · 내용 · 하단 버튼 */
|
|
67
61
|
export function StepScreen({
|
|
68
62
|
title,
|
|
69
63
|
total,
|
|
@@ -13,24 +13,19 @@ import { PressableBase } from '../../internal/pressable-base';
|
|
|
13
13
|
import { makeStyles } from '../../utils/styles';
|
|
14
14
|
import { Card } from '../internal/card';
|
|
15
15
|
|
|
16
|
-
/** 예) { id: 'm', label: '중 20×25cm' } */
|
|
17
16
|
export type SupplyOption = { id: string; label: string };
|
|
18
17
|
|
|
19
|
-
/** 묶음 수량과 그 가격 */
|
|
20
18
|
export type SupplyQuantity = { quantity: number; price: number };
|
|
21
19
|
|
|
22
20
|
export type SupplyItemCardProps = {
|
|
23
21
|
name: string;
|
|
24
22
|
image: ImageSourcePropType;
|
|
25
|
-
/** 2개 이상이면 칩으로 고른다 */
|
|
26
23
|
options?: readonly SupplyOption[];
|
|
27
24
|
selectedOptionId?: string | null;
|
|
28
25
|
onSelectOption?: (id: string) => void;
|
|
29
|
-
/** 선택한 옵션의 수량별 가격 */
|
|
30
26
|
quantities: readonly SupplyQuantity[];
|
|
31
27
|
selectedQuantity: number | null;
|
|
32
28
|
onSelectQuantity: (quantity: number) => void;
|
|
33
|
-
/** 기본 '장' */
|
|
34
29
|
unit?: string;
|
|
35
30
|
onAdd?: () => void;
|
|
36
31
|
style?: StyleProp<ViewStyle>;
|
|
@@ -75,7 +70,6 @@ const useStyles = makeStyles((t) => ({
|
|
|
75
70
|
quantity: { flex: 1 },
|
|
76
71
|
}));
|
|
77
72
|
|
|
78
|
-
/** 로고를 넣어 주문하는 공급 품목. 사이즈 · 수량을 고르고 담는다 */
|
|
79
73
|
export function SupplyItemCard({
|
|
80
74
|
name,
|
|
81
75
|
image,
|
|
@@ -16,15 +16,10 @@ export type ChartDatum = { label: string; value: number };
|
|
|
16
16
|
|
|
17
17
|
export type LineChartProps = {
|
|
18
18
|
data: readonly ChartDatum[];
|
|
19
|
-
/** 기본 200 */
|
|
20
19
|
height?: number;
|
|
21
|
-
/** y축 라벨. 기본은 천 단위 쉼표 */
|
|
22
20
|
formatY?: (value: number) => string;
|
|
23
|
-
/** x축 라벨. 기본은 label 그대로 */
|
|
24
21
|
formatX?: (label: string, index: number) => string;
|
|
25
|
-
/** 점을 눌렀을 때. 넘기면 각 구간이 눌린다 */
|
|
26
22
|
onPointPress?: (datum: ChartDatum, index: number) => void;
|
|
27
|
-
/** 기본은 최고 · 최저 · 마지막 값 요약 */
|
|
28
23
|
accessibilityLabel?: string;
|
|
29
24
|
style?: StyleProp<ViewStyle>;
|
|
30
25
|
};
|
|
@@ -32,6 +27,16 @@ export type LineChartProps = {
|
|
|
32
27
|
const defaultFormat = (v: number) => formatPrice(v, '');
|
|
33
28
|
const PAD = { top: 8, right: 12, bottom: 24, gap: 8 };
|
|
34
29
|
const FONT_SIZE = 11;
|
|
30
|
+
const WIDE = /[\u1100-\u11ff\u3000-\u9fff\uac00-\ud7af\uff00-\uffef]/;
|
|
31
|
+
const NARROW = /[,.:'\s]/;
|
|
32
|
+
|
|
33
|
+
export function estimateLabelWidth(label: string, fontSize = FONT_SIZE) {
|
|
34
|
+
let em = 0;
|
|
35
|
+
for (const ch of label) {
|
|
36
|
+
em += WIDE.test(ch) ? 1 : NARROW.test(ch) ? 0.34 : 0.64;
|
|
37
|
+
}
|
|
38
|
+
return Math.ceil(em * fontSize) + 2;
|
|
39
|
+
}
|
|
35
40
|
|
|
36
41
|
export function LineChart({
|
|
37
42
|
data,
|
|
@@ -48,7 +53,7 @@ export function LineChart({
|
|
|
48
53
|
const ticks = niceTicks(Math.min(0, ...values), Math.max(0, ...values));
|
|
49
54
|
const yLabels = ticks.map(formatY);
|
|
50
55
|
const left =
|
|
51
|
-
Math.max(...yLabels.map((l) => l
|
|
56
|
+
Math.max(0, ...yLabels.map((l) => estimateLabelWidth(l))) + PAD.gap;
|
|
52
57
|
const plot = {
|
|
53
58
|
x0: left,
|
|
54
59
|
x1: width - PAD.right,
|
package/src/charts/scale.ts
CHANGED
|
@@ -2,7 +2,6 @@ export type Point = { x: number; y: number };
|
|
|
2
2
|
|
|
3
3
|
const STEPS = [1, 2, 2.5, 5, 10];
|
|
4
4
|
|
|
5
|
-
/** 보기 좋은 눈금. 값이 하나뿐이거나 모두 같아도 범위를 만든다 */
|
|
6
5
|
export function niceTicks(min: number, max: number, count = 4): number[] {
|
|
7
6
|
let lo = Math.min(min, max);
|
|
8
7
|
let hi = Math.max(min, max);
|
|
@@ -24,7 +23,6 @@ export function niceTicks(min: number, max: number, count = 4): number[] {
|
|
|
24
23
|
return ticks;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
/** [d0, d1] → [r0, r1] 선형 변환. 범위 폭이 0이면 가운데로 */
|
|
28
26
|
export function linearScale(domain: [number, number], range: [number, number]) {
|
|
29
27
|
const [d0, d1] = domain;
|
|
30
28
|
const [r0, r1] = range;
|
|
@@ -43,7 +41,6 @@ export function areaPath(points: Point[], baseline: number): string {
|
|
|
43
41
|
return `${linePath(points)} L${last.x},${baseline} L${first.x},${baseline} Z`;
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
/** 라벨이 겹치지 않게 최대 maxLabels개만 남길 간격 */
|
|
47
44
|
export function labelStep(count: number, maxLabels: number): number {
|
|
48
45
|
return Math.max(1, Math.ceil(count / Math.max(1, maxLabels)));
|
|
49
46
|
}
|