@imfusion/web-ui 0.9.1-dev.9.gdfff1530 → 0.10.1-dev.11.g9f5bc06e
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/CHANGELOG.md +116 -21
- package/dist/code-NTcddiYk.js +139 -0
- package/dist/components/app-shell/app-shell.d.ts +1 -1
- package/dist/components/dialog/dialog.d.ts +148 -0
- package/dist/components/dialog/dialog.meta.d.ts +2 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +49 -0
- package/dist/components/scroll-area/scroll-area.meta.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2072 -1743
- package/dist/integrations/code-highlight.js +2 -2
- package/dist/integrations/frame-selection.js +1 -1
- package/dist/integrations/image-display-options.js +121 -111
- package/dist/{rolldown-runtime-Dy4uBu1J.js → resolve-state-props-DQf9WiGv.js} +12 -1
- package/dist/scroll-area-z9Lf9uIk.js +89 -0
- package/dist/slider-Bf274cMe.js +106 -0
- package/dist/style.css +1 -1
- package/dist/{tabs-DRyqtS04.js → tabs-Do0BFL12.js} +31 -32
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +1099 -0
- package/src/llms/llms.gen.txt +12 -0
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +1 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +2 -3
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +4 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +11 -5
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +11 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +6 -4
- package/src/llms/skills/imf-web-ui-update/SKILL.md +20 -10
- package/dist/code-BYkr5k55.js +0 -134
- package/dist/slider-Cqpreglu.js +0 -116
package/src/llms/llms.gen.txt
CHANGED
|
@@ -78,6 +78,12 @@ Show-and-hide region for secondary content such as FAQs, settings, or details. A
|
|
|
78
78
|
Copies a value to the clipboard and briefly shows confirmation. Also called a copy-to-clipboard button; commonly used with Code.Block.
|
|
79
79
|
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .copy-button (jq: jq '.copy-button' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
80
80
|
|
|
81
|
+
## Dialog
|
|
82
|
+
- category: Layout, status: experimental
|
|
83
|
+
Modal window over a dimmed page for focused tasks, forms, confirmations, or viewers. Also called a modal; use Drawer for a panel from the screen edge and Popover for content anchored to a trigger.
|
|
84
|
+
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .dialog (jq: jq '.dialog' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
85
|
+
- further reading (usage/anatomy, not props): https://base-ui.com/react/components/dialog.md
|
|
86
|
+
|
|
81
87
|
## Drawer
|
|
82
88
|
- category: Layout, status: stable
|
|
83
89
|
Off-canvas panel that slides in from a screen edge for navigation, settings, filters, or focused tasks. Also called a sidebar, side panel, or sheet.
|
|
@@ -173,6 +179,12 @@ Link as a whole row: optional leading icon, label, optional description line, an
|
|
|
173
179
|
Horizontal layout primitive for spacing, aligning, and wrapping children. Also called a horizontal stack or flex row.
|
|
174
180
|
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .row (jq: jq '.row' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
175
181
|
|
|
182
|
+
## ScrollArea
|
|
183
|
+
- category: Layout, status: experimental
|
|
184
|
+
Scrollable region with the library's overlay scrollbar and edge fades, for lists, panels, and dialog bodies. Also called a scroll container; use it instead of a bare overflow: auto.
|
|
185
|
+
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .scroll-area (jq: jq '.scroll-area' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
186
|
+
- further reading (usage/anatomy, not props): https://base-ui.com/react/components/scroll-area.md
|
|
187
|
+
|
|
176
188
|
## Select
|
|
177
189
|
- category: Inputs, status: stable
|
|
178
190
|
Dropdown for choosing a value from a known list. Also called a picker; use it for a labeled, keyboard-accessible option list.
|
|
@@ -18,9 +18,8 @@ The file layout is in [project-structure.md](project-structure.md).
|
|
|
18
18
|
Use one server-backed current-user query as the identity source:
|
|
19
19
|
|
|
20
20
|
- Put it in `api/auth/queries.ts` and define its key and schema with the [data.md](data.md) pattern.
|
|
21
|
-
- Expose query options as `context.api.auth.getUser()
|
|
22
|
-
- Call `queryClient.query(
|
|
23
|
-
component.
|
|
21
|
+
- Expose query options as `context.api.auth.getUser()`, with a numeric `staleTime` set in the factory.
|
|
22
|
+
- Call `queryClient.query(options)` in a loader (see [data.md](data.md)) or a query hook in a component.
|
|
24
23
|
- Keep credentials and access tokens out of React state.
|
|
25
24
|
- Do not infer authentication from local storage, decoded tokens, route flags, or permission-gated UI.
|
|
26
25
|
|
|
@@ -29,7 +29,8 @@ export function UserCard({ name, onEdit }: UserCardProps) {
|
|
|
29
29
|
## Grouping
|
|
30
30
|
|
|
31
31
|
Group by component role, such as layout or domain UI, according to the project structure. Do not create a hierarchy before
|
|
32
|
-
the project needs one.
|
|
32
|
+
the project needs one. Components that only one route uses go in that route's `-` folder, not a shared group; see
|
|
33
|
+
[project-structure.md](project-structure.md).
|
|
33
34
|
|
|
34
35
|
## One file or a folder
|
|
35
36
|
|
|
@@ -50,3 +51,5 @@ The barrel only re-exports the public pieces.
|
|
|
50
51
|
|
|
51
52
|
Keep a component's stylesheet, tests, and local types beside the component. A container that needs styling usually wants to
|
|
52
53
|
be a layout or dumb component instead.
|
|
54
|
+
|
|
55
|
+
A route-local component keeps its stylesheet and tests in the route's `-` folder beside it.
|
|
@@ -85,11 +85,17 @@ export function getDetails(options?: QueryOptions<User>) {
|
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Callers choose `queryClient.query`, `useSuspenseQuery`, or another Query API.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`
|
|
92
|
-
|
|
88
|
+
Callers choose `queryClient.query`, `useSuspenseQuery`, or another Query API. The factory owns `staleTime` as a number,
|
|
89
|
+
chosen by how fast other people change the data: near zero for data others edit often, minutes for data that rarely changes.
|
|
90
|
+
A router loader reads the cache with `queryClient.query(options)` and no override, not the deprecated `ensureQueryData` or
|
|
91
|
+
`fetchQuery`.
|
|
92
|
+
|
|
93
|
+
Never set `staleTime: "static"` in a factory or in `defaultOptions`. A query whose observers are all static is never
|
|
94
|
+
refetched, so invalidation after a mutation does nothing. Invalidation marks a query stale even when its `staleTime` is a
|
|
95
|
+
number, so the app's own mutations still refresh the data. Changes made by others show once the window expires.
|
|
96
|
+
|
|
97
|
+
Mutation factories likewise return `mutationOptions`, own their mutation key and parsing, and are passed to `useMutation`; do
|
|
98
|
+
not inline those options at the call site.
|
|
93
99
|
|
|
94
100
|
## Router context access
|
|
95
101
|
|
|
@@ -29,6 +29,17 @@ Create the root providers, current-user boundary, and pathless `_public/` and `_
|
|
|
29
29
|
new app starts `_app/` with a minimal `AppShell` unless it has no persistent authenticated navigation. An established app
|
|
30
30
|
keeps its working shell choice.
|
|
31
31
|
|
|
32
|
+
## Route-local code
|
|
33
|
+
|
|
34
|
+
A route file holds its search schema and `validateSearch`, its loaders, and its pending, error, and not-found components.
|
|
35
|
+
Route-local code that outgrows small in-file components (views, forms, hooks, tests) goes in a sibling folder named `-` plus
|
|
36
|
+
the route file's name: `route.tsx` gets `-route/`, `products.tsx` gets `-products/`. TanStack Router ignores files and
|
|
37
|
+
folders with a leading `-` when it builds the route tree, so the folder never becomes a route. The folder holds the route's
|
|
38
|
+
views with their props types, hooks, `.module.css` files, and tests. A component small enough to sit in the route file stays
|
|
39
|
+
there.
|
|
40
|
+
|
|
41
|
+
`partials/` holds only parts that more than one route uses.
|
|
42
|
+
|
|
32
43
|
## Imports
|
|
33
44
|
|
|
34
45
|
Use `./` for siblings and `#/` for imports elsewhere in `src/`:
|
|
@@ -5,10 +5,12 @@ looks.
|
|
|
5
5
|
|
|
6
6
|
## Composition: pages (smart containers), partials, dumb components
|
|
7
7
|
|
|
8
|
-
- **Pages** live in `routes/`. They load data, read URL state, coordinate actions, and compose the view.
|
|
9
|
-
component CSS.
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
- **Pages** live in `routes/`. They load data, read URL state, coordinate actions, and compose the view. Route files hold the
|
|
9
|
+
search schema, loaders, and pending, error, and not-found components. They do not own component CSS. Route-local views and
|
|
10
|
+
forms live in the route's `-` folder, as [project-structure.md](project-structure.md) describes, and that folder's
|
|
11
|
+
`.module.css` files are component styles.
|
|
12
|
+
- **Partials** are compositions that more than one route uses, extracted because they read as a unit. They have light logic
|
|
13
|
+
and no styling of their own.
|
|
12
14
|
- **Layout components** arrange content with `Stack`, `Row`, grids, and token gaps, and wrap long-form text in `Prose`.
|
|
13
15
|
- **Dumb components** receive data and callbacks, render UI, and own their styles. They do not fetch, route, or contain
|
|
14
16
|
business rules.
|
|
@@ -10,8 +10,8 @@ allowed-tools: Bash Read Grep Skill
|
|
|
10
10
|
|
|
11
11
|
# Update Web UI
|
|
12
12
|
|
|
13
|
-
This workflow has two possible commits: the package/tooling update
|
|
14
|
-
Never overwrite user changes or commit without fresh approval.
|
|
13
|
+
This workflow has two possible commits: the package/tooling update with the fixes its `Breaking` entries require, then an
|
|
14
|
+
optional consumer migration. Keep them separate. Never overwrite user changes or commit without fresh approval.
|
|
15
15
|
|
|
16
16
|
## Before you start
|
|
17
17
|
|
|
@@ -20,7 +20,8 @@ Invoke `imf-web-ui-user-profile` first and explain at its levels throughout.
|
|
|
20
20
|
Open with a short orientation, before any command runs, so the person knows the route and when they will be asked:
|
|
21
21
|
|
|
22
22
|
1. **Preflight**: check the project and stop on uncommitted work.
|
|
23
|
-
2. **Base update**: install the new package, refresh the skills and hooks,
|
|
23
|
+
2. **Base update**: install the new package, refresh the skills and hooks, fix what the `Breaking` entries require, verify,
|
|
24
|
+
then ask to commit.
|
|
24
25
|
3. **Migration check**: read what the new releases changed and report what this project needs; changes and their separate
|
|
25
26
|
commit wait for approval.
|
|
26
27
|
4. **Full audit**: offer `imf-web-ui-audit full`, a read-only check of the whole project against the conventions, wider than
|
|
@@ -88,16 +89,23 @@ installer-owned entries idempotently into the registration file for the chosen h
|
|
|
88
89
|
do not stack an event the project already covers.
|
|
89
90
|
|
|
90
91
|
After the installer command, inspect the installed skill diffs and briefly report any guidance changes; version-marker
|
|
91
|
-
changes alone do not count.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
changes alone do not count.
|
|
93
|
+
|
|
94
|
+
Then re-read, in full, every changed skill and reference the remaining work uses, starting with this update skill when it
|
|
95
|
+
changed. A diff shows what moved, not the step order you continue under, so it does not replace the re-read. Continue from
|
|
96
|
+
the current step using the updated guidance, keeping the original baseline, user choices, and completed changes in mind.
|
|
97
|
+
Check for newly required steps without repeating completed mutations or expanding the approved scope.
|
|
95
98
|
|
|
96
99
|
## Verify the base update
|
|
97
100
|
|
|
98
101
|
After every mutating command, compare the status with the preflight snapshot. Stop on an unexpected path or overlapping
|
|
99
102
|
change.
|
|
100
103
|
|
|
104
|
+
Read every `Breaking` entry and migration step in `node_modules/@imfusion/web-ui/CHANGELOG.md` between the pre-update and the
|
|
105
|
+
new version, keeping for a prerelease baseline only the ones the dist diff in the migration check confirms, and map each to
|
|
106
|
+
its call sites here. Fix the ones with matching code in the base update, so the update commit leaves the app consistent;
|
|
107
|
+
tests do not catch a removed custom property or a moved scroll container.
|
|
108
|
+
|
|
101
109
|
Run the consumer's documented full verification. Read its scripts first; prefer an aggregate check, otherwise run the
|
|
102
110
|
non-watch format, lint, typecheck, test, and build commands that exist.
|
|
103
111
|
|
|
@@ -110,8 +118,10 @@ Report before the first commit:
|
|
|
110
118
|
@imfusion/web-ui update report
|
|
111
119
|
Package : <old> -> <new>
|
|
112
120
|
Skills : <status>
|
|
121
|
+
Re-read : <changed skills read in full, or none changed>
|
|
113
122
|
Hooks : <status>
|
|
114
123
|
Verification : <status>
|
|
124
|
+
Breaking : <entries fixed here, not applicable, or none>
|
|
115
125
|
Update files : <paths>
|
|
116
126
|
Held back : <paths or none>
|
|
117
127
|
Conflicts : <paths or none>
|
|
@@ -137,9 +147,9 @@ diff was already in the baseline; report it as present.
|
|
|
137
147
|
This phase reads and reports: every file stays as it is until the person approves the migration. Open the report with the
|
|
138
148
|
releases read, then report separately:
|
|
139
149
|
|
|
140
|
-
- migrations: every `Breaking` entry and migration step, mapped to the call sites it affects here
|
|
141
|
-
shows; a step with no matching code is reported as not applicable. A style-only change, such as a
|
|
142
|
-
type error: find its call sites by component usage;
|
|
150
|
+
- migrations: every `Breaking` entry and migration step the base update left open, mapped to the call sites it affects here
|
|
151
|
+
and the fix the changelog shows; a step with no matching code is reported as not applicable. A style-only change, such as a
|
|
152
|
+
removed margin, raises no type error: find its call sites by component usage;
|
|
143
153
|
- compatibility fixes required by changed imports or types that the changelog does not cover;
|
|
144
154
|
- existing uses affected by a changed API or documented behavior;
|
|
145
155
|
- suggestions: new features from the highlights and `Added` entries that fit what the project already builds, each with the
|
package/dist/code-BYkr5k55.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { Xo as t, ja as n, pM as r } from "./icons-BsK_o-Cb.js";
|
|
3
|
-
import { t as i } from "./meta-V_KyLeGn.js";
|
|
4
|
-
import { cx as a } from "class-variance-authority";
|
|
5
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
-
import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
|
|
7
|
-
import { mergeProps as p } from "@base-ui/react/merge-props";
|
|
8
|
-
import { useRender as m } from "@base-ui/react/use-render";
|
|
9
|
-
//#region src/hooks/use-clipboard.ts
|
|
10
|
-
function h({ timeout: e = 1500 } = {}) {
|
|
11
|
-
let [t, n] = f(!1), r = d(void 0);
|
|
12
|
-
return u(() => () => clearTimeout(r.current), []), {
|
|
13
|
-
copied: t,
|
|
14
|
-
copy: l((t) => {
|
|
15
|
-
navigator.clipboard.writeText(t).then(() => {
|
|
16
|
-
n(!0), clearTimeout(r.current), r.current = setTimeout(() => n(!1), e);
|
|
17
|
-
});
|
|
18
|
-
}, [e])
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
var g = {
|
|
22
|
-
block: "imf-ui-code-module-block",
|
|
23
|
-
copy: "imf-ui-code-module-copy",
|
|
24
|
-
inline: "imf-ui-code-module-inline",
|
|
25
|
-
inlineCopy: "imf-ui-code-module-inlineCopy",
|
|
26
|
-
inlineLink: "imf-ui-code-module-inlineLink",
|
|
27
|
-
language: "imf-ui-code-module-language",
|
|
28
|
-
pre: "imf-ui-code-module-pre",
|
|
29
|
-
separator: "imf-ui-code-module-separator"
|
|
30
|
-
}, _ = /* @__PURE__ */ e({
|
|
31
|
-
Block: () => b,
|
|
32
|
-
Inline: () => v,
|
|
33
|
-
InlineLink: () => y
|
|
34
|
-
});
|
|
35
|
-
function v({ copyable: e = !1, children: i, render: a, ...l }) {
|
|
36
|
-
let { copied: u, copy: f } = h(), _ = d(null), v = u ? n : t;
|
|
37
|
-
return m({
|
|
38
|
-
defaultTagName: "code",
|
|
39
|
-
render: a,
|
|
40
|
-
props: {
|
|
41
|
-
...p(l, {
|
|
42
|
-
className: g.inline,
|
|
43
|
-
children: /* @__PURE__ */ c(o, { children: [
|
|
44
|
-
/* @__PURE__ */ s("span", {
|
|
45
|
-
ref: _,
|
|
46
|
-
children: i
|
|
47
|
-
}),
|
|
48
|
-
e && /* @__PURE__ */ s("span", { className: g.separator }),
|
|
49
|
-
e && /* @__PURE__ */ s("button", {
|
|
50
|
-
type: "button",
|
|
51
|
-
className: g.inlineCopy,
|
|
52
|
-
"data-copied": u || void 0,
|
|
53
|
-
"aria-label": u ? "Copied" : "Copy",
|
|
54
|
-
onClick: () => f(_.current?.textContent ?? ""),
|
|
55
|
-
children: /* @__PURE__ */ s(r, {
|
|
56
|
-
glyph: v,
|
|
57
|
-
size: 12,
|
|
58
|
-
strokeWidth: 2,
|
|
59
|
-
"aria-hidden": !0
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
] })
|
|
63
|
-
}),
|
|
64
|
-
"data-imf-ui-component": "Code.Inline"
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
v.displayName = "Code.Inline";
|
|
69
|
-
function y({ kind: e = "external", ...t }) {
|
|
70
|
-
let n = e === "external" ? {
|
|
71
|
-
target: "_blank",
|
|
72
|
-
rel: "noreferrer"
|
|
73
|
-
} : {};
|
|
74
|
-
return m({
|
|
75
|
-
defaultTagName: "a",
|
|
76
|
-
render: t.render,
|
|
77
|
-
props: {
|
|
78
|
-
...p(n, t, {
|
|
79
|
-
className: a(g.inline, g.inlineLink, t.className),
|
|
80
|
-
children: t.children
|
|
81
|
-
}),
|
|
82
|
-
"data-imf-ui-component": "Code.InlineLink",
|
|
83
|
-
"data-kind": e
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
y.displayName = "Code.InlineLink";
|
|
88
|
-
function b({ className: e, language: i, hideCopy: o = !1, children: l, ...u }) {
|
|
89
|
-
let { copied: f, copy: p } = h(), m = d(null), _ = f ? n : t;
|
|
90
|
-
return /* @__PURE__ */ c("div", {
|
|
91
|
-
"data-imf-ui-component": "Code.Block",
|
|
92
|
-
className: a(g.block, e),
|
|
93
|
-
children: [
|
|
94
|
-
i != null && /* @__PURE__ */ s("span", {
|
|
95
|
-
className: g.language,
|
|
96
|
-
children: i
|
|
97
|
-
}),
|
|
98
|
-
!o && /* @__PURE__ */ s("button", {
|
|
99
|
-
type: "button",
|
|
100
|
-
className: g.copy,
|
|
101
|
-
"data-copied": f || void 0,
|
|
102
|
-
"aria-label": f ? "Copied" : "Copy",
|
|
103
|
-
onClick: () => p(m.current?.textContent ?? ""),
|
|
104
|
-
children: /* @__PURE__ */ s(r, {
|
|
105
|
-
glyph: _,
|
|
106
|
-
size: 12,
|
|
107
|
-
strokeWidth: 2,
|
|
108
|
-
"aria-hidden": !0
|
|
109
|
-
})
|
|
110
|
-
}),
|
|
111
|
-
/* @__PURE__ */ s("pre", {
|
|
112
|
-
...u,
|
|
113
|
-
className: g.pre,
|
|
114
|
-
children: /* @__PURE__ */ s("code", {
|
|
115
|
-
ref: m,
|
|
116
|
-
children: l
|
|
117
|
-
})
|
|
118
|
-
})
|
|
119
|
-
]
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
b.displayName = "Code.Block";
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region src/components/code/code.meta.ts
|
|
125
|
-
var x = {
|
|
126
|
-
name: "Code",
|
|
127
|
-
category: i.display,
|
|
128
|
-
status: "stable",
|
|
129
|
-
namespace: !0,
|
|
130
|
-
description: "Displays source code inline or in a block, with optional language labels and copying. Also called a code snippet or code block.",
|
|
131
|
-
origin: "native"
|
|
132
|
-
};
|
|
133
|
-
//#endregion
|
|
134
|
-
export { _ as a, y as i, b as n, h as o, v as r, x as t };
|
package/dist/slider-Cqpreglu.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { cva as t } from "class-variance-authority";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
import { Slider as r } from "@base-ui/react/slider";
|
|
5
|
-
//#region src/utils/resolve-state-props.ts
|
|
6
|
-
function i(e, t) {
|
|
7
|
-
return e instanceof Function ? e(t) : e;
|
|
8
|
-
}
|
|
9
|
-
function a(e, t) {
|
|
10
|
-
return i(e, t);
|
|
11
|
-
}
|
|
12
|
-
function o(e, t) {
|
|
13
|
-
return i(e, t);
|
|
14
|
-
}
|
|
15
|
-
var s = {
|
|
16
|
-
control: "imf-ui-slider-module-control",
|
|
17
|
-
indicator: "imf-ui-slider-module-indicator",
|
|
18
|
-
label: "imf-ui-slider-module-label",
|
|
19
|
-
root: "imf-ui-slider-module-root",
|
|
20
|
-
thumb: "imf-ui-slider-module-thumb",
|
|
21
|
-
track: "imf-ui-slider-module-track",
|
|
22
|
-
value: "imf-ui-slider-module-value",
|
|
23
|
-
variantPosition: "imf-ui-slider-module-variantPosition"
|
|
24
|
-
}, c = /* @__PURE__ */ e({
|
|
25
|
-
Control: () => y,
|
|
26
|
-
Indicator: () => x,
|
|
27
|
-
Label: () => _,
|
|
28
|
-
Root: () => g,
|
|
29
|
-
Thumb: () => S,
|
|
30
|
-
Track: () => b,
|
|
31
|
-
Value: () => v
|
|
32
|
-
}), l = t(s.root, { variants: { variant: {
|
|
33
|
-
default: null,
|
|
34
|
-
position: s.variantPosition
|
|
35
|
-
} } }), u = t(s.label), d = t(s.value), f = t(s.control), p = t(s.track), m = t(s.indicator), h = t(s.thumb);
|
|
36
|
-
function g({ variant: e = "default", value: t, defaultValue: i, onValueChange: o, onValueCommitted: s, min: c = 0, max: u = 100, step: d = 1, largeStep: f = 10, minStepsBetweenValues: p = 0, disabled: m = !1, orientation: h = "horizontal", name: g, form: _, locale: v, thumbAlignment: y = "edge", thumbCollisionBehavior: b = "push", format: x, ...S }) {
|
|
37
|
-
return /* @__PURE__ */ n(r.Root, {
|
|
38
|
-
...S,
|
|
39
|
-
"data-imf-ui-component": "Slider.Root",
|
|
40
|
-
"data-orientation": h,
|
|
41
|
-
className: (t) => l({
|
|
42
|
-
variant: e,
|
|
43
|
-
className: a(S.className, t)
|
|
44
|
-
}),
|
|
45
|
-
value: t,
|
|
46
|
-
defaultValue: i,
|
|
47
|
-
onValueChange: o,
|
|
48
|
-
onValueCommitted: s,
|
|
49
|
-
min: c,
|
|
50
|
-
max: u,
|
|
51
|
-
step: d,
|
|
52
|
-
largeStep: f,
|
|
53
|
-
minStepsBetweenValues: p,
|
|
54
|
-
disabled: m,
|
|
55
|
-
orientation: h,
|
|
56
|
-
name: g,
|
|
57
|
-
form: _,
|
|
58
|
-
locale: v,
|
|
59
|
-
thumbAlignment: y,
|
|
60
|
-
thumbCollisionBehavior: b,
|
|
61
|
-
format: x
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
g.displayName = "Slider.Root";
|
|
65
|
-
function _(e) {
|
|
66
|
-
return /* @__PURE__ */ n(r.Label, {
|
|
67
|
-
...e,
|
|
68
|
-
"data-imf-ui-component": "Slider.Label",
|
|
69
|
-
className: (t) => u({ className: a(e.className, t) })
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
_.displayName = "Slider.Label";
|
|
73
|
-
function v({ children: e, ...t }) {
|
|
74
|
-
return /* @__PURE__ */ n(r.Value, {
|
|
75
|
-
...t,
|
|
76
|
-
"data-imf-ui-component": "Slider.Value",
|
|
77
|
-
className: (e) => d({ className: a(t.className, e) }),
|
|
78
|
-
children: e
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
v.displayName = "Slider.Value";
|
|
82
|
-
function y(e) {
|
|
83
|
-
return /* @__PURE__ */ n(r.Control, {
|
|
84
|
-
...e,
|
|
85
|
-
"data-imf-ui-component": "Slider.Control",
|
|
86
|
-
className: (t) => f({ className: a(e.className, t) })
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
y.displayName = "Slider.Control";
|
|
90
|
-
function b(e) {
|
|
91
|
-
return /* @__PURE__ */ n(r.Track, {
|
|
92
|
-
...e,
|
|
93
|
-
"data-imf-ui-component": "Slider.Track",
|
|
94
|
-
className: (t) => p({ className: a(e.className, t) })
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
b.displayName = "Slider.Track";
|
|
98
|
-
function x(e) {
|
|
99
|
-
return /* @__PURE__ */ n(r.Indicator, {
|
|
100
|
-
...e,
|
|
101
|
-
"data-imf-ui-component": "Slider.Indicator",
|
|
102
|
-
className: (t) => m({ className: a(e.className, t) })
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
x.displayName = "Slider.Indicator";
|
|
106
|
-
function S({ index: e, ...t }) {
|
|
107
|
-
return /* @__PURE__ */ n(r.Thumb, {
|
|
108
|
-
...t,
|
|
109
|
-
"data-imf-ui-component": "Slider.Thumb",
|
|
110
|
-
className: (e) => h({ className: a(t.className, e) }),
|
|
111
|
-
index: e
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
S.displayName = "Slider.Thumb";
|
|
115
|
-
//#endregion
|
|
116
|
-
export { S as a, c, g as i, a as l, x as n, b as o, _ as r, v as s, y as t, o as u };
|