rei-kit 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css CHANGED
@@ -832,6 +832,160 @@ to {
832
832
  inherits: false
833
833
  }
834
834
 
835
+ /* A line height of its own, so a column is exactly one digit tall without
836
+ depending on `lh` units or on whatever line height the parent set. */
837
+ .rk-ticker[data-v-e2db153c] {
838
+ display: inline-flex;
839
+ line-height: 1.15;
840
+ font-variant-numeric: tabular-nums;
841
+ }
842
+ .rk-ticker-track[data-v-e2db153c] {
843
+ display: inline-flex;
844
+ white-space: pre;
845
+ }
846
+ .rk-ticker-digit[data-v-e2db153c] {
847
+ display: inline-block;
848
+ height: 1.15em;
849
+ overflow: hidden;
850
+ }
851
+
852
+ /* Twice the slowest token: a roll is read, not glanced at. The small delay
853
+ per column, units first, is what makes it feel mechanical rather than
854
+ swapped. Both are tokens, so reduced motion takes them to zero. */
855
+ .rk-ticker-strip[data-v-e2db153c] {
856
+ display: flex;
857
+ flex-direction: column;
858
+ transition: transform calc(var(--duration-slower) * 2) var(--ease-standard);
859
+ transition-delay: calc(var(--duration-fast) / 5 * (var(--rk-ticker-order) - 1));
860
+ }
861
+ .rk-ticker-strip > span[data-v-e2db153c] {
862
+ height: 1.15em;
863
+ }
864
+
865
+ /* Tabular figures, so the number does not shake sideways as it counts. */
866
+ .rk-count[data-v-3cefce6f] {
867
+ font-variant-numeric: tabular-nums;
868
+ }
869
+
870
+ .rk-rotate[data-v-2ca5182f] {
871
+ display: inline-block;
872
+ vertical-align: bottom;
873
+ }
874
+ .rk-rotate-word[data-v-2ca5182f] {
875
+ display: inline-block;
876
+ }
877
+ .rk-rotate-enter-active[data-v-2ca5182f],
878
+ .rk-rotate-leave-active[data-v-2ca5182f] {
879
+ transition:
880
+ opacity var(--duration-base) var(--ease-standard),
881
+ transform var(--duration-base) var(--ease-standard),
882
+ filter var(--duration-base) var(--ease-standard);
883
+ }
884
+ .rk-rotate-enter-from[data-v-2ca5182f] {
885
+ opacity: 0;
886
+ transform: translateY(40%);
887
+ filter: blur(4px);
888
+ }
889
+ .rk-rotate-leave-to[data-v-2ca5182f] {
890
+ opacity: 0;
891
+ transform: translateY(-40%);
892
+ filter: blur(4px);
893
+ }
894
+
895
+ .rk-type[data-v-05f176ab] {
896
+ white-space: pre-wrap;
897
+ }
898
+
899
+ /* A bar the height of the text, in its colour. */
900
+ .rk-type-cursor[data-v-05f176ab] {
901
+ display: inline-block;
902
+ width: 0.08em;
903
+ height: 1em;
904
+ margin-left: 0.06em;
905
+ vertical-align: -0.12em;
906
+ background: currentColor;
907
+ animation: rk-type-blink-05f176ab 1s steps(1) infinite;
908
+ }
909
+ @keyframes rk-type-blink-05f176ab {
910
+ 50% {
911
+ opacity: 0;
912
+ }
913
+ }
914
+ @media (prefers-reduced-motion: reduce) {
915
+ .rk-type-cursor[data-v-05f176ab] {
916
+ animation: none;
917
+ }
918
+ }
919
+
920
+ .rk-reveal[data-v-c8b25508] {
921
+ transition:
922
+ opacity var(--duration-slower) var(--ease-standard),
923
+ transform var(--duration-slower) var(--ease-standard);
924
+ transition-delay: var(--rk-reveal-delay);
925
+ }
926
+
927
+ /* Hiding is instant; only arriving is animated. Otherwise an item leaving the
928
+ screen would fade out where nobody is looking and waste the frames. */
929
+ .rk-reveal.is-hidden[data-v-c8b25508] {
930
+ opacity: 0;
931
+ transition-duration: 0s;
932
+ transition-delay: 0s;
933
+ }
934
+ .rk-reveal-rise.is-hidden[data-v-c8b25508] {
935
+ transform: translateY(1rem);
936
+ }
937
+ .rk-reveal-scale.is-hidden[data-v-c8b25508] {
938
+ transform: scale(0.96);
939
+ }
940
+
941
+ .rk-marquee[data-v-9a25b43d] {
942
+ display: flex;
943
+ overflow: hidden;
944
+ }
945
+ .rk-marquee.is-faded[data-v-9a25b43d] {
946
+ mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
947
+ }
948
+ .rk-marquee-track[data-v-9a25b43d] {
949
+ display: flex;
950
+ width: max-content;
951
+ animation: rk-marquee-9a25b43d var(--rk-marquee-duration) linear infinite;
952
+ }
953
+ .rk-marquee.is-reverse .rk-marquee-track[data-v-9a25b43d] {
954
+ animation-direction: reverse;
955
+ }
956
+ .rk-marquee.is-paused .rk-marquee-track[data-v-9a25b43d],
957
+ .rk-marquee:hover .rk-marquee-track[data-v-9a25b43d],
958
+ .rk-marquee:focus-within .rk-marquee-track[data-v-9a25b43d] {
959
+ animation-play-state: paused;
960
+ }
961
+
962
+ /* Each group ends in the gap, so moving by exactly half the track lands the
963
+ second copy where the first began. */
964
+ .rk-marquee-group[data-v-9a25b43d] {
965
+ display: flex;
966
+ flex-shrink: 0;
967
+ align-items: center;
968
+ gap: var(--rk-marquee-gap);
969
+ padding-inline-end: var(--rk-marquee-gap);
970
+ }
971
+ @keyframes rk-marquee-9a25b43d {
972
+ to {
973
+ transform: translateX(-50%);
974
+ }
975
+ }
976
+ @media (prefers-reduced-motion: reduce) {
977
+ .rk-marquee[data-v-9a25b43d] {
978
+ overflow-x: auto;
979
+ mask-image: none;
980
+ }
981
+ .rk-marquee-track[data-v-9a25b43d] {
982
+ animation: none;
983
+ }
984
+ .rk-marquee-group[aria-hidden='true'][data-v-9a25b43d] {
985
+ display: none;
986
+ }
987
+ }
988
+
835
989
  .install-enter-active[data-v-552a4ac9],
836
990
  .install-leave-active[data-v-552a4ac9] {
837
991
  transition:
@@ -1237,32 +1391,32 @@ to {
1237
1391
  color: var(--color-ink-soft);
1238
1392
  }
1239
1393
 
1240
- .rk-tabs[data-v-2a18b30e] {
1394
+ .rk-tabs[data-v-8135ecab] {
1241
1395
  display: flex;
1242
1396
  align-items: center;
1243
1397
  gap: 0.25rem;
1244
1398
  border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);
1245
1399
  }
1246
- .rk-tab[data-v-2a18b30e] {
1400
+ .rk-tab[data-v-8135ecab] {
1247
1401
  position: relative;
1248
1402
  padding: 0.625rem 0.875rem;
1249
1403
  font-size: 0.875rem;
1250
1404
  color: var(--color-ink-soft);
1251
1405
  transition: color var(--duration-fast);
1252
1406
  }
1253
- .rk-tab[data-v-2a18b30e]:hover {
1407
+ .rk-tab[data-v-8135ecab]:hover {
1254
1408
  color: var(--color-ink);
1255
1409
  }
1256
- .rk-tab[data-v-2a18b30e]:focus-visible {
1410
+ .rk-tab[data-v-8135ecab]:focus-visible {
1257
1411
  outline: 2px solid var(--color-primary);
1258
1412
  outline-offset: -2px;
1259
1413
  border-radius: var(--radius-cell);
1260
1414
  }
1261
- .rk-tab.is-active[data-v-2a18b30e] {
1415
+ .rk-tab.is-active[data-v-8135ecab] {
1262
1416
  color: var(--color-ink);
1263
1417
  font-weight: 500;
1264
1418
  }
1265
- .rk-tab.is-active[data-v-2a18b30e]::after {
1419
+ .rk-tab.is-active[data-v-8135ecab]::after {
1266
1420
  content: '';
1267
1421
  position: absolute;
1268
1422
  inset-inline: 0.5rem;
@@ -1271,10 +1425,10 @@ to {
1271
1425
  border-radius: 9999px;
1272
1426
  background: var(--color-primary);
1273
1427
  }
1274
- .rk-tabpanel[data-v-2a18b30e] {
1428
+ .rk-tabpanel[data-v-8135ecab] {
1275
1429
  padding-top: 1rem;
1276
1430
  }
1277
- .rk-tabpanel[data-v-2a18b30e]:focus-visible {
1431
+ .rk-tabpanel[data-v-8135ecab]:focus-visible {
1278
1432
  outline: 2px solid var(--color-primary);
1279
1433
  outline-offset: 2px;
1280
1434
  }
@@ -22,3 +22,19 @@ export declare function setFormatLocale(next: string): void;
22
22
  * ```
23
23
  */
24
24
  export declare function formatDate(date: Date, options: Intl.DateTimeFormatOptions): string;
25
+ /**
26
+ * Formats a number in the active locale, or in `tag` when one is given.
27
+ *
28
+ * The same cache and the same locale as `formatDate`, so a counter and the
29
+ * date beside it change language together.
30
+ *
31
+ * @param value - Number to format.
32
+ * @param options - Passed straight to `Intl.NumberFormat`: currency, percent, decimals.
33
+ * @param tag - A BCP 47 tag that overrides the active locale for this call.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * formatNumber(48200, { style: 'currency', currency: 'JPY' }) // '¥48,200'
38
+ * ```
39
+ */
40
+ export declare function formatNumber(value: number, options?: Intl.NumberFormatOptions, tag?: string): string;
package/dist/web.css ADDED
@@ -0,0 +1,28 @@
1
+ /* rei-kit, everything, for a wide site: a column with gutters and a page fade.
2
+ *
3
+ * @import 'tailwindcss';
4
+ * @import 'rei-kit/web.css';
5
+ *
6
+ * Two lines instead of seven, and the seven had a trap in them: Tailwind only
7
+ * builds classes it has seen, and it never looks in node_modules on its own,
8
+ * so every app had to write an `@source` with the right number of `../` for
9
+ * wherever its stylesheet happened to sit. Get it wrong and nothing fails —
10
+ * the components mount and render unstyled.
11
+ *
12
+ * Here the `@source` sits next to the files it points at, and Tailwind
13
+ * resolves it from this file, so it is right wherever the app is.
14
+ *
15
+ * Only the compiled JavaScript is scanned. The source maps and the type
16
+ * declarations mention classes too — in examples, in comments — and scanning
17
+ * them built rules no component uses.
18
+ *
19
+ * Want less? The parts are still importable one by one, and `mobile.css` is
20
+ * the same for a mobile app. Import one preset, never both. */
21
+ @import './tokens.css';
22
+ @import './shell/web.css';
23
+ @import './materials.css';
24
+ @import './palettes.css';
25
+ @import './motion.css';
26
+ @import './styles.css';
27
+
28
+ @source './**/*.js';
package/dist/web.js CHANGED
@@ -450,6 +450,7 @@ var BaseTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
450
450
  onKeydown
451
451
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
452
452
  return openBlock(), createElementBlock("button", {
453
+ id: tabId(item.key),
453
454
  key: item.key,
454
455
  ref_for: true,
455
456
  ref_key: "tabs",
@@ -457,7 +458,6 @@ var BaseTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
457
458
  type: "button",
458
459
  role: "tab",
459
460
  class: normalizeClass(["rk-tab", { "is-active": item.key === active.value }]),
460
- id: tabId(item.key),
461
461
  "aria-selected": item.key === active.value,
462
462
  "aria-controls": panelId(item.key),
463
463
  tabindex: item.key === active.value ? 0 : -1,
@@ -465,10 +465,10 @@ var BaseTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
465
465
  }, toDisplayString(item.label), 11, _hoisted_2$2);
466
466
  }), 128))], 40, _hoisted_1$2), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
467
467
  return withDirectives((openBlock(), createElementBlock("div", {
468
+ id: panelId(item.key),
468
469
  key: item.key,
469
470
  role: "tabpanel",
470
471
  class: "rk-tabpanel",
471
- id: panelId(item.key),
472
472
  "aria-labelledby": tabId(item.key),
473
473
  tabindex: "0"
474
474
  }, [renderSlot(_ctx.$slots, "default", {
@@ -478,7 +478,7 @@ var BaseTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
478
478
  }), 128))]);
479
479
  };
480
480
  }
481
- }), [["__scopeId", "data-v-2a18b30e"]]);
481
+ }), [["__scopeId", "data-v-8135ecab"]]);
482
482
  //#endregion
483
483
  //#region src/web/BaseTooltip.vue?vue&type=script&setup=true&lang.ts
484
484
  var _hoisted_1$1 = { class: "rk-tip" };