@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,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { Button } from "../../components/button/button.js";
|
|
5
|
+
import { formatPrice } from "../../components/price/price.js";
|
|
6
|
+
import { Text } from "../../components/text/text.js";
|
|
7
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
8
|
+
import { Card } from "../internal/card.js";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const useStyles = makeStyles(t => ({
|
|
11
|
+
root: {
|
|
12
|
+
gap: t.space[3]
|
|
13
|
+
},
|
|
14
|
+
row: {
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
alignItems: 'baseline',
|
|
17
|
+
justifyContent: 'space-between'
|
|
18
|
+
},
|
|
19
|
+
expiring: {
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
justifyContent: 'space-between',
|
|
23
|
+
minHeight: 44,
|
|
24
|
+
paddingHorizontal: t.space[3],
|
|
25
|
+
borderRadius: t.radius.md,
|
|
26
|
+
backgroundColor: `${t.colors.warning}24`
|
|
27
|
+
},
|
|
28
|
+
meter: {
|
|
29
|
+
height: 6,
|
|
30
|
+
borderRadius: t.radius.full,
|
|
31
|
+
backgroundColor: t.colors.muted,
|
|
32
|
+
overflow: 'hidden'
|
|
33
|
+
},
|
|
34
|
+
fill: {
|
|
35
|
+
height: '100%',
|
|
36
|
+
backgroundColor: t.colors.primary
|
|
37
|
+
},
|
|
38
|
+
actions: {
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
gap: t.space[2]
|
|
41
|
+
},
|
|
42
|
+
action: {
|
|
43
|
+
flex: 1
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
/** 보유 크레딧과 오늘 생성 횟수 */
|
|
48
|
+
export function CreditWallet({
|
|
49
|
+
balance,
|
|
50
|
+
expiring,
|
|
51
|
+
todayUsed,
|
|
52
|
+
dailyLimit,
|
|
53
|
+
onBuy,
|
|
54
|
+
onHistory,
|
|
55
|
+
style
|
|
56
|
+
}) {
|
|
57
|
+
const s = useStyles();
|
|
58
|
+
const ratio = dailyLimit > 0 ? Math.min(1, todayUsed / dailyLimit) : 1;
|
|
59
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
60
|
+
style: [s.root, style],
|
|
61
|
+
children: [/*#__PURE__*/_jsxs(Card, {
|
|
62
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
63
|
+
style: s.row,
|
|
64
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
65
|
+
weight: "semibold",
|
|
66
|
+
children: "\uBCF4\uC720 \uD06C\uB808\uB527"
|
|
67
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
68
|
+
variant: "display",
|
|
69
|
+
children: formatPrice(balance, '')
|
|
70
|
+
})]
|
|
71
|
+
}), expiring !== undefined && expiring > 0 ? /*#__PURE__*/_jsxs(View, {
|
|
72
|
+
style: s.expiring,
|
|
73
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
74
|
+
children: "\uC774\uBC88 \uB2EC \uC18C\uBA78"
|
|
75
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
76
|
+
weight: "bold",
|
|
77
|
+
children: [formatPrice(expiring, ''), "\uAC1C"]
|
|
78
|
+
})]
|
|
79
|
+
}) : null, onBuy || onHistory ? /*#__PURE__*/_jsxs(View, {
|
|
80
|
+
style: s.actions,
|
|
81
|
+
children: [onHistory ? /*#__PURE__*/_jsx(Button, {
|
|
82
|
+
variant: "secondary",
|
|
83
|
+
style: s.action,
|
|
84
|
+
onPress: onHistory,
|
|
85
|
+
children: "\uB0B4\uC5ED"
|
|
86
|
+
}) : null, onBuy ? /*#__PURE__*/_jsx(Button, {
|
|
87
|
+
style: s.action,
|
|
88
|
+
onPress: onBuy,
|
|
89
|
+
children: "\uCDA9\uC804"
|
|
90
|
+
}) : null]
|
|
91
|
+
}) : null]
|
|
92
|
+
}), /*#__PURE__*/_jsxs(Card, {
|
|
93
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
94
|
+
style: s.row,
|
|
95
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
96
|
+
weight: "semibold",
|
|
97
|
+
children: "\uC624\uB298 \uC0DD\uC131"
|
|
98
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
99
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
100
|
+
weight: "bold",
|
|
101
|
+
children: todayUsed
|
|
102
|
+
}), " / ", dailyLimit]
|
|
103
|
+
})]
|
|
104
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
105
|
+
accessible: true,
|
|
106
|
+
accessibilityRole: "progressbar",
|
|
107
|
+
accessibilityLabel: "\uC624\uB298 \uC0DD\uC131",
|
|
108
|
+
accessibilityValue: {
|
|
109
|
+
min: 0,
|
|
110
|
+
max: dailyLimit,
|
|
111
|
+
now: todayUsed
|
|
112
|
+
},
|
|
113
|
+
style: s.meter,
|
|
114
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
115
|
+
style: [s.fill, {
|
|
116
|
+
width: `${ratio * 100}%`
|
|
117
|
+
}]
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=credit-wallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Button","formatPrice","Text","makeStyles","Card","jsx","_jsx","jsxs","_jsxs","useStyles","t","root","gap","space","row","flexDirection","alignItems","justifyContent","expiring","minHeight","paddingHorizontal","borderRadius","radius","md","backgroundColor","colors","warning","meter","height","full","muted","overflow","fill","primary","actions","action","flex","CreditWallet","balance","todayUsed","dailyLimit","onBuy","onHistory","style","s","ratio","Math","min","children","weight","variant","undefined","onPress","accessible","accessibilityRole","accessibilityLabel","accessibilityValue","max","now","width"],"sourceRoot":"../../../../src","sources":["blocks/credit-wallet/credit-wallet.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAwC,cAAc;AACnE,SAASC,MAAM,QAAQ,mCAAgC;AACvD,SAASC,WAAW,QAAQ,iCAA8B;AAC1D,SAASC,IAAI,QAAQ,+BAA4B;AACjD,SAASC,UAAU,QAAQ,uBAAoB;AAC/C,SAASC,IAAI,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAaxC,MAAMC,SAAS,GAAGN,UAAU,CAAEO,CAAC,KAAM;EACnCC,IAAI,EAAE;IAAEC,GAAG,EAAEF,CAAC,CAACG,KAAK,CAAC,CAAC;EAAE,CAAC;EACzBC,GAAG,EAAE;IACHC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,UAAU;IACtBC,cAAc,EAAE;EAClB,CAAC;EACDC,QAAQ,EAAE;IACRH,aAAa,EAAE,KAAK;IACpBC,UA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B,GAAI;QAAAkC,QAAA,gBACjB1C,IAAA,CAACJ,IAAI;UAAC+C,MAAM,EAAC,UAAU;UAAAD,QAAA,EAAC;QAAK,CAAM,CAAC,eACpCxC,KAAA,CAACN,IAAI;UAAA8C,QAAA,gBACH1C,IAAA,CAACJ,IAAI;YAAC+C,MAAM,EAAC,MAAM;YAAAD,QAAA,EAAET;UAAS,CAAO,CAAC,OAAG,EAACC,UAAU;QAAA,CAChD,CAAC;MAAA,CACH,CAAC,eACPlC,IAAA,CAACP,IAAI;QACHsD,UAAU;QACVC,iBAAiB,EAAC,aAAa;QAC/BC,kBAAkB,EAAC,2BAAO;QAC1BC,kBAAkB,EAAE;UAAET,GAAG,EAAE,CAAC;UAAEU,GAAG,EAAEjB,UAAU;UAAEkB,GAAG,EAAEnB;QAAU,CAAE;QAChEI,KAAK,EAAEC,CAAC,CAACjB,KAAM;QAAAqB,QAAA,eAEf1C,IAAA,CAACP,IAAI;UAAC4C,KAAK,EAAE,CAACC,CAAC,CAACZ,IAAI,EAAE;YAAE2B,KAAK,EAAE,GAAGd,KAAK,GAAG,GAAG;UAAI,CAAC;QAAE,CAAE;MAAC,CACnD,CAAC;IAAA,CACH,CAAC;EAAA,CACH,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CreditWallet"],"sourceRoot":"../../../../src","sources":["blocks/credit-wallet/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAgC,oBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { ActivityIndicator, StyleSheet, View } from 'react-native';
|
|
4
|
+
import { Photo } from "../../components/photo/photo.js";
|
|
5
|
+
import { Text } from "../../components/text/text.js";
|
|
6
|
+
import { CloseGlyph } from "../../internal/glyphs.js";
|
|
7
|
+
import { PressableBase } from "../../internal/pressable-base.js";
|
|
8
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
9
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
10
|
+
import { SortableGrid, SortableHandle } from "../../sortable/sortable-grid.js";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
const ADD = {
|
|
13
|
+
id: '__add',
|
|
14
|
+
uri: ''
|
|
15
|
+
};
|
|
16
|
+
const RADIUS = 10;
|
|
17
|
+
const useStyles = makeStyles(t => ({
|
|
18
|
+
fill: {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
top: 0,
|
|
21
|
+
right: 0,
|
|
22
|
+
bottom: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
borderRadius: RADIUS
|
|
27
|
+
},
|
|
28
|
+
dim: {
|
|
29
|
+
backgroundColor: 'rgba(0, 0, 0, 0.45)'
|
|
30
|
+
},
|
|
31
|
+
light: {
|
|
32
|
+
backgroundColor: 'rgba(255, 255, 255, 0.7)'
|
|
33
|
+
},
|
|
34
|
+
cover: {
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
left: 0,
|
|
37
|
+
right: 0,
|
|
38
|
+
bottom: 0,
|
|
39
|
+
paddingVertical: 2,
|
|
40
|
+
borderBottomLeftRadius: RADIUS,
|
|
41
|
+
borderBottomRightRadius: RADIUS,
|
|
42
|
+
backgroundColor: 'rgba(0, 0, 0, 0.6)'
|
|
43
|
+
},
|
|
44
|
+
coverText: {
|
|
45
|
+
color: '#ffffff',
|
|
46
|
+
textAlign: 'center'
|
|
47
|
+
},
|
|
48
|
+
remove: {
|
|
49
|
+
position: 'absolute',
|
|
50
|
+
top: 0,
|
|
51
|
+
right: 0,
|
|
52
|
+
width: 44,
|
|
53
|
+
height: 44,
|
|
54
|
+
alignItems: 'flex-end',
|
|
55
|
+
padding: t.space[1]
|
|
56
|
+
},
|
|
57
|
+
removeDot: {
|
|
58
|
+
width: 22,
|
|
59
|
+
height: 22,
|
|
60
|
+
borderRadius: 11,
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
justifyContent: 'center',
|
|
63
|
+
backgroundColor: '#262626'
|
|
64
|
+
},
|
|
65
|
+
add: {
|
|
66
|
+
aspectRatio: 1,
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
justifyContent: 'center',
|
|
69
|
+
gap: 2,
|
|
70
|
+
borderRadius: RADIUS,
|
|
71
|
+
borderWidth: 1,
|
|
72
|
+
borderColor: t.colors.input,
|
|
73
|
+
backgroundColor: t.colors.muted
|
|
74
|
+
},
|
|
75
|
+
count: {
|
|
76
|
+
fontSize: 13,
|
|
77
|
+
fontVariant: ['tabular-nums']
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
const g = StyleSheet.create({
|
|
81
|
+
center: {
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
justifyContent: 'center'
|
|
84
|
+
},
|
|
85
|
+
column: {
|
|
86
|
+
alignItems: 'center'
|
|
87
|
+
},
|
|
88
|
+
bump: {
|
|
89
|
+
borderBottomWidth: 0
|
|
90
|
+
},
|
|
91
|
+
open: {
|
|
92
|
+
borderTopColor: 'transparent',
|
|
93
|
+
transform: [{
|
|
94
|
+
rotate: '45deg'
|
|
95
|
+
}]
|
|
96
|
+
},
|
|
97
|
+
head: {
|
|
98
|
+
position: 'absolute'
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
/** 카메라 모양. svg 없이 테두리로 그린다 */
|
|
103
|
+
function CameraGlyph({
|
|
104
|
+
color,
|
|
105
|
+
size
|
|
106
|
+
}) {
|
|
107
|
+
const stroke = Math.max(1.5, size / 14);
|
|
108
|
+
const line = {
|
|
109
|
+
borderWidth: stroke,
|
|
110
|
+
borderColor: color
|
|
111
|
+
};
|
|
112
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
113
|
+
style: [g.column, {
|
|
114
|
+
width: size,
|
|
115
|
+
height: size
|
|
116
|
+
}],
|
|
117
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
118
|
+
style: [line, g.bump, {
|
|
119
|
+
width: size * 0.34,
|
|
120
|
+
height: size * 0.16,
|
|
121
|
+
marginTop: size * 0.1,
|
|
122
|
+
borderTopLeftRadius: stroke,
|
|
123
|
+
borderTopRightRadius: stroke
|
|
124
|
+
}]
|
|
125
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
126
|
+
style: [line, g.center, {
|
|
127
|
+
width: size * 0.84,
|
|
128
|
+
height: size * 0.58,
|
|
129
|
+
borderRadius: size * 0.12
|
|
130
|
+
}],
|
|
131
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
132
|
+
style: [line, {
|
|
133
|
+
width: size * 0.3,
|
|
134
|
+
height: size * 0.3,
|
|
135
|
+
borderRadius: size * 0.15
|
|
136
|
+
}]
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** 다시 시도 화살표. 끊긴 원 + 화살촉 */
|
|
143
|
+
function RetryGlyph({
|
|
144
|
+
color,
|
|
145
|
+
size
|
|
146
|
+
}) {
|
|
147
|
+
const stroke = Math.max(2, size / 11);
|
|
148
|
+
const ring = size * 0.76;
|
|
149
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
150
|
+
style: [g.center, {
|
|
151
|
+
width: size,
|
|
152
|
+
height: size
|
|
153
|
+
}],
|
|
154
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
155
|
+
style: [g.open, {
|
|
156
|
+
width: ring,
|
|
157
|
+
height: ring,
|
|
158
|
+
borderRadius: ring / 2,
|
|
159
|
+
borderWidth: stroke,
|
|
160
|
+
borderColor: color
|
|
161
|
+
}]
|
|
162
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
163
|
+
style: [g.head, {
|
|
164
|
+
top: size * 0.08,
|
|
165
|
+
right: size * 0.1,
|
|
166
|
+
width: size * 0.3,
|
|
167
|
+
height: size * 0.3,
|
|
168
|
+
borderTopWidth: stroke,
|
|
169
|
+
borderRightWidth: stroke,
|
|
170
|
+
borderColor: color
|
|
171
|
+
}]
|
|
172
|
+
})]
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** 상품 사진 올리기 · 순서 바꾸기. 앱 최상단이 GestureHandlerRootView로 감싸져 있어야 한다 */
|
|
177
|
+
export function ImageGrid({
|
|
178
|
+
images,
|
|
179
|
+
onImagesChange,
|
|
180
|
+
onAdd,
|
|
181
|
+
onRemove,
|
|
182
|
+
onRetry,
|
|
183
|
+
max = 10,
|
|
184
|
+
columns = 4,
|
|
185
|
+
style
|
|
186
|
+
}) {
|
|
187
|
+
const t = useTheme();
|
|
188
|
+
const s = useStyles();
|
|
189
|
+
const data = onAdd ? [ADD, ...images] : [...images];
|
|
190
|
+
const canAdd = images.length < max;
|
|
191
|
+
return /*#__PURE__*/_jsx(View, {
|
|
192
|
+
style: style,
|
|
193
|
+
children: /*#__PURE__*/_jsx(SortableGrid, {
|
|
194
|
+
data: data,
|
|
195
|
+
columns: columns,
|
|
196
|
+
gap: 10,
|
|
197
|
+
handle: true,
|
|
198
|
+
keyExtractor: img => img.id,
|
|
199
|
+
onDataChange: next => onImagesChange(next.filter(i => i !== ADD)),
|
|
200
|
+
itemLabel: img => {
|
|
201
|
+
if (img === ADD) return `사진 추가, ${max}장 중 ${images.length}장`;
|
|
202
|
+
const n = images.indexOf(img) + 1;
|
|
203
|
+
const state = img.status === 'uploading' ? ', 업로드 중' : img.status === 'failed' ? ', 업로드 실패' : '';
|
|
204
|
+
return `사진 ${n}${n === 1 ? ', 대표' : ''}${state}`;
|
|
205
|
+
},
|
|
206
|
+
renderItem: ({
|
|
207
|
+
item
|
|
208
|
+
}) => {
|
|
209
|
+
if (item === ADD) {
|
|
210
|
+
return /*#__PURE__*/_jsxs(PressableBase, {
|
|
211
|
+
accessibilityLabel: `사진 추가, ${max}장 중 ${images.length}장`,
|
|
212
|
+
disabled: !canAdd,
|
|
213
|
+
onPress: onAdd,
|
|
214
|
+
style: s.add,
|
|
215
|
+
children: [/*#__PURE__*/_jsx(CameraGlyph, {
|
|
216
|
+
color: t.colors.mutedForeground,
|
|
217
|
+
size: 24
|
|
218
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
219
|
+
weight: "semibold",
|
|
220
|
+
style: s.count,
|
|
221
|
+
children: [images.length, "/", max]
|
|
222
|
+
})]
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
const n = images.indexOf(item) + 1;
|
|
226
|
+
return /*#__PURE__*/_jsx(SortableHandle, {
|
|
227
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
228
|
+
children: [/*#__PURE__*/_jsx(Photo, {
|
|
229
|
+
source: {
|
|
230
|
+
uri: item.uri
|
|
231
|
+
},
|
|
232
|
+
radius: RADIUS
|
|
233
|
+
}), n === 1 && !item.status ? /*#__PURE__*/_jsx(View, {
|
|
234
|
+
style: s.cover,
|
|
235
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
236
|
+
variant: "caption",
|
|
237
|
+
weight: "bold",
|
|
238
|
+
style: s.coverText,
|
|
239
|
+
children: "\uB300\uD45C"
|
|
240
|
+
})
|
|
241
|
+
}) : null, item.status === 'uploading' ? /*#__PURE__*/_jsx(View, {
|
|
242
|
+
style: [s.fill, s.dim],
|
|
243
|
+
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
244
|
+
color: "#ffffff"
|
|
245
|
+
})
|
|
246
|
+
}) : item.status === 'failed' ? /*#__PURE__*/_jsx(PressableBase, {
|
|
247
|
+
accessibilityLabel: `사진 ${n} 업로드 실패, 다시 시도`,
|
|
248
|
+
disabled: !onRetry,
|
|
249
|
+
onPress: () => onRetry?.(item.id),
|
|
250
|
+
style: [s.fill, s.light],
|
|
251
|
+
children: /*#__PURE__*/_jsx(RetryGlyph, {
|
|
252
|
+
color: t.colors.destructive,
|
|
253
|
+
size: 26
|
|
254
|
+
})
|
|
255
|
+
}) : null, onRemove && item.status !== 'uploading' ? /*#__PURE__*/_jsx(PressableBase, {
|
|
256
|
+
accessibilityLabel: `사진 ${n} 삭제`,
|
|
257
|
+
onPress: () => onRemove(item.id),
|
|
258
|
+
style: s.remove,
|
|
259
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
260
|
+
style: s.removeDot,
|
|
261
|
+
children: /*#__PURE__*/_jsx(CloseGlyph, {
|
|
262
|
+
color: "#ffffff",
|
|
263
|
+
size: 12
|
|
264
|
+
})
|
|
265
|
+
})
|
|
266
|
+
}) : null]
|
|
267
|
+
})
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
})
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=image-grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActivityIndicator","StyleSheet","View","Photo","Text","CloseGlyph","PressableBase","useTheme","makeStyles","SortableGrid","SortableHandle","jsx","_jsx","jsxs","_jsxs","ADD","id","uri","RADIUS","useStyles","t","fill","position","top","right","bottom","left","alignItems","justifyContent","borderRadius","dim","backgroundColor","light","cover","paddingVertical","borderBottomLeftRadius","borderBottomRightRadius","coverText","color","textAlign","remove","width","height","padding","space","removeDot","add","aspectRatio","gap","borderWidth","borderColor","colors","input","muted","count","fontSize","fontVariant","g","create","center","column","bump","borderBottomWidth","open","borderTopColor","transform","rotate","head","CameraGlyph","size","stroke","Math","max","line","style","children","marginTop","borderTopLeftRadius","borderTopRightRadius","RetryGlyph","ring","borderTopWidth","borderRightWidth","ImageGrid","images","onImagesChange","onAdd","onRemove","onRetry","columns","s","data","canAdd","length","handle","keyExtractor","img","onDataChange","next","filter","i","itemLabel","n","indexOf","state","status","renderItem","item","accessibilityLabel","disabled","onPress","mutedForeground","weight","source","radius","variant","destructive"],"sourceRoot":"../../../../src","sources":["blocks/image-grid/image-grid.tsx"],"mappings":";;AAAA,SACEA,iBAAiB,EACjBC,UAAU,EACVC,IAAI,QAGC,cAAc;AACrB,SAASC,KAAK,QAAQ,iCAA8B;A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AAA,KAAMtB,OAAO,GAAGmB,IAAI,CAAC3F,EAAE,CAAE;cAClC0D,KAAK,EAAE,CAACgB,CAAC,CAACrE,IAAI,EAAEqE,CAAC,CAAC1D,KAAK,CAAE;cAAA2C,QAAA,eAEzB/D,IAAA,CAACmE,UAAU;gBAACzC,KAAK,EAAElB,CAAC,CAAC+B,MAAM,CAACiE,WAAY;gBAAC/C,IAAI,EAAE;cAAG,CAAE;YAAC,CACxC,CAAC,GACd,IAAI,EACPkB,QAAQ,IAAIoB,IAAI,CAACF,MAAM,KAAK,WAAW,gBACtC7F,IAAA,CAACN,aAAa;cACZsG,kBAAkB,EAAE,MAAMN,CAAC,KAAM;cACjCQ,OAAO,EAAEA,CAAA,KAAMvB,QAAQ,CAACoB,IAAI,CAAC3F,EAAE,CAAE;cACjC0D,KAAK,EAAEgB,CAAC,CAAClD,MAAO;cAAAmC,QAAA,eAEhB/D,IAAA,CAACV,IAAI;gBAACwE,KAAK,EAAEgB,CAAC,CAAC7C,SAAU;gBAAA8B,QAAA,eACvB/D,IAAA,CAACP,UAAU;kBAACiC,KAAK,EAAC,SAAS;kBAAC+B,IAAI,EAAE;gBAAG,CAAE;cAAC,CACpC;YAAC,CACM,CAAC,GACd,IAAI;UAAA,CACJ;QAAC,CACO,CAAC;MAErB;IAAE,CACH;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ImageGrid"],"sourceRoot":"../../../../src","sources":["blocks/image-grid/index.ts"],"mappings":";;AAAA,SAASA,SAAS,QAA6C,iBAAc","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export * from "./brand-profile-card/index.js";
|
|
4
|
+
export * from "./claim-row/index.js";
|
|
5
|
+
export * from "./color-swatch-picker/index.js";
|
|
6
|
+
export * from "./copy-variant-picker/index.js";
|
|
7
|
+
export * from "./credit-wallet/index.js";
|
|
8
|
+
export * from "./invoice-row/index.js";
|
|
9
|
+
export * from "./logo-candidate-grid/index.js";
|
|
10
|
+
export * from "./oauth-buttons/index.js";
|
|
11
|
+
export * from "./order-card/index.js";
|
|
12
|
+
export * from "./plan-card/index.js";
|
|
13
|
+
export * from "./product-list-empty/index.js";
|
|
14
|
+
export * from "./review-row/index.js";
|
|
15
|
+
export * from "./service-state-banner/index.js";
|
|
16
|
+
export * from "./shipping-tracking-row/index.js";
|
|
17
|
+
export * from "./site-preview-frame/index.js";
|
|
18
|
+
export * from "./stat-card/index.js";
|
|
19
|
+
export * from "./step-screen/index.js";
|
|
20
|
+
export * from "./supply-item-card/index.js";
|
|
21
|
+
export { formatDeadline, formatManwon } from "./internal/format.js";
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["formatDeadline","formatManwon"],"sourceRoot":"../../../src","sources":["blocks/index.tsx"],"mappings":";;AAAA,cAAc,+BAAsB;AACpC,cAAc,sBAAa;AAC3B,cAAc,gCAAuB;AACrC,cAAc,gCAAuB;AACrC,cAAc,0BAAiB;AAC/B,cAAc,wBAAe;AAC7B,cAAc,gCAAuB;AACrC,cAAc,0BAAiB;AAC/B,cAAc,uBAAc;AAC5B,cAAc,sBAAa;AAC3B,cAAc,+BAAsB;AACpC,cAAc,uBAAc;AAC5B,cAAc,iCAAwB;AACtC,cAAc,kCAAyB;AACvC,cAAc,+BAAsB;AACpC,cAAc,sBAAa;AAC3B,cAAc,wBAAe;AAC7B,cAAc,6BAAoB;AAClC,SAASA,cAAc,EAAEC,YAAY,QAAQ,sBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { PressableBase } from "../../internal/pressable-base.js";
|
|
5
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const useStyles = makeStyles(t => ({
|
|
8
|
+
card: {
|
|
9
|
+
gap: t.space[3],
|
|
10
|
+
padding: t.space[4],
|
|
11
|
+
borderRadius: t.radius.lg,
|
|
12
|
+
borderWidth: 1,
|
|
13
|
+
borderColor: t.colors.border,
|
|
14
|
+
backgroundColor: t.colors.background
|
|
15
|
+
},
|
|
16
|
+
pressed: {
|
|
17
|
+
backgroundColor: t.colors.muted
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
/** blocks 공용 카드 틀. onPress가 있으면 누를 수 있다 */
|
|
22
|
+
export function Card({
|
|
23
|
+
children,
|
|
24
|
+
onPress,
|
|
25
|
+
accessibilityLabel,
|
|
26
|
+
style
|
|
27
|
+
}) {
|
|
28
|
+
const s = useStyles();
|
|
29
|
+
if (!onPress) return /*#__PURE__*/_jsx(View, {
|
|
30
|
+
style: [s.card, style],
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
return /*#__PURE__*/_jsx(PressableBase, {
|
|
34
|
+
onPress: onPress,
|
|
35
|
+
accessibilityLabel: accessibilityLabel,
|
|
36
|
+
pressedStyle: s.pressed,
|
|
37
|
+
style: [s.card, style],
|
|
38
|
+
children: children
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","PressableBase","makeStyles","jsx","_jsx","useStyles","t","card","gap","space","padding","borderRadius","radius","lg","borderWidth","borderColor","colors","border","backgroundColor","background","pressed","muted","Card","children","onPress","accessibilityLabel","style","s","pressedStyle"],"sourceRoot":"../../../../src","sources":["blocks/internal/card.tsx"],"mappings":";;AACA,SAASA,IAAI,QAAwC,cAAc;AACnE,SAASC,aAAa,QAAQ,kCAA+B;AAC7D,SAASC,UAAU,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhD,MAAMC,SAAS,GAAGH,UAAU,CAAEI,CAAC,KAAM;EACnCC,IAAI,EAAE;IACJC,GAAG,EAAEF,CAAC,CAACG,KAAK,CAAC,CAAC,CAAC;IACfC,OAAO,EAAEJ,CAAC,CAACG,KAAK,CAAC,CAAC,CAAC;IACnBE,YAAY,EAAEL,CAAC,CAACM,MAAM,CAACC,EAAE;IACzBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAET,CAAC,CAACU,MAAM,CAACC,MAAM;IAC5BC,eAAe,EAAEZ,CAAC,CAACU,MAAM,CAACG;EAC5B,CAAC;EACDC,OAAO,EAAE;IAAEF,eAAe,EAAEZ,CAAC,CAACU,MAAM,CAACK;EAAM;AAC7C,CAAC,CAAC,CAAC;;AAEH;AACA,OAAO,SAASC,IAAIA,CAAC;EACnBC,QAAQ;EACRC,OAAO;EACPC,kBAAkB;EAClBC;AAMF,CAAC,EAAE;EACD,MAAMC,CAAC,GAAGtB,SAAS,CAAC,CAAC;EACrB,IAAI,CAACmB,OAAO,EAAE,oBAAOpB,IAAA,CAACJ,IAAI;IAAC0B,KAAK,EAAE,CAACC,CAAC,CAACpB,IAAI,EAAEmB,KAAK,CAAE;IAAAH,QAAA,EAAEA;EAAQ,CAAO,CAAC;EACpE,oBACEnB,IAAA,CAACH,aAAa;IACZuB,OAAO,EAAEA,OAAQ;IACjBC,kBAAkB,EAAEA,kBAAmB;IACvCG,YAAY,EAAED,CAAC,CAACP,OAAQ;IACxBM,KAAK,EAAE,CAACC,CAAC,CAACpB,IAAI,EAAEmB,KAAK,CAAE;IAAAH,QAAA,EAEtBA;EAAQ,CACI,CAAC;AAEpB","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { formatPrice } from "../../components/price/price.js";
|
|
4
|
+
|
|
5
|
+
/** 420000 → '42만', 12345 → '1.2만', 9000 → '9,000' */
|
|
6
|
+
export function formatManwon(value) {
|
|
7
|
+
const abs = Math.abs(value);
|
|
8
|
+
if (abs < 10000) return formatPrice(value, '');
|
|
9
|
+
const man = value / 10000;
|
|
10
|
+
const digits = Math.abs(man) >= 10 ? 0 : 1;
|
|
11
|
+
return `${Number(man.toFixed(digits))}만`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** 전기 대비 증감률(%). 이전 값이 0이면 null */
|
|
15
|
+
export function changeRate(current, previous) {
|
|
16
|
+
if (previous === 0) return null;
|
|
17
|
+
return (current - previous) / Math.abs(previous) * 100;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** 마감이 임박했을 때만 문구를 돌려준다. 0 → '오늘 마감', 1 → '내일 마감', 2 → '모레 마감', 그 밖 null */
|
|
21
|
+
export function formatDeadline(days) {
|
|
22
|
+
if (days < 0) return '기한 지남';
|
|
23
|
+
return ['오늘 마감', '내일 마감', '모레 마감'][days] ?? null;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["formatPrice","formatManwon","value","abs","Math","man","digits","Number","toFixed","changeRate","current","previous","formatDeadline","days"],"sourceRoot":"../../../../src","sources":["blocks/internal/format.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,iCAA8B;;AAE1D;AACA,OAAO,SAASC,YAAYA,CAACC,KAAa,EAAU;EAClD,MAAMC,GAAG,GAAGC,IAAI,CAACD,GAAG,CAACD,KAAK,CAAC;EAC3B,IAAIC,GAAG,GAAG,KAAK,EAAE,OAAOH,WAAW,CAACE,KAAK,EAAE,EAAE,CAAC;EAC9C,MAAMG,GAAG,GAAGH,KAAK,GAAG,KAAK;EACzB,MAAMI,MAAM,GAAGF,IAAI,CAACD,GAAG,CAACE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC;EAC1C,OAAO,GAAGE,MAAM,CAACF,GAAG,CAACG,OAAO,CAACF,MAAM,CAAC,CAAC,GAAG;AAC1C;;AAEA;AACA,OAAO,SAASG,UAAUA,CAACC,OAAe,EAAEC,QAAgB,EAAiB;EAC3E,IAAIA,QAAQ,KAAK,CAAC,EAAE,OAAO,IAAI;EAC/B,OAAQ,CAACD,OAAO,GAAGC,QAAQ,IAAIP,IAAI,CAACD,GAAG,CAACQ,QAAQ,CAAC,GAAI,GAAG;AAC1D;;AAEA;AACA,OAAO,SAASC,cAAcA,CAACC,IAAY,EAAiB;EAC1D,IAAIA,IAAI,GAAG,CAAC,EAAE,OAAO,OAAO;EAC5B,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAACA,IAAI,CAAC,IAAI,IAAI;AAClD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["InvoiceRow"],"sourceRoot":"../../../../src","sources":["blocks/invoice-row/index.ts"],"mappings":";;AAAA,SACEA,UAAU,QAGL,kBAAe","ignoreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { Button } from "../../components/button/button.js";
|
|
5
|
+
import { ListRow } from "../../components/list-row/list-row.js";
|
|
6
|
+
import { formatPrice } from "../../components/price/price.js";
|
|
7
|
+
import { Text } from "../../components/text/text.js";
|
|
8
|
+
import { AlertGlyph } from "../../internal/glyphs.js";
|
|
9
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
10
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
11
|
+
import { Card } from "../internal/card.js";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const useStyles = makeStyles(t => ({
|
|
14
|
+
row: {
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
gap: t.space[2]
|
|
18
|
+
},
|
|
19
|
+
grow: {
|
|
20
|
+
flex: 1
|
|
21
|
+
},
|
|
22
|
+
head: {
|
|
23
|
+
fontSize: 16,
|
|
24
|
+
lineHeight: 24,
|
|
25
|
+
fontVariant: ['tabular-nums']
|
|
26
|
+
},
|
|
27
|
+
action: {
|
|
28
|
+
flex: 1
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
/** 결제 내역 한 건. 실패한 결제는 해결 버튼이 있는 카드로 보여준다 */
|
|
33
|
+
export function InvoiceRow({
|
|
34
|
+
title,
|
|
35
|
+
amount,
|
|
36
|
+
status = 'paid',
|
|
37
|
+
refundedAmount,
|
|
38
|
+
onChangePaymentMethod,
|
|
39
|
+
onRetry,
|
|
40
|
+
retrying,
|
|
41
|
+
onPress,
|
|
42
|
+
style
|
|
43
|
+
}) {
|
|
44
|
+
const t = useTheme();
|
|
45
|
+
const s = useStyles();
|
|
46
|
+
if (status !== 'failed') {
|
|
47
|
+
const value = status === 'refunded' ? `환불 ${formatPrice(refundedAmount ?? amount)}` : formatPrice(amount);
|
|
48
|
+
return /*#__PURE__*/_jsx(ListRow, {
|
|
49
|
+
title: title,
|
|
50
|
+
onPress: onPress,
|
|
51
|
+
style: style,
|
|
52
|
+
trailing: /*#__PURE__*/_jsx(Text, {
|
|
53
|
+
weight: "semibold",
|
|
54
|
+
tone: status === 'refunded' ? 'muted' : 'default',
|
|
55
|
+
children: value
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return /*#__PURE__*/_jsxs(Card, {
|
|
60
|
+
onPress: onPress,
|
|
61
|
+
accessibilityLabel: `결제 실패, ${formatPrice(amount)}, ${title}`,
|
|
62
|
+
style: style,
|
|
63
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
64
|
+
style: s.row,
|
|
65
|
+
children: [/*#__PURE__*/_jsx(AlertGlyph, {
|
|
66
|
+
filled: true,
|
|
67
|
+
color: t.colors.destructive,
|
|
68
|
+
onColor: t.colors.destructiveForeground,
|
|
69
|
+
size: t.iconSize.md
|
|
70
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
71
|
+
weight: "bold",
|
|
72
|
+
tone: "destructive",
|
|
73
|
+
style: [s.head, s.grow],
|
|
74
|
+
children: "\uACB0\uC81C \uC2E4\uD328"
|
|
75
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
76
|
+
weight: "bold",
|
|
77
|
+
style: s.head,
|
|
78
|
+
children: formatPrice(amount)
|
|
79
|
+
})]
|
|
80
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
81
|
+
numberOfLines: 1,
|
|
82
|
+
children: title
|
|
83
|
+
}), onChangePaymentMethod || onRetry ? /*#__PURE__*/_jsxs(View, {
|
|
84
|
+
style: s.row,
|
|
85
|
+
children: [onChangePaymentMethod ? /*#__PURE__*/_jsx(Button, {
|
|
86
|
+
size: "sm",
|
|
87
|
+
variant: "outline",
|
|
88
|
+
style: s.action,
|
|
89
|
+
onPress: onChangePaymentMethod,
|
|
90
|
+
children: "\uACB0\uC81C\uC218\uB2E8 \uBCC0\uACBD"
|
|
91
|
+
}) : null, onRetry ? /*#__PURE__*/_jsx(Button, {
|
|
92
|
+
size: "sm",
|
|
93
|
+
loading: retrying,
|
|
94
|
+
style: s.action,
|
|
95
|
+
onPress: onRetry,
|
|
96
|
+
children: "\uB2E4\uC2DC \uACB0\uC81C"
|
|
97
|
+
}) : null]
|
|
98
|
+
}) : null]
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=invoice-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Button","ListRow","formatPrice","Text","AlertGlyph","useTheme","makeStyles","Card","jsx","_jsx","jsxs","_jsxs","useStyles","t","row","flexDirection","alignItems","gap","space","grow","flex","head","fontSize","lineHeight","fontVariant","action","InvoiceRow","title","amount","status","refundedAmount","onChangePaymentMethod","onRetry","retrying","onPress","style","s","value","trailing","weight","tone","children","accessibilityLabel","filled","color","colors","destructive","onColor","destructiveForeground","size","iconSize","md","numberOfLines","variant","loading"],"sourceRoot":"../../../../src","sources":["blocks/invoice-row/invoice-row.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAA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