@staffbase/design 21.3.0 → 21.3.1

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.
@@ -1 +1 @@
1
- export { }
1
+ export {}
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.cjs","names":[],"sources":["../src/hooks/date-time/useFormatDateTime.ts","../src/hooks/date-time/useFormatRelativeTime.ts"],"sourcesContent":["import {useMemo} from 'react';\n\nimport type {LocaleArgument} from './types';\n\ntype DateStyle = Extract<Intl.DateTimeFormatOptions['dateStyle'], 'short' | 'medium' | 'long'>;\ntype TimeStyle = Extract<Intl.DateTimeFormatOptions['timeStyle'], 'short' | 'medium'>;\n\nexport const useFormatDateTime = (\n locale: LocaleArgument,\n dateStyle: DateStyle | undefined,\n timeStyle: TimeStyle | undefined,\n) => {\n return useMemo(() => new Intl.DateTimeFormat(locale, {dateStyle, timeStyle}), [locale, dateStyle, timeStyle]);\n};\n","import {useCallback, useMemo} from 'react';\n\nimport type {LocaleArgument} from './types';\n\ntype Duration = {\n years?: number;\n months?: number;\n weeks?: number;\n days?: number;\n};\n\nexport const useFormatRelativeTime = (locale: LocaleArgument) => {\n const formatter = useMemo(() => new Intl.RelativeTimeFormat(locale, {numeric: 'auto'}), [locale]);\n\n return useCallback(\n (duration: Duration) => {\n if (duration.years) {\n return formatter.format(duration.years, 'year');\n }\n if (duration.months) {\n return formatter.format(duration.months, 'month');\n }\n if (duration.weeks) {\n return formatter.format(duration.weeks, 'week');\n }\n if (duration.days) {\n return formatter.format(duration.days, 'day');\n }\n return formatter.format(0, 'day');\n },\n [formatter],\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAOA,IAAa,qBACX,QACA,WACA,cACG;CACH,QAAA,GAAA,MAAA,eAAqB,IAAI,KAAK,eAAe,QAAQ;EAAC;EAAW;CAAS,CAAC,GAAG;EAAC;EAAQ;EAAW;CAAS,CAAC;AAC9G;;;ACFA,IAAa,yBAAyB,WAA2B;CAC/D,MAAM,aAAA,GAAA,MAAA,eAA0B,IAAI,KAAK,mBAAmB,QAAQ,EAAC,SAAS,OAAM,CAAC,GAAG,CAAC,MAAM,CAAC;CAEhG,QAAA,GAAA,MAAA,cACG,aAAuB;EACtB,IAAI,SAAS,OACX,OAAO,UAAU,OAAO,SAAS,OAAO,MAAM;EAEhD,IAAI,SAAS,QACX,OAAO,UAAU,OAAO,SAAS,QAAQ,OAAO;EAElD,IAAI,SAAS,OACX,OAAO,UAAU,OAAO,SAAS,OAAO,MAAM;EAEhD,IAAI,SAAS,MACX,OAAO,UAAU,OAAO,SAAS,MAAM,KAAK;EAE9C,OAAO,UAAU,OAAO,GAAG,KAAK;CAClC,GACA,CAAC,SAAS,CACZ;AACF"}
1
+ {"version":3,"file":"hooks.cjs","names":[],"sources":["../src/hooks/date-time/useFormatDateTime.ts","../src/hooks/date-time/useFormatRelativeTime.ts"],"sourcesContent":["import {useMemo} from 'react';\n\nimport type {LocaleArgument} from './types';\n\ntype DateStyle = Extract<Intl.DateTimeFormatOptions['dateStyle'], 'short' | 'medium' | 'long'>;\ntype TimeStyle = Extract<Intl.DateTimeFormatOptions['timeStyle'], 'short' | 'medium'>;\n\nexport const useFormatDateTime = (\n locale: LocaleArgument,\n dateStyle: DateStyle | undefined,\n timeStyle: TimeStyle | undefined,\n) => {\n return useMemo(() => new Intl.DateTimeFormat(locale, {dateStyle, timeStyle}), [locale, dateStyle, timeStyle]);\n};\n","import {useCallback, useMemo} from 'react';\n\nimport type {LocaleArgument} from './types';\n\ntype Duration = {\n years?: number;\n months?: number;\n weeks?: number;\n days?: number;\n};\n\nexport const useFormatRelativeTime = (locale: LocaleArgument) => {\n const formatter = useMemo(() => new Intl.RelativeTimeFormat(locale, {numeric: 'auto'}), [locale]);\n\n return useCallback(\n (duration: Duration) => {\n if (duration.years) {\n return formatter.format(duration.years, 'year');\n }\n if (duration.months) {\n return formatter.format(duration.months, 'month');\n }\n if (duration.weeks) {\n return formatter.format(duration.weeks, 'week');\n }\n if (duration.days) {\n return formatter.format(duration.days, 'day');\n }\n return formatter.format(0, 'day');\n },\n [formatter],\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAOA,IAAa,qBACX,QACA,WACA,cACG;CACH,QAAA,GAAO,MAAA,QAAA,OAAc,IAAI,KAAK,eAAe,QAAQ;EAAC;EAAW;CAAS,CAAC,GAAG;EAAC;EAAQ;EAAW;CAAS,CAAC;AAC9G;;;ACFA,IAAa,yBAAyB,WAA2B;CAC/D,MAAM,aAAA,GAAY,MAAA,QAAA,OAAc,IAAI,KAAK,mBAAmB,QAAQ,EAAC,SAAS,OAAM,CAAC,GAAG,CAAC,MAAM,CAAC;CAEhG,QAAA,GAAO,MAAA,YAAA,EACJ,aAAuB;EACtB,IAAI,SAAS,OACX,OAAO,UAAU,OAAO,SAAS,OAAO,MAAM;EAEhD,IAAI,SAAS,QACX,OAAO,UAAU,OAAO,SAAS,QAAQ,OAAO;EAElD,IAAI,SAAS,OACX,OAAO,UAAU,OAAO,SAAS,OAAO,MAAM;EAEhD,IAAI,SAAS,MACX,OAAO,UAAU,OAAO,SAAS,MAAM,KAAK;EAE9C,OAAO,UAAU,OAAO,GAAG,KAAK;CAClC,GACA,CAAC,SAAS,CACZ;AACF"}
@@ -11,9 +11,9 @@ See the License for the specific language governing permissions and
11
11
  limitations under the License.
12
12
  */
13
13
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
14
- const require_chunk = require("./chunk-CDHmpCQf.cjs");
14
+ const require_rolldown_runtime = require("./rolldown-runtime-BpSk109Z.cjs");
15
15
  let react = require("react");
16
- react = require_chunk.__toESM(react, 1);
16
+ react = require_rolldown_runtime.__toESM(react, 1);
17
17
  let react_jsx_runtime = require("react/jsx-runtime");
18
18
  //#region src/illustrations/IllustrationAnalytics.tsx
19
19
  /**