@hirobius/design-system 0.11.0 → 0.12.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 +11 -1
- package/dist/brand.js +36 -0
- package/dist/contexts.js +63 -59
- package/dist/hirobius-ui.js +22626 -3818
- package/dist/manifest.js +9 -9
- package/dist/scroll.js +42 -0
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +14 -1
- package/dist/types/src/app/components/activity-feed.d.ts +24 -2
- package/dist/types/src/app/components/alert-dialog.d.ts +56 -0
- package/dist/types/src/app/components/app-shell.d.ts +38 -0
- package/dist/types/src/app/components/aspect-ratio.d.ts +25 -0
- package/dist/types/src/app/components/avatar-group.d.ts +22 -0
- package/dist/types/src/app/components/bleed.d.ts +39 -0
- package/dist/types/src/app/components/blockquote.d.ts +20 -0
- package/dist/types/src/app/components/box-sx.d.ts +69 -0
- package/dist/types/src/app/components/box.d.ts +42 -0
- package/dist/types/src/app/components/breadcrumb.d.ts +5 -0
- package/dist/types/src/app/components/button-group.d.ts +18 -0
- package/dist/types/src/app/components/calendar.d.ts +20 -0
- package/dist/types/src/app/components/card.d.ts +29 -13
- package/dist/types/src/app/components/carousel.d.ts +24 -0
- package/dist/types/src/app/components/center.d.ts +36 -0
- package/dist/types/src/app/components/circular-progress.d.ts +28 -0
- package/dist/types/src/app/components/cluster.d.ts +39 -0
- package/dist/types/src/app/components/code-block.d.ts +19 -1
- package/dist/types/src/app/components/command-palette.d.ts +44 -0
- package/dist/types/src/app/components/container.d.ts +10 -0
- package/dist/types/src/app/components/context-menu.d.ts +55 -0
- package/dist/types/src/app/components/cover.d.ts +43 -0
- package/dist/types/src/app/components/date-input.d.ts +31 -0
- package/dist/types/src/app/components/date-range-input.d.ts +34 -0
- package/dist/types/src/app/components/date-time-input.d.ts +30 -0
- package/dist/types/src/app/components/disclosure.d.ts +5 -1
- package/dist/types/src/app/components/divider.d.ts +14 -10
- package/dist/types/src/app/components/doc-link-card.d.ts +5 -1
- package/dist/types/src/app/components/field.d.ts +9 -11
- package/dist/types/src/app/components/file-input.d.ts +28 -0
- package/dist/types/src/app/components/frame.d.ts +38 -0
- package/dist/types/src/app/components/heading-stack.d.ts +15 -5
- package/dist/types/src/app/components/hover-card.d.ts +31 -0
- package/dist/types/src/app/components/image-lightbox.d.ts +13 -0
- package/dist/types/src/app/components/inline-code.d.ts +14 -3
- package/dist/types/src/app/components/input-group.d.ts +23 -0
- package/dist/types/src/app/components/kbd.d.ts +18 -0
- package/dist/types/src/app/components/metadata-list.d.ts +43 -0
- package/dist/types/src/app/components/multi-selector.d.ts +40 -0
- package/dist/types/src/app/components/nav-group.d.ts +7 -2
- package/dist/types/src/app/components/nav-item.d.ts +12 -2
- package/dist/types/src/app/components/overflow-list.d.ts +19 -0
- package/dist/types/src/app/components/pin.d.ts +30 -0
- package/dist/types/src/app/components/reveal.d.ts +31 -0
- package/dist/types/src/app/components/segmented-control.d.ts +37 -3
- package/dist/types/src/app/components/selectable-card.d.ts +29 -0
- package/dist/types/src/app/components/side-nav.d.ts +21 -0
- package/dist/types/src/app/components/sidebar.d.ts +45 -0
- package/dist/types/src/app/components/stat.d.ts +8 -10
- package/dist/types/src/app/components/status-dot.d.ts +25 -0
- package/dist/types/src/app/components/status-list-item.d.ts +10 -11
- package/dist/types/src/app/components/stepper.d.ts +31 -0
- package/dist/types/src/app/components/switcher.d.ts +41 -0
- package/dist/types/src/app/components/table.d.ts +12 -1
- package/dist/types/src/app/components/tag.d.ts +19 -18
- package/dist/types/src/app/components/text.d.ts +8 -2
- package/dist/types/src/app/components/time-input.d.ts +24 -0
- package/dist/types/src/app/components/timestamp.d.ts +24 -0
- package/dist/types/src/app/components/toast.d.ts +8 -2
- package/dist/types/src/app/components/toggle-button.d.ts +32 -0
- package/dist/types/src/app/components/token.d.ts +26 -1
- package/dist/types/src/app/components/tokenizer.d.ts +24 -0
- package/dist/types/src/app/components/toolbar.d.ts +36 -0
- package/dist/types/src/app/components/top-nav.d.ts +21 -0
- package/dist/types/src/app/components/tree-list.d.ts +28 -0
- package/dist/types/src/app/components/visually-hidden.d.ts +17 -0
- package/dist/types/src/app/context/TenantContext.d.ts +1 -1
- package/dist/types/src/app/data/nav-model.d.ts +39 -0
- package/dist/types/src/app/design-system/generated-token-refs.d.ts +13 -0
- package/dist/types/src/app/design-system/generated-token-values.d.ts +14 -1
- package/dist/types/src/app/{pages/hds → layouts}/HdsSystemDocLayout.d.ts +1 -1
- package/dist/types/src/app/lib/hds-search.d.ts +45 -0
- package/dist/types/src/brand/index.d.ts +9 -0
- package/dist/types/src/brand/overlay.d.ts +71 -0
- package/dist/types/src/index.d.ts +92 -2
- package/dist/types/src/scroll/index.d.ts +16 -0
- package/dist/types/src/scroll/smooth-scroll.d.ts +48 -0
- package/dist/types/src/scroll/use-scroll-progress.d.ts +34 -0
- package/dist/variables.css +16 -5
- package/hirobius.tokens.json +57 -10
- package/package.json +35 -66
- package/public/hds-manifest.json +6082 -4854
- package/dist/types/src/app/components/info-page.d.ts +0 -10
package/dist/scroll.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as o, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import { ReactLenis as i } from "lenis/react";
|
|
4
|
+
import { useLenis as R } from "lenis/react";
|
|
5
|
+
import { useScroll as a } from "motion/react";
|
|
6
|
+
const f = {
|
|
7
|
+
duration: 1.2,
|
|
8
|
+
easing: (e) => Math.min(1, 1.001 - Math.pow(2, -10 * e)),
|
|
9
|
+
smoothWheel: !0
|
|
10
|
+
}, n = "(prefers-reduced-motion: reduce)";
|
|
11
|
+
function u() {
|
|
12
|
+
return c.useSyncExternalStore(
|
|
13
|
+
(e) => {
|
|
14
|
+
if (typeof window > "u" || !window.matchMedia) return () => {
|
|
15
|
+
};
|
|
16
|
+
const r = window.matchMedia(n);
|
|
17
|
+
return r.addEventListener("change", e), () => r.removeEventListener("change", e);
|
|
18
|
+
},
|
|
19
|
+
() => typeof window < "u" && window.matchMedia ? window.matchMedia(n).matches : !1,
|
|
20
|
+
() => !1
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function p({
|
|
24
|
+
children: e,
|
|
25
|
+
options: r,
|
|
26
|
+
root: t = !0,
|
|
27
|
+
ignoreReducedMotion: s = !1
|
|
28
|
+
}) {
|
|
29
|
+
return u() && !s ? /* @__PURE__ */ o(d, { children: e }) : /* @__PURE__ */ o(i, { root: t, options: { ...f, ...r }, children: e });
|
|
30
|
+
}
|
|
31
|
+
function M(e, r) {
|
|
32
|
+
const { scrollYProgress: t } = a({
|
|
33
|
+
target: e,
|
|
34
|
+
offset: (r == null ? void 0 : r.offset) ?? ["start end", "end start"]
|
|
35
|
+
});
|
|
36
|
+
return t;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
p as SmoothScroll,
|
|
40
|
+
R as useLenis,
|
|
41
|
+
M as useScrollProgress
|
|
42
|
+
};
|