@handijitcom/ui 2.0.0 → 3.0.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/README.md +67 -62
- package/build/calendar.cjs +1 -1
- package/build/calendar.cjs.map +1 -1
- package/build/calendar.css +1 -1
- package/build/calendar.js +109 -111
- package/build/calendar.js.map +1 -1
- package/build/chat.cjs +1 -1
- package/build/chat.cjs.map +1 -1
- package/build/chat.css +1 -1
- package/build/chat.js +2 -2
- package/build/chat.js.map +1 -1
- package/build/components/Alert/style.css +1 -1
- package/build/components/Avatar/index.cjs.map +1 -1
- package/build/components/Avatar/index.d.cts +1 -1
- package/build/components/Avatar/index.d.ts +1 -1
- package/build/components/Avatar/index.js.map +1 -1
- package/build/components/Avatar/style.css +1 -1
- package/build/components/Badge/index.cjs +1 -1
- package/build/components/Badge/index.cjs.map +1 -1
- package/build/components/Badge/index.d.cts +4 -2
- package/build/components/Badge/index.d.ts +4 -2
- package/build/components/Badge/index.js +1 -1
- package/build/components/Badge/index.js.map +1 -1
- package/build/components/Badge/style.css +1 -1
- package/build/components/BrandSurface/index.cjs +2 -0
- package/build/components/BrandSurface/index.cjs.map +1 -0
- package/build/components/BrandSurface/index.d.cts +46 -0
- package/build/components/BrandSurface/index.d.ts +46 -0
- package/build/components/BrandSurface/index.js +128 -0
- package/build/components/BrandSurface/index.js.map +1 -0
- package/build/components/BrandSurface/style.css +1 -0
- package/build/components/Button/index.cjs +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Button/style.css +1 -1
- package/build/components/CodeBadge/style.css +1 -1
- package/build/components/CopyField/style.css +1 -1
- package/build/components/DataTable/style.css +1 -1
- package/build/components/Eyebrow/index.cjs.map +1 -1
- package/build/components/Eyebrow/index.d.cts +1 -1
- package/build/components/Eyebrow/index.d.ts +1 -1
- package/build/components/Eyebrow/index.js.map +1 -1
- package/build/components/Eyebrow/style.css +1 -1
- package/build/components/Modal/style.css +1 -1
- package/build/components/Progress/index.cjs +1 -1
- package/build/components/Progress/index.cjs.map +1 -1
- package/build/components/Progress/index.d.cts +2 -2
- package/build/components/Progress/index.d.ts +2 -2
- package/build/components/Progress/index.js +1 -1
- package/build/components/Progress/index.js.map +1 -1
- package/build/components/Progress/style.css +1 -1
- package/build/components/Rating/style.css +1 -1
- package/build/components/RatingInput/style.css +1 -1
- package/build/components/Stat/style.css +1 -1
- package/build/components/StatStrip/index.cjs +1 -1
- package/build/components/StatStrip/index.cjs.map +1 -1
- package/build/components/StatStrip/index.d.cts +3 -3
- package/build/components/StatStrip/index.d.ts +3 -3
- package/build/components/StatStrip/index.js +1 -1
- package/build/components/StatStrip/index.js.map +1 -1
- package/build/components/StatStrip/style.css +1 -1
- package/build/components/StatusDot/index.cjs +1 -1
- package/build/components/StatusDot/index.cjs.map +1 -1
- package/build/components/StatusDot/index.d.cts +5 -3
- package/build/components/StatusDot/index.d.ts +5 -3
- package/build/components/StatusDot/index.js +1 -1
- package/build/components/StatusDot/index.js.map +1 -1
- package/build/components/StatusDot/style.css +1 -1
- package/build/components/TagInput/style.css +1 -1
- package/build/components/Textarea/style.css +1 -1
- package/build/components/Timeline/style.css +1 -1
- package/build/components/Toast/style.css +1 -1
- package/build/design/index.cjs +84 -178
- package/build/design/index.cjs.map +1 -1
- package/build/design/index.d.cts +72 -63
- package/build/design/index.d.mts +72 -63
- package/build/design/index.mjs +84 -178
- package/build/design/index.mjs.map +1 -1
- package/build/design/index.umd.cjs +1 -1
- package/build/design/index.umd.cjs.map +1 -1
- package/build/design/tokens.css +62 -177
- package/build/design/tokens.json +66 -168
- package/build/design/tokens.scss +48 -178
- package/build/enums/ui-variant.enum.cjs +1 -1
- package/build/enums/ui-variant.enum.cjs.map +1 -1
- package/build/enums/ui-variant.enum.d.cts +2 -2
- package/build/enums/ui-variant.enum.d.ts +2 -2
- package/build/enums/ui-variant.enum.js +1 -1
- package/build/enums/ui-variant.enum.js.map +1 -1
- package/build/index.cjs +1 -1
- package/build/index.d.cts +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +11 -11
- package/build/scss/_mixins.scss +8 -10
- package/build/scss/_variables.scss +19 -39
- package/build/styles.css +21 -21
- package/build/types/calendar/Calendar/index.d.cts +1 -1
- package/build/types/calendar/Calendar/index.d.ts +1 -1
- package/build/types/calendar/core/types.d.cts +3 -2
- package/build/types/calendar/core/types.d.ts +3 -2
- package/package.json +11 -11
- package/build/components/Band/index.cjs +0 -2
- package/build/components/Band/index.cjs.map +0 -1
- package/build/components/Band/index.d.cts +0 -45
- package/build/components/Band/index.d.ts +0 -45
- package/build/components/Band/index.js +0 -127
- package/build/components/Band/index.js.map +0 -1
- package/build/components/Band/style.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-alert-gHI-9{display:flex;align-items:flex-start;gap:var(--hd-space-3);padding:var(--hd-space-4);border-radius:var(--hd-radius-sm);font-size:var(--hd-type-small-size)}.ui-alert__icon-DhiCT{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;border-radius:var(--hd-radius-xs);font-size:20px}.ui-alert__body-52-z2{display:flex;flex:1;flex-wrap:wrap;align-items:flex-start;gap:var(--hd-space-2) var(--hd-space-3);min-width:0}.ui-alert__text-Slmxh{display:flex;flex-direction:column;gap:var(--hd-space-1);flex:1 1 16rem;min-width:0;padding-top:3px}.ui-alert__title-I8BAh{font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);color:inherit}.ui-alert__content-lhBEo{line-height:var(--hd-type-body-line-height);color:inherit;max-width:68ch}.ui-alert__content-lhBEo a{color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:var(--hd-font-weight-semibold)}.ui-alert__content-lhBEo strong{font-weight:var(--hd-font-weight-semibold)}.ui-alert__action-1mTje{flex:0 0 auto;max-width:100%}.ui-alert--info-lsAVw
|
|
1
|
+
@layer ui{.ui-alert-gHI-9{display:flex;align-items:flex-start;gap:var(--hd-space-3);padding:var(--hd-space-4);border-radius:var(--hd-radius-sm);font-size:var(--hd-type-small-size)}.ui-alert__icon-DhiCT{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;border-radius:var(--hd-radius-xs);font-size:20px}.ui-alert__body-52-z2{display:flex;flex:1;flex-wrap:wrap;align-items:flex-start;gap:var(--hd-space-2) var(--hd-space-3);min-width:0}.ui-alert__text-Slmxh{display:flex;flex-direction:column;gap:var(--hd-space-1);flex:1 1 16rem;min-width:0;padding-top:3px}.ui-alert__title-I8BAh{font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);color:inherit}.ui-alert__content-lhBEo{line-height:var(--hd-type-body-line-height);color:inherit;max-width:68ch}.ui-alert__content-lhBEo a{color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:var(--hd-font-weight-semibold)}.ui-alert__content-lhBEo strong{font-weight:var(--hd-font-weight-semibold)}.ui-alert__action-1mTje{flex:0 0 auto;max-width:100%}.ui-alert--info-lsAVw,.ui-alert--success-RMJR6{background-color:var(--hd-info-bg);border:1px solid var(--hd-info-line);color:var(--hd-info-fg)}.ui-alert--warning-Rkgln{background-color:var(--hd-bg-raised);border:1px solid var(--hd-border-strong);color:var(--hd-text)}.ui-alert--danger-9ei0Y{background-color:var(--hd-danger-bg);border:1px solid var(--hd-danger-line);color:var(--hd-danger-fg)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\nexport type AvatarShape = 'circle' | 'rounded';\n\n/**\n * `auto`: the initials medallion is painted from a FIXED bucket chosen by the name. `brand`: the\n * brand medallion —
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\nexport type AvatarShape = 'circle' | 'rounded';\n\n/**\n * `auto`: the initials medallion is painted from a FIXED bucket chosen by the name. `brand`: the\n * brand medallion — cobalt with a white mark, the same in both themes (the logo's colours;\n * the assistant's avatar, the tile of an empty chat).\n */\nexport type AvatarTone = 'auto' | 'brand';\n\ntype Props = {\n /** Tam ad; baş harfler buradan üretilir ve her durumda okunan addır (`aria-label`). */\n name: string;\n /** Profil görseli. */\n imageUrl?: string;\n /** Baş harf yerine ikon (marka işareti, sistem kullanıcısı). Görselden önce gelmez. */\n icon?: ReactNode;\n shape?: AvatarShape;\n tone?: AvatarTone;\n /** Baş harfleri büyütürken kullanılacak dil etiketi (\"tr\", \"az\"). */\n locale?: string;\n size?: 'sm' | 'md' | 'lg';\n className?: string;\n testId?: string;\n};\n\n/** Baş harfleri üretir: \"Ahmet İlhan\" → \"Aİ\". */\nconst resolveInitials = (name: string, locale?: string): string => {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '?';\n\n const letters =\n words.length === 1 ? words[0].slice(0, 2) : `${words[0][0]}${words[words.length - 1][0]}`;\n\n return locale ? letters.toLocaleUpperCase(locale) : letters.toLocaleUpperCase();\n};\n\n/** Adı SABİT bir renk kovasına eşler. */\nconst resolveTone = (name: string, total: number): number => {\n let hash = 5381;\n for (let index = 0; index < name.length; index += 1) hash = (hash * 33) ^ name.charCodeAt(index);\n\n return Math.abs(hash) % total;\n};\n\n/** Madalyon tonlarının sayısı — `_module.scss` içindeki kova sayısıyla AYNI. */\nconst TONE_COUNT = 6;\n\n/** Avatar — kullanıcı madalyonu. */\nconst Avatar: FC<Props> = ({\n name,\n imageUrl,\n icon,\n locale,\n size = 'md',\n shape = 'circle',\n tone = 'auto',\n className,\n testId,\n}) => {\n const { labels } = useUi();\n\n return (\n <span\n className={cx(\n styles.avatar,\n styles[`avatar--${size}`],\n shape === 'rounded' && styles['avatar--rounded'],\n tone === 'brand' && styles['avatar--brand'],\n /*\n * Karma ton yalnizca BAS HARF madalyonunda: gorselin uzerine renk basmak fotografi bozuyordu,\n * ikon ise bir kisi degil.\n */\n tone === 'auto' &&\n !imageUrl &&\n !icon &&\n styles[`avatar--tone-${resolveTone(name, TONE_COUNT)}`],\n className,\n )}\n /*\n * Ad `role=\"img\"` + `aria-label` ile taşınır: baş harfler (\"AY\") görsel bir kısaltma,\n * okunması gereken şey tam ad.\n * ⚠ `aria-hidden` KALDIRILDI. Kök üzerindeki `aria-hidden` yalnızca madalyonu değil KİŞİNİN\n * ADINI da erişilebilirlik ağacından çıkarıyordu\n */\n role=\"img\"\n aria-label={name}\n data-testid={testId}\n >\n {imageUrl ? (\n /* `alt=\"\"`: ad zaten kökte `aria-label` ile duyuruluyor, iki kez okunmasın. */\n <img className={styles.avatar__image} src={imageUrl} alt=\"\" />\n ) : icon ? (\n <span className={styles.avatar__icon} aria-hidden>\n {icon}\n </span>\n ) : (\n resolveInitials(name, locale ?? labels?.locale)\n )}\n </span>\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Avatar, 'Avatar')) as typeof Avatar;\n"],"names":["resolveInitials","name","locale","words","letters","resolveTone","total","hash","index","TONE_COUNT","Avatar","imageUrl","icon","size","shape","tone","className","testId","labels","useUi","jsx","cx","styles","memo","named"],"mappings":"4VAmCMA,EAAkB,CAACC,EAAcC,IAA4B,CACjE,MAAMC,EAAQF,EAAK,KAAA,EAAO,MAAM,KAAK,EAAE,OAAO,OAAO,EACrD,GAAIE,EAAM,SAAW,EAAG,MAAO,IAE/B,MAAMC,EACJD,EAAM,SAAW,EAAIA,EAAM,CAAC,EAAE,MAAM,EAAG,CAAC,EAAI,GAAGA,EAAM,CAAC,EAAE,CAAC,CAAC,GAAGA,EAAMA,EAAM,OAAS,CAAC,EA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2
|
export type AvatarShape = 'circle' | 'rounded';
|
|
3
3
|
/**
|
|
4
4
|
* `auto`: the initials medallion is painted from a FIXED bucket chosen by the name. `brand`: the
|
|
5
|
-
* brand medallion —
|
|
5
|
+
* brand medallion — cobalt with a white mark, the same in both themes (the logo's colours;
|
|
6
6
|
* the assistant's avatar, the tile of an empty chat).
|
|
7
7
|
*/
|
|
8
8
|
export type AvatarTone = 'auto' | 'brand';
|
|
@@ -2,7 +2,7 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
export type AvatarShape = 'circle' | 'rounded';
|
|
3
3
|
/**
|
|
4
4
|
* `auto`: the initials medallion is painted from a FIXED bucket chosen by the name. `brand`: the
|
|
5
|
-
* brand medallion —
|
|
5
|
+
* brand medallion — cobalt with a white mark, the same in both themes (the logo's colours;
|
|
6
6
|
* the assistant's avatar, the tile of an empty chat).
|
|
7
7
|
*/
|
|
8
8
|
export type AvatarTone = 'auto' | 'brand';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\nexport type AvatarShape = 'circle' | 'rounded';\n\n/**\n * `auto`: the initials medallion is painted from a FIXED bucket chosen by the name. `brand`: the\n * brand medallion —
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Avatar/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\nimport { useUi } from '../../theme/context';\n\nimport styles from './index.module.scss';\n\nexport type AvatarShape = 'circle' | 'rounded';\n\n/**\n * `auto`: the initials medallion is painted from a FIXED bucket chosen by the name. `brand`: the\n * brand medallion — cobalt with a white mark, the same in both themes (the logo's colours;\n * the assistant's avatar, the tile of an empty chat).\n */\nexport type AvatarTone = 'auto' | 'brand';\n\ntype Props = {\n /** Tam ad; baş harfler buradan üretilir ve her durumda okunan addır (`aria-label`). */\n name: string;\n /** Profil görseli. */\n imageUrl?: string;\n /** Baş harf yerine ikon (marka işareti, sistem kullanıcısı). Görselden önce gelmez. */\n icon?: ReactNode;\n shape?: AvatarShape;\n tone?: AvatarTone;\n /** Baş harfleri büyütürken kullanılacak dil etiketi (\"tr\", \"az\"). */\n locale?: string;\n size?: 'sm' | 'md' | 'lg';\n className?: string;\n testId?: string;\n};\n\n/** Baş harfleri üretir: \"Ahmet İlhan\" → \"Aİ\". */\nconst resolveInitials = (name: string, locale?: string): string => {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '?';\n\n const letters =\n words.length === 1 ? words[0].slice(0, 2) : `${words[0][0]}${words[words.length - 1][0]}`;\n\n return locale ? letters.toLocaleUpperCase(locale) : letters.toLocaleUpperCase();\n};\n\n/** Adı SABİT bir renk kovasına eşler. */\nconst resolveTone = (name: string, total: number): number => {\n let hash = 5381;\n for (let index = 0; index < name.length; index += 1) hash = (hash * 33) ^ name.charCodeAt(index);\n\n return Math.abs(hash) % total;\n};\n\n/** Madalyon tonlarının sayısı — `_module.scss` içindeki kova sayısıyla AYNI. */\nconst TONE_COUNT = 6;\n\n/** Avatar — kullanıcı madalyonu. */\nconst Avatar: FC<Props> = ({\n name,\n imageUrl,\n icon,\n locale,\n size = 'md',\n shape = 'circle',\n tone = 'auto',\n className,\n testId,\n}) => {\n const { labels } = useUi();\n\n return (\n <span\n className={cx(\n styles.avatar,\n styles[`avatar--${size}`],\n shape === 'rounded' && styles['avatar--rounded'],\n tone === 'brand' && styles['avatar--brand'],\n /*\n * Karma ton yalnizca BAS HARF madalyonunda: gorselin uzerine renk basmak fotografi bozuyordu,\n * ikon ise bir kisi degil.\n */\n tone === 'auto' &&\n !imageUrl &&\n !icon &&\n styles[`avatar--tone-${resolveTone(name, TONE_COUNT)}`],\n className,\n )}\n /*\n * Ad `role=\"img\"` + `aria-label` ile taşınır: baş harfler (\"AY\") görsel bir kısaltma,\n * okunması gereken şey tam ad.\n * ⚠ `aria-hidden` KALDIRILDI. Kök üzerindeki `aria-hidden` yalnızca madalyonu değil KİŞİNİN\n * ADINI da erişilebilirlik ağacından çıkarıyordu\n */\n role=\"img\"\n aria-label={name}\n data-testid={testId}\n >\n {imageUrl ? (\n /* `alt=\"\"`: ad zaten kökte `aria-label` ile duyuruluyor, iki kez okunmasın. */\n <img className={styles.avatar__image} src={imageUrl} alt=\"\" />\n ) : icon ? (\n <span className={styles.avatar__icon} aria-hidden>\n {icon}\n </span>\n ) : (\n resolveInitials(name, locale ?? labels?.locale)\n )}\n </span>\n );\n};\n\nexport default /*#__PURE__*/ memo(/*#__PURE__*/ named(Avatar, 'Avatar')) as typeof Avatar;\n"],"names":["resolveInitials","name","locale","words","letters","resolveTone","total","hash","index","TONE_COUNT","Avatar","imageUrl","icon","size","shape","tone","className","testId","labels","useUi","jsx","cx","styles","memo","named"],"mappings":";;;;;;;AAmCA,MAAMA,IAAkB,CAACC,GAAcC,MAA4B;AACjE,QAAMC,IAAQF,EAAK,KAAA,EAAO,MAAM,KAAK,EAAE,OAAO,OAAO;AACrD,MAAIE,EAAM,WAAW,EAAG,QAAO;AAE/B,QAAMC,IACJD,EAAM,WAAW,IAAIA,EAAM,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,GAAGA,EAAM,CAAC,EAAE,CAAC,CAAC,GAAGA,EAAMA,EAAM,SAAS,CAAC,EAAE,CAAC,CAAC;AAEzF,SAAOD,IAASE,EAAQ,kBAAkBF,CAAM,IAAIE,EAAQ,kBAAA;AAC9D,GAGMC,IAAc,CAACJ,GAAcK,MAA0B;AAC3D,MAAIC,IAAO;AACX,WAASC,IAAQ,GAAGA,IAAQP,EAAK,QAAQO,KAAS,EAAG,CAAAD,IAAQA,IAAO,KAAMN,EAAK,WAAWO,CAAK;AAE/F,SAAO,KAAK,IAAID,CAAI,IAAID;AAC1B,GAGMG,IAAa,GAGbC,IAAoB,CAAC;AAAA,EACzB,MAAAT;AAAA,EACA,UAAAU;AAAA,EACA,MAAAC;AAAA,EACA,QAAAV;AAAA,EACA,MAAAW,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,WAAAC;AAAA,EACA,QAAAC;AACF,MAAM;AACJ,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA;AAEnB,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO;AAAA,QACPA,EAAO,WAAWT,CAAI,EAAE;AAAA,QACxBC,MAAU,aAAaQ,EAAO,iBAAiB;AAAA,QAC/CP,MAAS,WAAWO,EAAO,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,QAK1CP,MAAS,UACP,CAACJ,KACD,CAACC,KACDU,EAAO,gBAAgBjB,EAAYJ,GAAMQ,CAAU,CAAC,EAAE;AAAA,QACxDO;AAAA,MAAA;AAAA,MAQF,MAAK;AAAA,MACL,cAAYf;AAAA,MACZ,eAAagB;AAAA,MAEZ,UAAAN;AAAA;AAAA,QAEC,gBAAAS,EAAC,SAAI,WAAWE,EAAO,eAAe,KAAKX,GAAU,KAAI,GAAA,CAAG;AAAA,UAC1DC,IACF,gBAAAQ,EAAC,QAAA,EAAK,WAAWE,EAAO,cAAc,eAAW,IAC9C,UAAAV,EAAA,CACH,IAEAZ,EAAgBC,GAAMC,MAAUgB,KAAA,gBAAAA,EAAQ,OAAM;AAAA,IAAA;AAAA,EAAA;AAItD,GAEAV,IAA6B,gBAAAe,EAAmB,gBAAAC,EAAMd,GAAQ,QAAQ,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-avatar-qoh3P{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:var(--hd-radius-pill);background-color:var(--hd-bg-inset);color:var(--hd-text);font-family:var(--hd-font-display);font-weight:var(--hd-font-weight-semibold);letter-spacing:0;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden}.ui-avatar__image-uAyAX{width:100%;height:100%;object-fit:cover}.ui-avatar__icon-CVOYs{display:inline-flex;font-size:18px}.ui-avatar--sm-GGjU4 .ui-avatar__icon-CVOYs{font-size:16px}.ui-avatar--lg-ULP-r .ui-avatar__icon-CVOYs{font-size:24px}.ui-avatar--rounded-Sq2tv{border-radius:var(--hd-radius-sm)}.ui-avatar--rounded-Sq2tv.ui-avatar--md-xhXnK{border-radius:var(--hd-radius-md)}.ui-avatar--rounded-Sq2tv.ui-avatar--lg-ULP-r{border-radius:var(--hd-radius-lg)}.ui-avatar--brand-oJor6{background-color:var(--hd-
|
|
1
|
+
@layer ui{.ui-avatar-qoh3P{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:var(--hd-radius-pill);background-color:var(--hd-bg-inset);color:var(--hd-text);font-family:var(--hd-font-display);font-weight:var(--hd-font-weight-semibold);letter-spacing:0;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden}.ui-avatar__image-uAyAX{width:100%;height:100%;object-fit:cover}.ui-avatar__icon-CVOYs{display:inline-flex;font-size:18px}.ui-avatar--sm-GGjU4 .ui-avatar__icon-CVOYs{font-size:16px}.ui-avatar--lg-ULP-r .ui-avatar__icon-CVOYs{font-size:24px}.ui-avatar--rounded-Sq2tv{border-radius:var(--hd-radius-sm)}.ui-avatar--rounded-Sq2tv.ui-avatar--md-xhXnK{border-radius:var(--hd-radius-md)}.ui-avatar--rounded-Sq2tv.ui-avatar--lg-ULP-r{border-radius:var(--hd-radius-lg)}.ui-avatar--brand-oJor6{background-color:var(--hd-primary);color:var(--hd-on-primary)}.ui-avatar--sm-GGjU4{width:32px;height:32px;font-size:var(--hd-type-caption-size)}.ui-avatar--md-xhXnK{width:44px;height:44px;font-size:var(--hd-type-body-size)}.ui-avatar--lg-ULP-r{width:56px;height:56px;font-size:var(--hd-type-h4-size)}.ui-avatar--tone-0-mvjdw{background-color:var(--hd-primary-soft);color:var(--hd-text)}.ui-avatar--tone-1-RYZOX{background-color:var(--hd-text);color:var(--hd-bg-surface)}.ui-avatar--tone-2-vP-CS{background-color:var(--hd-primary);color:var(--hd-on-primary)}.ui-avatar--tone-3-ivgnI{background-color:var(--hd-bg-inset);color:var(--hd-primary-text)}.ui-avatar--tone-4-V57r3{background-color:var(--hd-bg-raised);color:var(--hd-text-2)}.ui-avatar--tone-5-65aPg{background-color:var(--hd-danger-bg);color:var(--hd-danger-fg)}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),n=require("react"),c=require("../../helpers/class-name.helper.cjs"),e={default:{"badge":"ui-badge-uLAaI","badge__icon":"ui-badge__icon-R2goZ","badge--neutral":"ui-badge--neutral-6kddt","badge--soft":"ui-badge--soft-gFeRF","badge--solid":"ui-badge--solid-rtdHI","badge--outline":"ui-badge--outline-QiAAz","badge--
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),n=require("react"),c=require("../../helpers/class-name.helper.cjs"),e={default:{"badge":"ui-badge-uLAaI","badge__icon":"ui-badge__icon-R2goZ","badge--neutral":"ui-badge--neutral-6kddt","badge--soft":"ui-badge--soft-gFeRF","badge--solid":"ui-badge--solid-rtdHI","badge--outline":"ui-badge--outline-QiAAz","badge--danger":"ui-badge--danger-X3nV0","badge--info":"ui-badge--info-mHOwk","badge--ink":"ui-badge--ink-Dj3ht"}},i=({children:s,tone:d="neutral",variant:l="soft",icon:a,className:r,testId:u})=>t.jsxs("span",{className:c.cx(e.default.badge,e.default[`badge--${d}`],e.default[`badge--${l}`],r),"data-testid":u,children:[a&&t.jsx("span",{className:e.default.badge__icon,children:a}),s]}),o=n.memo(i);exports.default=o;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type BadgeTone =\n | 'neutral'\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type BadgeTone =\n | 'neutral'\n /** Ink, the emphatic neutral: a label that needs a look (a low stock, a pending state). */\n | 'ink'\n | 'danger'\n /** Cobalt: information, a counter, a navigation label, a \"New\" mark, a good state. */\n | 'info';\n\n/** `soft` is the tint, `solid` the filled pair (a counter, a discount), `outline` line and text. */\nexport type BadgeVariant = 'soft' | 'solid' | 'outline';\n\ntype Props = {\n children: ReactNode;\n tone?: BadgeTone;\n variant?: BadgeVariant;\n /** A small icon, shown before the text. */\n icon?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** Badge — a status or classification label. */\nconst Badge: FC<Props> = ({\n children,\n tone = 'neutral',\n variant = 'soft',\n icon,\n className,\n testId,\n}) => (\n <span\n className={cx(styles.badge, styles[`badge--${tone}`], styles[`badge--${variant}`], className)}\n data-testid={testId}\n >\n {icon && <span className={styles.badge__icon}>{icon}</span>}\n {children}\n </span>\n);\n\nexport default /*#__PURE__*/ memo(Badge) as typeof Badge;\n"],"names":["Badge","children","tone","variant","icon","className","testId","jsxs","cx","styles","jsx","index"],"mappings":"0PA4BMA,EAAmB,CAAC,CACxB,SAAAC,EACA,KAAAC,EAAO,UACP,QAAAC,EAAU,OACV,KAAAC,EACA,UAAAC,EACA,OAAAC,CACF,IACEC,EAAAA,KAAC,OAAA,CACC,UAAWC,EAAAA,GAAGC,EAAAA,QAAO,MAAOA,EAAAA,QAAO,UAAUP,CAAI,EAAE,EAAGO,EAAAA,QAAO,UAAUN,CAAO,EAAE,EAAGE,CAAS,EAC5F,cAAaC,EAEZ,SAAA,CAAAF,GAAQM,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,YAAc,SAAAL,EAAK,EACnDH,CAAA,CAAA,CACH,EAGFU,SAAkCX,CAAK"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
export type BadgeTone = 'neutral'
|
|
3
|
-
/**
|
|
2
|
+
export type BadgeTone = 'neutral'
|
|
3
|
+
/** Ink, the emphatic neutral: a label that needs a look (a low stock, a pending state). */
|
|
4
|
+
| 'ink' | 'danger'
|
|
5
|
+
/** Cobalt: information, a counter, a navigation label, a "New" mark, a good state. */
|
|
4
6
|
| 'info';
|
|
5
7
|
/** `soft` is the tint, `solid` the filled pair (a counter, a discount), `outline` line and text. */
|
|
6
8
|
export type BadgeVariant = 'soft' | 'solid' | 'outline';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
export type BadgeTone = 'neutral'
|
|
3
|
-
/**
|
|
2
|
+
export type BadgeTone = 'neutral'
|
|
3
|
+
/** Ink, the emphatic neutral: a label that needs a look (a low stock, a pending state). */
|
|
4
|
+
| 'ink' | 'danger'
|
|
5
|
+
/** Cobalt: information, a counter, a navigation label, a "New" mark, a good state. */
|
|
4
6
|
| 'info';
|
|
5
7
|
/** `soft` is the tint, `solid` the filled pair (a counter, a discount), `outline` line and text. */
|
|
6
8
|
export type BadgeVariant = 'soft' | 'solid' | 'outline';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as n } from "react";
|
|
3
3
|
import { cx as c } from "../../helpers/class-name.helper.js";
|
|
4
|
-
const a = {"badge":"ui-badge-uLAaI","badge__icon":"ui-badge__icon-R2goZ","badge--neutral":"ui-badge--neutral-6kddt","badge--soft":"ui-badge--soft-gFeRF","badge--solid":"ui-badge--solid-rtdHI","badge--outline":"ui-badge--outline-QiAAz","badge--
|
|
4
|
+
const a = {"badge":"ui-badge-uLAaI","badge__icon":"ui-badge__icon-R2goZ","badge--neutral":"ui-badge--neutral-6kddt","badge--soft":"ui-badge--soft-gFeRF","badge--solid":"ui-badge--solid-rtdHI","badge--outline":"ui-badge--outline-QiAAz","badge--danger":"ui-badge--danger-X3nV0","badge--info":"ui-badge--info-mHOwk","badge--ink":"ui-badge--ink-Dj3ht"};
|
|
5
5
|
const l = ({
|
|
6
6
|
children: s,
|
|
7
7
|
tone: t = "neutral",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type BadgeTone =\n | 'neutral'\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type BadgeTone =\n | 'neutral'\n /** Ink, the emphatic neutral: a label that needs a look (a low stock, a pending state). */\n | 'ink'\n | 'danger'\n /** Cobalt: information, a counter, a navigation label, a \"New\" mark, a good state. */\n | 'info';\n\n/** `soft` is the tint, `solid` the filled pair (a counter, a discount), `outline` line and text. */\nexport type BadgeVariant = 'soft' | 'solid' | 'outline';\n\ntype Props = {\n children: ReactNode;\n tone?: BadgeTone;\n variant?: BadgeVariant;\n /** A small icon, shown before the text. */\n icon?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** Badge — a status or classification label. */\nconst Badge: FC<Props> = ({\n children,\n tone = 'neutral',\n variant = 'soft',\n icon,\n className,\n testId,\n}) => (\n <span\n className={cx(styles.badge, styles[`badge--${tone}`], styles[`badge--${variant}`], className)}\n data-testid={testId}\n >\n {icon && <span className={styles.badge__icon}>{icon}</span>}\n {children}\n </span>\n);\n\nexport default /*#__PURE__*/ memo(Badge) as typeof Badge;\n"],"names":["Badge","children","tone","variant","icon","className","testId","jsxs","cx","styles","jsx","index"],"mappings":";;;;AA4BA,MAAMA,IAAmB,CAAC;AAAA,EACxB,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AACF,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAGC,EAAO,OAAOA,EAAO,UAAUP,CAAI,EAAE,GAAGO,EAAO,UAAUN,CAAO,EAAE,GAAGE,CAAS;AAAA,IAC5F,eAAaC;AAAA,IAEZ,UAAA;AAAA,MAAAF,KAAQ,gBAAAM,EAAC,QAAA,EAAK,WAAWD,EAAO,aAAc,UAAAL,GAAK;AAAA,MACnDH;AAAA,IAAA;AAAA,EAAA;AACH,GAGFU,sBAAkCX,CAAK;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-badge-uLAaI{display:inline-flex;align-items:center;gap:var(--hd-space-1);font-family:var(--ui-badge-font, var(--hd-font-body));font-size:var(--hd-type-caption-size);font-weight:var(--ui-badge-weight, var(--hd-font-weight-semibold));letter-spacing:var(--ui-badge-tracking, normal);text-transform:var(--ui-badge-transform, none);line-height:1;white-space:nowrap;padding:var(--hd-space-1) var(--hd-space-2);border-radius:var(--ui-badge-radius, var(--hd-radius-pill));border:1px solid transparent}.ui-badge__icon-R2goZ{display:flex;font-size:.95em}.ui-badge--neutral-6kddt.ui-badge--soft-gFeRF{background-color:var(--ui-badge-bg, var(--hd-bg-raised));border-color:var(--ui-badge-line, var(--hd-border));color:var(--ui-badge-fg, var(--hd-text-2))}.ui-badge--neutral-6kddt.ui-badge--solid-rtdHI{background-color:var(--ui-badge-bg, var(--hd-text));border-color:var(--ui-badge-line, var(--hd-text));color:var(--ui-badge-fg, var(--hd-bg-surface))}.ui-badge--neutral-6kddt.ui-badge--outline-QiAAz{border-color:var(--ui-badge-line, var(--hd-border-strong));color:var(--ui-badge-fg, var(--hd-text-2))}.ui-badge--
|
|
1
|
+
@layer ui{.ui-badge-uLAaI{display:inline-flex;align-items:center;gap:var(--hd-space-1);font-family:var(--ui-badge-font, var(--hd-font-body));font-size:var(--hd-type-caption-size);font-weight:var(--ui-badge-weight, var(--hd-font-weight-semibold));letter-spacing:var(--ui-badge-tracking, normal);text-transform:var(--ui-badge-transform, none);line-height:1;white-space:nowrap;padding:var(--hd-space-1) var(--hd-space-2);border-radius:var(--ui-badge-radius, var(--hd-radius-pill));border:1px solid transparent}.ui-badge__icon-R2goZ{display:flex;font-size:.95em}.ui-badge--neutral-6kddt.ui-badge--soft-gFeRF{background-color:var(--ui-badge-bg, var(--hd-bg-raised));border-color:var(--ui-badge-line, var(--hd-border));color:var(--ui-badge-fg, var(--hd-text-2))}.ui-badge--neutral-6kddt.ui-badge--solid-rtdHI{background-color:var(--ui-badge-bg, var(--hd-text));border-color:var(--ui-badge-line, var(--hd-text));color:var(--ui-badge-fg, var(--hd-bg-surface))}.ui-badge--neutral-6kddt.ui-badge--outline-QiAAz{border-color:var(--ui-badge-line, var(--hd-border-strong));color:var(--ui-badge-fg, var(--hd-text-2))}.ui-badge--danger-X3nV0.ui-badge--soft-gFeRF{background-color:var(--hd-danger-bg);border:1px solid var(--hd-danger-line);color:var(--hd-danger-fg)}.ui-badge--danger-X3nV0.ui-badge--solid-rtdHI{background-color:var(--hd-danger-solid);border-color:var(--hd-danger-solid);color:var(--hd-danger-on-solid)}.ui-badge--danger-X3nV0.ui-badge--outline-QiAAz{border-color:var(--hd-danger-line);color:var(--hd-danger-fg)}.ui-badge--info-mHOwk.ui-badge--soft-gFeRF{background-color:var(--hd-info-bg);border:1px solid var(--hd-info-line);color:var(--hd-info-fg)}.ui-badge--info-mHOwk.ui-badge--solid-rtdHI{background-color:var(--hd-info-solid);border-color:var(--hd-info-solid);color:var(--hd-info-on-solid)}.ui-badge--info-mHOwk.ui-badge--outline-QiAAz{border-color:var(--hd-info-line);color:var(--hd-info-fg)}.ui-badge--ink-Dj3ht.ui-badge--soft-gFeRF{background-color:var(--hd-bg-raised);border:1px solid var(--hd-border-strong);color:var(--hd-text)}.ui-badge--ink-Dj3ht.ui-badge--solid-rtdHI{background-color:var(--hd-text);border-color:var(--hd-text);color:var(--hd-bg-surface)}.ui-badge--ink-Dj3ht.ui-badge--outline-QiAAz{border-color:var(--hd-text);color:var(--hd-text)}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),f=require("react"),l=require("@handijitcom/ui/design"),_=require("../../helpers/class-name.helper.cjs"),m=require("../../helpers/component.helper.cjs"),a={default:{"surface":"ui-surface-u2MbJ","surface__backdrop":"ui-surface__backdrop-rTyNA","surface__stop-from":"ui-surface__stop-from-0xkPz","surface__stop-to":"ui-surface__stop-to-aYMt0","surface__glow-centre":"ui-surface__glow-centre-nsLVh","surface__glow-edge":"ui-surface__glow-edge-2tbcR","surface__dot":"ui-surface__dot-Yb11z","surface__mask":"ui-surface__mask-1R-Jg","surface__fade-edge":"ui-surface__fade-edge-uhnUX","surface__fade-clear":"ui-surface__fade-clear-fjP11","surface__artwork":"ui-surface__artwork-RUrs5","surface__body":"ui-surface__body-zm-Ym","surface--artwork":"ui-surface--artwork-72AmW","surface__footer":"ui-surface__footer-Qb5t-","blueprint":"ui-blueprint-WeJGc","blueprint__stop-from":"ui-blueprint__stop-from-mvWpW","blueprint__stop-to":"ui-blueprint__stop-to-0bQ1k","blueprint__body":"ui-blueprint__body-YRHk-","blueprint__dot":"ui-blueprint__dot-wO5fN"}},S={start:{cx:"8%",cy:"14%",r:"42%"},end:{cx:"92%",cy:"22%",r:"38%"}},x=.24,p=s=>s==="both"?["start","end"]:s==="none"?[]:[s],$=s=>p(s).flatMap(r=>r==="start"?[[0,!0],[x,!1]]:[[1-x,!1],[1,!0]]),b=(s,r)=>`${s}-${r.replace(/[^\w-]/g,"")}`,w=({children:s,as:r="section",glow:i="both",dots:c="end",artwork:n,footer:o,"aria-label":h,"aria-labelledby":j,className:g,id:N,testId:y})=>{const t=b("ui-brand",f.useId()),u=$(c);return e.jsxs(r,{id:N,className:_.cx(a.default.surface,n!==void 0&&a.default["surface--artwork"],g),"aria-label":h,"aria-labelledby":j,"data-ui-brand-surface":"","data-testid":y,children:[e.jsxs("svg",{className:a.default.surface__backdrop,"aria-hidden":"true",focusable:"false",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:`${t}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0",className:a.default["surface__stop-from"]}),e.jsx("stop",{offset:l.brandSurface.gradientHold,className:a.default["surface__stop-from"]}),e.jsx("stop",{offset:"1",className:a.default["surface__stop-to"]})]}),e.jsxs("radialGradient",{id:`${t}-glow`,children:[e.jsx("stop",{offset:"0",className:a.default["surface__glow-centre"]}),e.jsx("stop",{offset:"1",className:a.default["surface__glow-edge"]})]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("pattern",{id:`${t}-dots`,width:l.brandSurface.dotCell,height:l.brandSurface.dotCell,patternUnits:"userSpaceOnUse",children:e.jsx("circle",{className:a.default.surface__dot,cx:l.brandSurface.dotCell/2,cy:l.brandSurface.dotCell/2,r:l.brandSurface.dotRadius})}),e.jsx("linearGradient",{id:`${t}-fade`,x1:"0",y1:"0",x2:"1",y2:"0",children:u.map(([d,v])=>e.jsx("stop",{offset:d,className:v?a.default["surface__fade-edge"]:a.default["surface__fade-clear"]},d))}),e.jsx("mask",{id:`${t}-mask`,className:a.default.surface__mask,children:e.jsx("rect",{width:"100%",height:"100%",fill:`url(#${t}-fade)`})})]})]}),e.jsx("rect",{width:"100%",height:"100%",fill:`url(#${t}-fill)`}),p(i).map(d=>e.jsx("circle",{...S[d],fill:`url(#${t}-glow)`},d)),u.length>0&&e.jsx("rect",{width:"100%",height:"100%",fill:`url(#${t}-dots)`,mask:`url(#${t}-mask)`})]}),n!==void 0&&e.jsx("div",{className:a.default.surface__artwork,"aria-hidden":"true",children:n}),e.jsx("div",{className:a.default.surface__body,children:s}),o!==void 0&&e.jsx("div",{className:a.default.surface__footer,children:o})]})},B=({shape:s,className:r,testId:i})=>{const c=b("ui-blueprint",f.useId());return e.jsxs("svg",{className:_.cx(a.default.blueprint,r),viewBox:s.viewBox,"aria-hidden":"true",focusable:"false","data-testid":i,children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:`${c}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0",className:a.default["blueprint__stop-from"]}),e.jsx("stop",{offset:l.brandSurface.blueprintHold,className:a.default["blueprint__stop-to"]})]})}),e.jsx("path",{className:a.default.blueprint__body,fill:`url(#${c}-fill)`,d:s.body}),s.dot!==void 0&&e.jsx("path",{className:a.default.blueprint__dot,d:s.dot})]})},k=m.named(B,"BrandBlueprint"),q=f.memo(m.named(w,"BrandSurface"));exports.BrandBlueprint=k;exports.default=q;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/BrandSurface/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode, useId } from 'react';\n\nimport { brandSurface } from '@handijitcom/ui/design';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\n/** Where a decorative layer sits; `start` and `end` follow the writing direction. */\nexport type BrandSurfaceSide = 'start' | 'end' | 'both' | 'none';\n\n/** A supergraphic's outline: the shape of `logos.mark` of `@handijitcom/ui/design` fits. */\nexport type BrandBlueprintShape = {\n viewBox: string;\n /** Path data of the body, drawn in the blueprint's white fill and outline. */\n body: string;\n /** Path data of the mark's dot, filled with the accent like the logo's. */\n dot?: string;\n};\n\ntype BrandSurfaceProps = {\n children: ReactNode;\n /** The element. A `section` is a landmark only with a name: pass `aria-labelledby`. */\n as?: 'section' | 'div' | 'header' | 'footer' | 'aside';\n /** Soft white sheens at the top corners. */\n glow?: BrandSurfaceSide;\n /** The white dot grid, fading out towards the content. */\n dots?: BrandSurfaceSide;\n /** Decorative artwork at the bottom end (a `BrandBlueprint`); hidden below the tablet width. */\n artwork?: ReactNode;\n /** A full-width strip under the content, outside its padding (`StatStrip variant=\"brand\"`). */\n footer?: ReactNode;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n className?: string;\n id?: string;\n testId?: string;\n};\n\ntype BlueprintProps = {\n shape: BrandBlueprintShape;\n className?: string;\n testId?: string;\n};\n\n/*\n * The glow circles, in percent of the surface: a radius in percent is measured against the\n * surface's normalised diagonal, so the glow grows with it instead of flooding a phone-sized one.\n */\nconst GLOWS = {\n start: { cx: '8%', cy: '14%', r: '42%' },\n end: { cx: '92%', cy: '22%', r: '38%' },\n} as const;\n\n/*\n * Where the dot grid is visible along the surface's width: full at the edge, gone by a quarter of\n * the way in, so the content column stays clear.\n */\nconst DOT_REACH = 0.24;\n\nconst sidesOf = (side: BrandSurfaceSide): ('start' | 'end')[] => {\n if (side === 'both') return ['start', 'end'];\n if (side === 'none') return [];\n return [side];\n};\n\n/** The mask stops of the dot grid: `true` is the edge opacity, `false` transparent. */\nconst fadeStops = (side: BrandSurfaceSide): [offset: number, isEdge: boolean][] =>\n sidesOf(side).flatMap(edge =>\n edge === 'start'\n ? [\n [0, true],\n [DOT_REACH, false],\n ]\n : [\n [1 - DOT_REACH, false],\n [1, true],\n ],\n );\n\n/*\n * Ids come from `useId`: two surfaces on a page, or the same one rendered twice, must not share\n * gradient ids. `useId` also runs in a server component, so the module carries no `'use client'`\n * and the surface sends no JavaScript. It returns `:r1:`, `«r1»` or `_r_1_` by React version; an\n * SVG `url(#…)` wants plain characters.\n */\nconst svgId = (prefix: string, id: string): string => `${prefix}-${id.replace(/[^\\w-]/g, '')}`;\n\n/**\n * BrandSurface — the brand's cobalt surface: a hero, a closing call, a sign-in side, a footer,\n * the same in both themes. Cobalt (`primary`) with white on it, deepening to one darker cobalt\n * step; its imagery (gradient, white sheens, white dot grid) is inline SVG, decorative and hidden\n * from assistive technology, never a CSS gradient. Descendants draw a white focus ring, and the\n * `ACCENT` button glows softly on it.\n * @example <BrandSurface as=\"section\" aria-labelledby=\"cta\" footer={<StatStrip variant=\"brand\" … />}>\n */\nconst BrandSurface: FC<BrandSurfaceProps> = ({\n children,\n as: Tag = 'section',\n glow = 'both',\n dots = 'end',\n artwork,\n footer,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className,\n id,\n testId,\n}) => {\n const base = svgId('ui-brand', useId());\n const fade = fadeStops(dots);\n\n return (\n <Tag\n id={id}\n className={cx(styles.surface, artwork !== undefined && styles['surface--artwork'], className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-ui-brand-surface=\"\"\n data-testid={testId}\n >\n <svg className={styles.surface__backdrop} aria-hidden=\"true\" focusable=\"false\">\n <defs>\n <linearGradient id={`${base}-fill`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" className={styles['surface__stop-from']} />\n <stop offset={brandSurface.gradientHold} className={styles['surface__stop-from']} />\n <stop offset=\"1\" className={styles['surface__stop-to']} />\n </linearGradient>\n <radialGradient id={`${base}-glow`}>\n <stop offset=\"0\" className={styles['surface__glow-centre']} />\n <stop offset=\"1\" className={styles['surface__glow-edge']} />\n </radialGradient>\n {fade.length > 0 && (\n <>\n <pattern\n id={`${base}-dots`}\n width={brandSurface.dotCell}\n height={brandSurface.dotCell}\n patternUnits=\"userSpaceOnUse\"\n >\n <circle\n className={styles.surface__dot}\n cx={brandSurface.dotCell / 2}\n cy={brandSurface.dotCell / 2}\n r={brandSurface.dotRadius}\n />\n </pattern>\n <linearGradient id={`${base}-fade`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n {fade.map(([offset, isEdge]) => (\n <stop\n key={offset}\n offset={offset}\n className={\n isEdge ? styles['surface__fade-edge'] : styles['surface__fade-clear']\n }\n />\n ))}\n </linearGradient>\n <mask id={`${base}-mask`} className={styles.surface__mask}>\n <rect width=\"100%\" height=\"100%\" fill={`url(#${base}-fade)`} />\n </mask>\n </>\n )}\n </defs>\n <rect width=\"100%\" height=\"100%\" fill={`url(#${base}-fill)`} />\n {sidesOf(glow).map(side => (\n <circle key={side} {...GLOWS[side]} fill={`url(#${base}-glow)`} />\n ))}\n {fade.length > 0 && (\n <rect\n width=\"100%\"\n height=\"100%\"\n fill={`url(#${base}-dots)`}\n mask={`url(#${base}-mask)`}\n />\n )}\n </svg>\n\n {artwork !== undefined && (\n <div className={styles.surface__artwork} aria-hidden=\"true\">\n {artwork}\n </div>\n )}\n\n <div className={styles.surface__body}>{children}</div>\n\n {footer !== undefined && <div className={styles.surface__footer}>{footer}</div>}\n </Tag>\n );\n};\n\n/**\n * BrandBlueprint — a supergraphic in the blueprint style: a white fill that fades out, a white\n * outline at low opacity and the solid coral dot of the logo. Decorative only (`aria-hidden`);\n * give it to `BrandSurface`'s `artwork`.\n * @example <BrandBlueprint shape={logos.mark} />\n */\nconst Blueprint: FC<BlueprintProps> = ({ shape, className, testId }) => {\n const base = svgId('ui-blueprint', useId());\n\n return (\n <svg\n className={cx(styles.blueprint, className)}\n viewBox={shape.viewBox}\n aria-hidden=\"true\"\n focusable=\"false\"\n data-testid={testId}\n >\n <defs>\n <linearGradient id={`${base}-fill`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" className={styles['blueprint__stop-from']} />\n <stop offset={brandSurface.blueprintHold} className={styles['blueprint__stop-to']} />\n </linearGradient>\n </defs>\n <path className={styles.blueprint__body} fill={`url(#${base}-fill)`} d={shape.body} />\n {shape.dot !== undefined && <path className={styles.blueprint__dot} d={shape.dot} />}\n </svg>\n );\n};\n\nexport const BrandBlueprint: FC<BlueprintProps> = /*#__PURE__*/ named(Blueprint, 'BrandBlueprint');\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(BrandSurface, 'BrandSurface'),\n) as typeof BrandSurface;\n"],"names":["GLOWS","DOT_REACH","sidesOf","side","fadeStops","edge","svgId","prefix","id","BrandSurface","children","Tag","glow","dots","artwork","footer","ariaLabel","ariaLabelledBy","className","testId","base","useId","fade","jsxs","cx","styles","jsx","brandSurface","Fragment","offset","isEdge","Blueprint","shape","BrandBlueprint","named","index","memo"],"mappings":"8UAkDMA,EAAQ,CACZ,MAAO,CAAE,GAAI,KAAM,GAAI,MAAO,EAAG,KAAA,EACjC,IAAK,CAAE,GAAI,MAAO,GAAI,MAAO,EAAG,KAAA,CAClC,EAMMC,EAAY,IAEZC,EAAWC,GACXA,IAAS,OAAe,CAAC,QAAS,KAAK,EACvCA,IAAS,OAAe,CAAA,EACrB,CAACA,CAAI,EAIRC,EAAaD,GACjBD,EAAQC,CAAI,EAAE,QAAQE,GACpBA,IAAS,QACL,CACE,CAAC,EAAG,EAAI,EACR,CAACJ,EAAW,EAAK,CAAA,EAEnB,CACE,CAAC,EAAIA,EAAW,EAAK,EACrB,CAAC,EAAG,EAAI,CAAA,CAEhB,EAQIK,EAAQ,CAACC,EAAgBC,IAAuB,GAAGD,CAAM,IAAIC,EAAG,QAAQ,UAAW,EAAE,CAAC,GAUtFC,EAAsC,CAAC,CAC3C,SAAAC,EACA,GAAIC,EAAM,UACV,KAAAC,EAAO,OACP,KAAAC,EAAO,MACP,QAAAC,EACA,OAAAC,EACA,aAAcC,EACd,kBAAmBC,EACnB,UAAAC,EACA,GAAAV,EACA,OAAAW,CACF,IAAM,CACJ,MAAMC,EAAOd,EAAM,WAAYe,EAAAA,MAAA,CAAO,EAChCC,EAAOlB,EAAUS,CAAI,EAE3B,OACEU,EAAAA,KAACZ,EAAA,CACC,GAAAH,EACA,UAAWgB,EAAAA,GAAGC,EAAAA,QA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QACV,cAAab,EAEb,SAAA,CAAAO,MAAC,OAAA,CACC,SAAAH,EAAAA,KAAC,iBAAA,CAAe,GAAI,GAAGH,CAAI,QAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAC1D,SAAA,CAAAM,MAAC,QAAK,OAAO,IAAI,UAAWD,EAAAA,QAAO,sBAAsB,EAAG,EAC5DC,MAAC,QAAK,OAAQC,EAAAA,aAAa,cAAe,UAAWF,UAAO,oBAAoB,CAAA,CAAG,CAAA,CAAA,CACrF,CAAA,CACF,EACAC,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,gBAAiB,KAAM,QAAQL,CAAI,SAAU,EAAGY,EAAM,IAAA,CAAM,EACnFA,EAAM,MAAQ,QAAaN,EAAAA,IAAC,OAAA,CAAK,UAAWD,EAAAA,QAAO,eAAgB,EAAGO,EAAM,GAAA,CAAK,CAAA,CAAA,CAAA,CAGxF,EAEaC,EAAmDC,EAAAA,MAAMH,EAAW,gBAAgB,EAEjGI,EAA6BC,EAAAA,KACbF,EAAAA,MAAMzB,EAAc,cAAc,CAClD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** Where a decorative layer sits; `start` and `end` follow the writing direction. */
|
|
3
|
+
export type BrandSurfaceSide = 'start' | 'end' | 'both' | 'none';
|
|
4
|
+
/** A supergraphic's outline: the shape of `logos.mark` of `@handijitcom/ui/design` fits. */
|
|
5
|
+
export type BrandBlueprintShape = {
|
|
6
|
+
viewBox: string;
|
|
7
|
+
/** Path data of the body, drawn in the blueprint's white fill and outline. */
|
|
8
|
+
body: string;
|
|
9
|
+
/** Path data of the mark's dot, filled with the accent like the logo's. */
|
|
10
|
+
dot?: string;
|
|
11
|
+
};
|
|
12
|
+
type BrandSurfaceProps = {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** The element. A `section` is a landmark only with a name: pass `aria-labelledby`. */
|
|
15
|
+
as?: 'section' | 'div' | 'header' | 'footer' | 'aside';
|
|
16
|
+
/** Soft white sheens at the top corners. */
|
|
17
|
+
glow?: BrandSurfaceSide;
|
|
18
|
+
/** The white dot grid, fading out towards the content. */
|
|
19
|
+
dots?: BrandSurfaceSide;
|
|
20
|
+
/** Decorative artwork at the bottom end (a `BrandBlueprint`); hidden below the tablet width. */
|
|
21
|
+
artwork?: ReactNode;
|
|
22
|
+
/** A full-width strip under the content, outside its padding (`StatStrip variant="brand"`). */
|
|
23
|
+
footer?: ReactNode;
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
'aria-labelledby'?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
id?: string;
|
|
28
|
+
testId?: string;
|
|
29
|
+
};
|
|
30
|
+
type BlueprintProps = {
|
|
31
|
+
shape: BrandBlueprintShape;
|
|
32
|
+
className?: string;
|
|
33
|
+
testId?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* BrandSurface — the brand's cobalt surface: a hero, a closing call, a sign-in side, a footer,
|
|
37
|
+
* the same in both themes. Cobalt (`primary`) with white on it, deepening to one darker cobalt
|
|
38
|
+
* step; its imagery (gradient, white sheens, white dot grid) is inline SVG, decorative and hidden
|
|
39
|
+
* from assistive technology, never a CSS gradient. Descendants draw a white focus ring, and the
|
|
40
|
+
* `ACCENT` button glows softly on it.
|
|
41
|
+
* @example <BrandSurface as="section" aria-labelledby="cta" footer={<StatStrip variant="brand" … />}>
|
|
42
|
+
*/
|
|
43
|
+
declare const BrandSurface: FC<BrandSurfaceProps>;
|
|
44
|
+
export declare const BrandBlueprint: FC<BlueprintProps>;
|
|
45
|
+
declare const _default: typeof BrandSurface;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** Where a decorative layer sits; `start` and `end` follow the writing direction. */
|
|
3
|
+
export type BrandSurfaceSide = 'start' | 'end' | 'both' | 'none';
|
|
4
|
+
/** A supergraphic's outline: the shape of `logos.mark` of `@handijitcom/ui/design` fits. */
|
|
5
|
+
export type BrandBlueprintShape = {
|
|
6
|
+
viewBox: string;
|
|
7
|
+
/** Path data of the body, drawn in the blueprint's white fill and outline. */
|
|
8
|
+
body: string;
|
|
9
|
+
/** Path data of the mark's dot, filled with the accent like the logo's. */
|
|
10
|
+
dot?: string;
|
|
11
|
+
};
|
|
12
|
+
type BrandSurfaceProps = {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** The element. A `section` is a landmark only with a name: pass `aria-labelledby`. */
|
|
15
|
+
as?: 'section' | 'div' | 'header' | 'footer' | 'aside';
|
|
16
|
+
/** Soft white sheens at the top corners. */
|
|
17
|
+
glow?: BrandSurfaceSide;
|
|
18
|
+
/** The white dot grid, fading out towards the content. */
|
|
19
|
+
dots?: BrandSurfaceSide;
|
|
20
|
+
/** Decorative artwork at the bottom end (a `BrandBlueprint`); hidden below the tablet width. */
|
|
21
|
+
artwork?: ReactNode;
|
|
22
|
+
/** A full-width strip under the content, outside its padding (`StatStrip variant="brand"`). */
|
|
23
|
+
footer?: ReactNode;
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
'aria-labelledby'?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
id?: string;
|
|
28
|
+
testId?: string;
|
|
29
|
+
};
|
|
30
|
+
type BlueprintProps = {
|
|
31
|
+
shape: BrandBlueprintShape;
|
|
32
|
+
className?: string;
|
|
33
|
+
testId?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* BrandSurface — the brand's cobalt surface: a hero, a closing call, a sign-in side, a footer,
|
|
37
|
+
* the same in both themes. Cobalt (`primary`) with white on it, deepening to one darker cobalt
|
|
38
|
+
* step; its imagery (gradient, white sheens, white dot grid) is inline SVG, decorative and hidden
|
|
39
|
+
* from assistive technology, never a CSS gradient. Descendants draw a white focus ring, and the
|
|
40
|
+
* `ACCENT` button glows softly on it.
|
|
41
|
+
* @example <BrandSurface as="section" aria-labelledby="cta" footer={<StatStrip variant="brand" … />}>
|
|
42
|
+
*/
|
|
43
|
+
declare const BrandSurface: FC<BrandSurfaceProps>;
|
|
44
|
+
export declare const BrandBlueprint: FC<BlueprintProps>;
|
|
45
|
+
declare const _default: typeof BrandSurface;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { memo as k, useId as p } from "react";
|
|
3
|
+
import { brandSurface as d } from "@handijitcom/ui/design";
|
|
4
|
+
import { cx as _ } from "../../helpers/class-name.helper.js";
|
|
5
|
+
import { named as h } from "../../helpers/component.helper.js";
|
|
6
|
+
const a = {"surface":"ui-surface-u2MbJ","surface__backdrop":"ui-surface__backdrop-rTyNA","surface__stop-from":"ui-surface__stop-from-0xkPz","surface__stop-to":"ui-surface__stop-to-aYMt0","surface__glow-centre":"ui-surface__glow-centre-nsLVh","surface__glow-edge":"ui-surface__glow-edge-2tbcR","surface__dot":"ui-surface__dot-Yb11z","surface__mask":"ui-surface__mask-1R-Jg","surface__fade-edge":"ui-surface__fade-edge-uhnUX","surface__fade-clear":"ui-surface__fade-clear-fjP11","surface__artwork":"ui-surface__artwork-RUrs5","surface__body":"ui-surface__body-zm-Ym","surface--artwork":"ui-surface--artwork-72AmW","surface__footer":"ui-surface__footer-Qb5t-","blueprint":"ui-blueprint-WeJGc","blueprint__stop-from":"ui-blueprint__stop-from-mvWpW","blueprint__stop-to":"ui-blueprint__stop-to-0bQ1k","blueprint__body":"ui-blueprint__body-YRHk-","blueprint__dot":"ui-blueprint__dot-wO5fN"};
|
|
7
|
+
const S = {
|
|
8
|
+
start: { cx: "8%", cy: "14%", r: "42%" },
|
|
9
|
+
end: { cx: "92%", cy: "22%", r: "38%" }
|
|
10
|
+
}, m = 0.24, b = (r) => r === "both" ? ["start", "end"] : r === "none" ? [] : [r], C = (r) => b(r).flatMap(
|
|
11
|
+
(l) => l === "start" ? [
|
|
12
|
+
[0, !0],
|
|
13
|
+
[m, !1]
|
|
14
|
+
] : [
|
|
15
|
+
[1 - m, !1],
|
|
16
|
+
[1, !0]
|
|
17
|
+
]
|
|
18
|
+
), g = (r, l) => `${r}-${l.replace(/[^\w-]/g, "")}`, G = ({
|
|
19
|
+
children: r,
|
|
20
|
+
as: l = "section",
|
|
21
|
+
glow: o = "both",
|
|
22
|
+
dots: c = "end",
|
|
23
|
+
artwork: n,
|
|
24
|
+
footer: u,
|
|
25
|
+
"aria-label": N,
|
|
26
|
+
"aria-labelledby": x,
|
|
27
|
+
className: y,
|
|
28
|
+
id: $,
|
|
29
|
+
testId: v
|
|
30
|
+
}) => {
|
|
31
|
+
const s = g("ui-brand", p()), f = C(c);
|
|
32
|
+
return /* @__PURE__ */ t(
|
|
33
|
+
l,
|
|
34
|
+
{
|
|
35
|
+
id: $,
|
|
36
|
+
className: _(a.surface, n !== void 0 && a["surface--artwork"], y),
|
|
37
|
+
"aria-label": N,
|
|
38
|
+
"aria-labelledby": x,
|
|
39
|
+
"data-ui-brand-surface": "",
|
|
40
|
+
"data-testid": v,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ t("svg", { className: a.surface__backdrop, "aria-hidden": "true", focusable: "false", children: [
|
|
43
|
+
/* @__PURE__ */ t("defs", { children: [
|
|
44
|
+
/* @__PURE__ */ t("linearGradient", { id: `${s}-fill`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
45
|
+
/* @__PURE__ */ e("stop", { offset: "0", className: a["surface__stop-from"] }),
|
|
46
|
+
/* @__PURE__ */ e("stop", { offset: d.gradientHold, className: a["surface__stop-from"] }),
|
|
47
|
+
/* @__PURE__ */ e("stop", { offset: "1", className: a["surface__stop-to"] })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ t("radialGradient", { id: `${s}-glow`, children: [
|
|
50
|
+
/* @__PURE__ */ e("stop", { offset: "0", className: a["surface__glow-centre"] }),
|
|
51
|
+
/* @__PURE__ */ e("stop", { offset: "1", className: a["surface__glow-edge"] })
|
|
52
|
+
] }),
|
|
53
|
+
f.length > 0 && /* @__PURE__ */ t(B, { children: [
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
"pattern",
|
|
56
|
+
{
|
|
57
|
+
id: `${s}-dots`,
|
|
58
|
+
width: d.dotCell,
|
|
59
|
+
height: d.dotCell,
|
|
60
|
+
patternUnits: "userSpaceOnUse",
|
|
61
|
+
children: /* @__PURE__ */ e(
|
|
62
|
+
"circle",
|
|
63
|
+
{
|
|
64
|
+
className: a.surface__dot,
|
|
65
|
+
cx: d.dotCell / 2,
|
|
66
|
+
cy: d.dotCell / 2,
|
|
67
|
+
r: d.dotRadius
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ e("linearGradient", { id: `${s}-fade`, x1: "0", y1: "0", x2: "1", y2: "0", children: f.map(([i, w]) => /* @__PURE__ */ e(
|
|
73
|
+
"stop",
|
|
74
|
+
{
|
|
75
|
+
offset: i,
|
|
76
|
+
className: w ? a["surface__fade-edge"] : a["surface__fade-clear"]
|
|
77
|
+
},
|
|
78
|
+
i
|
|
79
|
+
)) }),
|
|
80
|
+
/* @__PURE__ */ e("mask", { id: `${s}-mask`, className: a.surface__mask, children: /* @__PURE__ */ e("rect", { width: "100%", height: "100%", fill: `url(#${s}-fade)` }) })
|
|
81
|
+
] })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ e("rect", { width: "100%", height: "100%", fill: `url(#${s}-fill)` }),
|
|
84
|
+
b(o).map((i) => /* @__PURE__ */ e("circle", { ...S[i], fill: `url(#${s}-glow)` }, i)),
|
|
85
|
+
f.length > 0 && /* @__PURE__ */ e(
|
|
86
|
+
"rect",
|
|
87
|
+
{
|
|
88
|
+
width: "100%",
|
|
89
|
+
height: "100%",
|
|
90
|
+
fill: `url(#${s}-dots)`,
|
|
91
|
+
mask: `url(#${s}-mask)`
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
] }),
|
|
95
|
+
n !== void 0 && /* @__PURE__ */ e("div", { className: a.surface__artwork, "aria-hidden": "true", children: n }),
|
|
96
|
+
/* @__PURE__ */ e("div", { className: a.surface__body, children: r }),
|
|
97
|
+
u !== void 0 && /* @__PURE__ */ e("div", { className: a.surface__footer, children: u })
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}, O = ({ shape: r, className: l, testId: o }) => {
|
|
102
|
+
const c = g("ui-blueprint", p());
|
|
103
|
+
return /* @__PURE__ */ t(
|
|
104
|
+
"svg",
|
|
105
|
+
{
|
|
106
|
+
className: _(a.blueprint, l),
|
|
107
|
+
viewBox: r.viewBox,
|
|
108
|
+
"aria-hidden": "true",
|
|
109
|
+
focusable: "false",
|
|
110
|
+
"data-testid": o,
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ t("linearGradient", { id: `${c}-fill`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
113
|
+
/* @__PURE__ */ e("stop", { offset: "0", className: a["blueprint__stop-from"] }),
|
|
114
|
+
/* @__PURE__ */ e("stop", { offset: d.blueprintHold, className: a["blueprint__stop-to"] })
|
|
115
|
+
] }) }),
|
|
116
|
+
/* @__PURE__ */ e("path", { className: a.blueprint__body, fill: `url(#${c}-fill)`, d: r.body }),
|
|
117
|
+
r.dot !== void 0 && /* @__PURE__ */ e("path", { className: a.blueprint__dot, d: r.dot })
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}, D = /* @__PURE__ */ h(O, "BrandBlueprint"), E = /* @__PURE__ */ k(
|
|
122
|
+
/* @__PURE__ */ h(G, "BrandSurface")
|
|
123
|
+
);
|
|
124
|
+
export {
|
|
125
|
+
D as BrandBlueprint,
|
|
126
|
+
E as default
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/BrandSurface/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode, useId } from 'react';\n\nimport { brandSurface } from '@handijitcom/ui/design';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { named } from '../../helpers/component.helper';\n\nimport styles from './index.module.scss';\n\n/** Where a decorative layer sits; `start` and `end` follow the writing direction. */\nexport type BrandSurfaceSide = 'start' | 'end' | 'both' | 'none';\n\n/** A supergraphic's outline: the shape of `logos.mark` of `@handijitcom/ui/design` fits. */\nexport type BrandBlueprintShape = {\n viewBox: string;\n /** Path data of the body, drawn in the blueprint's white fill and outline. */\n body: string;\n /** Path data of the mark's dot, filled with the accent like the logo's. */\n dot?: string;\n};\n\ntype BrandSurfaceProps = {\n children: ReactNode;\n /** The element. A `section` is a landmark only with a name: pass `aria-labelledby`. */\n as?: 'section' | 'div' | 'header' | 'footer' | 'aside';\n /** Soft white sheens at the top corners. */\n glow?: BrandSurfaceSide;\n /** The white dot grid, fading out towards the content. */\n dots?: BrandSurfaceSide;\n /** Decorative artwork at the bottom end (a `BrandBlueprint`); hidden below the tablet width. */\n artwork?: ReactNode;\n /** A full-width strip under the content, outside its padding (`StatStrip variant=\"brand\"`). */\n footer?: ReactNode;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n className?: string;\n id?: string;\n testId?: string;\n};\n\ntype BlueprintProps = {\n shape: BrandBlueprintShape;\n className?: string;\n testId?: string;\n};\n\n/*\n * The glow circles, in percent of the surface: a radius in percent is measured against the\n * surface's normalised diagonal, so the glow grows with it instead of flooding a phone-sized one.\n */\nconst GLOWS = {\n start: { cx: '8%', cy: '14%', r: '42%' },\n end: { cx: '92%', cy: '22%', r: '38%' },\n} as const;\n\n/*\n * Where the dot grid is visible along the surface's width: full at the edge, gone by a quarter of\n * the way in, so the content column stays clear.\n */\nconst DOT_REACH = 0.24;\n\nconst sidesOf = (side: BrandSurfaceSide): ('start' | 'end')[] => {\n if (side === 'both') return ['start', 'end'];\n if (side === 'none') return [];\n return [side];\n};\n\n/** The mask stops of the dot grid: `true` is the edge opacity, `false` transparent. */\nconst fadeStops = (side: BrandSurfaceSide): [offset: number, isEdge: boolean][] =>\n sidesOf(side).flatMap(edge =>\n edge === 'start'\n ? [\n [0, true],\n [DOT_REACH, false],\n ]\n : [\n [1 - DOT_REACH, false],\n [1, true],\n ],\n );\n\n/*\n * Ids come from `useId`: two surfaces on a page, or the same one rendered twice, must not share\n * gradient ids. `useId` also runs in a server component, so the module carries no `'use client'`\n * and the surface sends no JavaScript. It returns `:r1:`, `«r1»` or `_r_1_` by React version; an\n * SVG `url(#…)` wants plain characters.\n */\nconst svgId = (prefix: string, id: string): string => `${prefix}-${id.replace(/[^\\w-]/g, '')}`;\n\n/**\n * BrandSurface — the brand's cobalt surface: a hero, a closing call, a sign-in side, a footer,\n * the same in both themes. Cobalt (`primary`) with white on it, deepening to one darker cobalt\n * step; its imagery (gradient, white sheens, white dot grid) is inline SVG, decorative and hidden\n * from assistive technology, never a CSS gradient. Descendants draw a white focus ring, and the\n * `ACCENT` button glows softly on it.\n * @example <BrandSurface as=\"section\" aria-labelledby=\"cta\" footer={<StatStrip variant=\"brand\" … />}>\n */\nconst BrandSurface: FC<BrandSurfaceProps> = ({\n children,\n as: Tag = 'section',\n glow = 'both',\n dots = 'end',\n artwork,\n footer,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className,\n id,\n testId,\n}) => {\n const base = svgId('ui-brand', useId());\n const fade = fadeStops(dots);\n\n return (\n <Tag\n id={id}\n className={cx(styles.surface, artwork !== undefined && styles['surface--artwork'], className)}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-ui-brand-surface=\"\"\n data-testid={testId}\n >\n <svg className={styles.surface__backdrop} aria-hidden=\"true\" focusable=\"false\">\n <defs>\n <linearGradient id={`${base}-fill`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" className={styles['surface__stop-from']} />\n <stop offset={brandSurface.gradientHold} className={styles['surface__stop-from']} />\n <stop offset=\"1\" className={styles['surface__stop-to']} />\n </linearGradient>\n <radialGradient id={`${base}-glow`}>\n <stop offset=\"0\" className={styles['surface__glow-centre']} />\n <stop offset=\"1\" className={styles['surface__glow-edge']} />\n </radialGradient>\n {fade.length > 0 && (\n <>\n <pattern\n id={`${base}-dots`}\n width={brandSurface.dotCell}\n height={brandSurface.dotCell}\n patternUnits=\"userSpaceOnUse\"\n >\n <circle\n className={styles.surface__dot}\n cx={brandSurface.dotCell / 2}\n cy={brandSurface.dotCell / 2}\n r={brandSurface.dotRadius}\n />\n </pattern>\n <linearGradient id={`${base}-fade`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n {fade.map(([offset, isEdge]) => (\n <stop\n key={offset}\n offset={offset}\n className={\n isEdge ? styles['surface__fade-edge'] : styles['surface__fade-clear']\n }\n />\n ))}\n </linearGradient>\n <mask id={`${base}-mask`} className={styles.surface__mask}>\n <rect width=\"100%\" height=\"100%\" fill={`url(#${base}-fade)`} />\n </mask>\n </>\n )}\n </defs>\n <rect width=\"100%\" height=\"100%\" fill={`url(#${base}-fill)`} />\n {sidesOf(glow).map(side => (\n <circle key={side} {...GLOWS[side]} fill={`url(#${base}-glow)`} />\n ))}\n {fade.length > 0 && (\n <rect\n width=\"100%\"\n height=\"100%\"\n fill={`url(#${base}-dots)`}\n mask={`url(#${base}-mask)`}\n />\n )}\n </svg>\n\n {artwork !== undefined && (\n <div className={styles.surface__artwork} aria-hidden=\"true\">\n {artwork}\n </div>\n )}\n\n <div className={styles.surface__body}>{children}</div>\n\n {footer !== undefined && <div className={styles.surface__footer}>{footer}</div>}\n </Tag>\n );\n};\n\n/**\n * BrandBlueprint — a supergraphic in the blueprint style: a white fill that fades out, a white\n * outline at low opacity and the solid coral dot of the logo. Decorative only (`aria-hidden`);\n * give it to `BrandSurface`'s `artwork`.\n * @example <BrandBlueprint shape={logos.mark} />\n */\nconst Blueprint: FC<BlueprintProps> = ({ shape, className, testId }) => {\n const base = svgId('ui-blueprint', useId());\n\n return (\n <svg\n className={cx(styles.blueprint, className)}\n viewBox={shape.viewBox}\n aria-hidden=\"true\"\n focusable=\"false\"\n data-testid={testId}\n >\n <defs>\n <linearGradient id={`${base}-fill`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0\" className={styles['blueprint__stop-from']} />\n <stop offset={brandSurface.blueprintHold} className={styles['blueprint__stop-to']} />\n </linearGradient>\n </defs>\n <path className={styles.blueprint__body} fill={`url(#${base}-fill)`} d={shape.body} />\n {shape.dot !== undefined && <path className={styles.blueprint__dot} d={shape.dot} />}\n </svg>\n );\n};\n\nexport const BrandBlueprint: FC<BlueprintProps> = /*#__PURE__*/ named(Blueprint, 'BrandBlueprint');\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(BrandSurface, 'BrandSurface'),\n) as typeof BrandSurface;\n"],"names":["GLOWS","DOT_REACH","sidesOf","side","fadeStops","edge","svgId","prefix","id","BrandSurface","children","Tag","glow","dots","artwork","footer","ariaLabel","ariaLabelledBy","className","testId","base","useId","fade","jsxs","cx","styles","jsx","brandSurface","Fragment","offset","isEdge","Blueprint","shape","BrandBlueprint","named","index","memo"],"mappings":";;;;;;AAkDA,MAAMA,IAAQ;AAAA,EACZ,OAAO,EAAE,IAAI,MAAM,IAAI,OAAO,GAAG,MAAA;AAAA,EACjC,KAAK,EAAE,IAAI,OAAO,IAAI,OAAO,GAAG,MAAA;AAClC,GAMMC,IAAY,MAEZC,IAAU,CAACC,MACXA,MAAS,SAAe,CAAC,SAAS,KAAK,IACvCA,MAAS,SAAe,CAAA,IACrB,CAACA,CAAI,GAIRC,IAAY,CAACD,MACjBD,EAAQC,CAAI,EAAE;AAAA,EAAQ,CAAAE,MACpBA,MAAS,UACL;AAAA,IACE,CAAC,GAAG,EAAI;AAAA,IACR,CAACJ,GAAW,EAAK;AAAA,EAAA,IAEnB;AAAA,IACE,CA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C,UAAK,QAAQC,EAAa,eAAe,WAAWF,EAAO,oBAAoB,EAAA,CAAG;AAAA,QAAA,EAAA,CACrF,EAAA,CACF;AAAA,QACA,gBAAAC,EAAC,QAAA,EAAK,WAAWD,EAAO,iBAAiB,MAAM,QAAQL,CAAI,UAAU,GAAGY,EAAM,KAAA,CAAM;AAAA,QACnFA,EAAM,QAAQ,UAAa,gBAAAN,EAAC,QAAA,EAAK,WAAWD,EAAO,gBAAgB,GAAGO,EAAM,IAAA,CAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxF,GAEaC,IAAmD,gBAAAC,EAAMH,GAAW,gBAAgB,GAEjGI,IAA6B,gBAAAC;AAAA,EACb,gBAAAF,EAAMzB,GAAc,cAAc;AAClD;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer ui{.ui-surface-u2MbJ{position:relative;isolation:isolate;overflow:clip;display:flex;flex-direction:column;border-radius:var(--ui-brand-surface-radius, var(--hd-radius-lg));background-color:var(--hd-primary);color:var(--hd-on-primary);--ui-ring-color: var(--hd-on-primary)}@media (max-width: 640px){.ui-surface-u2MbJ{border-radius:var(--ui-brand-surface-radius, var(--hd-radius-md))}}.ui-surface__backdrop-rTyNA{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;width:100%;height:100%;pointer-events:none}[dir=rtl] .ui-surface__backdrop-rTyNA{transform:scaleX(-1)}.ui-surface__stop-from-0xkPz{stop-color:var(--hd-primary)}.ui-surface__stop-to-aYMt0{stop-color:var(--hd-brand-surface-deep)}.ui-surface__glow-centre-nsLVh{stop-color:var(--hd-on-primary);stop-opacity:var(--hd-brand-surface-glow-alpha)}.ui-surface__glow-edge-2tbcR{stop-color:var(--hd-on-primary);stop-opacity:0}.ui-surface__dot-Yb11z{fill:var(--hd-on-primary)}.ui-surface__mask-1R-Jg{mask-type:alpha}.ui-surface__fade-edge-uhnUX{stop-opacity:var(--hd-brand-surface-dot-alpha)}.ui-surface__fade-clear-fjP11{stop-opacity:0}.ui-surface__artwork-RUrs5{position:absolute;inset-inline-end:clamp(var(--hd-space-6),3.5vw,var(--hd-space-12));bottom:0;z-index:-1;width:var(--ui-brand-surface-artwork-width, 120px);pointer-events:none}@media (max-width: 1024px){.ui-surface__artwork-RUrs5{display:none}}.ui-surface__body-zm-Ym{position:relative;padding:var(--ui-brand-surface-padding, clamp(var(--hd-space-6), 4vw, var(--hd-space-12)) clamp(var(--hd-space-5), 4vw, var(--hd-space-12)))}@media (min-width: 1025px){.ui-surface--artwork-72AmW .ui-surface__body-zm-Ym{padding-inline-end:calc(var(--ui-brand-surface-artwork-width, 120px) + var(--hd-space-16))}}.ui-surface__footer-Qb5t-{position:relative}@media (forced-colors: active){.ui-surface-u2MbJ{border:1px solid CanvasText}.ui-surface__backdrop-rTyNA,.ui-surface__artwork-RUrs5{display:none}}.ui-blueprint-WeJGc{display:block;width:100%;height:auto;overflow:visible}.ui-blueprint__stop-from-mvWpW{stop-color:var(--hd-on-primary);stop-opacity:var(--hd-brand-surface-blueprint-fill-alpha)}.ui-blueprint__stop-to-0bQ1k{stop-color:var(--hd-on-primary);stop-opacity:0}.ui-blueprint__body-YRHk-{stroke:var(--hd-on-primary);stroke-opacity:var(--hd-brand-surface-blueprint-stroke-alpha);stroke-width:2px;stroke-linejoin:round;vector-effect:non-scaling-stroke}.ui-blueprint__dot-wO5fN{fill:var(--hd-accent)}@media (forced-colors: active){.ui-blueprint-WeJGc{display:none}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),m=require("react"),h=require("../../helpers/class-name.helper.cjs"),k=require("../../helpers/component.helper.cjs"),v=require("../../enums/ui-size.enum.cjs"),C=require("../../enums/ui-variant.enum.cjs"),R=require("../Link/index.cjs"),$=require("../Spinner/index.cjs"),e={default:{"button":"ui-button-SRu4R","button__icon":"ui-button__icon-giom6","button__spinner":"ui-button__spinner-vexVG","button__label":"ui-button__label-qiMHm","button--inert":"ui-button--inert-iUGId","button--full":"ui-button--full-CwPHR","button--loading":"ui-button--loading-O-naJ","button--xsmall":"ui-button--xsmall-MmjpU","button--pill":"ui-button--pill-VFBYN","button--small":"ui-button--small-TF9Hz","button--medium":"ui-button--medium-JDjkH","button--large":"ui-button--large-btadu","button--primary":"ui-button--primary-ym7RJ","button--accent":"ui-button--accent--hgUf","button--secondary":"ui-button--secondary-56m1d","button--outline":"ui-button--outline-ZI8sw","button--soft":"ui-button--soft-xKGjx","button--ghost":"ui-button--ghost-rijnZ","button--danger":"ui-button--danger-TNGd2","button--on-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),m=require("react"),h=require("../../helpers/class-name.helper.cjs"),k=require("../../helpers/component.helper.cjs"),v=require("../../enums/ui-size.enum.cjs"),C=require("../../enums/ui-variant.enum.cjs"),R=require("../Link/index.cjs"),$=require("../Spinner/index.cjs"),e={default:{"button":"ui-button-SRu4R","button__icon":"ui-button__icon-giom6","button__spinner":"ui-button__spinner-vexVG","button__label":"ui-button__label-qiMHm","button--inert":"ui-button--inert-iUGId","button--full":"ui-button--full-CwPHR","button--loading":"ui-button--loading-O-naJ","button--xsmall":"ui-button--xsmall-MmjpU","button--pill":"ui-button--pill-VFBYN","button--small":"ui-button--small-TF9Hz","button--medium":"ui-button--medium-JDjkH","button--large":"ui-button--large-btadu","button--primary":"ui-button--primary-ym7RJ","button--accent":"ui-button--accent--hgUf","button--secondary":"ui-button--secondary-56m1d","button--outline":"ui-button--outline-ZI8sw","button--soft":"ui-button--soft-xKGjx","button--ghost":"ui-button--ghost-rijnZ","button--danger":"ui-button--danger-TNGd2","button--on-brand":"ui-button--on-brand-lH26K"}},w=m.forwardRef(({variant:f=C.default.PRIMARY,size:_=v.default.MEDIUM,shape:x="rounded",isLoading:n,isFullWidth:p,startIcon:c,endIcon:d,className:j,children:q,disabled:i,href:a,isExternal:N,linkProps:B,testId:o,...u},M)=>{const l=!!i||!!n,r=h.cx(e.default.button,e.default[`button--${f.toLowerCase().replace("_","-")}`],e.default[`button--${_.toLowerCase()}`],x==="pill"&&e.default["button--pill"],p&&e.default["button--full"],n&&e.default["button--loading"],a&&l&&e.default["button--inert"],j),s=t.jsxs(t.Fragment,{children:[n&&t.jsx($.default,{size:"sm",className:e.default.button__spinner,label:""}),!n&&c&&t.jsx("span",{className:e.default.button__icon,children:c}),t.jsx("span",{className:e.default.button__label,children:q}),d&&t.jsx("span",{className:e.default.button__icon,children:d})]}),b={"aria-busy":n,"aria-disabled":l||void 0,tabIndex:l?-1:u.tabIndex,onClick:l?void 0:u.onClick};return a&&N?t.jsx("a",{...u,...b,href:a,className:r,target:"_blank",rel:"noopener noreferrer","data-testid":o,children:s}):a?t.jsx(R.default,{...u,...b,href:a,className:r,"data-testid":o,...B,children:s}):t.jsx("button",{ref:M,className:r,disabled:i||n,"aria-busy":n,"data-testid":o,...u,children:s})}),y=m.memo(k.named(w,"Button"));exports.default=y;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -6,7 +6,7 @@ import $ from "../../enums/ui-size.enum.js";
|
|
|
6
6
|
import h from "../../enums/ui-variant.enum.js";
|
|
7
7
|
import j from "../Link/index.js";
|
|
8
8
|
import v from "../Spinner/index.js";
|
|
9
|
-
const t = {"button":"ui-button-SRu4R","button__icon":"ui-button__icon-giom6","button__spinner":"ui-button__spinner-vexVG","button__label":"ui-button__label-qiMHm","button--inert":"ui-button--inert-iUGId","button--full":"ui-button--full-CwPHR","button--loading":"ui-button--loading-O-naJ","button--xsmall":"ui-button--xsmall-MmjpU","button--pill":"ui-button--pill-VFBYN","button--small":"ui-button--small-TF9Hz","button--medium":"ui-button--medium-JDjkH","button--large":"ui-button--large-btadu","button--primary":"ui-button--primary-ym7RJ","button--accent":"ui-button--accent--hgUf","button--secondary":"ui-button--secondary-56m1d","button--outline":"ui-button--outline-ZI8sw","button--soft":"ui-button--soft-xKGjx","button--ghost":"ui-button--ghost-rijnZ","button--danger":"ui-button--danger-TNGd2","button--on-
|
|
9
|
+
const t = {"button":"ui-button-SRu4R","button__icon":"ui-button__icon-giom6","button__spinner":"ui-button__spinner-vexVG","button__label":"ui-button__label-qiMHm","button--inert":"ui-button--inert-iUGId","button--full":"ui-button--full-CwPHR","button--loading":"ui-button--loading-O-naJ","button--xsmall":"ui-button--xsmall-MmjpU","button--pill":"ui-button--pill-VFBYN","button--small":"ui-button--small-TF9Hz","button--medium":"ui-button--medium-JDjkH","button--large":"ui-button--large-btadu","button--primary":"ui-button--primary-ym7RJ","button--accent":"ui-button--accent--hgUf","button--secondary":"ui-button--secondary-56m1d","button--outline":"ui-button--outline-ZI8sw","button--soft":"ui-button--soft-xKGjx","button--ghost":"ui-button--ghost-rijnZ","button--danger":"ui-button--danger-TNGd2","button--on-brand":"ui-button--on-brand-lH26K"};
|
|
10
10
|
const z = /* @__PURE__ */ I(
|
|
11
11
|
({
|
|
12
12
|
variant: p = h.PRIMARY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-button-SRu4R{position:relative}.ui-button-SRu4R:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max(100%,44px);height:max(100%,44px)}.ui-button-SRu4R{display:inline-flex;align-items:center;justify-content:center;gap:var(--hd-space-2);border:1px solid transparent;border-radius:var(--ui-button-radius, var(--hd-radius-sm));font-family:var(--hd-font-body);font-weight:var(--ui-button-weight, var(--hd-font-weight-semibold));line-height:1;letter-spacing:var(--ui-button-tracking, normal);white-space:var(--ui-button-wrap, nowrap);cursor:pointer;text-decoration:none;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),border-color var(--hd-duration-fast) var(--hd-ease-standard),color var(--hd-duration-fast) var(--hd-ease-standard),box-shadow var(--hd-duration-fast) var(--hd-ease-standard),transform var(--hd-duration-fast) var(--hd-ease-standard)}.ui-button-SRu4R:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-button-SRu4R:active:not(:disabled){transform:translateY(1px)}.ui-button-SRu4R:disabled{cursor:not-allowed;transform:none;box-shadow:none}@media (prefers-reduced-motion: reduce){.ui-button-SRu4R{transition:none}.ui-button-SRu4R:active:not(:disabled){transform:none}}.ui-button__icon-giom6{display:inline-flex;align-items:center;flex-shrink:0;font-size:18px}.ui-button__spinner-vexVG{display:inline-flex;align-items:center;flex-shrink:0;font-size:1.05em}.ui-button__label-qiMHm{display:inline-flex;align-items:center}.ui-button--inert-iUGId{pointer-events:none}.ui-button--full-CwPHR{width:100%}.ui-button--loading-O-naJ{cursor:progress}.ui-button--xsmall-MmjpU{padding:var(--hd-space-1) var(--hd-space-3);font-size:var(--hd-type-caption-size);min-height:28px}.ui-button--xsmall-MmjpU .ui-button__icon-giom6{font-size:14px}.ui-button--pill-VFBYN{border-radius:var(--hd-radius-pill)}.ui-button--small-TF9Hz{padding:var(--hd-space-1) var(--hd-space-3);font-size:var(--hd-type-small-size);min-height:32px}.ui-button--small-TF9Hz .ui-button__icon-giom6{font-size:16px}.ui-button--medium-JDjkH{padding:var(--hd-space-2) var(--hd-space-4);font-size:calc((var(--hd-type-small-size) + var(--hd-type-body-size)) / 2);min-height:40px}.ui-button--large-btadu{padding:var(--hd-space-3) var(--hd-space-6);font-size:var(--hd-type-body-size);min-height:48px}.ui-button--large-btadu .ui-button__icon-giom6{font-size:20px}.ui-button--primary-ym7RJ{background-color:var(--hd-primary);border-color:var(--hd-primary);color:var(--hd-on-primary)}.ui-button--primary-ym7RJ:hover:not(:disabled){background-color:var(--hd-primary-hover);border-color:var(--hd-primary-hover)}.ui-button--primary-ym7RJ:active:not(:disabled){background-color:var(--hd-primary-active);border-color:var(--hd-primary-active)}.ui-button--accent--hgUf{background-color:var(--hd-accent);border-color:var(--hd-accent);color:var(--hd-on-accent)}.ui-button--accent--hgUf:hover:not(:disabled){background-color:var(--hd-accent-hover);border-color:var(--hd-accent-hover)}.ui-button--accent--hgUf:active:not(:disabled){background-color:var(--hd-accent-active);border-color:var(--hd-accent-active)}.ui-button--secondary-56m1d{background-color:var(--hd-bg-surface);border-color:var(--hd-border-strong);color:var(--hd-text)}.ui-button--secondary-56m1d:hover:not(:disabled){border-color:var(--hd-text-3);background-color:var(--hd-bg-raised)}.ui-button--secondary-56m1d:active:not(:disabled){background-color:var(--hd-bg-inset)}.ui-button--outline-ZI8sw{background-color:transparent;border-color:var(--hd-primary);color:var(--hd-primary-text)}.ui-button--outline-ZI8sw:hover:not(:disabled){background-color:var(--hd-primary-soft)}.ui-button--outline-ZI8sw:active:not(:disabled){background-color:var(--hd-primary-soft-hover)}.ui-button--soft-xKGjx{background-color:var(--hd-bg-raised);color:var(--hd-text)}.ui-button--soft-xKGjx:hover:not(:disabled){background-color:var(--hd-bg-inset)}.ui-button--soft-xKGjx:active:not(:disabled){background-color:var(--hd-bg-inset);border-color:var(--hd-border-strong)}.ui-button--ghost-rijnZ{background-color:transparent;color:var(--hd-primary-text)}.ui-button--ghost-rijnZ:hover:not(:disabled){background-color:var(--hd-primary-soft)}.ui-button--ghost-rijnZ:active:not(:disabled){background-color:var(--hd-primary-soft-hover)}.ui-button--danger-TNGd2{background-color:var(--hd-danger-solid);border-color:var(--hd-danger-solid);color:var(--hd-danger-on-solid)}.ui-button--danger-TNGd2:hover:not(:disabled){background-color:color-mix(in oklab,var(--hd-danger-solid) 88%,black);border-color:color-mix(in oklab,var(--hd-danger-solid) 88%,black)}.ui-button--danger-TNGd2:active:not(:disabled){background-color:color-mix(in oklab,var(--hd-danger-solid) 78%,black);border-color:color-mix(in oklab,var(--hd-danger-solid) 78%,black)}.ui-button--on-
|
|
1
|
+
@layer ui{.ui-button-SRu4R{position:relative}.ui-button-SRu4R:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max(100%,44px);height:max(100%,44px)}.ui-button-SRu4R{display:inline-flex;align-items:center;justify-content:center;gap:var(--hd-space-2);border:1px solid transparent;border-radius:var(--ui-button-radius, var(--hd-radius-sm));font-family:var(--hd-font-body);font-weight:var(--ui-button-weight, var(--hd-font-weight-semibold));line-height:1;letter-spacing:var(--ui-button-tracking, normal);white-space:var(--ui-button-wrap, nowrap);cursor:pointer;text-decoration:none;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),border-color var(--hd-duration-fast) var(--hd-ease-standard),color var(--hd-duration-fast) var(--hd-ease-standard),box-shadow var(--hd-duration-fast) var(--hd-ease-standard),transform var(--hd-duration-fast) var(--hd-ease-standard)}.ui-button-SRu4R:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-button-SRu4R:active:not(:disabled){transform:translateY(1px)}.ui-button-SRu4R:disabled{cursor:not-allowed;transform:none;box-shadow:none}@media (prefers-reduced-motion: reduce){.ui-button-SRu4R{transition:none}.ui-button-SRu4R:active:not(:disabled){transform:none}}.ui-button__icon-giom6{display:inline-flex;align-items:center;flex-shrink:0;font-size:18px}.ui-button__spinner-vexVG{display:inline-flex;align-items:center;flex-shrink:0;font-size:1.05em}.ui-button__label-qiMHm{display:inline-flex;align-items:center}.ui-button--inert-iUGId{pointer-events:none}.ui-button--full-CwPHR{width:100%}.ui-button--loading-O-naJ{cursor:progress}.ui-button--xsmall-MmjpU{padding:var(--hd-space-1) var(--hd-space-3);font-size:var(--hd-type-caption-size);min-height:28px}.ui-button--xsmall-MmjpU .ui-button__icon-giom6{font-size:14px}.ui-button--pill-VFBYN{border-radius:var(--hd-radius-pill)}.ui-button--small-TF9Hz{padding:var(--hd-space-1) var(--hd-space-3);font-size:var(--hd-type-small-size);min-height:32px}.ui-button--small-TF9Hz .ui-button__icon-giom6{font-size:16px}.ui-button--medium-JDjkH{padding:var(--hd-space-2) var(--hd-space-4);font-size:calc((var(--hd-type-small-size) + var(--hd-type-body-size)) / 2);min-height:40px}.ui-button--large-btadu{padding:var(--hd-space-3) var(--hd-space-6);font-size:var(--hd-type-body-size);min-height:48px}.ui-button--large-btadu .ui-button__icon-giom6{font-size:20px}.ui-button--primary-ym7RJ{background-color:var(--hd-primary);border-color:var(--hd-primary);color:var(--hd-on-primary)}.ui-button--primary-ym7RJ:hover:not(:disabled){background-color:var(--hd-primary-hover);border-color:var(--hd-primary-hover)}.ui-button--primary-ym7RJ:active:not(:disabled){background-color:var(--hd-primary-active);border-color:var(--hd-primary-active)}.ui-button--accent--hgUf{background-color:var(--hd-accent);border-color:var(--hd-accent);color:var(--hd-on-accent)}.ui-button--accent--hgUf:hover:not(:disabled){background-color:var(--hd-accent-hover);border-color:var(--hd-accent-hover)}.ui-button--accent--hgUf:active:not(:disabled){background-color:var(--hd-accent-active);border-color:var(--hd-accent-active)}.ui-button--secondary-56m1d{background-color:var(--hd-bg-surface);border-color:var(--hd-border-strong);color:var(--hd-text)}.ui-button--secondary-56m1d:hover:not(:disabled){border-color:var(--hd-text-3);background-color:var(--hd-bg-raised)}.ui-button--secondary-56m1d:active:not(:disabled){background-color:var(--hd-bg-inset)}.ui-button--outline-ZI8sw{background-color:transparent;border-color:var(--hd-primary);color:var(--hd-primary-text)}.ui-button--outline-ZI8sw:hover:not(:disabled){background-color:var(--hd-primary-soft)}.ui-button--outline-ZI8sw:active:not(:disabled){background-color:var(--hd-primary-soft-hover)}.ui-button--soft-xKGjx{background-color:var(--hd-bg-raised);color:var(--hd-text)}.ui-button--soft-xKGjx:hover:not(:disabled){background-color:var(--hd-bg-inset)}.ui-button--soft-xKGjx:active:not(:disabled){background-color:var(--hd-bg-inset);border-color:var(--hd-border-strong)}.ui-button--ghost-rijnZ{background-color:transparent;color:var(--hd-primary-text)}.ui-button--ghost-rijnZ:hover:not(:disabled){background-color:var(--hd-primary-soft)}.ui-button--ghost-rijnZ:active:not(:disabled){background-color:var(--hd-primary-soft-hover)}.ui-button--danger-TNGd2{background-color:var(--hd-danger-solid);border-color:var(--hd-danger-solid);color:var(--hd-danger-on-solid)}.ui-button--danger-TNGd2:hover:not(:disabled){background-color:color-mix(in oklab,var(--hd-danger-solid) 88%,black);border-color:color-mix(in oklab,var(--hd-danger-solid) 88%,black)}.ui-button--danger-TNGd2:active:not(:disabled){background-color:color-mix(in oklab,var(--hd-danger-solid) 78%,black);border-color:color-mix(in oklab,var(--hd-danger-solid) 78%,black)}.ui-button--on-brand-lH26K{background-color:transparent;border-color:var(--hd-on-primary);color:var(--hd-on-primary)}.ui-button--on-brand-lH26K:hover:not(:disabled),.ui-button--on-brand-lH26K:active:not(:disabled){background-color:var(--hd-brand-surface-deep)}.ui-button--on-brand-lH26K:disabled{background-color:transparent;border-color:var(--hd-brand-surface-line);color:var(--hd-on-primary)}.ui-button-SRu4R:disabled:not(.ui-button--on-brand-lH26K){background-color:var(--hd-bg-disabled);border-color:transparent;color:var(--hd-text-disabled)}.ui-button--outline-ZI8sw:disabled:not(.ui-button--on-brand-lH26K),.ui-button--ghost-rijnZ:disabled:not(.ui-button--on-brand-lH26K){background-color:transparent}.ui-button--outline-ZI8sw:disabled:not(.ui-button--on-brand-lH26K){border-color:var(--hd-border)}:where([data-ui-brand-surface]) .ui-button--accent--hgUf:not(:disabled){box-shadow:var(--hd-brand-surface-accent-glow)}.ui-button__spinner-vexVG{border-color:color-mix(in srgb,currentColor 28%,transparent);border-top-color:currentColor;width:1.15em;height:1.15em;border-width:2px}@media (prefers-reduced-motion: reduce){.ui-button__spinner-vexVG{border-top-color:currentColor}}}
|