From 826fd7de89709125924672e76cb6503c7918c12b Mon Sep 17 00:00:00 2001 From: MK Date: Wed, 20 Nov 2024 18:37:09 +0000 Subject: [PATCH] chore: edit typography and push ellipsis text support --- .../wui-list-select-account.stories.ts | 4 +- packages/ui-new/src/assets/svg/mail.ts | 12 ++-- .../ui-new/src/components/wui-text/styles.ts | 58 +++++++++++++++++-- .../wui-list-select-account/index.ts | 32 +++++----- .../wui-list-select-account/styles.ts | 32 +++++++--- 5 files changed, 102 insertions(+), 36 deletions(-) diff --git a/apps/gallery-new/stories/composites/wui-list-select-account.stories.ts b/apps/gallery-new/stories/composites/wui-list-select-account.stories.ts index 5853a382b7..8a15488f2b 100644 --- a/apps/gallery-new/stories/composites/wui-list-select-account.stories.ts +++ b/apps/gallery-new/stories/composites/wui-list-select-account.stories.ts @@ -1,4 +1,4 @@ - import { html } from 'lit' +import { html } from 'lit' import type { Meta } from '@storybook/web-components' import '@reown/appkit-ui-new/src/composites/wui-list-select-account' import '../../components/gallery-container' @@ -17,7 +17,7 @@ export default { icon: 'mail', disabled: false }, - transparent: { + argTypes: { dollars: { control: { type: 'text' } }, diff --git a/packages/ui-new/src/assets/svg/mail.ts b/packages/ui-new/src/assets/svg/mail.ts index a44cccf93b..9dc38067fc 100644 --- a/packages/ui-new/src/assets/svg/mail.ts +++ b/packages/ui-new/src/assets/svg/mail.ts @@ -1,10 +1,6 @@ import { svg } from 'lit' -export const mailSvg = svg` - -` +export const mailSvg = svg` + + +` diff --git a/packages/ui-new/src/components/wui-text/styles.ts b/packages/ui-new/src/components/wui-text/styles.ts index eec2a096ce..8bd14aac13 100644 --- a/packages/ui-new/src/components/wui-text/styles.ts +++ b/packages/ui-new/src/components/wui-text/styles.ts @@ -9,10 +9,6 @@ export default css` width: 100%; display: inline-block; font-style: normal; - font-feature-settings: - 'tnum' on, - 'lnum' on, - 'case' on; overflow: inherit; text-overflow: inherit; text-align: var(--local-align); @@ -48,6 +44,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h1-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h1-medium { @@ -56,6 +55,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h1-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h2-regular-mono { @@ -72,6 +74,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h2-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h2-medium { @@ -80,6 +85,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h2-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h3-regular-mono { @@ -96,6 +104,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h3-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h3-medium { @@ -104,6 +115,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h3-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h4-regular-mono { @@ -120,6 +134,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h4-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h4-medium { @@ -128,6 +145,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h4-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h5-regular-mono { @@ -144,6 +164,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h5-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h5-medium { @@ -152,6 +175,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h5-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h6-regular-mono { @@ -168,6 +194,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h6-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-h6-medium { @@ -176,6 +205,9 @@ export default css` letter-spacing: ${({ typography }) => typography['h6-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-lg-regular-mono { @@ -192,6 +224,9 @@ export default css` letter-spacing: ${({ typography }) => typography['lg-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-lg-medium { @@ -200,6 +235,9 @@ export default css` letter-spacing: ${({ typography }) => typography['lg-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-md-regular-mono { @@ -216,6 +254,9 @@ export default css` letter-spacing: ${({ typography }) => typography['md-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-md-medium { @@ -224,6 +265,9 @@ export default css` letter-spacing: ${({ typography }) => typography['md-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-sm-regular-mono { @@ -240,6 +284,9 @@ export default css` letter-spacing: ${({ typography }) => typography['sm-regular'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.regular}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } .wui-font-sm-medium { @@ -248,5 +295,8 @@ export default css` letter-spacing: ${({ typography }) => typography['sm-medium'].letterSpacing}; font-weight: ${({ fontWeight }) => fontWeight.medium}; font-family: ${({ fontFamily }) => fontFamily.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; } ` diff --git a/packages/ui-new/src/composites/wui-list-select-account/index.ts b/packages/ui-new/src/composites/wui-list-select-account/index.ts index bf7929536f..5b005c9d31 100644 --- a/packages/ui-new/src/composites/wui-list-select-account/index.ts +++ b/packages/ui-new/src/composites/wui-list-select-account/index.ts @@ -6,7 +6,6 @@ import { elementStyles, resetStyles } from '../../utils/ThemeUtil.js' import '../../components/wui-text/index.js' import '../../components/wui-icon/index.js' import '../wui-avatar/index.js' -import '../wui-icon-box/index.js' import { UiHelperUtil } from '../../utils/UiHelperUtil.js' import type { IconType } from '../../utils/TypeUtil.js' @@ -32,31 +31,34 @@ export class WuiListSelectAccount extends LitElement { return html`