@infonomic/uikit 1.5.0 → 2.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/dist/components/button/button-group.d.ts +1 -1
- package/dist/components/button/button-group.d.ts.map +1 -1
- package/dist/components/button/button-group.js +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/control-buttons.d.ts.map +1 -1
- package/dist/components/button/control-buttons.js +3 -3
- package/dist/components/button/copy-button.d.ts.map +1 -1
- package/dist/components/button/copy-button.js +2 -2
- package/dist/components/button/icon-button.d.ts.map +1 -1
- package/dist/components/button/icon-button.js +1 -1
- package/dist/components/button/index.js +17 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/input/checkbox.d.ts.map +1 -1
- package/dist/components/input/checkbox.js +4 -4
- package/dist/components/input/error-text.d.ts.map +1 -1
- package/dist/components/input/error-text.js +1 -1
- package/dist/components/input/help-text.d.ts.map +1 -1
- package/dist/components/input/help-text.js +1 -1
- package/dist/components/input/input-adornment.d.ts.map +1 -1
- package/dist/components/input/input-adornment.js +1 -1
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +3 -3
- package/dist/components/input/label.d.ts.map +1 -1
- package/dist/components/input/label.js +1 -1
- package/dist/components/input/radio-group.js +1 -1
- package/dist/components/input/select.d.ts +1 -1
- package/dist/components/input/select.d.ts.map +1 -1
- package/dist/components/input/select.js +3 -3
- package/dist/components/input/text-area.d.ts.map +1 -1
- package/dist/components/input/text-area.js +3 -3
- package/dist/components/notifications/alert.d.ts.map +1 -1
- package/dist/components/notifications/alert.js +2 -2
- package/dist/components/notifications/toast.js +4 -4
- package/dist/components/pager/ellipses.d.ts.map +1 -1
- package/dist/components/pager/ellipses.js +1 -1
- package/dist/components/pager/first-button.d.ts.map +1 -1
- package/dist/components/pager/first-button.js +2 -2
- package/dist/components/pager/last-button.d.ts.map +1 -1
- package/dist/components/pager/last-button.js +2 -2
- package/dist/components/pager/next-button.d.ts.map +1 -1
- package/dist/components/pager/next-button.js +2 -2
- package/dist/components/pager/number-button.d.ts.map +1 -1
- package/dist/components/pager/number-button.js +2 -2
- package/dist/components/pager/pagination.d.ts +1 -1
- package/dist/components/pager/pagination.d.ts.map +1 -1
- package/dist/components/pager/pagination.js +5 -5
- package/dist/components/pager/previous-button.d.ts.map +1 -1
- package/dist/components/pager/previous-button.js +2 -2
- package/dist/components/scroll-area/scroll-area.js +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +2 -2
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/icons/index.js +1 -17
- package/package.json +9 -5
- package/src/astro.d.ts +43 -0
- package/src/astro.js +2 -2
- package/src/components/@types/shared.ts +24 -0
- package/src/components/accordion/accordion.module.css +60 -0
- package/src/components/accordion/accordion.stories.tsx +117 -0
- package/src/components/accordion/accordion.tsx +105 -0
- package/src/components/animation/fade-in-lift.stories.tsx +81 -0
- package/src/components/animation/fade-in-lift.tsx +42 -0
- package/src/components/avatar/avatar.module.css +54 -0
- package/src/components/avatar/avatar.stories.tsx +28 -0
- package/src/components/avatar/avatar.tsx +19 -0
- package/src/components/button/@types/button.ts +17 -0
- package/src/components/button/button-group.module.css +17 -0
- package/src/components/button/button-group.stories.tsx +45 -0
- package/src/components/button/button-group.tsx +132 -0
- package/src/components/button/button-icon.stories.tsx +145 -0
- package/src/components/button/button-intents.stories.tsx +50 -0
- package/src/components/button/button-variants.stories.tsx +60 -0
- package/src/components/button/button.astro +86 -0
- package/src/components/button/button.module.css +533 -0
- package/src/components/button/button.tsx +81 -0
- package/src/components/button/control-buttons.module.css +144 -0
- package/src/components/button/control-buttons.stories.tsx +60 -0
- package/src/components/button/control-buttons.tsx +137 -0
- package/src/components/button/copy-button.module.css +31 -0
- package/src/components/button/copy-button.stories.tsx +50 -0
- package/src/components/button/copy-button.tsx +92 -0
- package/src/components/button/icon-button.astro +47 -0
- package/src/components/button/icon-button.tsx +44 -0
- package/src/components/button/index.ts +5 -0
- package/src/components/calendar/calendar.module.css +315 -0
- package/src/components/calendar/calendar.stories.tsx +139 -0
- package/src/components/calendar/calendar.tsx +173 -0
- package/src/components/card/card-content.astro +14 -0
- package/src/components/card/card-description.astro +14 -0
- package/src/components/card/card-footer.astro +14 -0
- package/src/components/card/card-header.astro +14 -0
- package/src/components/card/card-title.astro +14 -0
- package/src/components/card/card.astro +41 -0
- package/src/components/card/card.module.css +67 -0
- package/src/components/card/card.stories.tsx +61 -0
- package/src/components/card/card.tsx +86 -0
- package/src/components/container/container.astro +13 -0
- package/src/components/container/container.module.css +28 -0
- package/src/components/container/container.stories.tsx +42 -0
- package/src/components/container/container.tsx +23 -0
- package/src/components/dropdown/dropdown.module.css +131 -0
- package/src/components/dropdown/dropdown.stories.tsx +103 -0
- package/src/components/dropdown/dropdown.tsx +193 -0
- package/src/components/hamburger/hamburger.astro +30 -0
- package/src/components/hamburger/hamburger.tsx +66 -0
- package/src/components/input/@types/checkbox.ts +20 -0
- package/src/components/input/@types/input.ts +20 -0
- package/src/components/input/checkbox-group.tsx +78 -0
- package/src/components/input/checkbox.module.css +267 -0
- package/src/components/input/checkbox.stories.tsx +240 -0
- package/src/components/input/checkbox.tsx +95 -0
- package/src/components/input/error-text.astro +14 -0
- package/src/components/input/error-text.module.css +19 -0
- package/src/components/input/error-text.tsx +18 -0
- package/src/components/input/errors.tsx +37 -0
- package/src/components/input/help-text.astro +13 -0
- package/src/components/input/help-text.module.css +19 -0
- package/src/components/input/help-text.tsx +13 -0
- package/src/components/input/index.tsx +8 -0
- package/src/components/input/input-adornment.astro +26 -0
- package/src/components/input/input-adornment.module.css +18 -0
- package/src/components/input/input-adornment.tsx +36 -0
- package/src/components/input/input.astro +99 -0
- package/src/components/input/input.module.css +310 -0
- package/src/components/input/input.stories.tsx +174 -0
- package/src/components/input/input.tsx +103 -0
- package/src/components/input/label.astro +24 -0
- package/src/components/input/label.module.css +28 -0
- package/src/components/input/label.tsx +25 -0
- package/src/components/input/radio-group.module.css +219 -0
- package/src/components/input/radio-group.stories.tsx +73 -0
- package/src/components/input/radio-group.tsx +67 -0
- package/src/components/input/select.module.css +75 -0
- package/src/components/input/select.stories.tsx +34 -0
- package/src/components/input/select.tsx +115 -0
- package/src/components/input/text-area.module.css +9 -0
- package/src/components/input/text-area.stories.tsx +51 -0
- package/src/components/input/text-area.tsx +81 -0
- package/src/components/input/utils.ts +21 -0
- package/src/components/notifications/@types/alert.ts +12 -0
- package/src/components/notifications/@types/toast.ts +12 -0
- package/src/components/notifications/alert.module.css +114 -0
- package/src/components/notifications/alert.stories.tsx +39 -0
- package/src/components/notifications/alert.tsx +117 -0
- package/src/components/notifications/index.ts +2 -0
- package/src/components/notifications/toast.module.css +237 -0
- package/src/components/notifications/toast.stories.tsx +42 -0
- package/src/components/notifications/toast.tsx +124 -0
- package/src/components/overlay/index.stories.tsx +29 -0
- package/src/components/overlay/index.ts +2 -0
- package/src/components/overlay/overlay.module.css +41 -0
- package/src/components/overlay/overlay.tsx +61 -0
- package/src/components/pager/@types/index.ts +2 -0
- package/src/components/pager/ellipses.tsx +18 -0
- package/src/components/pager/event-pager.tsx +18 -0
- package/src/components/pager/first-button.tsx +53 -0
- package/src/components/pager/hooks/types/usePagination.ts +80 -0
- package/src/components/pager/hooks/usePagination.ts +140 -0
- package/src/components/pager/icons/first.tsx +33 -0
- package/src/components/pager/icons/index.tsx +4 -0
- package/src/components/pager/icons/last.tsx +33 -0
- package/src/components/pager/icons/next.tsx +20 -0
- package/src/components/pager/icons/previous.tsx +20 -0
- package/src/components/pager/index.ts +4 -0
- package/src/components/pager/last-button.tsx +57 -0
- package/src/components/pager/next-button.tsx +55 -0
- package/src/components/pager/number-button.tsx +83 -0
- package/src/components/pager/pagination.module.css +165 -0
- package/src/components/pager/pagination.stories.tsx +190 -0
- package/src/components/pager/pagination.tsx +266 -0
- package/src/components/pager/previous-button.tsx +51 -0
- package/src/components/scroll-area/scroll-area.module.css +80 -0
- package/src/components/scroll-area/scroll-area.stories.tsx +33 -0
- package/src/components/scroll-area/scroll-area.tsx +22 -0
- package/src/components/scroll-to-top/scroll-to-top.tsx +59 -0
- package/src/components/section/section.astro +13 -0
- package/src/components/section/section.module.css +7 -0
- package/src/components/section/section.tsx +23 -0
- package/src/components/shimmer/shimmer.module.css +53 -0
- package/src/components/shimmer/shimmer.stories.tsx +24 -0
- package/src/components/shimmer/shimmer.tsx +70 -0
- package/src/components/table/table.module.css +100 -0
- package/src/components/table/table.stories.tsx +95 -0
- package/src/components/table/table.tsx +165 -0
- package/src/components/tabs/tabs.module.css +64 -0
- package/src/components/tabs/tabs.stories.tsx +47 -0
- package/src/components/tabs/tabs.tsx +75 -0
- package/src/components/timeline/timeline.module.css +87 -0
- package/src/components/timeline/timeline.stories.tsx +50 -0
- package/src/components/timeline/timeline.tsx +177 -0
- package/src/components/tooltip/tooltip.module.css +55 -0
- package/src/components/tooltip/tooltip.stories.tsx +59 -0
- package/src/components/tooltip/tooltip.tsx +51 -0
- package/src/declarations.d.ts +4 -0
- package/src/hooks/use-media-query.ts +20 -0
- package/src/icons/activity-icon.tsx +40 -0
- package/src/icons/calendar-icon.tsx +39 -0
- package/src/icons/check-icon.tsx +33 -0
- package/src/icons/chevron-down-icon.tsx +39 -0
- package/src/icons/chevron-left-double-icon.tsx +58 -0
- package/src/icons/chevron-left-icon.tsx +58 -0
- package/src/icons/chevron-right-double-icon.tsx +58 -0
- package/src/icons/chevron-right-icon.tsx +58 -0
- package/src/icons/chevrons-up-down.tsx +37 -0
- package/src/icons/close-icon.astro +38 -0
- package/src/icons/close-icon.tsx +30 -0
- package/src/icons/copy-icon.tsx +35 -0
- package/src/icons/danger-icon.tsx +18 -0
- package/src/icons/dashboard-icon.tsx +41 -0
- package/src/icons/delete-icon.tsx +34 -0
- package/src/icons/document-icon.tsx +38 -0
- package/src/icons/download-icon.tsx +39 -0
- package/src/icons/edit-icon.tsx +35 -0
- package/src/icons/ellipsis-icon.tsx +38 -0
- package/src/icons/email-icon.tsx +33 -0
- package/src/icons/external-link-icon.tsx +39 -0
- package/src/icons/github-icon.tsx +27 -0
- package/src/icons/globe-icon.tsx +50 -0
- package/src/icons/google-icon.tsx +44 -0
- package/src/icons/gripper-vertical-icon.tsx +43 -0
- package/src/icons/history-icon.tsx +32 -0
- package/src/icons/home-icon.tsx +34 -0
- package/src/icons/icon-element.astro +27 -0
- package/src/icons/icon-element.tsx +32 -0
- package/src/icons/icon-sprite.tsx +18 -0
- package/src/icons/icons.module.css +147 -0
- package/src/icons/index.stories.tsx +25 -0
- package/src/icons/index.ts +39 -0
- package/src/icons/info-icon.tsx +18 -0
- package/src/icons/infonomic-icon.tsx +173 -0
- package/src/icons/light-icon.astro +36 -0
- package/src/icons/light-icon.tsx +29 -0
- package/src/icons/location-pin-icon.tsx +36 -0
- package/src/icons/moon-icon.astro +38 -0
- package/src/icons/moon-icon.tsx +42 -0
- package/src/icons/plus-icon.tsx +34 -0
- package/src/icons/primary-icon.tsx +22 -0
- package/src/icons/refresh-icon.tsx +33 -0
- package/src/icons/return-icon.tsx +36 -0
- package/src/icons/roles-icon.tsx +34 -0
- package/src/icons/search-icon.astro +40 -0
- package/src/icons/search-icon.tsx +29 -0
- package/src/icons/search-menu-icon.tsx +42 -0
- package/src/icons/settings-gear-icon.tsx +36 -0
- package/src/icons/settings-sliders-icon.tsx +43 -0
- package/src/icons/sign-out-icon.tsx +35 -0
- package/src/icons/source/icon-calendar.svg +1 -0
- package/src/icons/source/icon-check.svg +4 -0
- package/src/icons/source/icon-close.svg +3 -0
- package/src/icons/source/icon-coinbase.svg +9 -0
- package/src/icons/source/icon-copy.svg +4 -0
- package/src/icons/source/icon-document.svg +5 -0
- package/src/icons/source/icon-download.svg +4 -0
- package/src/icons/source/icon-edit.svg +6 -0
- package/src/icons/source/icon-eth-purple.svg +15 -0
- package/src/icons/source/icon-etherscan.svg +5 -0
- package/src/icons/source/icon-external-link.svg +4 -0
- package/src/icons/source/icon-globe.svg +7 -0
- package/src/icons/source/icon-gripper-vertical.svg +9 -0
- package/src/icons/source/icon-info.svg +4 -0
- package/src/icons/source/icon-infonomic.svg +43 -0
- package/src/icons/source/icon-ledger.svg +4 -0
- package/src/icons/source/icon-light.svg +3 -0
- package/src/icons/source/icon-location-pin.svg +8 -0
- package/src/icons/source/icon-logout.svg +6 -0
- package/src/icons/source/icon-metamask.svg +32 -0
- package/src/icons/source/icon-moon.svg +3 -0
- package/src/icons/source/icon-plus.svg +4 -0
- package/src/icons/source/icon-refresh.svg +4 -0
- package/src/icons/source/icon-return.svg +4 -0
- package/src/icons/source/icon-search-menu.svg +13 -0
- package/src/icons/source/icon-search.svg +3 -0
- package/src/icons/source/icon-settings-gear.svg +5 -0
- package/src/icons/source/icon-settings.svg +12 -0
- package/src/icons/source/icon-wallet.svg +3 -0
- package/src/icons/source/icon-walletconnect.svg +4 -0
- package/src/icons/source/icon-x.svg +4 -0
- package/src/icons/stopwatch-icon.tsx +39 -0
- package/src/icons/success-icon.tsx +18 -0
- package/src/icons/types/icon.ts +8 -0
- package/src/icons/user-icon.tsx +33 -0
- package/src/icons/users-icon.tsx +35 -0
- package/src/icons/wallet-icon.tsx +29 -0
- package/src/icons/warning-icon.tsx +18 -0
- package/src/icons/x-icon.tsx +33 -0
- package/src/loaders/ellipses.tsx +36 -0
- package/src/loaders/loaders.stories.tsx +46 -0
- package/src/loaders/ring.tsx +33 -0
- package/src/loaders/spinner.tsx +28 -0
- package/src/loaders/types/index.ts +6 -0
- package/src/react.ts +99 -0
- package/src/styles/base/animations.css +143 -0
- package/src/styles/base/base.css +5 -0
- package/src/styles/base/colors.css +163 -0
- package/src/styles/base/colors.stories.tsx +671 -0
- package/src/styles/base/reset.css +464 -0
- package/src/styles/base/typography.css +25 -0
- package/src/styles/base/vars.css +188 -0
- package/src/styles/components/card.css +20 -0
- package/src/styles/components/checkbox.css +55 -0
- package/src/styles/components/components.css +11 -0
- package/src/styles/components/directional-button.css +92 -0
- package/src/styles/components/dropdown.css +19 -0
- package/src/styles/components/fade-in-lift.css +13 -0
- package/src/styles/components/hamburger.css +107 -0
- package/src/styles/components/icon-element.css +4 -0
- package/src/styles/components/list-checkbox.css +60 -0
- package/src/styles/components/loaders.css +196 -0
- package/src/styles/components/popover.css +15 -0
- package/src/styles/components/scroll-to-top.css +89 -0
- package/src/styles/components/toast.css +18 -0
- package/src/styles/styles.css +6 -0
- package/src/styles/theme/autofill.css +58 -0
- package/src/styles/theme/scrollers.css +52 -0
- package/src/styles/theme/theme.css +130 -0
- package/src/styles/theme/theme.stories.tsx +33 -0
- package/src/styles/typography/code.stories.tsx +76 -0
- package/src/styles/typography/default.stories.tsx +51 -0
- package/src/styles/typography/fonts.css +30 -0
- package/src/styles/typography/lists.stories.tsx +50 -0
- package/src/styles/typography/prose.css +404 -0
- package/src/styles/typography/quote.stories.tsx +37 -0
- package/src/styles/typography.css +24 -0
- package/src/styles/utils/scroll-layout-shift.css +9 -0
- package/src/styles/utils/utility-classes.css +1278 -0
- package/src/styles/utils/utils.css +2 -0
- package/src/theme/theme-provider/index.ts +1 -0
- package/src/theme/theme-provider/provider.tsx +44 -0
- package/src/utils/capitalize.ts +6 -0
- package/src/utils/externalLinkProps.ts +6 -0
- package/src/utils/findMatch.ts +7 -0
- package/src/utils/getPortalRoot.ts +3 -0
- package/src/utils/isTouchDevice.ts +11 -0
- package/src/utils/objectsToArray.ts +15 -0
- package/src/utils/objectsToString.ts +5 -0
- package/src/utils/polymorphic.ts +16 -0
- package/src/utils/to-kebab-case.ts +5 -0
- package/src/widgets/datepicker/datepicker.module.css +189 -0
- package/src/widgets/datepicker/datepicker.stories.tsx +25 -0
- package/src/widgets/datepicker/datepicker.tsx +310 -0
- package/src/widgets/drawer/drawer-container.tsx +26 -0
- package/src/widgets/drawer/drawer-content.tsx +26 -0
- package/src/widgets/drawer/drawer-context.tsx +49 -0
- package/src/widgets/drawer/drawer-header.tsx +27 -0
- package/src/widgets/drawer/drawer-top-actions.tsx +27 -0
- package/src/widgets/drawer/drawer-wrapper.tsx +54 -0
- package/src/widgets/drawer/drawer.module.css +116 -0
- package/src/widgets/drawer/drawer.stories.tsx +224 -0
- package/src/widgets/drawer/drawer.tsx +115 -0
- package/src/widgets/drawer/motionDomAnimation.ts +4 -0
- package/src/widgets/drawer/motionDomMax.ts +4 -0
- package/src/widgets/modal/modal-actions.tsx +26 -0
- package/src/widgets/modal/modal-container.tsx +26 -0
- package/src/widgets/modal/modal-content.tsx +26 -0
- package/src/widgets/modal/modal-header.tsx +27 -0
- package/src/widgets/modal/modal-wrapper.tsx +50 -0
- package/src/widgets/modal/modal.module.css +85 -0
- package/src/widgets/modal/modal.stories.tsx +71 -0
- package/src/widgets/modal/modal.tsx +110 -0
- package/src/widgets/modal/motionDomAnimation.ts +4 -0
- package/src/widgets/modal/motionDomMax.ts +4 -0
- package/src/widgets/search/index.ts +1 -0
- package/src/widgets/search/search.stories.tsx +18 -0
- package/src/widgets/search/search.tsx +186 -0
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Adapted from Tailwind typography plugin
|
|
3
|
+
* Portions copyright (c) Tailwind Labs, Inc.
|
|
4
|
+
*
|
|
5
|
+
* A simple typography style sheet that can be used in a project
|
|
6
|
+
* without Tailwind, although the typography styles are quite basic.
|
|
7
|
+
*
|
|
8
|
+
* Note: You should only load one typography style sheet or plugin.
|
|
9
|
+
* If Tailwind is being used in the frontend, and you're using
|
|
10
|
+
* the Tailwind typography plugin, then this style sheet should NOT
|
|
11
|
+
* be loaded (although it will cause little harm as it's
|
|
12
|
+
* behind a cascade layer).
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
@layer infonomic-typography {
|
|
16
|
+
:root {
|
|
17
|
+
--prose-body: var(--gray-900);
|
|
18
|
+
--prose-headings: var(--gray-900);
|
|
19
|
+
--prose-lead: #4b5563;
|
|
20
|
+
--prose-links: var(--accent-950);
|
|
21
|
+
--prose-counters: #6b7280;
|
|
22
|
+
--prose-bullets: #d1d5db;
|
|
23
|
+
--prose-hr: #e5e7eb;
|
|
24
|
+
--prose-quotes: var(--accent-700);
|
|
25
|
+
--prose-quote-borders: var(--accent-700);
|
|
26
|
+
--prose-captions: #6b7280;
|
|
27
|
+
--prose-kbd: #111827;
|
|
28
|
+
--prose-kbd-shadows: 17 24 39;
|
|
29
|
+
--prose-code: #1e293b;
|
|
30
|
+
--prose-code-background: #efefef;
|
|
31
|
+
--prose-code-borders: #cccccc;
|
|
32
|
+
--prose-pre-code: #e5e7eb;
|
|
33
|
+
--prose-pre-bg: #1f2937;
|
|
34
|
+
--prose-invert-body: var(--gray-50);
|
|
35
|
+
--prose-invert-headings: var(--gray-50);
|
|
36
|
+
--prose-invert-lead: #9ca3af;
|
|
37
|
+
--prose-invert-links: var(--accent-500);
|
|
38
|
+
--prose-invert-counters: #9ca3af;
|
|
39
|
+
--prose-invert-bullets: #4b5563;
|
|
40
|
+
--prose-invert-hr: #374151;
|
|
41
|
+
--prose-invert-quotes: var(--accent-400);
|
|
42
|
+
--prose-invert-quote-borders: var(--accent-400);
|
|
43
|
+
--prose-invert-captions: #9ca3af;
|
|
44
|
+
--prose-invert-kbd: #fff;
|
|
45
|
+
--prose-invert-kbd-shadows: 255 255 255;
|
|
46
|
+
--prose-invert-code: #f1f5f9;
|
|
47
|
+
--prose-invert-code-background: #222222;
|
|
48
|
+
--prose-invert-code-borders: #333333;
|
|
49
|
+
--prose-invert-pre-code: #d1d5db;
|
|
50
|
+
--prose-invert-pre-bg: rgb(0 0 0 / 50%);
|
|
51
|
+
--prose-invert-th-borders: #4b5563;
|
|
52
|
+
--prose-invert-td-borders: #374151;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dark {
|
|
56
|
+
--prose-body: var(--prose-invert-body);
|
|
57
|
+
--prose-headings: var(--prose-invert-headings);
|
|
58
|
+
--prose-lead: var(--prose-invert-lead);
|
|
59
|
+
--prose-links: var(--prose-invert-links);
|
|
60
|
+
--prose-counters: var(--prose-invert-counters);
|
|
61
|
+
--prose-bullets: var(--prose-invert-bullets);
|
|
62
|
+
--prose-hr: var(--prose-invert-hr);
|
|
63
|
+
--prose-quotes: var(--prose-invert-quotes);
|
|
64
|
+
--prose-quote-borders: var(--prose-invert-quote-borders);
|
|
65
|
+
--prose-captions: var(--prose-invert-captions);
|
|
66
|
+
--prose-kbd: var(--prose-invert-kbd);
|
|
67
|
+
--prose-kbd-shadows: var(--prose-invert-kbd-shadows);
|
|
68
|
+
--prose-code: var(--prose-invert-code);
|
|
69
|
+
--prose-code-background: var(--prose-invert-code-background);
|
|
70
|
+
--prose-code-borders: var(--prose-invert-code-borders);
|
|
71
|
+
--prose-pre-code: var(--prose-invert-pre-code);
|
|
72
|
+
--prose-pre-bg: var(--prose-invert-pre-bg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Brute force our not-dark class for now until we figure out
|
|
76
|
+
* a better way to do this. Note - the following does NOT work:
|
|
77
|
+
.dark:not(:where([class~="not-dark"], [class~="not-dark"] *)) {
|
|
78
|
+
*/
|
|
79
|
+
.not-dark {
|
|
80
|
+
--prose-body: var(--gray-900);
|
|
81
|
+
--prose-headings: var(--gray-900);
|
|
82
|
+
--prose-lead: #4b5563;
|
|
83
|
+
--prose-links: var(--accent-950);
|
|
84
|
+
--prose-counters: #6b7280;
|
|
85
|
+
--prose-bullets: #d1d5db;
|
|
86
|
+
--prose-hr: #e5e7eb;
|
|
87
|
+
--prose-quotes: var(--accent-700);
|
|
88
|
+
--prose-quote-borders: var(--accent-700);
|
|
89
|
+
--prose-captions: #6b7280;
|
|
90
|
+
--prose-kbd: #111827;
|
|
91
|
+
--prose-kbd-shadows: 17 24 39;
|
|
92
|
+
--prose-code: #1e293b;
|
|
93
|
+
--prose-code-background: #efefef;
|
|
94
|
+
--prose-code-borders: #cccccc;
|
|
95
|
+
--prose-pre-code: #e5e7eb;
|
|
96
|
+
--prose-pre-bg: #1f2937;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
100
|
+
* Typography defaults
|
|
101
|
+
* We will gradually refactor prose to sensible defaults
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
html {
|
|
105
|
+
font-size: 1rem;
|
|
106
|
+
color: var(--prose-body);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Redeclared here to change the specificity and scope of --prose-body */
|
|
110
|
+
html .not-dark {
|
|
111
|
+
color: var(--prose-body);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Overflow wrap for long non-dictionary words or urls */
|
|
115
|
+
article,
|
|
116
|
+
.editor-text,
|
|
117
|
+
.break-long-words {
|
|
118
|
+
overflow-wrap: anywhere;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
article,
|
|
122
|
+
.dynamic-text {
|
|
123
|
+
font-size: 1.25rem;
|
|
124
|
+
line-height: 1.6;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* medium breakpoint */
|
|
128
|
+
@media screen and (min-width: 768px) {
|
|
129
|
+
|
|
130
|
+
article,
|
|
131
|
+
.dynamic-text {
|
|
132
|
+
font-size: 1.125rem;
|
|
133
|
+
line-height: 1.64;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Default headings - will be overridden by prose sections below */
|
|
139
|
+
.prose {
|
|
140
|
+
|
|
141
|
+
h1,
|
|
142
|
+
h2,
|
|
143
|
+
h3,
|
|
144
|
+
h4,
|
|
145
|
+
h5 {
|
|
146
|
+
color: var(--prose-headings);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
.prose :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
152
|
+
font-size: 2.5rem;
|
|
153
|
+
font-weight: 600;
|
|
154
|
+
line-height: 1.125;
|
|
155
|
+
margin-top: 0;
|
|
156
|
+
margin-bottom: 1rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.prose :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
160
|
+
font-size: 2rem;
|
|
161
|
+
font-weight: 600;
|
|
162
|
+
line-height: 1.2;
|
|
163
|
+
margin-top: 1.5rem;
|
|
164
|
+
margin-bottom: 0.75rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.prose :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
168
|
+
font-size: 1.75rem;
|
|
169
|
+
font-weight: 600;
|
|
170
|
+
line-height: 1.1;
|
|
171
|
+
margin-top: 1.25rem;
|
|
172
|
+
margin-bottom: 0.75rem;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.prose :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
176
|
+
font-size: 1.55rem;
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
line-height: 1.1;
|
|
179
|
+
margin-top: 1.25rem;
|
|
180
|
+
margin-bottom: 0.65rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.prose :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
184
|
+
margin-top: 1.25em;
|
|
185
|
+
margin-bottom: 1.25em;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.prose-lg :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
189
|
+
font-size: 1.125rem;
|
|
190
|
+
line-height: 1.64;
|
|
191
|
+
margin-top: 1.25em;
|
|
192
|
+
margin-bottom: 1.25em;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.prose-xl :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
196
|
+
font-size: 1.25rem;
|
|
197
|
+
line-height: 1.6;
|
|
198
|
+
margin-top: 1.25em;
|
|
199
|
+
margin-bottom: 1.25em;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.prose :where([class~="lead"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
203
|
+
color: var(--prose-lead);
|
|
204
|
+
font-size: 1.25em;
|
|
205
|
+
line-height: 1.4;
|
|
206
|
+
margin-top: 1.2em;
|
|
207
|
+
margin-bottom: 1.2em;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.prose :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
211
|
+
color: var(--prose-links);
|
|
212
|
+
text-decoration: underline;
|
|
213
|
+
font-weight: 500;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.prose :where(strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
217
|
+
color: var(--prose-bold);
|
|
218
|
+
font-weight: 500;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.prose :where(a strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
222
|
+
color: inherit;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.prose :where(blockquote strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
226
|
+
color: inherit;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.prose :where(ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
230
|
+
list-style-type: decimal;
|
|
231
|
+
margin-top: 1.25em;
|
|
232
|
+
margin-bottom: 1.25em;
|
|
233
|
+
padding-inline-start: 1.625em;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.prose :where(ol[type="A"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
237
|
+
list-style-type: upper-alpha;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.prose :where(ol[type="a"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
241
|
+
list-style-type: lower-alpha;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.prose :where(ol[type="A" s]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
245
|
+
list-style-type: upper-alpha;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.prose :where(ol[type="a" s]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
249
|
+
list-style-type: lower-alpha;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.prose :where(ol[type="I"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
253
|
+
list-style-type: upper-roman;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.prose :where(ol[type="i"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
257
|
+
list-style-type: lower-roman;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.prose :where(ol[type="I" s]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
261
|
+
list-style-type: upper-roman;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.prose :where(ol[type="i" s]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
265
|
+
list-style-type: lower-roman;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.prose :where(ol[type="1"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
269
|
+
list-style-type: decimal;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.prose :where(ul):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
273
|
+
list-style-type: disc;
|
|
274
|
+
margin-top: 1.25em;
|
|
275
|
+
margin-bottom: 1.25em;
|
|
276
|
+
padding-inline-start: 1.625em;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.prose :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *))::marker {
|
|
280
|
+
font-weight: 400;
|
|
281
|
+
color: var(--prose-counters);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.prose :where(ul > li):not(:where([class~="not-prose"], [class~="not-prose"] *))::marker {
|
|
285
|
+
color: var(--prose-bullets);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.prose :where(dt):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
289
|
+
color: var(--prose-headings);
|
|
290
|
+
font-weight: 500;
|
|
291
|
+
margin-top: 1.25em;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.prose :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
295
|
+
border-color: var(--prose-hr);
|
|
296
|
+
border-top-width: 1px;
|
|
297
|
+
margin-top: 3em;
|
|
298
|
+
margin-bottom: 3em;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
302
|
+
font-weight: bold;
|
|
303
|
+
font-style: normal;
|
|
304
|
+
color: var(--prose-quotes);
|
|
305
|
+
quotes: none;
|
|
306
|
+
margin-top: 1.6em;
|
|
307
|
+
margin-bottom: 1.6em;
|
|
308
|
+
margin-right: 2rem;
|
|
309
|
+
font-size: 1.5rem;
|
|
310
|
+
line-height: 1.2;
|
|
311
|
+
padding-inline-start: 1rem;
|
|
312
|
+
border-inline-start-width: 0.25rem;
|
|
313
|
+
border-inline-start-color: var(--prose-quote-borders);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.prose :where(blockquote p:first-of-type):not( :where([class~="not-prose"], [class~="not-prose"] *))::before {
|
|
317
|
+
content: open-quote;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.prose :where(blockquote p:last-of-type):not( :where([class~="not-prose"], [class~="not-prose"] *))::after {
|
|
321
|
+
content: close-quote;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.prose :where(img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
325
|
+
margin-top: 2em;
|
|
326
|
+
margin-bottom: 2em;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.prose :where(picture):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
330
|
+
display: block;
|
|
331
|
+
margin-top: 2em;
|
|
332
|
+
margin-bottom: 2em;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.prose :where(video):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
336
|
+
margin-top: 2em;
|
|
337
|
+
margin-bottom: 2em;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.prose :where(kbd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
341
|
+
font-weight: 500;
|
|
342
|
+
font-family: inherit;
|
|
343
|
+
color: var(--prose-kbd);
|
|
344
|
+
box-shadow: 0 0 0 1px rgb(var(--prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--prose-kbd-shadows) / 10%);
|
|
345
|
+
font-size: 0.875em;
|
|
346
|
+
border-radius: 0.3125rem;
|
|
347
|
+
padding-top: 0.1875em;
|
|
348
|
+
padding-inline-end: 0.375em;
|
|
349
|
+
padding-bottom: 0.1875em;
|
|
350
|
+
padding-inline-start: 0.375em;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.prose :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
354
|
+
color: var(--prose-code);
|
|
355
|
+
font-weight: 400;
|
|
356
|
+
font-size: 0.875em;
|
|
357
|
+
background-color: var(--prose-code-background);
|
|
358
|
+
border-color: var(--prose-code-borders);
|
|
359
|
+
border-radius: 0.25rem;
|
|
360
|
+
border-width: 1px;
|
|
361
|
+
padding-left: 0.375rem;
|
|
362
|
+
padding-right: 0.375rem;
|
|
363
|
+
padding-top: 0.125rem;
|
|
364
|
+
padding-bottom: 0.125rem;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.prose :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
368
|
+
color: var(--prose-pre-code);
|
|
369
|
+
background-color: var(--prose-pre-bg);
|
|
370
|
+
overflow-x: auto;
|
|
371
|
+
font-weight: 400;
|
|
372
|
+
line-height: 1.7142857;
|
|
373
|
+
margin-top: 1.7142857em;
|
|
374
|
+
margin-bottom: 1.7142857em;
|
|
375
|
+
border-radius: 0.375rem;
|
|
376
|
+
padding-top: 0.8571429em;
|
|
377
|
+
padding-inline-end: 1.1428571em;
|
|
378
|
+
padding-bottom: 0.8571429em;
|
|
379
|
+
padding-inline-start: 1.1428571em;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.prose :where(pre code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
383
|
+
background-color: initial;
|
|
384
|
+
border-width: 0;
|
|
385
|
+
border-radius: 0;
|
|
386
|
+
padding: 0;
|
|
387
|
+
font-weight: inherit;
|
|
388
|
+
color: inherit;
|
|
389
|
+
font-size: 1em !important;
|
|
390
|
+
font-family: inherit;
|
|
391
|
+
line-height: inherit;
|
|
392
|
+
padding-left: 0;
|
|
393
|
+
padding-right: 0;
|
|
394
|
+
padding-top: 0;
|
|
395
|
+
padding-bottom: 0;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
@media (min-width: 768px) {
|
|
399
|
+
.prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
400
|
+
font-size: 1.7rem;
|
|
401
|
+
line-height: 1.2;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-vite'
|
|
2
|
+
|
|
3
|
+
export const Quote = (): React.JSX.Element => {
|
|
4
|
+
return (
|
|
5
|
+
<>
|
|
6
|
+
<div style={{ marginBottom: '48px' }}>
|
|
7
|
+
<div style={{ maxWidth: '700px', margin: 'auto' }} className="prose">
|
|
8
|
+
<h1>Heading 1</h1>
|
|
9
|
+
<p>
|
|
10
|
+
This is a paragraph of text that we'll use for our typography storybook page. This
|
|
11
|
+
is a paragraph of text that we'll use for our typography storybook page. This is a
|
|
12
|
+
paragraph of text that we'll use for our typography storybook page. This is a
|
|
13
|
+
paragraph of text that we'll use for our typography storybook page.
|
|
14
|
+
</p>
|
|
15
|
+
<blockquote>This is some text inside a blockquote.</blockquote>
|
|
16
|
+
<p>
|
|
17
|
+
This is a paragraph of text that we'll use for our typography storybook page. This
|
|
18
|
+
is a paragraph of text that we'll use for our typography storybook page. This is a
|
|
19
|
+
paragraph of text that we'll use for our typography storybook page. This is a
|
|
20
|
+
paragraph of text that we'll use for our typography storybook page.
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const meta: Meta = {
|
|
29
|
+
/* 👇 The title prop is optional.
|
|
30
|
+
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
|
31
|
+
* to learn how to generate automatic titles
|
|
32
|
+
*/
|
|
33
|
+
title: 'Typography',
|
|
34
|
+
component: Quote,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default meta
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@import "./typography/fonts.css";
|
|
2
|
+
@import "./typography/prose.css";
|
|
3
|
+
|
|
4
|
+
@layer infonomic-typography {
|
|
5
|
+
html {
|
|
6
|
+
font-family: var(--font-sans);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.font-sans {
|
|
10
|
+
font-family: var(--font-sans);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.font-display {
|
|
14
|
+
font-family: var(--font-display);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.font-serif {
|
|
18
|
+
font-family: var(--font-serif);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.font-mono {
|
|
22
|
+
font-family: var(--font-mono);
|
|
23
|
+
}
|
|
24
|
+
}
|