@umodeapporg/ui 0.39.0 → 0.40.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.
@@ -8,11 +8,15 @@ interface IThemeToggleProps<TOption extends TUiThemeToggleOption = TUiThemePrefe
8
8
  /** Positions of the knob, in order. Defaults to light, system and dark; the host adds a
9
9
  skin for as long as it is on offer and drops it again when the season ends. */
10
10
  options?: ReadonlyArray<TOption>;
11
+ /** An option the host wants noticed, such as a skin that has just come into season: it glows
12
+ and pulses, and its hint invites a try, until the host stops passing it (usually once the
13
+ user has picked it). No effect on the active option. */
14
+ invitingOption?: TOption;
11
15
  }
12
16
  /**
13
17
  * The theme control: an explicit light/dark choice, `system` to follow the OS, and any skin
14
18
  * the host is offering. The host owns the preference (persistence + writing `data-theme` and
15
19
  * `data-theme-skin` on <html>); this renders the knob.
16
20
  */
17
- declare const ThemeToggle: <TOption extends TUiThemeToggleOption = TUiThemePreference>({ preference, onChange, options, }: IThemeToggleProps<TOption>) => import("react").JSX.Element;
21
+ declare const ThemeToggle: <TOption extends TUiThemeToggleOption = TUiThemePreference>({ preference, onChange, options, invitingOption, }: IThemeToggleProps<TOption>) => import("react").JSX.Element;
18
22
  export default ThemeToggle;
@@ -10,24 +10,60 @@ import PumpkinGlyph from "./PumpkinGlyph.js";
10
10
  const OPTION_SIZE_REM = HEADER_CONTROL_SIZE_REM;
11
11
  const OPTION_ICON_SIZE = 15;
12
12
  const renderSymbol = (icon) => (isActive) => /* @__PURE__ */ jsx(MaterialSymbol, { icon, size: OPTION_ICON_SIZE, fill: isActive });
13
+ const BRAND_INVITE = {
14
+ iconClassName: "text-brand-emphasis",
15
+ glowClassName: "bg-brand/25",
16
+ ringClassName: "border-brand"
17
+ };
13
18
  const OPTION_PRESENTATION = {
14
19
  light: { labelKey: "theme.light", renderIcon: renderSymbol("light_mode") },
15
20
  system: { labelKey: "theme.system", renderIcon: renderSymbol("computer") },
16
21
  dark: { labelKey: "theme.dark", renderIcon: renderSymbol("dark_mode") },
17
22
  halloween: {
18
23
  labelKey: "theme.halloween",
19
- renderIcon: (isActive) => /* @__PURE__ */ jsx(PumpkinGlyph, { size: OPTION_ICON_SIZE, filled: isActive })
24
+ renderIcon: (isActive) => /* @__PURE__ */ jsx(PumpkinGlyph, { size: OPTION_ICON_SIZE, filled: isActive }),
25
+ invite: {
26
+ iconClassName: "text-warning-emphasis",
27
+ glowClassName: "bg-warning/50",
28
+ ringClassName: "border-warning"
29
+ }
20
30
  },
21
31
  christmas: {
22
32
  labelKey: "theme.christmas",
23
- renderIcon: (isActive) => /* @__PURE__ */ jsx(ChristmasTreeGlyph, { size: OPTION_ICON_SIZE, filled: isActive })
33
+ renderIcon: (isActive) => /* @__PURE__ */ jsx(ChristmasTreeGlyph, { size: OPTION_ICON_SIZE, filled: isActive }),
34
+ invite: {
35
+ iconClassName: "text-success-emphasis",
36
+ glowClassName: "bg-warning/50",
37
+ ringClassName: "border-warning"
38
+ }
24
39
  }
25
40
  };
41
+ const INVITE_GLOW_SECONDS = 1.6;
42
+ const INVITE_RING_SECONDS = 2.4;
43
+ const INVITE_RING_DELAYS_SECONDS = [0, -INVITE_RING_SECONDS / 2];
44
+ const OptionInviteLight = ({ invite }) => /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 -z-10", children: [
45
+ /* @__PURE__ */ jsx(
46
+ "span",
47
+ {
48
+ className: classNames("absolute inset-0.5 animate-state-breathe rounded-full", invite.glowClassName),
49
+ style: { animationDuration: `${INVITE_GLOW_SECONDS}s` }
50
+ }
51
+ ),
52
+ INVITE_RING_DELAYS_SECONDS.map((delaySeconds) => /* @__PURE__ */ jsx(
53
+ "span",
54
+ {
55
+ className: classNames("absolute inset-0 animate-state-halo rounded-full border", invite.ringClassName),
56
+ style: { animationDuration: `${INVITE_RING_SECONDS}s`, animationDelay: `${delaySeconds}s` }
57
+ },
58
+ delaySeconds
59
+ ))
60
+ ] });
26
61
  const DEFAULT_OPTIONS = ["light", "system", "dark"];
27
62
  const ThemeToggle = ({
28
63
  preference,
29
64
  onChange,
30
- options
65
+ options,
66
+ invitingOption
31
67
  }) => {
32
68
  const { t } = useTranslation("ui");
33
69
  const requestedOptions = Array.isArray(options) && options.length > 0 ? options : DEFAULT_OPTIONS;
@@ -49,19 +85,26 @@ const ThemeToggle = ({
49
85
  visibleOptions.map((option) => {
50
86
  const isActive = option === preference;
51
87
  const presentation = OPTION_PRESENTATION[option];
52
- return /* @__PURE__ */ jsx(ControlledTooltip, { content: t(presentation.labelKey), children: /* @__PURE__ */ jsx(
88
+ const invite = option === invitingOption && !isActive ? presentation.invite ?? BRAND_INVITE : null;
89
+ const label = t(presentation.labelKey);
90
+ return /* @__PURE__ */ jsx(ControlledTooltip, { content: invite ? t("theme.invite", { theme: label }) : label, children: /* @__PURE__ */ jsxs(
53
91
  ControlledButton,
54
92
  {
55
- "aria-label": t(presentation.labelKey),
93
+ "aria-label": label,
56
94
  defaultHtmlButton: true,
57
95
  "aria-pressed": isActive,
58
96
  onClick: () => onChange(option),
59
97
  className: classNames(
60
98
  "relative z-10 flex shrink-0 items-center justify-center rounded-full leading-none transition-colors duration-base",
61
- isActive ? "text-brand-emphasis" : "text-foreground-subtle hover:text-foreground-muted"
99
+ isActive && "text-brand-emphasis",
100
+ invite?.iconClassName,
101
+ !isActive && !invite && "text-foreground-subtle hover:text-foreground-muted"
62
102
  ),
63
103
  style: { width: `${OPTION_SIZE_REM}rem`, height: `${OPTION_SIZE_REM}rem` },
64
- children: presentation.renderIcon(isActive)
104
+ children: [
105
+ invite && /* @__PURE__ */ jsx(OptionInviteLight, { invite }),
106
+ presentation.renderIcon(isActive)
107
+ ]
65
108
  }
66
109
  ) }, option);
67
110
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeToggle.js","sources":["../../../src/components/Shell/ThemeToggle.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport classNames from 'classnames';\nimport { useTranslation } from 'react-i18next';\n\nimport ControlledButton from '@/components/Form/ControlledButton';\nimport ControlledTooltip from '@/components/UI/ControlledTooltip';\nimport { MaterialSymbol, SymbolCodepoints } from '@/components/UI/MaterialSymbol';\nimport { TUiThemeSkin } from '@/helpers/themeSkins';\n\nimport ChristmasTreeGlyph from './ChristmasTreeGlyph';\nimport { HEADER_CONTROL_SHELL_CLASS, HEADER_CONTROL_SIZE_REM } from './headerControlStyles';\nimport PumpkinGlyph from './PumpkinGlyph';\n\nconst OPTION_SIZE_REM = HEADER_CONTROL_SIZE_REM;\nconst OPTION_ICON_SIZE = 15;\n\nexport type TUiThemePreference = 'light' | 'system' | 'dark';\n\n/** A skin is one more position of the knob: choosing it is choosing its scheme, re-coloured. */\nexport type TUiThemeToggleOption = TUiThemePreference | TUiThemeSkin;\n\ninterface IOptionPresentation {\n labelKey: string;\n renderIcon: (isActive: boolean) => ReactNode;\n}\n\nconst renderSymbol = (icon: SymbolCodepoints) => (isActive: boolean) => (\n <MaterialSymbol icon={icon} size={OPTION_ICON_SIZE} fill={isActive} />\n);\n\nconst OPTION_PRESENTATION: Record<TUiThemeToggleOption, IOptionPresentation> = {\n light: { labelKey: 'theme.light', renderIcon: renderSymbol('light_mode') },\n system: { labelKey: 'theme.system', renderIcon: renderSymbol('computer') },\n dark: { labelKey: 'theme.dark', renderIcon: renderSymbol('dark_mode') },\n halloween: {\n labelKey: 'theme.halloween',\n renderIcon: (isActive) => <PumpkinGlyph size={OPTION_ICON_SIZE} filled={isActive} />,\n },\n christmas: {\n labelKey: 'theme.christmas',\n renderIcon: (isActive) => <ChristmasTreeGlyph size={OPTION_ICON_SIZE} filled={isActive} />,\n },\n};\n\nconst DEFAULT_OPTIONS: ReadonlyArray<TUiThemePreference> = ['light', 'system', 'dark'];\n\ninterface IThemeToggleProps<TOption extends TUiThemeToggleOption = TUiThemePreference> {\n preference: TOption;\n onChange: (preference: TOption) => void;\n /** Positions of the knob, in order. Defaults to light, system and dark; the host adds a\n skin for as long as it is on offer and drops it again when the season ends. */\n options?: ReadonlyArray<TOption>;\n}\n\n/**\n * The theme control: an explicit light/dark choice, `system` to follow the OS, and any skin\n * the host is offering. The host owns the preference (persistence + writing `data-theme` and\n * `data-theme-skin` on <html>); this renders the knob.\n */\nconst ThemeToggle = <TOption extends TUiThemeToggleOption = TUiThemePreference>({\n preference,\n onChange,\n options,\n}: IThemeToggleProps<TOption>) => {\n const { t } = useTranslation('ui');\n\n const requestedOptions = (\n Array.isArray(options) && options.length > 0 ? options : DEFAULT_OPTIONS\n ) as ReadonlyArray<TOption>;\n const visibleOptions = requestedOptions.filter((option) => Boolean(OPTION_PRESENTATION[option]));\n const activeIndex = visibleOptions.indexOf(preference);\n\n return (\n <div role=\"group\" aria-label={t('theme.toggle')} className={HEADER_CONTROL_SHELL_CLASS}>\n <div className=\"relative flex items-center\">\n {activeIndex >= 0 && (\n <div\n aria-hidden\n className=\"pointer-events-none absolute left-0 top-0 rounded-full bg-surface shadow-elevation1 ring-1 ring-border transition-transform duration-base ease-enter\"\n style={{\n width: `${OPTION_SIZE_REM}rem`,\n height: `${OPTION_SIZE_REM}rem`,\n transform: `translateX(${activeIndex * OPTION_SIZE_REM}rem)`,\n }}\n />\n )}\n\n {visibleOptions.map((option) => {\n const isActive = option === preference;\n const presentation = OPTION_PRESENTATION[option];\n\n return (\n <ControlledTooltip key={option} content={t(presentation.labelKey)}>\n <ControlledButton\n aria-label={t(presentation.labelKey)}\n defaultHtmlButton\n aria-pressed={isActive}\n onClick={() => onChange(option)}\n className={classNames(\n 'relative z-10 flex shrink-0 items-center justify-center rounded-full leading-none transition-colors duration-base',\n isActive ? 'text-brand-emphasis' : 'text-foreground-subtle hover:text-foreground-muted',\n )}\n style={{ width: `${OPTION_SIZE_REM}rem`, height: `${OPTION_SIZE_REM}rem` }}\n >\n {presentation.renderIcon(isActive)}\n </ControlledButton>\n </ControlledTooltip>\n );\n })}\n </div>\n </div>\n );\n};\n\nexport default ThemeToggle;\n"],"names":[],"mappings":";;;;;;;;;AAa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,eAAe;AAAA,UAC1B,WAAW,cAAc,cAAc,eAAe;AAAA,QAAA;AAAA,MACxD;AAAA,IAAA;AAAA,IAIH,eAAe,IAAI,CAAC,WAAW;AAC9B,YAAM,WAAW,WAAW;AAC5B,YAAM,eAAe,oBAAoB,MAAM;AAE/C,iCACG,mBAAA,EAA+B,SAAS,EAAE,aAAa,QAAQ,GAC9D,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAY,EAAE,aAAa,QAAQ;AAAA,UACnC,mBAAiB;AAAA,UACjB,gBAAc;AAAA,UACd,SAAS,MAAM,SAAS,MAAM;AAAA,UAC9B,WAAW;AAAA,YACT;AAAA,YACA,WAAW,wBAAwB;AAAA,UAAA;AAAA,UAErC,OAAO,EAAE,OAAO,GAAG,eAAe,OAAO,QAAQ,GAAG,eAAe,MAAA;AAAA,UAElE,UAAA,aAAa,WAAW,QAAQ;AAAA,QAAA;AAAA,MAAA,KAZb,MAcxB;AAAA,IAEJ,CAAC;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"ThemeToggle.js","sources":["../../../src/components/Shell/ThemeToggle.tsx"],"sourcesContent":["import { ReactNode } from 'react';\nimport classNames from 'classnames';\nimport { useTranslation } from 'react-i18next';\n\nimport ControlledButton from '@/components/Form/ControlledButton';\nimport ControlledTooltip from '@/components/UI/ControlledTooltip';\nimport { MaterialSymbol, SymbolCodepoints } from '@/components/UI/MaterialSymbol';\nimport { TUiThemeSkin } from '@/helpers/themeSkins';\n\nimport ChristmasTreeGlyph from './ChristmasTreeGlyph';\nimport { HEADER_CONTROL_SHELL_CLASS, HEADER_CONTROL_SIZE_REM } from './headerControlStyles';\nimport PumpkinGlyph from './PumpkinGlyph';\n\nconst OPTION_SIZE_REM = HEADER_CONTROL_SIZE_REM;\nconst OPTION_ICON_SIZE = 15;\n\nexport type TUiThemePreference = 'light' | 'system' | 'dark';\n\n/** A skin is one more position of the knob: choosing it is choosing its scheme, re-coloured. */\nexport type TUiThemeToggleOption = TUiThemePreference | TUiThemeSkin;\n\ninterface IOptionInvite {\n iconClassName: string;\n glowClassName: string;\n ringClassName: string;\n}\n\ninterface IOptionPresentation {\n labelKey: string;\n renderIcon: (isActive: boolean) => ReactNode;\n /** Ink and light of the option while the host invites a try (`invitingOption`). */\n invite?: IOptionInvite;\n}\n\nconst renderSymbol = (icon: SymbolCodepoints) => (isActive: boolean) => (\n <MaterialSymbol icon={icon} size={OPTION_ICON_SIZE} fill={isActive} />\n);\n\nconst BRAND_INVITE: IOptionInvite = {\n iconClassName: 'text-brand-emphasis',\n glowClassName: 'bg-brand/25',\n ringClassName: 'border-brand',\n};\n\n/* A skin invites in its own season's colours, read from the tokens of whatever scheme is\n painted (the skin is not on yet while it is being offered): a green tree under a gold\n twinkle, an orange pumpkin under an orange glow. The `-emphasis` ink keeps the icon above\n 3:1 on the muted shell in both schemes. */\nconst OPTION_PRESENTATION: Record<TUiThemeToggleOption, IOptionPresentation> = {\n light: { labelKey: 'theme.light', renderIcon: renderSymbol('light_mode') },\n system: { labelKey: 'theme.system', renderIcon: renderSymbol('computer') },\n dark: { labelKey: 'theme.dark', renderIcon: renderSymbol('dark_mode') },\n halloween: {\n labelKey: 'theme.halloween',\n renderIcon: (isActive) => <PumpkinGlyph size={OPTION_ICON_SIZE} filled={isActive} />,\n invite: {\n iconClassName: 'text-warning-emphasis',\n glowClassName: 'bg-warning/50',\n ringClassName: 'border-warning',\n },\n },\n christmas: {\n labelKey: 'theme.christmas',\n renderIcon: (isActive) => <ChristmasTreeGlyph size={OPTION_ICON_SIZE} filled={isActive} />,\n invite: {\n iconClassName: 'text-success-emphasis',\n glowClassName: 'bg-warning/50',\n ringClassName: 'border-warning',\n },\n },\n};\n\nconst INVITE_GLOW_SECONDS = 1.6;\nconst INVITE_RING_SECONDS = 2.4;\nconst INVITE_RING_DELAYS_SECONDS: ReadonlyArray<number> = [0, -INVITE_RING_SECONDS / 2];\n\n/* A glow breathing under the icon and two sonar rings half a beat apart: slow enough to stay\n far below three flashes per second, steady enough to be noticed in a busy header. It sits at\n -z-10 inside the button's own stacking context, so it lights the icon from behind and never\n covers it. */\ninterface IOptionInviteLightProps {\n invite: IOptionInvite;\n}\n\nconst OptionInviteLight: React.FC<IOptionInviteLightProps> = ({ invite }) => (\n <span aria-hidden className=\"pointer-events-none absolute inset-0 -z-10\">\n <span\n className={classNames('absolute inset-0.5 animate-state-breathe rounded-full', invite.glowClassName)}\n style={{ animationDuration: `${INVITE_GLOW_SECONDS}s` }}\n />\n {INVITE_RING_DELAYS_SECONDS.map((delaySeconds) => (\n <span\n key={delaySeconds}\n className={classNames('absolute inset-0 animate-state-halo rounded-full border', invite.ringClassName)}\n style={{ animationDuration: `${INVITE_RING_SECONDS}s`, animationDelay: `${delaySeconds}s` }}\n />\n ))}\n </span>\n);\n\nconst DEFAULT_OPTIONS: ReadonlyArray<TUiThemePreference> = ['light', 'system', 'dark'];\n\ninterface IThemeToggleProps<TOption extends TUiThemeToggleOption = TUiThemePreference> {\n preference: TOption;\n onChange: (preference: TOption) => void;\n /** Positions of the knob, in order. Defaults to light, system and dark; the host adds a\n skin for as long as it is on offer and drops it again when the season ends. */\n options?: ReadonlyArray<TOption>;\n /** An option the host wants noticed, such as a skin that has just come into season: it glows\n and pulses, and its hint invites a try, until the host stops passing it (usually once the\n user has picked it). No effect on the active option. */\n invitingOption?: TOption;\n}\n\n/**\n * The theme control: an explicit light/dark choice, `system` to follow the OS, and any skin\n * the host is offering. The host owns the preference (persistence + writing `data-theme` and\n * `data-theme-skin` on <html>); this renders the knob.\n */\nconst ThemeToggle = <TOption extends TUiThemeToggleOption = TUiThemePreference>({\n preference,\n onChange,\n options,\n invitingOption,\n}: IThemeToggleProps<TOption>) => {\n const { t } = useTranslation('ui');\n\n const requestedOptions = (\n Array.isArray(options) && options.length > 0 ? options : DEFAULT_OPTIONS\n ) as ReadonlyArray<TOption>;\n const visibleOptions = requestedOptions.filter((option) => Boolean(OPTION_PRESENTATION[option]));\n const activeIndex = visibleOptions.indexOf(preference);\n\n return (\n <div role=\"group\" aria-label={t('theme.toggle')} className={HEADER_CONTROL_SHELL_CLASS}>\n <div className=\"relative flex items-center\">\n {activeIndex >= 0 && (\n <div\n aria-hidden\n className=\"pointer-events-none absolute left-0 top-0 rounded-full bg-surface shadow-elevation1 ring-1 ring-border transition-transform duration-base ease-enter\"\n style={{\n width: `${OPTION_SIZE_REM}rem`,\n height: `${OPTION_SIZE_REM}rem`,\n transform: `translateX(${activeIndex * OPTION_SIZE_REM}rem)`,\n }}\n />\n )}\n\n {visibleOptions.map((option) => {\n const isActive = option === preference;\n const presentation = OPTION_PRESENTATION[option];\n const invite = option === invitingOption && !isActive ? (presentation.invite ?? BRAND_INVITE) : null;\n const label = t(presentation.labelKey);\n\n return (\n <ControlledTooltip key={option} content={invite ? t('theme.invite', { theme: label }) : label}>\n <ControlledButton\n aria-label={label}\n defaultHtmlButton\n aria-pressed={isActive}\n onClick={() => onChange(option)}\n className={classNames(\n 'relative z-10 flex shrink-0 items-center justify-center rounded-full leading-none transition-colors duration-base',\n isActive && 'text-brand-emphasis',\n invite?.iconClassName,\n !isActive && !invite && 'text-foreground-subtle hover:text-foreground-muted',\n )}\n style={{ width: `${OPTION_SIZE_REM}rem`, height: `${OPTION_SIZE_REM}rem` }}\n >\n {invite && <OptionInviteLight invite={invite} />}\n {presentation.renderIcon(isActive)}\n </ControlledButton>\n </ControlledTooltip>\n );\n })}\n </div>\n </div>\n );\n};\n\nexport default ThemeToggle;\n"],"names":[],"mappings":";;;;;;;;;AAaA,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;AAoBzB,MAAM,eAAe,CAAC,SAA2B,CAAC,aAChD,oBAAC,gBAAA,EAAe,MAAY,MAAM,kBAAkB,MAAM,SAAA,CAAU;AAGtE,MAAM,eAA8B;AAAA,EAClC,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AACjB;AAMA,MAAM,sBAAyE;AAAA,EAC7E,OAAO,EAAE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GAAG,eAAe,MAAA;AAAA,UAElE,UAAA;AAAA,YAAA,UAAU,oBAAC,qBAAkB,OAAA,CAAgB;AAAA,YAC7C,aAAa,WAAW,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,KAfb,MAiBxB;AAAA,IAEJ,CAAC;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;"}
@@ -645,7 +645,8 @@ declare const _default: {
645
645
  "dark": "Dark theme",
646
646
  "system": "Follow system",
647
647
  "halloween": "Halloween theme",
648
- "christmas": "Christmas theme"
648
+ "christmas": "Christmas theme",
649
+ "invite": "Try it: {{theme}}"
649
650
  },
650
651
  "toast": {
651
652
  "learnMore": "Learn more"
@@ -29,7 +29,7 @@ const pagination = { "resultsPerPage": "Results per page", "pageOf": "Page {{cur
29
29
  const permissions = { "deniedAction": "This action is not open to your profile. An account administrator can grant access.", "deniedRequest": "This action is not open to your user profile.", "checkingAccess": "Checking permissions...", "deniedPage": { "resource": "Page: {{resource}}", "backToHome": "Back to start", "nextStepsTitle": "What to do now", "service": { "title": "This module is not part of your account", "message": "The module behind this page is not among the services your account has, so no user in it can open the page.", "nextStep": "Talk to whoever owns the account at uMode to add this module. Everything else you already use keeps working." }, "capability": { "title": "This page is not open to you yet", "message": "Your account has this page, but your user profile does not include permission to open it yet.", "nextStep": "An account administrator can grant it in Settings, Access Control, under your user profile. It takes seconds and applies from your next visit." }, "request": { "title": "This page needs a permission you do not have yet", "message": "You got this far, but while loading this screen we found that your user profile does not have access to its information.", "nextStep": "An account administrator can grant it in Settings, Access Control. If access was just granted, use Try again. None of your work was affected." } } };
30
30
  const requestErrors = { "denied": { "title": "This area is not open to you yet", "description": "Your user profile does not include access to this content. An account administrator can grant it in Settings, Access Control." }, "notFound": { "title": "We could not find this item", "description": "It may have been deleted by someone on the team, or the link that brought you here is out of date." }, "offline": { "title": "The connection seems to have dropped", "description": "Check your connection and try again in a few seconds. Nothing you had already saved was lost." }, "server": { "title": "Something is unstable on our side", "description": "The problem is on our end, not something you did. Try again in a moment; if it keeps happening, contact support." }, "unknown": { "title": "We could not load this part", "description": "This is usually temporary. Try again and, if it stays like this, contact support and tell them what you were doing." } };
31
31
  const sidebar = { "home": "Home", "logout": "Sign out", "openSidebar": "Open sidebar", "collapseSidebar": "Collapse sidebar", "favorites": { "add": "Add to favorites", "remove": "Remove from favorites" }, "sections": { "favorites": "Favorites", "management": "Management", "registration": "Records" } };
32
- const theme = { "toggle": "Theme", "light": "Light theme", "dark": "Dark theme", "system": "Follow system", "halloween": "Halloween theme", "christmas": "Christmas theme" };
32
+ const theme = { "toggle": "Theme", "light": "Light theme", "dark": "Dark theme", "system": "Follow system", "halloween": "Halloween theme", "christmas": "Christmas theme", "invite": "Try it: {{theme}}" };
33
33
  const toast = { "learnMore": "Learn more" };
34
34
  const unifiedSearchBar = { "clearFilter": "Clear filter" };
35
35
  const uploader = { "dragOr": "Drag or", "selectFile": "select a file", "orPaste": "or paste (Ctrl+V)", "allowedFormats": "Allowed formats:", "upTo": "up to", "megabytesSuffix": "MB", "sendFiles": "Send file(s)", "filesIgnoredMaxSize": "Some files were ignored because they exceeded the maximum size of {{size}}MB", "invalidFormat": "Please add files in the allowed formats", "allowedFormatsTooltip": "Allowed formats: {{formats}} up to {{size}}MB", "anyFormatUpTo": "Any format up to {{size}} MB", "filesBlocked": "This file type is not accepted: {{files}}.", "filesOverMaxSize": "Over the {{size}} MB limit: {{files}}." };
@@ -648,6 +648,7 @@ export declare const uiLocales: {
648
648
  system: string;
649
649
  halloween: string;
650
650
  christmas: string;
651
+ invite: string;
651
652
  };
652
653
  toast: {
653
654
  learnMore: string;
@@ -1342,6 +1343,7 @@ export declare const uiLocales: {
1342
1343
  system: string;
1343
1344
  halloween: string;
1344
1345
  christmas: string;
1346
+ invite: string;
1345
1347
  };
1346
1348
  toast: {
1347
1349
  learnMore: string;
@@ -645,7 +645,8 @@ declare const _default: {
645
645
  "dark": "Tema escuro",
646
646
  "system": "Seguir o sistema",
647
647
  "halloween": "Tema de Halloween",
648
- "christmas": "Tema de Natal"
648
+ "christmas": "Tema de Natal",
649
+ "invite": "Experimente: {{theme}}"
649
650
  },
650
651
  "toast": {
651
652
  "learnMore": "Saiba Mais"
@@ -29,7 +29,7 @@ const pagination = { "resultsPerPage": "Resultados por página", "pageOf": "Pág
29
29
  const permissions = { "deniedAction": "Esta ação não está liberada para o seu perfil. Um administrador da conta pode liberar o acesso.", "deniedRequest": "Esta ação não está liberada para o seu perfil de usuário.", "checkingAccess": "Verificando permissões...", "deniedPage": { "resource": "Página: {{resource}}", "backToHome": "Voltar para o início", "nextStepsTitle": "O que fazer agora", "service": { "title": "Este módulo não faz parte da sua conta", "message": "O módulo que abre esta página ainda não está entre os serviços contratados pela sua conta, então ele não pode ser aberto por nenhum usuário dela.", "nextStep": "Fale com a pessoa responsável pela conta na uMode para incluir este módulo. Enquanto isso, o restante do que você já usa segue funcionando normalmente." }, "capability": { "title": "Esta página ainda não está liberada para você", "message": "A sua conta tem esta página, mas o seu perfil de usuário ainda não inclui a permissão para abri-la.", "nextStep": "Um administrador da conta pode liberar em Configurações, Controle de Acesso, escolhendo o seu perfil de usuário. Leva alguns segundos e vale a partir do próximo acesso." }, "request": { "title": "Esta página precisa de uma permissão que você ainda não tem", "message": "Você chegou até aqui, mas ao buscar as informações desta tela percebemos que o seu perfil de usuário não tem acesso a elas.", "nextStep": "Um administrador da conta pode liberar em Configurações, Controle de Acesso. Se o acesso acabou de ser concedido, use Tentar novamente. Nada do seu trabalho foi afetado." } } };
30
30
  const requestErrors = { "denied": { "title": "Esta área ainda não está liberada para você", "description": "Seu perfil de usuário não inclui o acesso a este conteúdo. Um administrador da conta pode liberar em Configurações, Controle de Acesso." }, "notFound": { "title": "Não encontramos este item", "description": "Ele pode ter sido excluído por alguém da equipe, ou o link usado para chegar até aqui está desatualizado." }, "offline": { "title": "Parece que a conexão caiu", "description": "Confira sua conexão e tente de novo em alguns segundos. Nada do que já foi salvo se perdeu." }, "server": { "title": "Estamos com uma instabilidade", "description": "O problema é aqui do nosso lado, não em algo que você fez. Tente de novo em alguns instantes; se continuar, fale com o suporte." }, "unknown": { "title": "Não conseguimos carregar esta parte", "description": "Isso costuma ser passageiro. Tente de novo e, se continuar assim, fale com o suporte contando o que você estava fazendo." } };
31
31
  const sidebar = { "home": "Início", "logout": "Sair", "openSidebar": "Abrir barra lateral", "collapseSidebar": "Recolher barra lateral", "favorites": { "add": "Adicionar aos favoritos", "remove": "Remover dos favoritos" }, "sections": { "favorites": "Favoritos", "management": "Gestão", "registration": "Cadastros" } };
32
- const theme = { "toggle": "Tema", "light": "Tema claro", "dark": "Tema escuro", "system": "Seguir o sistema", "halloween": "Tema de Halloween", "christmas": "Tema de Natal" };
32
+ const theme = { "toggle": "Tema", "light": "Tema claro", "dark": "Tema escuro", "system": "Seguir o sistema", "halloween": "Tema de Halloween", "christmas": "Tema de Natal", "invite": "Experimente: {{theme}}" };
33
33
  const toast = { "learnMore": "Saiba Mais" };
34
34
  const unifiedSearchBar = { "clearFilter": "Limpar Filtro" };
35
35
  const uploader = { "dragOr": "Arraste ou", "selectFile": "selecione um arquivo", "orPaste": "ou cole (Ctrl+V)", "allowedFormats": "Formatos permitidos:", "upTo": "até", "megabytesSuffix": "MB", "sendFiles": "Enviar arquivo(s)", "filesIgnoredMaxSize": "Alguns arquivos foram ignorados porque excederam o tamanho máximo de {{size}}MB", "invalidFormat": "Por favor, insira arquivos nos formatos permitidos", "allowedFormatsTooltip": "Formatos permitidos: {{formats}} até {{size}}MB", "anyFormatUpTo": "Qualquer formato até {{size}} MB", "filesBlocked": "Este tipo de arquivo não é aceito: {{files}}.", "filesOverMaxSize": "Passou do limite de {{size}} MB: {{files}}." };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umodeapporg/ui",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "sideEffects": [