@mmailaender/convex-creem 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/LICENSE +201 -0
- package/README.md +1176 -0
- package/dist/client/helpers.d.ts +17 -0
- package/dist/client/helpers.d.ts.map +1 -0
- package/dist/client/helpers.js +43 -0
- package/dist/client/helpers.js.map +1 -0
- package/dist/client/index.d.ts +1041 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +1068 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/parsers.d.ts +45 -0
- package/dist/client/parsers.d.ts.map +1 -0
- package/dist/client/parsers.js +138 -0
- package/dist/client/parsers.js.map +1 -0
- package/dist/client/polyfill.d.ts +2 -0
- package/dist/client/polyfill.d.ts.map +1 -0
- package/dist/client/polyfill.js +3 -0
- package/dist/client/polyfill.js.map +1 -0
- package/dist/component/_generated/api.d.ts +36 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +542 -0
- package/dist/component/_generated/component.d.ts.map +1 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +121 -0
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/component/_generated/server.js +78 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +3 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/lib.d.ts +1005 -0
- package/dist/component/lib.d.ts.map +1 -0
- package/dist/component/lib.js +647 -0
- package/dist/component/lib.js.map +1 -0
- package/dist/component/schema.d.ts +191 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +104 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/component/util.d.ts +61 -0
- package/dist/component/util.d.ts.map +1 -0
- package/dist/component/util.js +142 -0
- package/dist/component/util.js.map +1 -0
- package/dist/core/catalog.d.ts +18 -0
- package/dist/core/catalog.d.ts.map +1 -0
- package/dist/core/catalog.js +82 -0
- package/dist/core/catalog.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/markdown.d.ts +12 -0
- package/dist/core/markdown.d.ts.map +1 -0
- package/dist/core/markdown.js +26 -0
- package/dist/core/markdown.js.map +1 -0
- package/dist/core/payments.d.ts +11 -0
- package/dist/core/payments.d.ts.map +1 -0
- package/dist/core/payments.js +27 -0
- package/dist/core/payments.js.map +1 -0
- package/dist/core/pendingCheckout.d.ts +15 -0
- package/dist/core/pendingCheckout.d.ts.map +1 -0
- package/dist/core/pendingCheckout.js +40 -0
- package/dist/core/pendingCheckout.js.map +1 -0
- package/dist/core/resolver.d.ts +11 -0
- package/dist/core/resolver.d.ts.map +1 -0
- package/dist/core/resolver.js +106 -0
- package/dist/core/resolver.js.map +1 -0
- package/dist/core/selectors.d.ts +12 -0
- package/dist/core/selectors.d.ts.map +1 -0
- package/dist/core/selectors.js +18 -0
- package/dist/core/selectors.js.map +1 -0
- package/dist/core/subscriptionUpdate.d.ts +20 -0
- package/dist/core/subscriptionUpdate.d.ts.map +1 -0
- package/dist/core/subscriptionUpdate.js +64 -0
- package/dist/core/subscriptionUpdate.js.map +1 -0
- package/dist/core/types.d.ts +170 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +15 -0
- package/dist/core/types.js.map +1 -0
- package/dist/design-system/colors/color-utils.d.ts +10 -0
- package/dist/design-system/colors/color-utils.d.ts.map +1 -0
- package/dist/design-system/colors/color-utils.js +91 -0
- package/dist/design-system/colors/color-utils.js.map +1 -0
- package/dist/design-system/colors/config.d.ts +33 -0
- package/dist/design-system/colors/config.d.ts.map +1 -0
- package/dist/design-system/colors/config.js +224 -0
- package/dist/design-system/colors/config.js.map +1 -0
- package/dist/design-system/colors/index.d.ts +3 -0
- package/dist/design-system/colors/index.d.ts.map +1 -0
- package/dist/design-system/colors/index.js +3 -0
- package/dist/design-system/colors/index.js.map +1 -0
- package/dist/design-system/rounded/config.d.ts +31 -0
- package/dist/design-system/rounded/config.d.ts.map +1 -0
- package/dist/design-system/rounded/config.js +76 -0
- package/dist/design-system/rounded/config.js.map +1 -0
- package/dist/design-system/rounded/index.d.ts +2 -0
- package/dist/design-system/rounded/index.d.ts.map +1 -0
- package/dist/design-system/rounded/index.js +2 -0
- package/dist/design-system/rounded/index.js.map +1 -0
- package/dist/design-system/typography/config.d.ts +55 -0
- package/dist/design-system/typography/config.d.ts.map +1 -0
- package/dist/design-system/typography/config.js +308 -0
- package/dist/design-system/typography/config.js.map +1 -0
- package/dist/design-system/typography/index.d.ts +3 -0
- package/dist/design-system/typography/index.d.ts.map +1 -0
- package/dist/design-system/typography/index.js +3 -0
- package/dist/design-system/typography/index.js.map +1 -0
- package/dist/design-system/typography/tokens.d.ts +23 -0
- package/dist/design-system/typography/tokens.d.ts.map +1 -0
- package/dist/design-system/typography/tokens.js +99 -0
- package/dist/design-system/typography/tokens.js.map +1 -0
- package/dist/react/hooks/useCheckoutSuccessParams.d.ts +2 -0
- package/dist/react/hooks/useCheckoutSuccessParams.d.ts.map +1 -0
- package/dist/react/hooks/useCheckoutSuccessParams.js +5 -0
- package/dist/react/hooks/useCheckoutSuccessParams.js.map +1 -0
- package/dist/react/index.d.ts +25 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +22 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/primitives/BillingGate.d.ts +8 -0
- package/dist/react/primitives/BillingGate.d.ts.map +1 -0
- package/dist/react/primitives/BillingGate.js +13 -0
- package/dist/react/primitives/BillingGate.js.map +1 -0
- package/dist/react/primitives/BillingToggle.d.ts +8 -0
- package/dist/react/primitives/BillingToggle.d.ts.map +1 -0
- package/dist/react/primitives/BillingToggle.js +12 -0
- package/dist/react/primitives/BillingToggle.js.map +1 -0
- package/dist/react/primitives/CheckoutButton.d.ts +11 -0
- package/dist/react/primitives/CheckoutButton.d.ts.map +1 -0
- package/dist/react/primitives/CheckoutButton.js +21 -0
- package/dist/react/primitives/CheckoutButton.js.map +1 -0
- package/dist/react/primitives/CheckoutSuccessSummary.d.ts +7 -0
- package/dist/react/primitives/CheckoutSuccessSummary.d.ts.map +1 -0
- package/dist/react/primitives/CheckoutSuccessSummary.js +11 -0
- package/dist/react/primitives/CheckoutSuccessSummary.js.map +1 -0
- package/dist/react/primitives/CustomerPortalButton.d.ts +8 -0
- package/dist/react/primitives/CustomerPortalButton.d.ts.map +1 -0
- package/dist/react/primitives/CustomerPortalButton.js +21 -0
- package/dist/react/primitives/CustomerPortalButton.js.map +1 -0
- package/dist/react/primitives/NumberInput.d.ts +11 -0
- package/dist/react/primitives/NumberInput.d.ts.map +1 -0
- package/dist/react/primitives/NumberInput.js +18 -0
- package/dist/react/primitives/NumberInput.js.map +1 -0
- package/dist/react/primitives/OneTimeCheckoutButton.d.ts +11 -0
- package/dist/react/primitives/OneTimeCheckoutButton.d.ts.map +1 -0
- package/dist/react/primitives/OneTimeCheckoutButton.js +4 -0
- package/dist/react/primitives/OneTimeCheckoutButton.js.map +1 -0
- package/dist/react/primitives/OneTimePaymentStatusBadge.d.ts +6 -0
- package/dist/react/primitives/OneTimePaymentStatusBadge.d.ts.map +1 -0
- package/dist/react/primitives/OneTimePaymentStatusBadge.js +11 -0
- package/dist/react/primitives/OneTimePaymentStatusBadge.js.map +1 -0
- package/dist/react/primitives/PaymentWarningBanner.d.ts +7 -0
- package/dist/react/primitives/PaymentWarningBanner.d.ts.map +1 -0
- package/dist/react/primitives/PaymentWarningBanner.js +18 -0
- package/dist/react/primitives/PaymentWarningBanner.js.map +1 -0
- package/dist/react/primitives/PricingCard.d.ts +37 -0
- package/dist/react/primitives/PricingCard.d.ts.map +1 -0
- package/dist/react/primitives/PricingCard.js +125 -0
- package/dist/react/primitives/PricingCard.js.map +1 -0
- package/dist/react/primitives/PricingSection.d.ts +39 -0
- package/dist/react/primitives/PricingSection.d.ts.map +1 -0
- package/dist/react/primitives/PricingSection.js +24 -0
- package/dist/react/primitives/PricingSection.js.map +1 -0
- package/dist/react/primitives/ScheduledChangeBanner.d.ts +8 -0
- package/dist/react/primitives/ScheduledChangeBanner.d.ts.map +1 -0
- package/dist/react/primitives/ScheduledChangeBanner.js +13 -0
- package/dist/react/primitives/ScheduledChangeBanner.js.map +1 -0
- package/dist/react/primitives/SegmentControl.d.ts +11 -0
- package/dist/react/primitives/SegmentControl.d.ts.map +1 -0
- package/dist/react/primitives/SegmentControl.js +8 -0
- package/dist/react/primitives/SegmentControl.js.map +1 -0
- package/dist/react/primitives/SegmentGroup.d.ts +14 -0
- package/dist/react/primitives/SegmentGroup.d.ts.map +1 -0
- package/dist/react/primitives/SegmentGroup.js +11 -0
- package/dist/react/primitives/SegmentGroup.js.map +1 -0
- package/dist/react/primitives/TrialLimitBanner.d.ts +7 -0
- package/dist/react/primitives/TrialLimitBanner.d.ts.map +1 -0
- package/dist/react/primitives/TrialLimitBanner.js +14 -0
- package/dist/react/primitives/TrialLimitBanner.js.map +1 -0
- package/dist/react/shared.d.ts +28 -0
- package/dist/react/shared.d.ts.map +1 -0
- package/dist/react/shared.js +109 -0
- package/dist/react/shared.js.map +1 -0
- package/dist/react/widgets/BillingPortal.d.ts +9 -0
- package/dist/react/widgets/BillingPortal.d.ts.map +1 -0
- package/dist/react/widgets/BillingPortal.js +30 -0
- package/dist/react/widgets/BillingPortal.js.map +1 -0
- package/dist/react/widgets/ProductItem.d.ts +8 -0
- package/dist/react/widgets/ProductItem.d.ts.map +1 -0
- package/dist/react/widgets/ProductItem.js +14 -0
- package/dist/react/widgets/ProductItem.js.map +1 -0
- package/dist/react/widgets/ProductRoot.d.ts +16 -0
- package/dist/react/widgets/ProductRoot.d.ts.map +1 -0
- package/dist/react/widgets/ProductRoot.js +171 -0
- package/dist/react/widgets/ProductRoot.js.map +1 -0
- package/dist/react/widgets/SubscriptionItem.d.ts +27 -0
- package/dist/react/widgets/SubscriptionItem.d.ts.map +1 -0
- package/dist/react/widgets/SubscriptionItem.js +32 -0
- package/dist/react/widgets/SubscriptionItem.js.map +1 -0
- package/dist/react/widgets/SubscriptionRoot.d.ts +16 -0
- package/dist/react/widgets/SubscriptionRoot.d.ts.map +1 -0
- package/dist/react/widgets/SubscriptionRoot.js +405 -0
- package/dist/react/widgets/SubscriptionRoot.js.map +1 -0
- package/dist/react/widgets/index.d.ts +19 -0
- package/dist/react/widgets/index.d.ts.map +1 -0
- package/dist/react/widgets/index.js +16 -0
- package/dist/react/widgets/index.js.map +1 -0
- package/dist/react/widgets/productGroupContext.d.ts +6 -0
- package/dist/react/widgets/productGroupContext.d.ts.map +1 -0
- package/dist/react/widgets/productGroupContext.js +3 -0
- package/dist/react/widgets/productGroupContext.js.map +1 -0
- package/dist/react/widgets/subscriptionContext.d.ts +6 -0
- package/dist/react/widgets/subscriptionContext.d.ts.map +1 -0
- package/dist/react/widgets/subscriptionContext.js +3 -0
- package/dist/react/widgets/subscriptionContext.js.map +1 -0
- package/dist/react/widgets/types.d.ts +171 -0
- package/dist/react/widgets/types.d.ts.map +1 -0
- package/dist/react/widgets/types.js +2 -0
- package/dist/react/widgets/types.js.map +1 -0
- package/dist/svelte/index.d.ts +22 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +20 -0
- package/dist/svelte/index.js.map +1 -0
- package/dist/svelte/primitives/BillingGate.svelte +28 -0
- package/dist/svelte/primitives/BillingToggle.svelte +27 -0
- package/dist/svelte/primitives/CheckoutButton.svelte +60 -0
- package/dist/svelte/primitives/CheckoutSuccessSummary.svelte +34 -0
- package/dist/svelte/primitives/CustomerPortalButton.svelte +60 -0
- package/dist/svelte/primitives/NumberInput.svelte +71 -0
- package/dist/svelte/primitives/OneTimeCheckoutButton.svelte +37 -0
- package/dist/svelte/primitives/OneTimePaymentStatusBadge.svelte +20 -0
- package/dist/svelte/primitives/PaymentWarningBanner.svelte +30 -0
- package/dist/svelte/primitives/PricingCard.svelte +356 -0
- package/dist/svelte/primitives/PricingSection.svelte +121 -0
- package/dist/svelte/primitives/ScheduledChangeBanner.svelte +46 -0
- package/dist/svelte/primitives/SegmentControl.svelte +38 -0
- package/dist/svelte/primitives/SegmentGroup.svelte +52 -0
- package/dist/svelte/primitives/TrialLimitBanner.svelte +32 -0
- package/dist/svelte/primitives/shared.d.ts +13 -0
- package/dist/svelte/primitives/shared.d.ts.map +1 -0
- package/dist/svelte/primitives/shared.js +87 -0
- package/dist/svelte/primitives/shared.js.map +1 -0
- package/dist/svelte/widgets/BillingPortal.svelte +55 -0
- package/dist/svelte/widgets/Product.svelte +35 -0
- package/dist/svelte/widgets/ProductRoot.svelte +428 -0
- package/dist/svelte/widgets/Subscription.svelte +52 -0
- package/dist/svelte/widgets/SubscriptionRoot.svelte +690 -0
- package/dist/svelte/widgets/index.d.ts +19 -0
- package/dist/svelte/widgets/index.d.ts.map +1 -0
- package/dist/svelte/widgets/index.js +16 -0
- package/dist/svelte/widgets/index.js.map +1 -0
- package/dist/svelte/widgets/productGroupContext.d.ts +6 -0
- package/dist/svelte/widgets/productGroupContext.d.ts.map +1 -0
- package/dist/svelte/widgets/productGroupContext.js +2 -0
- package/dist/svelte/widgets/productGroupContext.js.map +1 -0
- package/dist/svelte/widgets/subscriptionContext.d.ts +6 -0
- package/dist/svelte/widgets/subscriptionContext.d.ts.map +1 -0
- package/dist/svelte/widgets/subscriptionContext.js +2 -0
- package/dist/svelte/widgets/subscriptionContext.js.map +1 -0
- package/dist/svelte/widgets/types.d.ts +171 -0
- package/dist/svelte/widgets/types.d.ts.map +1 -0
- package/dist/svelte/widgets/types.js +2 -0
- package/dist/svelte/widgets/types.js.map +1 -0
- package/package.json +182 -0
- package/src/client/helpers.test.ts +139 -0
- package/src/client/helpers.ts +51 -0
- package/src/client/index.test.ts +1554 -0
- package/src/client/index.ts +1504 -0
- package/src/client/parsers.test.ts +1017 -0
- package/src/client/parsers.ts +182 -0
- package/src/client/polyfill.ts +2 -0
- package/src/component/_generated/api.ts +52 -0
- package/src/component/_generated/component.ts +619 -0
- package/src/component/_generated/dataModel.ts +60 -0
- package/src/component/_generated/server.ts +156 -0
- package/src/component/convex.config.ts +3 -0
- package/src/component/lib.test.ts +1359 -0
- package/src/component/lib.ts +726 -0
- package/src/component/schema.ts +112 -0
- package/src/component/util.test.ts +281 -0
- package/src/component/util.ts +228 -0
- package/src/core/catalog.test.ts +212 -0
- package/src/core/catalog.ts +119 -0
- package/src/core/index.ts +8 -0
- package/src/core/markdown.test.ts +43 -0
- package/src/core/markdown.ts +26 -0
- package/src/core/payments.test.ts +69 -0
- package/src/core/payments.ts +33 -0
- package/src/core/pendingCheckout.test.ts +44 -0
- package/src/core/pendingCheckout.ts +40 -0
- package/src/core/resolver.test.ts +283 -0
- package/src/core/resolver.ts +160 -0
- package/src/core/selectors.test.ts +119 -0
- package/src/core/selectors.ts +35 -0
- package/src/core/subscriptionUpdate.test.ts +164 -0
- package/src/core/subscriptionUpdate.ts +102 -0
- package/src/core/types.ts +220 -0
- package/src/design-system/README.md +40 -0
- package/src/design-system/base.css +27 -0
- package/src/design-system/colors/color-utils.ts +110 -0
- package/src/design-system/colors/config.ts +282 -0
- package/src/design-system/colors/index.ts +2 -0
- package/src/design-system/colors/utilities.css +2328 -0
- package/src/design-system/components/badges.css +65 -0
- package/src/design-system/components/buttons.css +256 -0
- package/src/design-system/components/dialog.css +218 -0
- package/src/design-system/components/icon-buttons.css +115 -0
- package/src/design-system/components/inputs.css +94 -0
- package/src/design-system/components/links.css +53 -0
- package/src/design-system/components/prose.css +67 -0
- package/src/design-system/components/segment-control.css +303 -0
- package/src/design-system/index.css +21 -0
- package/src/design-system/rounded/config.ts +91 -0
- package/src/design-system/rounded/index.ts +1 -0
- package/src/design-system/rounded/utilities.css +37 -0
- package/src/design-system/typography/config.ts +340 -0
- package/src/design-system/typography/index.ts +2 -0
- package/src/design-system/typography/tokens.ts +148 -0
- package/src/design-system/typography/utilities.css +728 -0
- package/src/library.css +20 -0
- package/src/react/hooks/useCheckoutSuccessParams.ts +7 -0
- package/src/react/index.tsx +47 -0
- package/src/react/primitives/BillingGate.tsx +26 -0
- package/src/react/primitives/BillingToggle.tsx +29 -0
- package/src/react/primitives/CheckoutButton.tsx +47 -0
- package/src/react/primitives/CheckoutSuccessSummary.tsx +36 -0
- package/src/react/primitives/CustomerPortalButton.tsx +50 -0
- package/src/react/primitives/NumberInput.tsx +83 -0
- package/src/react/primitives/OneTimeCheckoutButton.tsx +27 -0
- package/src/react/primitives/OneTimePaymentStatusBadge.tsx +18 -0
- package/src/react/primitives/PaymentWarningBanner.tsx +33 -0
- package/src/react/primitives/PricingCard.tsx +421 -0
- package/src/react/primitives/PricingSection.tsx +129 -0
- package/src/react/primitives/ScheduledChangeBanner.tsx +52 -0
- package/src/react/primitives/SegmentControl.tsx +32 -0
- package/src/react/primitives/SegmentGroup.tsx +53 -0
- package/src/react/primitives/TrialLimitBanner.tsx +32 -0
- package/src/react/shared.ts +138 -0
- package/src/react/widgets/BillingPortal.tsx +56 -0
- package/src/react/widgets/ProductItem.tsx +26 -0
- package/src/react/widgets/ProductRoot.tsx +441 -0
- package/src/react/widgets/SubscriptionItem.tsx +71 -0
- package/src/react/widgets/SubscriptionRoot.tsx +759 -0
- package/src/react/widgets/index.ts +36 -0
- package/src/react/widgets/productGroupContext.ts +10 -0
- package/src/react/widgets/subscriptionContext.ts +10 -0
- package/src/react/widgets/types.ts +179 -0
- package/src/svelte/index.ts +43 -0
- package/src/svelte/primitives/BillingGate.svelte +28 -0
- package/src/svelte/primitives/BillingToggle.svelte +27 -0
- package/src/svelte/primitives/CheckoutButton.svelte +60 -0
- package/src/svelte/primitives/CheckoutSuccessSummary.svelte +34 -0
- package/src/svelte/primitives/CustomerPortalButton.svelte +60 -0
- package/src/svelte/primitives/NumberInput.svelte +71 -0
- package/src/svelte/primitives/OneTimeCheckoutButton.svelte +37 -0
- package/src/svelte/primitives/OneTimePaymentStatusBadge.svelte +20 -0
- package/src/svelte/primitives/PaymentWarningBanner.svelte +30 -0
- package/src/svelte/primitives/PricingCard.svelte +356 -0
- package/src/svelte/primitives/PricingSection.svelte +121 -0
- package/src/svelte/primitives/ScheduledChangeBanner.svelte +46 -0
- package/src/svelte/primitives/SegmentControl.svelte +38 -0
- package/src/svelte/primitives/SegmentGroup.svelte +52 -0
- package/src/svelte/primitives/TrialLimitBanner.svelte +32 -0
- package/src/svelte/primitives/shared.ts +113 -0
- package/src/svelte/svelte.d.ts +6 -0
- package/src/svelte/widgets/BillingPortal.svelte +55 -0
- package/src/svelte/widgets/Product.svelte +35 -0
- package/src/svelte/widgets/ProductRoot.svelte +428 -0
- package/src/svelte/widgets/Subscription.svelte +52 -0
- package/src/svelte/widgets/SubscriptionRoot.svelte +690 -0
- package/src/svelte/widgets/index.ts +36 -0
- package/src/svelte/widgets/productGroupContext.ts +7 -0
- package/src/svelte/widgets/subscriptionContext.ts +7 -0
- package/src/svelte/widgets/types.ts +179 -0
- package/src/tailwind.css +6 -0
- package/src/test.ts +18 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* Components: Inputs */
|
|
2
|
+
|
|
3
|
+
@utility input-base {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
block-size: 2rem;
|
|
7
|
+
padding-inline: 12px;
|
|
8
|
+
border-radius: var(--et-radius-m);
|
|
9
|
+
font-family: var(--et-typeface-plain);
|
|
10
|
+
font-size: var(--et-type-label-m-size-desktop);
|
|
11
|
+
line-height: 1.25rem;
|
|
12
|
+
letter-spacing: var(--et-type-label-m-tracking-desktop);
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
color: var(--et-color-foreground-default);
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
outline: none;
|
|
17
|
+
|
|
18
|
+
&::placeholder {
|
|
19
|
+
color: var(--et-color-foreground-placeholder);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:focus-visible {
|
|
23
|
+
outline: none;
|
|
24
|
+
box-shadow: 0 0 0 2px var(--et-color-border-default);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:disabled {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@variant dark {
|
|
33
|
+
color: var(--et-color-foreground-default-dark);
|
|
34
|
+
|
|
35
|
+
&::placeholder {
|
|
36
|
+
color: var(--et-color-foreground-placeholder-dark);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:focus-visible {
|
|
40
|
+
box-shadow: 0 0 0 2px var(--et-color-border-default-dark);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@utility input-variant-default {
|
|
46
|
+
border: 1px solid var(--et-color-border-default);
|
|
47
|
+
|
|
48
|
+
@variant dark {
|
|
49
|
+
border-color: var(--et-color-border-default-dark);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@utility input-variant-ghost {
|
|
54
|
+
border: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Precomposed classes for direct markup usage, e.g. <input class="input-default" /> */
|
|
58
|
+
@utility input-default {
|
|
59
|
+
@apply input-base input-variant-default;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@utility input-ghost {
|
|
63
|
+
@apply input-base input-variant-ghost;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@utility number-input {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 0.25rem;
|
|
70
|
+
padding-inline: 0.25rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@utility number-input-value {
|
|
74
|
+
inline-size: 11.0625rem;
|
|
75
|
+
text-align: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@utility number-input-value-compact {
|
|
79
|
+
inline-size: auto;
|
|
80
|
+
min-inline-size: 1ch;
|
|
81
|
+
padding-inline: 0;
|
|
82
|
+
text-align: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@utility input-no-spinner {
|
|
86
|
+
-moz-appearance: textfield;
|
|
87
|
+
appearance: textfield;
|
|
88
|
+
|
|
89
|
+
&::-webkit-outer-spin-button,
|
|
90
|
+
&::-webkit-inner-spin-button {
|
|
91
|
+
-webkit-appearance: none;
|
|
92
|
+
margin: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* Components: Links */
|
|
2
|
+
|
|
3
|
+
@utility link-inline {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 0.25rem;
|
|
8
|
+
color: var(--et-color-foreground-muted);
|
|
9
|
+
font-family: var(--et-typeface-plain);
|
|
10
|
+
font-size: var(--et-type-label-m-size-desktop);
|
|
11
|
+
line-height: var(--et-type-label-m-line-height-desktop);
|
|
12
|
+
letter-spacing: var(--et-type-label-m-tracking-desktop);
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
text-decoration: none;
|
|
15
|
+
transition: color 120ms ease;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: var(--et-color-foreground-default);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:active {
|
|
22
|
+
color: var(--et-color-foreground-default);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:focus-visible {
|
|
26
|
+
outline: none;
|
|
27
|
+
box-shadow: 0 0 0 2px var(--et-color-border-default);
|
|
28
|
+
border-radius: var(--et-radius-s);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[aria-disabled="true"] {
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
opacity: 0.5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@variant dark {
|
|
37
|
+
color: var(--et-color-foreground-muted-dark);
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
color: var(--et-color-foreground-default-dark);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:active {
|
|
44
|
+
color: var(--et-color-foreground-default-dark);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@utility link-inline-icon {
|
|
50
|
+
inline-size: 1rem;
|
|
51
|
+
block-size: 1rem;
|
|
52
|
+
flex: 0 0 auto;
|
|
53
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* Minimal prose styles for markdown-rendered descriptions.
|
|
2
|
+
Applied via the .creem-prose class on description containers. */
|
|
3
|
+
|
|
4
|
+
.creem-prose {
|
|
5
|
+
> :first-child {
|
|
6
|
+
margin-top: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
> :last-child {
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
p {
|
|
14
|
+
margin-top: 0.5em;
|
|
15
|
+
margin-bottom: 0.5em;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
strong {
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
em {
|
|
23
|
+
font-style: italic;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
a {
|
|
27
|
+
text-decoration: underline;
|
|
28
|
+
text-underline-offset: 2px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
a:hover {
|
|
32
|
+
opacity: 0.8;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ul,
|
|
36
|
+
ol {
|
|
37
|
+
padding-left: 1.25em;
|
|
38
|
+
margin-top: 0.5em;
|
|
39
|
+
margin-bottom: 0.5em;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
ul {
|
|
43
|
+
list-style-type: disc;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
ol {
|
|
47
|
+
list-style-type: decimal;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
li {
|
|
51
|
+
margin-top: 0.25em;
|
|
52
|
+
margin-bottom: 0.25em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
code {
|
|
56
|
+
font-size: 0.875em;
|
|
57
|
+
padding: 0.125em 0.25em;
|
|
58
|
+
border-radius: 0.25rem;
|
|
59
|
+
background-color: rgb(0 0 0 / 0.05);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (prefers-color-scheme: dark) {
|
|
63
|
+
code {
|
|
64
|
+
background-color: rgb(255 255 255 / 0.1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/* Components: Segment Group */
|
|
2
|
+
|
|
3
|
+
@utility segment-group {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: stretch;
|
|
7
|
+
gap: 2px;
|
|
8
|
+
padding: 2px;
|
|
9
|
+
border-radius: 10px;
|
|
10
|
+
background-color: var(--et-color-surface-tonal);
|
|
11
|
+
@variant dark {
|
|
12
|
+
background-color: var(--et-color-surface-tonal-dark);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@utility segment-group-indicator {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: var(--top);
|
|
19
|
+
left: var(--left);
|
|
20
|
+
width: var(--width);
|
|
21
|
+
height: var(--height);
|
|
22
|
+
border-radius: var(--et-radius-m);
|
|
23
|
+
background-color: var(--et-color-surface-base);
|
|
24
|
+
box-shadow:
|
|
25
|
+
0px 4px 8px 0px rgba(0, 0, 0, 0),
|
|
26
|
+
0px 2.821px 5.642px 0px rgba(0, 0, 0, 0.04),
|
|
27
|
+
0px 1.179px 2.358px 0px rgba(0, 0, 0, 0.08);
|
|
28
|
+
--transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
29
|
+
transition:
|
|
30
|
+
left var(--transition-duration, 150ms) var(--transition-timing-function),
|
|
31
|
+
top var(--transition-duration, 150ms) var(--transition-timing-function),
|
|
32
|
+
width var(--transition-duration, 150ms) var(--transition-timing-function),
|
|
33
|
+
height var(--transition-duration, 150ms) var(--transition-timing-function);
|
|
34
|
+
z-index: 0;
|
|
35
|
+
@variant dark {
|
|
36
|
+
background-color: var(--et-color-surface-base-dark);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@utility segment-group-item {
|
|
41
|
+
position: relative;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
gap: 0.25rem;
|
|
47
|
+
min-height: 2rem;
|
|
48
|
+
padding-inline: 12px;
|
|
49
|
+
padding-block: 8px;
|
|
50
|
+
border-radius: var(--et-radius-m);
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
user-select: none;
|
|
53
|
+
color: var(--et-color-foreground-default);
|
|
54
|
+
background: transparent;
|
|
55
|
+
outline: none;
|
|
56
|
+
|
|
57
|
+
&::after {
|
|
58
|
+
content: "";
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset: 0;
|
|
61
|
+
border-radius: inherit;
|
|
62
|
+
background: color-mix(
|
|
63
|
+
in oklab,
|
|
64
|
+
var(--et-color-foreground-default) 0%,
|
|
65
|
+
transparent
|
|
66
|
+
);
|
|
67
|
+
transition: background-color 120ms ease;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:hover::after {
|
|
72
|
+
background: color-mix(
|
|
73
|
+
in oklab,
|
|
74
|
+
var(--et-color-foreground-default) 8%,
|
|
75
|
+
transparent
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:active::after {
|
|
80
|
+
background: color-mix(
|
|
81
|
+
in oklab,
|
|
82
|
+
var(--et-color-foreground-default) 10%,
|
|
83
|
+
transparent
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Checked state stays transparent; active background is the moving indicator */
|
|
88
|
+
&[data-state="checked"]::after,
|
|
89
|
+
&[aria-checked="true"]::after,
|
|
90
|
+
&[data-current]::after {
|
|
91
|
+
background: transparent;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&[data-focus-visible] {
|
|
95
|
+
box-shadow: 0 0 0 2px var(--et-color-border-default);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&[data-disabled] {
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
opacity: 0.5;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&[data-disabled]::after {
|
|
104
|
+
background: transparent;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@variant dark {
|
|
108
|
+
color: var(--et-color-foreground-default-dark);
|
|
109
|
+
|
|
110
|
+
&::after {
|
|
111
|
+
background: color-mix(
|
|
112
|
+
in oklab,
|
|
113
|
+
var(--et-color-foreground-default-dark) 0%,
|
|
114
|
+
transparent
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:hover::after {
|
|
119
|
+
background: color-mix(
|
|
120
|
+
in oklab,
|
|
121
|
+
var(--et-color-foreground-default-dark) 8%,
|
|
122
|
+
transparent
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:active::after {
|
|
127
|
+
background: color-mix(
|
|
128
|
+
in oklab,
|
|
129
|
+
var(--et-color-foreground-default-dark) 10%,
|
|
130
|
+
transparent
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&[data-focus-visible] {
|
|
135
|
+
box-shadow: 0 0 0 2px var(--et-color-border-default-dark);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@utility segment-group-item-text {
|
|
141
|
+
color: var(--et-color-foreground-default);
|
|
142
|
+
@variant dark {
|
|
143
|
+
color: var(--et-color-foreground-default-dark);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@utility segment-group-item-control {
|
|
148
|
+
position: absolute;
|
|
149
|
+
inset: 0;
|
|
150
|
+
opacity: 0;
|
|
151
|
+
pointer-events: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Backward-compatible utility aliases */
|
|
155
|
+
@utility segment-control {
|
|
156
|
+
position: relative;
|
|
157
|
+
display: inline-flex;
|
|
158
|
+
align-items: stretch;
|
|
159
|
+
gap: 2px;
|
|
160
|
+
padding: 2px;
|
|
161
|
+
border-radius: 10px;
|
|
162
|
+
background-color: var(--et-color-surface-tonal);
|
|
163
|
+
@variant dark {
|
|
164
|
+
background-color: var(--et-color-surface-tonal-dark);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@utility segment-control-indicator {
|
|
169
|
+
position: absolute;
|
|
170
|
+
top: var(--top);
|
|
171
|
+
left: var(--left);
|
|
172
|
+
width: var(--width);
|
|
173
|
+
height: var(--height);
|
|
174
|
+
border-radius: var(--et-radius-m);
|
|
175
|
+
background-color: var(--et-color-surface-base);
|
|
176
|
+
box-shadow:
|
|
177
|
+
0px 4px 8px 0px rgba(0, 0, 0, 0),
|
|
178
|
+
0px 2.821px 5.642px 0px rgba(0, 0, 0, 0.04),
|
|
179
|
+
0px 1.179px 2.358px 0px rgba(0, 0, 0, 0.08);
|
|
180
|
+
--transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
181
|
+
transition:
|
|
182
|
+
left var(--transition-duration, 150ms) var(--transition-timing-function),
|
|
183
|
+
top var(--transition-duration, 150ms) var(--transition-timing-function),
|
|
184
|
+
width var(--transition-duration, 150ms) var(--transition-timing-function),
|
|
185
|
+
height var(--transition-duration, 150ms) var(--transition-timing-function);
|
|
186
|
+
z-index: 0;
|
|
187
|
+
@variant dark {
|
|
188
|
+
background-color: var(--et-color-surface-base-dark);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@utility segment-control-item {
|
|
193
|
+
position: relative;
|
|
194
|
+
z-index: 1;
|
|
195
|
+
display: inline-flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
gap: 0.25rem;
|
|
199
|
+
min-height: 2rem;
|
|
200
|
+
padding-inline: 12px;
|
|
201
|
+
padding-block: 8px;
|
|
202
|
+
border-radius: var(--et-radius-m);
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
user-select: none;
|
|
205
|
+
color: var(--et-color-foreground-default);
|
|
206
|
+
background: transparent;
|
|
207
|
+
outline: none;
|
|
208
|
+
|
|
209
|
+
&::after {
|
|
210
|
+
content: "";
|
|
211
|
+
position: absolute;
|
|
212
|
+
inset: 0;
|
|
213
|
+
border-radius: inherit;
|
|
214
|
+
background: color-mix(
|
|
215
|
+
in oklab,
|
|
216
|
+
var(--et-color-foreground-default) 0%,
|
|
217
|
+
transparent
|
|
218
|
+
);
|
|
219
|
+
transition: background-color 120ms ease;
|
|
220
|
+
pointer-events: none;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&:hover::after {
|
|
224
|
+
background: color-mix(
|
|
225
|
+
in oklab,
|
|
226
|
+
var(--et-color-foreground-default) 8%,
|
|
227
|
+
transparent
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&:active::after {
|
|
232
|
+
background: color-mix(
|
|
233
|
+
in oklab,
|
|
234
|
+
var(--et-color-foreground-default) 10%,
|
|
235
|
+
transparent
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&[data-state="checked"]::after,
|
|
240
|
+
&[aria-checked="true"]::after,
|
|
241
|
+
&[data-current]::after {
|
|
242
|
+
background: transparent;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&[data-focus-visible] {
|
|
246
|
+
box-shadow: 0 0 0 2px var(--et-color-border-default);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&[data-disabled] {
|
|
250
|
+
cursor: not-allowed;
|
|
251
|
+
opacity: 0.5;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&[data-disabled]::after {
|
|
255
|
+
background: transparent;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@variant dark {
|
|
259
|
+
color: var(--et-color-foreground-default-dark);
|
|
260
|
+
|
|
261
|
+
&::after {
|
|
262
|
+
background: color-mix(
|
|
263
|
+
in oklab,
|
|
264
|
+
var(--et-color-foreground-default-dark) 0%,
|
|
265
|
+
transparent
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
&:hover::after {
|
|
270
|
+
background: color-mix(
|
|
271
|
+
in oklab,
|
|
272
|
+
var(--et-color-foreground-default-dark) 8%,
|
|
273
|
+
transparent
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
&:active::after {
|
|
278
|
+
background: color-mix(
|
|
279
|
+
in oklab,
|
|
280
|
+
var(--et-color-foreground-default-dark) 10%,
|
|
281
|
+
transparent
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&[data-focus-visible] {
|
|
286
|
+
box-shadow: 0 0 0 2px var(--et-color-border-default-dark);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@utility segment-control-item-text {
|
|
292
|
+
color: var(--et-color-foreground-default);
|
|
293
|
+
@variant dark {
|
|
294
|
+
color: var(--et-color-foreground-default-dark);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@utility segment-control-item-control {
|
|
299
|
+
position: absolute;
|
|
300
|
+
inset: 0;
|
|
301
|
+
opacity: 0;
|
|
302
|
+
pointer-events: none;
|
|
303
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@import "@fontsource/inter/100.css";
|
|
2
|
+
@import "@fontsource/inter/200.css";
|
|
3
|
+
@import "@fontsource/inter/300.css";
|
|
4
|
+
@import "@fontsource/inter/400.css";
|
|
5
|
+
@import "@fontsource/inter/500.css";
|
|
6
|
+
@import "@fontsource/inter/600.css";
|
|
7
|
+
@import "@fontsource/inter/700.css";
|
|
8
|
+
@import "@fontsource/inter/800.css";
|
|
9
|
+
@import "@fontsource/inter/900.css";
|
|
10
|
+
@import "./base.css";
|
|
11
|
+
@import "./colors/utilities.css";
|
|
12
|
+
@import "./rounded/utilities.css";
|
|
13
|
+
@import "./typography/utilities.css";
|
|
14
|
+
@import "./components/buttons.css";
|
|
15
|
+
@import "./components/badges.css";
|
|
16
|
+
@import "./components/icon-buttons.css";
|
|
17
|
+
@import "./components/inputs.css";
|
|
18
|
+
@import "./components/links.css";
|
|
19
|
+
@import "./components/prose.css";
|
|
20
|
+
@import "./components/segment-control.css";
|
|
21
|
+
@import "./components/dialog.css";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export const RADIUS_TOKENS = {
|
|
2
|
+
"rounded-sm": { label: "rounded-sm", px: 6 },
|
|
3
|
+
rounded: { label: "rounded", px: 8 },
|
|
4
|
+
"rounded-lg": { label: "rounded-lg", px: 12 },
|
|
5
|
+
"rounded-xl": { label: "rounded-xl", px: 16 },
|
|
6
|
+
"rounded-full": { label: "rounded-full", px: 9999 },
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export type RadiusTokenKey = keyof typeof RADIUS_TOKENS;
|
|
10
|
+
export type RadiusSemanticRole = "S" | "M" | "L" | "XL" | "Full";
|
|
11
|
+
|
|
12
|
+
export const SEMANTIC_ROLE_ORDER: RadiusSemanticRole[] = [
|
|
13
|
+
"S",
|
|
14
|
+
"M",
|
|
15
|
+
"L",
|
|
16
|
+
"XL",
|
|
17
|
+
"Full",
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export const DEFAULT_SEMANTIC_RADIUS_TOKENS: Record<
|
|
21
|
+
RadiusSemanticRole,
|
|
22
|
+
RadiusTokenKey
|
|
23
|
+
> = {
|
|
24
|
+
S: "rounded-sm",
|
|
25
|
+
M: "rounded",
|
|
26
|
+
L: "rounded-lg",
|
|
27
|
+
XL: "rounded-xl",
|
|
28
|
+
Full: "rounded-full",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const COMPONENT_ORDER = [
|
|
32
|
+
"checkbox",
|
|
33
|
+
"keyboard-shortcut",
|
|
34
|
+
"tag",
|
|
35
|
+
"badge",
|
|
36
|
+
"small-button",
|
|
37
|
+
"button",
|
|
38
|
+
"menu-item",
|
|
39
|
+
"tab",
|
|
40
|
+
"textarea",
|
|
41
|
+
"input",
|
|
42
|
+
"large-button",
|
|
43
|
+
"card",
|
|
44
|
+
"dropdown",
|
|
45
|
+
"popover",
|
|
46
|
+
"tooltip",
|
|
47
|
+
"modal",
|
|
48
|
+
"drawer",
|
|
49
|
+
"table",
|
|
50
|
+
"image",
|
|
51
|
+
"avatar",
|
|
52
|
+
"toggle",
|
|
53
|
+
"progress-bar",
|
|
54
|
+
] as const;
|
|
55
|
+
|
|
56
|
+
export type RadiusComponent = (typeof COMPONENT_ORDER)[number];
|
|
57
|
+
|
|
58
|
+
export const DEFAULT_COMPONENT_SEMANTIC: Record<
|
|
59
|
+
RadiusComponent,
|
|
60
|
+
RadiusSemanticRole
|
|
61
|
+
> = {
|
|
62
|
+
checkbox: "S",
|
|
63
|
+
"keyboard-shortcut": "S",
|
|
64
|
+
tag: "S",
|
|
65
|
+
badge: "S",
|
|
66
|
+
"small-button": "S",
|
|
67
|
+
button: "M",
|
|
68
|
+
"menu-item": "M",
|
|
69
|
+
tab: "M",
|
|
70
|
+
textarea: "M",
|
|
71
|
+
input: "M",
|
|
72
|
+
"large-button": "L",
|
|
73
|
+
card: "L",
|
|
74
|
+
dropdown: "L",
|
|
75
|
+
popover: "L",
|
|
76
|
+
tooltip: "L",
|
|
77
|
+
modal: "XL",
|
|
78
|
+
drawer: "XL",
|
|
79
|
+
table: "XL",
|
|
80
|
+
image: "L",
|
|
81
|
+
avatar: "Full",
|
|
82
|
+
toggle: "Full",
|
|
83
|
+
"progress-bar": "Full",
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export function titleizeComponentName(name: RadiusComponent): string {
|
|
87
|
+
return name
|
|
88
|
+
.split("-")
|
|
89
|
+
.map((chunk) => chunk.charAt(0).toUpperCase() + chunk.slice(1))
|
|
90
|
+
.join(" ");
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./config.js";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* Components: Rounded */
|
|
2
|
+
|
|
3
|
+
@layer base {
|
|
4
|
+
:root {
|
|
5
|
+
--et-radius-token-rounded-sm: 0.375rem;
|
|
6
|
+
--et-radius-token-rounded: 0.5rem;
|
|
7
|
+
--et-radius-token-rounded-lg: 0.75rem;
|
|
8
|
+
--et-radius-token-rounded-xl: 1rem;
|
|
9
|
+
--et-radius-token-rounded-full: 9999px;
|
|
10
|
+
|
|
11
|
+
--et-radius-s: var(--et-radius-token-rounded-sm);
|
|
12
|
+
--et-radius-m: var(--et-radius-token-rounded);
|
|
13
|
+
--et-radius-l: var(--et-radius-token-rounded-lg);
|
|
14
|
+
--et-radius-xl: var(--et-radius-token-rounded-xl);
|
|
15
|
+
--et-radius-full: var(--et-radius-token-rounded-full);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@utility radius-s {
|
|
20
|
+
border-radius: var(--et-radius-s);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@utility radius-m {
|
|
24
|
+
border-radius: var(--et-radius-m);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@utility radius-l {
|
|
28
|
+
border-radius: var(--et-radius-l);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@utility radius-xl {
|
|
32
|
+
border-radius: var(--et-radius-xl);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@utility radius-full {
|
|
36
|
+
border-radius: var(--et-radius-full);
|
|
37
|
+
}
|