@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,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Text, View } from 'react-native';
|
|
4
|
+
import { PressableBase } from "../../internal/pressable-base.js";
|
|
5
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
6
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const HEIGHT = 40;
|
|
9
|
+
const useStyles = makeStyles(t => ({
|
|
10
|
+
track: {
|
|
11
|
+
flexDirection: 'row',
|
|
12
|
+
height: HEIGHT,
|
|
13
|
+
padding: t.space[1],
|
|
14
|
+
gap: t.space[1],
|
|
15
|
+
borderRadius: t.radius.md,
|
|
16
|
+
backgroundColor: t.colors.muted
|
|
17
|
+
},
|
|
18
|
+
tab: {
|
|
19
|
+
flex: 1,
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
borderRadius: t.radius.sm
|
|
23
|
+
},
|
|
24
|
+
selected: {
|
|
25
|
+
backgroundColor: t.colors.background,
|
|
26
|
+
boxShadow: t.shadow.sm
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
fontFamily: t.fontFamily,
|
|
30
|
+
fontSize: 14,
|
|
31
|
+
lineHeight: 20,
|
|
32
|
+
fontWeight: '500',
|
|
33
|
+
color: t.colors.mutedForeground
|
|
34
|
+
},
|
|
35
|
+
selectedLabel: {
|
|
36
|
+
color: t.colors.foreground
|
|
37
|
+
}
|
|
38
|
+
}));
|
|
39
|
+
export function SegmentedTabs({
|
|
40
|
+
items,
|
|
41
|
+
value,
|
|
42
|
+
onValueChange,
|
|
43
|
+
style
|
|
44
|
+
}) {
|
|
45
|
+
const t = useTheme();
|
|
46
|
+
const s = useStyles();
|
|
47
|
+
return /*#__PURE__*/_jsx(View, {
|
|
48
|
+
accessibilityRole: "tablist",
|
|
49
|
+
style: [s.track, style],
|
|
50
|
+
children: items.map(item => {
|
|
51
|
+
const selected = item.value === value;
|
|
52
|
+
return /*#__PURE__*/_jsx(PressableBase, {
|
|
53
|
+
accessibilityRole: "tab",
|
|
54
|
+
accessibilityState: {
|
|
55
|
+
selected
|
|
56
|
+
},
|
|
57
|
+
accessibilityLabel: item.label,
|
|
58
|
+
touchHeight: HEIGHT,
|
|
59
|
+
pressedStyle: {},
|
|
60
|
+
onPress: () => {
|
|
61
|
+
if (!selected) onValueChange(item.value);
|
|
62
|
+
},
|
|
63
|
+
style: [s.tab, selected && s.selected],
|
|
64
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
65
|
+
numberOfLines: 1,
|
|
66
|
+
maxFontSizeMultiplier: t.maxFontScale,
|
|
67
|
+
style: [s.label, selected && s.selectedLabel],
|
|
68
|
+
children: item.label
|
|
69
|
+
})
|
|
70
|
+
}, item.value);
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=segmented-tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text","View","PressableBase","useTheme","makeStyles","jsx","_jsx","HEIGHT","useStyles","t","track","flexDirection","height","padding","space","gap","borderRadius","radius","md","backgroundColor","colors","muted","tab","flex","alignItems","justifyContent","sm","selected","background","boxShadow","shadow","label","fontFamily","fontSize","lineHeight","fontWeight","color","mutedForeground","selectedLabel","foreground","SegmentedTabs","items","value","onValueChange","style","s","accessibilityRole","children","map","item","accessibilityState","accessibilityLabel","touchHeight","pressedStyle","onPress","numberOfLines","maxFontSizeMultiplier","maxFontScale"],"sourceRoot":"../../../../src","sources":["components/segmented-tabs/segmented-tabs.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACzE,SAASC,aAAa,QAAQ,kCAA+B;AAC7D,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,UAAU,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYhD,MAAMC,MAAM,GAAG,EAAE;AAEjB,MAAMC,SAAS,GAAGJ,UAAU,CAAEK,CAAC,KAAM;EACnCC,KAAK,EAAE;IACLC,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAEL,MAAM;IACdM,OAAO,EAAEJ,CAAC,CAACK,KAAK,CAAC,CAAC,CAAC;IACnBC,GAAG,EAAEN,CAAC,CAACK,KAAK,CAAC,CAAC,CAAC;IACfE,YAAY,EAAEP,CAAC,CAACQ,MAAM,CAACC,EAAE;IACzBC,eAAe,EAAEV,CAAC,CAACW,MAAM,CAACC;EAC5B,CAAC;EACDC,GAAG,EAAE;IACHC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBT,YAAY,EAAEP,CAAC,CAACQ,MAAM,CAACS;EACzB,CAAC;EACDC,QAAQ,EAAE;IAAER,eAAe,EAAEV,CAAC,CAACW,MAAM,CAACQ,UAAU;IAAE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N,IAAI;UACHuD,aAAa,EAAE,CAAE;UACjBC,qBAAqB,EAAE/C,CAAC,CAACgD,YAAa;UACtCb,KAAK,EAAE,CAACC,CAAC,CAACd,KAAK,EAAEJ,QAAQ,IAAIkB,CAAC,CAACP,aAAa,CAAE;UAAAS,QAAA,EAE7CE,IAAI,CAAClB;QAAK,CACP;MAAC,GAjBFkB,IAAI,CAACP,KAkBG,CAAC;IAEpB,CAAC;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Sheet"],"sourceRoot":"../../../../src","sources":["components/sheet/index.ts"],"mappings":";;AAAA,SAASA,KAAK,QAAyB,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Animated, KeyboardAvoidingView, Modal, Text, useWindowDimensions, View } from 'react-native';
|
|
4
|
+
import { Backdrop, useOverlayTransition } from "../../internal/overlay.js";
|
|
5
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
6
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
7
|
+
import { ToastHost } from "../toast/toast.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const useStyles = makeStyles(t => ({
|
|
10
|
+
root: {
|
|
11
|
+
flex: 1,
|
|
12
|
+
justifyContent: 'flex-end'
|
|
13
|
+
},
|
|
14
|
+
panel: {
|
|
15
|
+
maxHeight: '90%',
|
|
16
|
+
paddingTop: t.space[2],
|
|
17
|
+
paddingHorizontal: t.space[4],
|
|
18
|
+
gap: t.space[3],
|
|
19
|
+
borderTopLeftRadius: t.radius.lg,
|
|
20
|
+
borderTopRightRadius: t.radius.lg,
|
|
21
|
+
backgroundColor: t.colors.background,
|
|
22
|
+
boxShadow: t.shadow.md
|
|
23
|
+
},
|
|
24
|
+
handle: {
|
|
25
|
+
alignSelf: 'center',
|
|
26
|
+
width: 36,
|
|
27
|
+
height: 4,
|
|
28
|
+
borderRadius: t.radius.full,
|
|
29
|
+
backgroundColor: t.colors.border
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
...t.typography.title,
|
|
33
|
+
fontFamily: t.fontFamily,
|
|
34
|
+
color: t.colors.foreground
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
export function Sheet({
|
|
38
|
+
open,
|
|
39
|
+
onOpenChange,
|
|
40
|
+
title,
|
|
41
|
+
bottomInset = 0,
|
|
42
|
+
dismissible = true,
|
|
43
|
+
closeLabel = '닫기',
|
|
44
|
+
children,
|
|
45
|
+
style
|
|
46
|
+
}) {
|
|
47
|
+
const t = useTheme();
|
|
48
|
+
const s = useStyles();
|
|
49
|
+
const {
|
|
50
|
+
height
|
|
51
|
+
} = useWindowDimensions();
|
|
52
|
+
const {
|
|
53
|
+
mounted,
|
|
54
|
+
progress
|
|
55
|
+
} = useOverlayTransition(open);
|
|
56
|
+
const close = () => {
|
|
57
|
+
if (dismissible) onOpenChange(false);
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/_jsxs(Modal, {
|
|
60
|
+
visible: mounted,
|
|
61
|
+
transparent: true,
|
|
62
|
+
animationType: "none",
|
|
63
|
+
statusBarTranslucent: true,
|
|
64
|
+
navigationBarTranslucent: true,
|
|
65
|
+
onRequestClose: close,
|
|
66
|
+
children: [/*#__PURE__*/_jsxs(KeyboardAvoidingView, {
|
|
67
|
+
behavior: "padding",
|
|
68
|
+
style: s.root,
|
|
69
|
+
children: [/*#__PURE__*/_jsx(Backdrop, {
|
|
70
|
+
progress: progress,
|
|
71
|
+
onPress: close,
|
|
72
|
+
label: closeLabel
|
|
73
|
+
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
74
|
+
accessibilityViewIsModal: true,
|
|
75
|
+
style: [s.panel, {
|
|
76
|
+
paddingBottom: t.space[4] + bottomInset
|
|
77
|
+
}, {
|
|
78
|
+
transform: [{
|
|
79
|
+
translateY: progress.interpolate({
|
|
80
|
+
inputRange: [0, 1],
|
|
81
|
+
outputRange: [height, 0]
|
|
82
|
+
})
|
|
83
|
+
}]
|
|
84
|
+
}, style],
|
|
85
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
86
|
+
style: s.handle
|
|
87
|
+
}), title ? /*#__PURE__*/_jsx(Text, {
|
|
88
|
+
accessibilityRole: "header",
|
|
89
|
+
maxFontSizeMultiplier: t.maxFontScale,
|
|
90
|
+
style: s.title,
|
|
91
|
+
children: title
|
|
92
|
+
}) : null, children]
|
|
93
|
+
})]
|
|
94
|
+
}), /*#__PURE__*/_jsx(ToastHost, {})]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Animated","KeyboardAvoidingView","Modal","Text","useWindowDimensions","View","Backdrop","useOverlayTransition","useTheme","makeStyles","ToastHost","jsx","_jsx","jsxs","_jsxs","useStyles","t","root","flex","justifyContent","panel","maxHeight","paddingTop","space","paddingHorizontal","gap","borderTopLeftRadius","radius","lg","borderTopRightRadius","backgroundColor","colors","background","boxShadow","shadow","md","handle","alignSelf","width","height","borderRadius","full","border","title","typography","fontFamily","color","foreground","Sheet","open","onOpenChange","bottomInset","dismissible","closeLabel","children","style","s","mounted","progress","close","visible","transparent","animationType","statusBarTranslucent","navigationBarTranslucent","onRequestClose","behavior","onPress","label","accessibilityViewIsModal","paddingBottom","transform","translateY","interpolate","inputRange","outputRange","accessibilityRole","maxFontSizeMultiplier","maxFontScale"],"sourceRoot":"../../../../src","sources":["components/sheet/sheet.tsx"],"mappings":";;AACA,SACEA,QAAQ,EACRC,oBAAoB,EACpBC,KAAK,EACLC,IAAI,EACJC,mBAAmB,EACnBC,IAAI,QAGC,cAAc;AACrB,SAASC,QAAQ,EAAEC,oBAAoB,QAAQ,2BAAwB;AACvE,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,UAAU,QAAQ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EACxBO,KAAK,gBACJ/B,IAAA,CAACT,IAAI;UACHyE,iBAAiB,EAAC,QAAQ;UAC1BC,qBAAqB,EAAE7D,CAAC,CAAC8D,YAAa;UACtCvB,KAAK,EAAEC,CAAC,CAACb,KAAM;UAAAW,QAAA,EAEdX;QAAK,CACF,CAAC,GACL,IAAI,EACPW,QAAQ;MAAA,CACI,CAAC;IAAA,CACI,CAAC,eACvB1C,IAAA,CAACF,SAAS,IAAE,CAAC;EAAA,CACR,CAAC;AAEZ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Skeleton"],"sourceRoot":"../../../../src","sources":["components/skeleton/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAA4B,eAAY","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
import { Animated } from 'react-native';
|
|
5
|
+
import { useNativeDriver } from "../../internal/overlay.js";
|
|
6
|
+
import { useReducedMotion } from "../../internal/use-reduced-motion.js";
|
|
7
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/** 불러오는 중인 자리. '동작 줄이기'가 켜져 있으면 깜빡이지 않는다 */
|
|
10
|
+
export function Skeleton({
|
|
11
|
+
width = '100%',
|
|
12
|
+
height = 16,
|
|
13
|
+
radius,
|
|
14
|
+
style
|
|
15
|
+
}) {
|
|
16
|
+
const t = useTheme();
|
|
17
|
+
const reduced = useReducedMotion();
|
|
18
|
+
const opacity = useRef(new Animated.Value(1)).current;
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (reduced) {
|
|
21
|
+
opacity.setValue(0.7);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const half = t.motion.duration * 4;
|
|
25
|
+
const loop = Animated.loop(Animated.sequence([Animated.timing(opacity, {
|
|
26
|
+
toValue: 0.5,
|
|
27
|
+
duration: half,
|
|
28
|
+
useNativeDriver
|
|
29
|
+
}), Animated.timing(opacity, {
|
|
30
|
+
toValue: 1,
|
|
31
|
+
duration: half,
|
|
32
|
+
useNativeDriver
|
|
33
|
+
})]));
|
|
34
|
+
loop.start();
|
|
35
|
+
return () => loop.stop();
|
|
36
|
+
}, [opacity, reduced, t.motion.duration]);
|
|
37
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
38
|
+
accessible: false,
|
|
39
|
+
importantForAccessibility: "no-hide-descendants",
|
|
40
|
+
style: [{
|
|
41
|
+
width,
|
|
42
|
+
height,
|
|
43
|
+
borderRadius: radius ?? t.radius.sm,
|
|
44
|
+
backgroundColor: t.colors.muted,
|
|
45
|
+
opacity
|
|
46
|
+
}, style]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","Animated","useNativeDriver","useReducedMotion","useTheme","jsx","_jsx","Skeleton","width","height","radius","style","t","reduced","opacity","Value","current","setValue","half","motion","duration","loop","sequence","timing","toValue","start","stop","View","accessible","importantForAccessibility","borderRadius","sm","backgroundColor","colors","muted"],"sourceRoot":"../../../../src","sources":["components/skeleton/skeleton.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SACEC,QAAQ,QAIH,cAAc;AACrB,SAASC,eAAe,QAAQ,2BAAwB;AACxD,SAASC,gBAAgB,QAAQ,sCAAmC;AACpE,SAASC,QAAQ,QAAQ,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYtD;AACA,OAAO,SAASC,QAAQA,CAAC;EACvBC,KAAK,GAAG,MAAM;EACdC,MAAM,GAAG,EAAE;EACXC,MAAM;EACNC;AACa,CAAC,EAAE;EAChB,MAAMC,CAAC,GAAGR,QAAQ,CAAC,CAAC;EACpB,MAAMS,OAAO,GAAGV,gBAA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ources":["components/status-badge/index.ts"],"mappings":";;AAAA,SACEA,WAAW,QAGN,mBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Text, View } from 'react-native';
|
|
4
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
5
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const useStyles = makeStyles(t => ({
|
|
8
|
+
base: {
|
|
9
|
+
alignSelf: 'flex-start',
|
|
10
|
+
paddingHorizontal: t.space[2],
|
|
11
|
+
paddingVertical: 2,
|
|
12
|
+
borderRadius: t.radius.full
|
|
13
|
+
},
|
|
14
|
+
label: {
|
|
15
|
+
...t.typography.caption,
|
|
16
|
+
fontFamily: t.fontFamily,
|
|
17
|
+
fontWeight: '600'
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
export function StatusBadge({
|
|
21
|
+
tone = 'neutral',
|
|
22
|
+
children,
|
|
23
|
+
style
|
|
24
|
+
}) {
|
|
25
|
+
const t = useTheme();
|
|
26
|
+
const s = useStyles();
|
|
27
|
+
const [bg, fg] = {
|
|
28
|
+
neutral: [t.colors.muted, t.colors.mutedForeground],
|
|
29
|
+
info: [t.colors.info, t.colors.infoForeground],
|
|
30
|
+
success: [t.colors.success, t.colors.successForeground],
|
|
31
|
+
warning: [t.colors.warning, t.colors.warningForeground],
|
|
32
|
+
destructive: [t.colors.destructive, t.colors.destructiveForeground]
|
|
33
|
+
}[tone];
|
|
34
|
+
return /*#__PURE__*/_jsx(View, {
|
|
35
|
+
style: [s.base, {
|
|
36
|
+
backgroundColor: bg
|
|
37
|
+
}, style],
|
|
38
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
39
|
+
numberOfLines: 1,
|
|
40
|
+
maxFontSizeMultiplier: t.maxFontScale,
|
|
41
|
+
style: [s.label, {
|
|
42
|
+
color: fg
|
|
43
|
+
}],
|
|
44
|
+
children: children
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=status-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text","View","useTheme","makeStyles","jsx","_jsx","useStyles","t","base","alignSelf","paddingHorizontal","space","paddingVertical","borderRadius","radius","full","label","typography","caption","fontFamily","fontWeight","StatusBadge","tone","children","style","s","bg","fg","neutral","colors","muted","mutedForeground","info","infoForeground","success","successForeground","warning","warningForeground","destructive","destructiveForeground","backgroundColor","numberOfLines","maxFontSizeMultiplier","maxFontScale","color"],"sourceRoot":"../../../../src","sources":["components/status-badge/status-badge.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACzE,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,UAAU,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYhD,MAAMC,SAAS,GAAGH,UAAU,CAAEI,CAAC,KAAM;EACnCC,IAAI,EAAE;IACJC,SAAS,EAAE,YAAY;IACvBC,iBAAiB,EAAEH,CAAC,CAACI,KAAK,CAAC,CAAC,CAAC;IAC7BC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAEN,CAAC,CAACO,MAAM,CAACC;EACzB,CAAC;EACDC,KAAK,EAAE;IACL,GAAGT,CAAC,CAACU,UAAU,CAACC,OAAO;IACvBC,UAAU,EAAEZ,CAAC,CAACY,UAAU;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC,CAAC;AAEH,OAAO,SAASC,WAAWA,CAAC;EAC1BC,IAAI,GAAG,SAAS;EAChBC,QAAQ;EACRC;AACgB,CAAC,EAAE;EACnB,MAAMjB,CAAC,GAAGL,QAAQ,CAAC,CAAC;EACpB,MAAMuB,CAAC,GAAGnB,SAAS,CAAC,CAAC;EACrB,MAAM,CAACoB,EAAE,EAAEC,EAAE,CAAC,GAAG;IACfC,OAAO,EAAE,CAACrB,CAAC,CAACsB,MAAM,CAACC,KAAK,EAAEvB,CAAC,CAACsB,MAAM,CAACE,eAAe,CAAC;IACnDC,IAAI,EAAE,CAACzB,CAAC,CAACsB,MAAM,CAACG,IAAI,EAAEzB,CAAC,CAACsB,MAAM,CAACI,cAAc,CAAC;IAC9CC,OAAO,EAAE,CAAC3B,CAAC,CAACsB,MAAM,CAACK,OAAO,EAAE3B,CAAC,CAACsB,MAAM,CAACM,iBAAiB,CAAC;IACvDC,OAAO,EAAE,CAAC7B,CAAC,CAACsB,MAAM,CAACO,OAAO,EAAE7B,CAAC,CAACsB,MAAM,CAACQ,iBAAiB,CAAC;IACvDC,WAAW,EAAE,CAAC/B,CAAC,CAACsB,MAAM,CAACS,WAAW,EAAE/B,CAAC,CAACsB,MAAM,CAACU,qBAAqB;EACpE,CAAC,CAACjB,IAAI,CAAC;EACP,oBACEjB,IAAA,CAACJ,IAAI;IAACuB,KAAK,EAAE,CAACC,CAAC,CAACjB,IAAI,EAAE;MAAEgC,eAAe,EAAEd;IAAG,CAAC,EAAEF,KAAK,CAAE;IAAAD,QAAA,eACpDlB,IAAA,CAACL,IAAI;MACHyC,aAAa,EAAE,CAAE;MACjBC,qBAAqB,EAAEnC,CAAC,CAACoC,YAAa;MACtCnB,KAAK,EAAE,CAACC,CAAC,CAACT,KAAK,EAAE;QAAE4B,KAAK,EAAEjB;MAAG,CAAC,CAAE;MAAAJ,QAAA,EAE/BA;IAAQ,CACL;EAAC,CACH,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Switch"],"sourceRoot":"../../../../src","sources":["components/switch/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAA0B,aAAU","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Switch as RNSwitch } from 'react-native';
|
|
4
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export function Switch({
|
|
7
|
+
disabled,
|
|
8
|
+
style,
|
|
9
|
+
...rest
|
|
10
|
+
}) {
|
|
11
|
+
const t = useTheme();
|
|
12
|
+
return /*#__PURE__*/_jsx(RNSwitch, {
|
|
13
|
+
trackColor: {
|
|
14
|
+
false: t.colors.border,
|
|
15
|
+
true: t.colors.primary
|
|
16
|
+
},
|
|
17
|
+
thumbColor: t.colors.background,
|
|
18
|
+
ios_backgroundColor: t.colors.border,
|
|
19
|
+
...rest,
|
|
20
|
+
disabled: disabled,
|
|
21
|
+
style: [disabled && {
|
|
22
|
+
opacity: t.opacity.disabled
|
|
23
|
+
}, style]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Switch","RNSwitch","useTheme","jsx","_jsx","disabled","style","rest","t","trackColor","false","colors","border","true","primary","thumbColor","background","ios_backgroundColor","opacity"],"sourceRoot":"../../../../src","sources":["components/switch/switch.tsx"],"mappings":";;AACA,SACEA,MAAM,IAAIC,QAAQ,QAEb,cAAc;AACrB,SAASC,QAAQ,QAAQ,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQtD,OAAO,SAASJ,MAAMA,CAAC;EAAEK,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAkB,CAAC,EAAE;EAChE,MAAMC,CAAC,GAAGN,QAAQ,CAAC,CAAC;EACpB,oBACEE,IAAA,CAACH,QAAQ;IACPQ,UAAU,EAAE;MAAEC,KAAK,EAAEF,CAAC,CAACG,MAAM,CAACC,MAAM;MAAEC,IAAI,EAAEL,CAAC,CAACG,MAAM,CAACG;IAAQ,CAAE;IAC/DC,UAAU,EAAEP,CAAC,CAACG,MAAM,CAACK,UAAW;IAChCC,mBAAmB,EAAET,CAAC,CAACG,MAAM,CAACC,MAAO;IAAA,GACjCL,IAAI;IACRF,QAAQ,EAAEA,QAAS;IACnBC,KAAK,EAAE,CAACD,QAAQ,IAAI;MAAEa,OAAO,EAAEV,CAAC,CAACU,OAAO,CAACb;IAAS,CAAC,EAAEC,KAAK;EAAE,CAC7D,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text"],"sourceRoot":"../../../../src","sources":["components/text/index.ts"],"mappings":";;AAAA,SAASA,IAAI,QAAwD,WAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Text as RNText } from 'react-native';
|
|
4
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
5
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const useStyles = makeStyles(t => ({
|
|
8
|
+
caption: t.typography.caption,
|
|
9
|
+
body: t.typography.body,
|
|
10
|
+
bodyLg: t.typography.bodyLg,
|
|
11
|
+
title: t.typography.title,
|
|
12
|
+
display: t.typography.display,
|
|
13
|
+
default: {
|
|
14
|
+
color: t.colors.foreground
|
|
15
|
+
},
|
|
16
|
+
muted: {
|
|
17
|
+
color: t.colors.mutedForeground
|
|
18
|
+
},
|
|
19
|
+
destructive: {
|
|
20
|
+
color: t.colors.destructive
|
|
21
|
+
},
|
|
22
|
+
success: {
|
|
23
|
+
color: t.colors.success
|
|
24
|
+
},
|
|
25
|
+
font: {
|
|
26
|
+
fontFamily: t.fontFamily
|
|
27
|
+
},
|
|
28
|
+
regular: {
|
|
29
|
+
fontWeight: '400'
|
|
30
|
+
},
|
|
31
|
+
medium: {
|
|
32
|
+
fontWeight: '500'
|
|
33
|
+
},
|
|
34
|
+
semibold: {
|
|
35
|
+
fontWeight: '600'
|
|
36
|
+
},
|
|
37
|
+
bold: {
|
|
38
|
+
fontWeight: '700'
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
export function Text({
|
|
42
|
+
variant = 'body',
|
|
43
|
+
tone = 'default',
|
|
44
|
+
weight,
|
|
45
|
+
style,
|
|
46
|
+
...rest
|
|
47
|
+
}) {
|
|
48
|
+
const t = useTheme();
|
|
49
|
+
const s = useStyles();
|
|
50
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
51
|
+
maxFontSizeMultiplier: t.maxFontScale,
|
|
52
|
+
...rest,
|
|
53
|
+
style: [s.font, s[variant], s[tone], weight && s[weight], style]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Text","RNText","useTheme","makeStyles","jsx","_jsx","useStyles","t","caption","typography","body","bodyLg","title","display","default","color","colors","foreground","muted","mutedForeground","destructive","success","font","fontFamily","regular","fontWeight","medium","semibold","bold","variant","tone","weight","style","rest","s","maxFontSizeMultiplier","maxFontScale"],"sourceRoot":"../../../../src","sources":["components/text/text.tsx"],"mappings":";;AACA,SAASA,IAAI,IAAIC,MAAM,QAAuC,cAAc;AAE5E,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,UAAU,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgBhD,MAAMC,SAAS,GAAGH,UAAU,CAAEI,CAAC,KAAM;EACnCC,OAAO,EAAED,CAAC,CAACE,UAAU,CAACD,OAAO;EAC7BE,IAAI,EAAEH,CAAC,CAACE,UAAU,CAACC,IAAI;EACvBC,MAAM,EAAEJ,CAAC,CAACE,UAAU,CAACE,MAAM;EAC3BC,KAAK,EAAEL,CAAC,CAACE,UAAU,CAACG,KAAK;EACzBC,OAAO,EAAEN,CAAC,CAACE,UAAU,CAACI,OAAO;EAC7BC,OAAO,EAAE;IAAEC,KAAK,EAAER,CAAC,CAACS,MAAM,CAACC;EAAW,CAAC;EACvCC,KAAK,EAAE;IAAEH,KAAK,EAAER,CAAC,CAACS,MAAM,CAACG;EAAgB,CAAC;EAC1CC,WAAW,EAAE;IAAEL,KAAK,EAAER,CAAC,CAACS,MAAM,CAACI;EAAY,CAAC;EAC5CC,OAAO,EAAE;IAAEN,KAAK,EAAER,CAAC,CAACS,MAAM,CAACK;EAAQ,CAAC;EACpCC,IAAI,EAAE;IAAEC,UAAU,EAAEhB,CAAC,CAACgB;EAAW,CAAC;EAClCC,OAAO,EAAE;IAAEC,UAAU,EAAE;EAAM,CAAC;EAC9BC,MAAM,EAAE;IAAED,UAAU,EAAE;EAAM,CAAC;EAC7BE,QAAQ,EAAE;IAAEF,UAAU,EAAE;EAAM,CAAC;EAC/BG,IAAI,EAAE;IAAEH,UAAU,EAAE;EAAM;AAC5B,CAAC,CAAC,CAAC;AAEH,OAAO,SAASzB,IAAIA,CAAC;EACnB6B,OAAO,GAAG,MAAM;EAChBC,IAAI,GAAG,SAAS;EAChBC,MAAM;EACNC,KAAK;EACL,GAAGC;AACM,CAAC,EAAE;EACZ,MAAM1B,CAAC,GAAGL,QAAQ,CAAC,CAAC;EACpB,MAAMgC,CAAC,GAAG5B,SAAS,CAAC,CAAC;EACrB,oBACED,IAAA,CAACJ,MAAM;IACLkC,qBAAqB,EAAE5B,CAAC,CAAC6B,YAAa;IAAA,GAClCH,IAAI;IACRD,KAAK,EAAE,CAACE,CAAC,CAACZ,IAAI,EAAEY,CAAC,CAACL,OAAO,CAAC,EAAEK,CAAC,CAACJ,IAAI,CAAC,EAAEC,MAAM,IAAIG,CAAC,CAACH,MAAM,CAAC,EAAEC,KAAK;EAAE,CAClE,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ToastHost","ToastProvider","useToast"],"sourceRoot":"../../../../src","sources":["components/toast/index.ts"],"mappings":";;AAAA,SACEA,SAAS,EACTC,aAAa,EACbC,QAAQ,QAKH,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext, useEffect, useId, useRef, useState, useSyncExternalStore } from 'react';
|
|
4
|
+
import { AccessibilityInfo, Animated, Platform, Text, View } from 'react-native';
|
|
5
|
+
import { useNativeDriver } from "../../internal/overlay.js";
|
|
6
|
+
import { PressableBase } from "../../internal/pressable-base.js";
|
|
7
|
+
import { useReducedMotion } from "../../internal/use-reduced-motion.js";
|
|
8
|
+
import { useTheme } from "../../theme/theme-provider.js";
|
|
9
|
+
import { makeStyles } from "../../utils/styles.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
/** Provider 하나가 가진 상태. show를 불러도 Provider 아래 화면은 다시 렌더링되지 않는다. */
|
|
12
|
+
function createToastStore() {
|
|
13
|
+
let current = null;
|
|
14
|
+
let timer;
|
|
15
|
+
let seq = 0;
|
|
16
|
+
let hosts = [];
|
|
17
|
+
const listeners = new Set();
|
|
18
|
+
const emit = () => listeners.forEach(l => l());
|
|
19
|
+
const hide = () => {
|
|
20
|
+
clearTimeout(timer);
|
|
21
|
+
current = null;
|
|
22
|
+
emit();
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
bottomInset: 0,
|
|
26
|
+
subscribe(listener) {
|
|
27
|
+
listeners.add(listener);
|
|
28
|
+
return () => {
|
|
29
|
+
listeners.delete(listener);
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
getCurrent: () => current,
|
|
33
|
+
/** 가장 나중에 붙은 host(가장 위의 Modal)만 그린다 */
|
|
34
|
+
getTopHost: () => hosts[hosts.length - 1],
|
|
35
|
+
addHost(id) {
|
|
36
|
+
hosts = [...hosts, id];
|
|
37
|
+
emit();
|
|
38
|
+
return () => {
|
|
39
|
+
hosts = hosts.filter(h => h !== id);
|
|
40
|
+
emit();
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
show({
|
|
44
|
+
message,
|
|
45
|
+
tone = 'neutral',
|
|
46
|
+
duration,
|
|
47
|
+
action
|
|
48
|
+
}) {
|
|
49
|
+
clearTimeout(timer);
|
|
50
|
+
current = {
|
|
51
|
+
id: ++seq,
|
|
52
|
+
message,
|
|
53
|
+
tone,
|
|
54
|
+
action
|
|
55
|
+
};
|
|
56
|
+
timer = setTimeout(hide, duration ?? (action ? 4000 : 2500));
|
|
57
|
+
emit();
|
|
58
|
+
if (Platform.OS === 'ios') AccessibilityInfo.announceForAccessibility(message);
|
|
59
|
+
},
|
|
60
|
+
hide
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const StoreContext = /*#__PURE__*/createContext(null);
|
|
64
|
+
export function ToastProvider({
|
|
65
|
+
bottomInset = 0,
|
|
66
|
+
children
|
|
67
|
+
}) {
|
|
68
|
+
const [store] = useState(createToastStore);
|
|
69
|
+
store.bottomInset = bottomInset;
|
|
70
|
+
useEffect(() => () => store.hide(), [store]);
|
|
71
|
+
return /*#__PURE__*/_jsxs(StoreContext.Provider, {
|
|
72
|
+
value: store,
|
|
73
|
+
children: [children, /*#__PURE__*/_jsx(ToastHost, {})]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
export function useToast() {
|
|
77
|
+
const store = useContext(StoreContext);
|
|
78
|
+
if (!store) throw new Error('useToast must be used inside <ToastProvider>.');
|
|
79
|
+
return store;
|
|
80
|
+
}
|
|
81
|
+
const useStyles = makeStyles(t => ({
|
|
82
|
+
layer: {
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
left: t.space[4],
|
|
85
|
+
right: t.space[4],
|
|
86
|
+
alignItems: 'center'
|
|
87
|
+
},
|
|
88
|
+
toast: {
|
|
89
|
+
flexDirection: 'row',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
maxWidth: 480,
|
|
92
|
+
minHeight: 48,
|
|
93
|
+
paddingHorizontal: t.space[4],
|
|
94
|
+
paddingVertical: t.space[3],
|
|
95
|
+
borderRadius: t.radius.md,
|
|
96
|
+
boxShadow: t.shadow.md
|
|
97
|
+
},
|
|
98
|
+
withAction: {
|
|
99
|
+
alignSelf: 'stretch',
|
|
100
|
+
paddingVertical: 0,
|
|
101
|
+
paddingRight: t.space[2]
|
|
102
|
+
},
|
|
103
|
+
message: {
|
|
104
|
+
...t.typography.body,
|
|
105
|
+
flexShrink: 1,
|
|
106
|
+
fontFamily: t.fontFamily
|
|
107
|
+
},
|
|
108
|
+
messageFill: {
|
|
109
|
+
flex: 1,
|
|
110
|
+
fontSize: 14
|
|
111
|
+
},
|
|
112
|
+
action: {
|
|
113
|
+
paddingHorizontal: t.space[3],
|
|
114
|
+
justifyContent: 'center'
|
|
115
|
+
},
|
|
116
|
+
actionLabel: {
|
|
117
|
+
fontFamily: t.fontFamily,
|
|
118
|
+
fontSize: 14,
|
|
119
|
+
lineHeight: 20,
|
|
120
|
+
fontWeight: '700'
|
|
121
|
+
}
|
|
122
|
+
}));
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Toast를 그리는 자리. Provider가 하나 두고, Modal을 쓰는 컴포넌트(Sheet · Dialog)가
|
|
126
|
+
* Modal 안에 하나씩 더 둔다. 가장 위의 host만 그린다.
|
|
127
|
+
*/
|
|
128
|
+
export function ToastHost() {
|
|
129
|
+
const store = useContext(StoreContext);
|
|
130
|
+
return store ? /*#__PURE__*/_jsx(ToastHostInner, {
|
|
131
|
+
store: store
|
|
132
|
+
}) : null;
|
|
133
|
+
}
|
|
134
|
+
function ToastHostInner({
|
|
135
|
+
store
|
|
136
|
+
}) {
|
|
137
|
+
const t = useTheme();
|
|
138
|
+
const s = useStyles();
|
|
139
|
+
const id = useId();
|
|
140
|
+
const reduced = useReducedMotion();
|
|
141
|
+
const opacity = useRef(new Animated.Value(0)).current;
|
|
142
|
+
const current = useSyncExternalStore(store.subscribe, store.getCurrent);
|
|
143
|
+
const isTop = useSyncExternalStore(store.subscribe, () => store.getTopHost() === id);
|
|
144
|
+
useEffect(() => store.addHost(id), [store, id]);
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (!current) return;
|
|
147
|
+
opacity.setValue(reduced ? 1 : 0);
|
|
148
|
+
if (reduced) return;
|
|
149
|
+
const animation = Animated.timing(opacity, {
|
|
150
|
+
toValue: 1,
|
|
151
|
+
duration: t.motion.duration,
|
|
152
|
+
useNativeDriver
|
|
153
|
+
});
|
|
154
|
+
animation.start();
|
|
155
|
+
return () => animation.stop();
|
|
156
|
+
}, [current, opacity, reduced, t.motion.duration]);
|
|
157
|
+
if (!current || !isTop) return null;
|
|
158
|
+
const [bg, fg] = {
|
|
159
|
+
neutral: [t.colors.foreground, t.colors.background],
|
|
160
|
+
success: [t.colors.success, t.colors.successForeground],
|
|
161
|
+
destructive: [t.colors.destructive, t.colors.destructiveForeground]
|
|
162
|
+
}[current.tone];
|
|
163
|
+
// 어두운 바탕(light) 위에서는 밝은 파랑, 밝은 바탕(dark) 위에서는 진한 파랑
|
|
164
|
+
const actionColor = current.tone !== 'neutral' ? fg : t.scheme === 'light' ? '#93c5fd' : '#1d4ed8';
|
|
165
|
+
return /*#__PURE__*/_jsx(View, {
|
|
166
|
+
pointerEvents: "box-none",
|
|
167
|
+
style: [s.layer, {
|
|
168
|
+
bottom: t.space[4] + store.bottomInset
|
|
169
|
+
}],
|
|
170
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
171
|
+
accessibilityRole: "alert",
|
|
172
|
+
accessibilityLiveRegion: "polite",
|
|
173
|
+
style: [s.toast, !!current.action && s.withAction, {
|
|
174
|
+
backgroundColor: bg,
|
|
175
|
+
opacity
|
|
176
|
+
}],
|
|
177
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
178
|
+
maxFontSizeMultiplier: t.maxFontScale,
|
|
179
|
+
style: [s.message, !!current.action && s.messageFill, {
|
|
180
|
+
color: fg
|
|
181
|
+
}],
|
|
182
|
+
children: current.message
|
|
183
|
+
}), current.action ? /*#__PURE__*/_jsx(PressableBase, {
|
|
184
|
+
accessibilityRole: "button",
|
|
185
|
+
accessibilityLabel: current.action.label,
|
|
186
|
+
touchHeight: 44,
|
|
187
|
+
style: s.action,
|
|
188
|
+
onPress: () => {
|
|
189
|
+
current.action?.onPress();
|
|
190
|
+
store.hide();
|
|
191
|
+
},
|
|
192
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
193
|
+
maxFontSizeMultiplier: t.maxFontScale,
|
|
194
|
+
style: [s.actionLabel, {
|
|
195
|
+
color: actionColor
|
|
196
|
+
}],
|
|
197
|
+
children: current.action.label
|
|
198
|
+
})
|
|
199
|
+
}) : null]
|
|
200
|
+
})
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=toast.js.map
|