@sandurtech/sandui 0.0.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.
- package/README.md +64 -0
- package/dist/index.d.ts +161 -0
- package/dist/sandui.js +875 -0
- package/dist/sandui.umd.js +6 -0
- package/dist/style.css +1 -0
- package/package.json +57 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# SandUI
|
|
2
|
+
|
|
3
|
+
SandUI is the SandurTech React component library. This release resets the package for a clean-slate `0.0.1` publish using Vite library mode, TypeScript declaration output, and bundled SCSS.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @sandurtech/sandui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependencies:
|
|
12
|
+
|
|
13
|
+
- `react >=18`
|
|
14
|
+
- `react-dom >=18`
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { SandButton, SandCard, SandInputGroup } from '@sandurtech/sandui';
|
|
20
|
+
import '@sandurtech/sandui/style.css';
|
|
21
|
+
|
|
22
|
+
export function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<SandCard header="Launch">
|
|
25
|
+
<SandInputGroup label="Project name" />
|
|
26
|
+
<SandButton>Deploy</SandButton>
|
|
27
|
+
</SandCard>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Development
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm ci
|
|
36
|
+
npm run test
|
|
37
|
+
npm run build
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Build Output
|
|
41
|
+
|
|
42
|
+
The package publishes:
|
|
43
|
+
|
|
44
|
+
- ESM bundle: `dist/sandui.js`
|
|
45
|
+
- UMD bundle: `dist/sandui.umd.js`
|
|
46
|
+
- Types: `dist/index.d.ts`
|
|
47
|
+
- Styles: `dist/style.css`
|
|
48
|
+
|
|
49
|
+
## V2 Migration
|
|
50
|
+
|
|
51
|
+
The previous SandUI package line published `0.1.x` APIs before this reset. The new `0.0.1` line keeps the scoped package name but treats the component surface as a clean restart.
|
|
52
|
+
|
|
53
|
+
Breaking changes discovered while comparing to the earlier package setup:
|
|
54
|
+
|
|
55
|
+
- Unprefixed exports such as `Button`, `Card`, and `ButtonProps` were replaced by `SandButton`, `SandCard`, and `SandButtonProps`.
|
|
56
|
+
- The public barrel is now explicit and only exposes `Sand*` components and `Sand*` types from the root package entry.
|
|
57
|
+
- The build output changed from app/docs-oriented assets to library artifacts plus a single bundled stylesheet.
|
|
58
|
+
- React and React DOM are now peer dependencies instead of bundled runtime dependencies.
|
|
59
|
+
|
|
60
|
+
If you need to mark the old package line as deprecated, use:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm deprecate @sandurtech/sandui@0.1.0 "This version is deprecated. Please use 0.0.1 or higher."
|
|
64
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { SandBadge } from './components/Badge/Badge';
|
|
2
|
+
import { SandBadgeProps } from './components/Badge/Badge';
|
|
3
|
+
import { SandBreadcrumbItem } from './components/Breadcrumbs/Breadcrumbs';
|
|
4
|
+
import { SandBreadcrumbs } from './components/Breadcrumbs/Breadcrumbs';
|
|
5
|
+
import { SandBreadcrumbsProps } from './components/Breadcrumbs/Breadcrumbs';
|
|
6
|
+
import { SandButton } from './components/Button/Button';
|
|
7
|
+
import { SandButtonProps } from './components/Button/Button';
|
|
8
|
+
import { SandCard } from './components/Card/Card';
|
|
9
|
+
import { SandCardProps } from './components/Card/Card';
|
|
10
|
+
import { SandCheckbox } from './components/Selection/Selection';
|
|
11
|
+
import { SandChoiceBaseProps } from './components/Selection/Selection';
|
|
12
|
+
import { SandChoiceGroup } from './components/Selection/Selection';
|
|
13
|
+
import { SandChoiceGroupProps } from './components/Selection/Selection';
|
|
14
|
+
import { SandCodeBlock } from './components/CodeBlock/CodeBlock';
|
|
15
|
+
import { SandCodeBlockProps } from './components/CodeBlock/CodeBlock';
|
|
16
|
+
import { SandCodeTabs } from './components/CodeBlock/CodeBlock';
|
|
17
|
+
import { SandCodeTabsProps } from './components/CodeBlock/CodeBlock';
|
|
18
|
+
import { SandContainer } from './components/Layout/Layout';
|
|
19
|
+
import { SandContainerProps } from './components/Layout/Layout';
|
|
20
|
+
import { SandDivider } from './components/Divider/Divider';
|
|
21
|
+
import { SandDividerProps } from './components/Divider/Divider';
|
|
22
|
+
import { SandFeedbackProps } from './components/Feedback/Feedback';
|
|
23
|
+
import { SandFormGroup } from './components/Input/Input';
|
|
24
|
+
import { SandFormGroupProps } from './components/Input/Input';
|
|
25
|
+
import { SandHeader } from './components/Layout/Layout';
|
|
26
|
+
import { SandHeaderProps } from './components/Layout/Layout';
|
|
27
|
+
import { SandInput } from './components/Input/Input';
|
|
28
|
+
import { SandInputGroup } from './components/Input/Input';
|
|
29
|
+
import { SandInputGroupProps } from './components/Input/Input';
|
|
30
|
+
import { SandInputProps } from './components/Input/Input';
|
|
31
|
+
import { SandKBD } from './components/Kbd/Kbd';
|
|
32
|
+
import { SandKBDProps } from './components/Kbd/Kbd';
|
|
33
|
+
import { SandMicroserviceLayout } from './components/Layout/Layout';
|
|
34
|
+
import { SandMicroserviceLayoutProps } from './components/Layout/Layout';
|
|
35
|
+
import { SandModal } from './components/Modal/Modal';
|
|
36
|
+
import { SandModalBodyProps } from './components/Modal/Modal';
|
|
37
|
+
import { SandModalDescriptionProps } from './components/Modal/Modal';
|
|
38
|
+
import { SandModalFooterProps } from './components/Modal/Modal';
|
|
39
|
+
import { SandModalHeaderProps } from './components/Modal/Modal';
|
|
40
|
+
import { SandModalProps } from './components/Modal/Modal';
|
|
41
|
+
import { SandModalTitleProps } from './components/Modal/Modal';
|
|
42
|
+
import { SandPagination } from './components/Pagination/Pagination';
|
|
43
|
+
import { SandPaginationProps } from './components/Pagination/Pagination';
|
|
44
|
+
import { SandRadio } from './components/Selection/Selection';
|
|
45
|
+
import { SandResultPanel } from './components/Layout/Layout';
|
|
46
|
+
import { SandResultPanelProps } from './components/Layout/Layout';
|
|
47
|
+
import { SandSnackbar } from './components/Feedback/Feedback';
|
|
48
|
+
import { SandSwitch } from './components/Selection/Selection';
|
|
49
|
+
import { SandToast } from './components/Feedback/Feedback';
|
|
50
|
+
import { SandToolLayout } from './components/Layout/Layout';
|
|
51
|
+
import { SandToolLayoutProps } from './components/Layout/Layout';
|
|
52
|
+
import { SandToolPanel } from './components/Layout/Layout';
|
|
53
|
+
import { SandToolPanelProps } from './components/Layout/Layout';
|
|
54
|
+
|
|
55
|
+
export { SandBadge }
|
|
56
|
+
|
|
57
|
+
export { SandBadgeProps }
|
|
58
|
+
|
|
59
|
+
export { SandBreadcrumbItem }
|
|
60
|
+
|
|
61
|
+
export { SandBreadcrumbs }
|
|
62
|
+
|
|
63
|
+
export { SandBreadcrumbsProps }
|
|
64
|
+
|
|
65
|
+
export { SandButton }
|
|
66
|
+
|
|
67
|
+
export { SandButtonProps }
|
|
68
|
+
|
|
69
|
+
export { SandCard }
|
|
70
|
+
|
|
71
|
+
export { SandCardProps }
|
|
72
|
+
|
|
73
|
+
export { SandCheckbox }
|
|
74
|
+
|
|
75
|
+
export { SandChoiceBaseProps }
|
|
76
|
+
|
|
77
|
+
export { SandChoiceGroup }
|
|
78
|
+
|
|
79
|
+
export { SandChoiceGroupProps }
|
|
80
|
+
|
|
81
|
+
export { SandCodeBlock }
|
|
82
|
+
|
|
83
|
+
export { SandCodeBlockProps }
|
|
84
|
+
|
|
85
|
+
export { SandCodeTabs }
|
|
86
|
+
|
|
87
|
+
export { SandCodeTabsProps }
|
|
88
|
+
|
|
89
|
+
export { SandContainer }
|
|
90
|
+
|
|
91
|
+
export { SandContainerProps }
|
|
92
|
+
|
|
93
|
+
export { SandDivider }
|
|
94
|
+
|
|
95
|
+
export { SandDividerProps }
|
|
96
|
+
|
|
97
|
+
export { SandFeedbackProps }
|
|
98
|
+
|
|
99
|
+
export { SandFormGroup }
|
|
100
|
+
|
|
101
|
+
export { SandFormGroupProps }
|
|
102
|
+
|
|
103
|
+
export { SandHeader }
|
|
104
|
+
|
|
105
|
+
export { SandHeaderProps }
|
|
106
|
+
|
|
107
|
+
export { SandInput }
|
|
108
|
+
|
|
109
|
+
export { SandInputGroup }
|
|
110
|
+
|
|
111
|
+
export { SandInputGroupProps }
|
|
112
|
+
|
|
113
|
+
export { SandInputProps }
|
|
114
|
+
|
|
115
|
+
export { SandKBD }
|
|
116
|
+
|
|
117
|
+
export { SandKBDProps }
|
|
118
|
+
|
|
119
|
+
export { SandMicroserviceLayout }
|
|
120
|
+
|
|
121
|
+
export { SandMicroserviceLayoutProps }
|
|
122
|
+
|
|
123
|
+
export { SandModal }
|
|
124
|
+
|
|
125
|
+
export { SandModalBodyProps }
|
|
126
|
+
|
|
127
|
+
export { SandModalDescriptionProps }
|
|
128
|
+
|
|
129
|
+
export { SandModalFooterProps }
|
|
130
|
+
|
|
131
|
+
export { SandModalHeaderProps }
|
|
132
|
+
|
|
133
|
+
export { SandModalProps }
|
|
134
|
+
|
|
135
|
+
export { SandModalTitleProps }
|
|
136
|
+
|
|
137
|
+
export { SandPagination }
|
|
138
|
+
|
|
139
|
+
export { SandPaginationProps }
|
|
140
|
+
|
|
141
|
+
export { SandRadio }
|
|
142
|
+
|
|
143
|
+
export { SandResultPanel }
|
|
144
|
+
|
|
145
|
+
export { SandResultPanelProps }
|
|
146
|
+
|
|
147
|
+
export { SandSnackbar }
|
|
148
|
+
|
|
149
|
+
export { SandSwitch }
|
|
150
|
+
|
|
151
|
+
export { SandToast }
|
|
152
|
+
|
|
153
|
+
export { SandToolLayout }
|
|
154
|
+
|
|
155
|
+
export { SandToolLayoutProps }
|
|
156
|
+
|
|
157
|
+
export { SandToolPanel }
|
|
158
|
+
|
|
159
|
+
export { SandToolPanelProps }
|
|
160
|
+
|
|
161
|
+
export { }
|
package/dist/sandui.js
ADDED
|
@@ -0,0 +1,875 @@
|
|
|
1
|
+
import Oe, { forwardRef as b, useMemo as T, useState as ke, useCallback as I, useId as C, useRef as K, useEffect as Ie, createContext as Me, useContext as De } from "react";
|
|
2
|
+
var U = { exports: {} }, D = {};
|
|
3
|
+
var me;
|
|
4
|
+
function Pe() {
|
|
5
|
+
if (me) return D;
|
|
6
|
+
me = 1;
|
|
7
|
+
var d = /* @__PURE__ */ Symbol.for("react.transitional.element"), a = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
|
+
function n(r, t, c) {
|
|
9
|
+
var o = null;
|
|
10
|
+
if (c !== void 0 && (o = "" + c), t.key !== void 0 && (o = "" + t.key), "key" in t) {
|
|
11
|
+
c = {};
|
|
12
|
+
for (var u in t)
|
|
13
|
+
u !== "key" && (c[u] = t[u]);
|
|
14
|
+
} else c = t;
|
|
15
|
+
return t = c.ref, {
|
|
16
|
+
$$typeof: d,
|
|
17
|
+
type: r,
|
|
18
|
+
key: o,
|
|
19
|
+
ref: t !== void 0 ? t : null,
|
|
20
|
+
props: c
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return D.Fragment = a, D.jsx = n, D.jsxs = n, D;
|
|
24
|
+
}
|
|
25
|
+
var P = {};
|
|
26
|
+
var pe;
|
|
27
|
+
function Fe() {
|
|
28
|
+
return pe || (pe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
|
+
function d(e) {
|
|
30
|
+
if (e == null) return null;
|
|
31
|
+
if (typeof e == "function")
|
|
32
|
+
return e.$$typeof === Ce ? null : e.displayName || e.name || null;
|
|
33
|
+
if (typeof e == "string") return e;
|
|
34
|
+
switch (e) {
|
|
35
|
+
case A:
|
|
36
|
+
return "Fragment";
|
|
37
|
+
case J:
|
|
38
|
+
return "Profiler";
|
|
39
|
+
case V:
|
|
40
|
+
return "StrictMode";
|
|
41
|
+
case L:
|
|
42
|
+
return "Suspense";
|
|
43
|
+
case Y:
|
|
44
|
+
return "SuspenseList";
|
|
45
|
+
case Re:
|
|
46
|
+
return "Activity";
|
|
47
|
+
}
|
|
48
|
+
if (typeof e == "object")
|
|
49
|
+
switch (typeof e.tag == "number" && console.error(
|
|
50
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
|
+
), e.$$typeof) {
|
|
52
|
+
case g:
|
|
53
|
+
return "Portal";
|
|
54
|
+
case j:
|
|
55
|
+
return e.displayName || "Context";
|
|
56
|
+
case M:
|
|
57
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
|
+
case R:
|
|
59
|
+
var l = e.render;
|
|
60
|
+
return e = e.displayName, e || (e = l.displayName || l.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
|
+
case G:
|
|
62
|
+
return l = e.displayName || null, l !== null ? l : d(e.type) || "Memo";
|
|
63
|
+
case X:
|
|
64
|
+
l = e._payload, e = e._init;
|
|
65
|
+
try {
|
|
66
|
+
return d(e(l));
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function a(e) {
|
|
73
|
+
return "" + e;
|
|
74
|
+
}
|
|
75
|
+
function n(e) {
|
|
76
|
+
try {
|
|
77
|
+
a(e);
|
|
78
|
+
var l = !1;
|
|
79
|
+
} catch {
|
|
80
|
+
l = !0;
|
|
81
|
+
}
|
|
82
|
+
if (l) {
|
|
83
|
+
l = console;
|
|
84
|
+
var p = l.error, k = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
85
|
+
return p.call(
|
|
86
|
+
l,
|
|
87
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
|
+
k
|
|
89
|
+
), a(e);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function r(e) {
|
|
93
|
+
if (e === A) return "<>";
|
|
94
|
+
if (typeof e == "object" && e !== null && e.$$typeof === X)
|
|
95
|
+
return "<...>";
|
|
96
|
+
try {
|
|
97
|
+
var l = d(e);
|
|
98
|
+
return l ? "<" + l + ">" : "<...>";
|
|
99
|
+
} catch {
|
|
100
|
+
return "<...>";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function t() {
|
|
104
|
+
var e = Z.A;
|
|
105
|
+
return e === null ? null : e.getOwner();
|
|
106
|
+
}
|
|
107
|
+
function c() {
|
|
108
|
+
return Error("react-stack-top-frame");
|
|
109
|
+
}
|
|
110
|
+
function o(e) {
|
|
111
|
+
if (le.call(e, "key")) {
|
|
112
|
+
var l = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
113
|
+
if (l && l.isReactWarning) return !1;
|
|
114
|
+
}
|
|
115
|
+
return e.key !== void 0;
|
|
116
|
+
}
|
|
117
|
+
function u(e, l) {
|
|
118
|
+
function p() {
|
|
119
|
+
ie || (ie = !0, console.error(
|
|
120
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
121
|
+
l
|
|
122
|
+
));
|
|
123
|
+
}
|
|
124
|
+
p.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
125
|
+
get: p,
|
|
126
|
+
configurable: !0
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function f() {
|
|
130
|
+
var e = d(this.type);
|
|
131
|
+
return ue[e] || (ue[e] = !0, console.error(
|
|
132
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
133
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
134
|
+
}
|
|
135
|
+
function h(e, l, p, k, H, ee) {
|
|
136
|
+
var v = p.ref;
|
|
137
|
+
return e = {
|
|
138
|
+
$$typeof: N,
|
|
139
|
+
type: e,
|
|
140
|
+
key: l,
|
|
141
|
+
props: p,
|
|
142
|
+
_owner: k
|
|
143
|
+
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(e, "ref", {
|
|
144
|
+
enumerable: !1,
|
|
145
|
+
get: f
|
|
146
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
147
|
+
configurable: !1,
|
|
148
|
+
enumerable: !1,
|
|
149
|
+
writable: !0,
|
|
150
|
+
value: 0
|
|
151
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
152
|
+
configurable: !1,
|
|
153
|
+
enumerable: !1,
|
|
154
|
+
writable: !0,
|
|
155
|
+
value: null
|
|
156
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
157
|
+
configurable: !1,
|
|
158
|
+
enumerable: !1,
|
|
159
|
+
writable: !0,
|
|
160
|
+
value: H
|
|
161
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
162
|
+
configurable: !1,
|
|
163
|
+
enumerable: !1,
|
|
164
|
+
writable: !0,
|
|
165
|
+
value: ee
|
|
166
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
|
+
}
|
|
168
|
+
function _(e, l, p, k, H, ee) {
|
|
169
|
+
var v = l.children;
|
|
170
|
+
if (v !== void 0)
|
|
171
|
+
if (k)
|
|
172
|
+
if (Ae(v)) {
|
|
173
|
+
for (k = 0; k < v.length; k++)
|
|
174
|
+
m(v[k]);
|
|
175
|
+
Object.freeze && Object.freeze(v);
|
|
176
|
+
} else
|
|
177
|
+
console.error(
|
|
178
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
|
+
);
|
|
180
|
+
else m(v);
|
|
181
|
+
if (le.call(l, "key")) {
|
|
182
|
+
v = d(e);
|
|
183
|
+
var $ = Object.keys(l).filter(function($e) {
|
|
184
|
+
return $e !== "key";
|
|
185
|
+
});
|
|
186
|
+
k = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", fe[v + k] || ($ = 0 < $.length ? "{" + $.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
188
|
+
let props = %s;
|
|
189
|
+
<%s {...props} />
|
|
190
|
+
React keys must be passed directly to JSX without using spread:
|
|
191
|
+
let props = %s;
|
|
192
|
+
<%s key={someKey} {...props} />`,
|
|
193
|
+
k,
|
|
194
|
+
v,
|
|
195
|
+
$,
|
|
196
|
+
v
|
|
197
|
+
), fe[v + k] = !0);
|
|
198
|
+
}
|
|
199
|
+
if (v = null, p !== void 0 && (n(p), v = "" + p), o(l) && (n(l.key), v = "" + l.key), "key" in l) {
|
|
200
|
+
p = {};
|
|
201
|
+
for (var ae in l)
|
|
202
|
+
ae !== "key" && (p[ae] = l[ae]);
|
|
203
|
+
} else p = l;
|
|
204
|
+
return v && u(
|
|
205
|
+
p,
|
|
206
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
207
|
+
), h(
|
|
208
|
+
e,
|
|
209
|
+
v,
|
|
210
|
+
p,
|
|
211
|
+
t(),
|
|
212
|
+
H,
|
|
213
|
+
ee
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
function m(e) {
|
|
217
|
+
S(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === X && (e._payload.status === "fulfilled" ? S(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
218
|
+
}
|
|
219
|
+
function S(e) {
|
|
220
|
+
return typeof e == "object" && e !== null && e.$$typeof === N;
|
|
221
|
+
}
|
|
222
|
+
var y = Oe, N = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), A = /* @__PURE__ */ Symbol.for("react.fragment"), V = /* @__PURE__ */ Symbol.for("react.strict_mode"), J = /* @__PURE__ */ Symbol.for("react.profiler"), M = /* @__PURE__ */ Symbol.for("react.consumer"), j = /* @__PURE__ */ Symbol.for("react.context"), R = /* @__PURE__ */ Symbol.for("react.forward_ref"), L = /* @__PURE__ */ Symbol.for("react.suspense"), Y = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), Re = /* @__PURE__ */ Symbol.for("react.activity"), Ce = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, le = Object.prototype.hasOwnProperty, Ae = Array.isArray, Q = console.createTask ? console.createTask : function() {
|
|
223
|
+
return null;
|
|
224
|
+
};
|
|
225
|
+
y = {
|
|
226
|
+
react_stack_bottom_frame: function(e) {
|
|
227
|
+
return e();
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
var ie, ue = {}, be = y.react_stack_bottom_frame.bind(
|
|
231
|
+
y,
|
|
232
|
+
c
|
|
233
|
+
)(), _e = Q(r(c)), fe = {};
|
|
234
|
+
P.Fragment = A, P.jsx = function(e, l, p) {
|
|
235
|
+
var k = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
236
|
+
return _(
|
|
237
|
+
e,
|
|
238
|
+
l,
|
|
239
|
+
p,
|
|
240
|
+
!1,
|
|
241
|
+
k ? Error("react-stack-top-frame") : be,
|
|
242
|
+
k ? Q(r(e)) : _e
|
|
243
|
+
);
|
|
244
|
+
}, P.jsxs = function(e, l, p) {
|
|
245
|
+
var k = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
246
|
+
return _(
|
|
247
|
+
e,
|
|
248
|
+
l,
|
|
249
|
+
p,
|
|
250
|
+
!0,
|
|
251
|
+
k ? Error("react-stack-top-frame") : be,
|
|
252
|
+
k ? Q(r(e)) : _e
|
|
253
|
+
);
|
|
254
|
+
};
|
|
255
|
+
})()), P;
|
|
256
|
+
}
|
|
257
|
+
var he;
|
|
258
|
+
function Be() {
|
|
259
|
+
return he || (he = 1, process.env.NODE_ENV === "production" ? U.exports = Pe() : U.exports = Fe()), U.exports;
|
|
260
|
+
}
|
|
261
|
+
var s = Be();
|
|
262
|
+
const ye = {
|
|
263
|
+
"sand-badge": "_sand-badge_uye3i_1",
|
|
264
|
+
"sand-badge-primary": "_sand-badge-primary_uye3i_14",
|
|
265
|
+
"sand-badge-secondary": "_sand-badge-secondary_uye3i_19",
|
|
266
|
+
"sand-badge-success": "_sand-badge-success_uye3i_24",
|
|
267
|
+
"sand-badge-failed": "_sand-badge-failed_uye3i_30"
|
|
268
|
+
};
|
|
269
|
+
function i(...d) {
|
|
270
|
+
return d.filter(Boolean).join(" ");
|
|
271
|
+
}
|
|
272
|
+
function ze(d) {
|
|
273
|
+
return Array.from(
|
|
274
|
+
d.querySelectorAll(
|
|
275
|
+
[
|
|
276
|
+
"a[href]",
|
|
277
|
+
"button:not([disabled])",
|
|
278
|
+
"textarea:not([disabled])",
|
|
279
|
+
"input:not([disabled])",
|
|
280
|
+
"select:not([disabled])",
|
|
281
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
282
|
+
].join(",")
|
|
283
|
+
)
|
|
284
|
+
).filter((a) => !a.hasAttribute("disabled") && !a.getAttribute("aria-hidden"));
|
|
285
|
+
}
|
|
286
|
+
function ne(d, a, n, r) {
|
|
287
|
+
if (n !== 0)
|
|
288
|
+
switch (d.key) {
|
|
289
|
+
case "ArrowRight":
|
|
290
|
+
case "ArrowDown":
|
|
291
|
+
d.preventDefault(), r((a + 1) % n);
|
|
292
|
+
break;
|
|
293
|
+
case "ArrowLeft":
|
|
294
|
+
case "ArrowUp":
|
|
295
|
+
d.preventDefault(), r((a - 1 + n) % n);
|
|
296
|
+
break;
|
|
297
|
+
case "Home":
|
|
298
|
+
d.preventDefault(), r(0);
|
|
299
|
+
break;
|
|
300
|
+
case "End":
|
|
301
|
+
d.preventDefault(), r(n - 1);
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const qe = b(function({ variant: a = "primary", className: n = "", ...r }, t) {
|
|
306
|
+
const c = T(() => ye[`sand-badge-${a}`], [a]);
|
|
307
|
+
return /* @__PURE__ */ s.jsx(
|
|
308
|
+
"span",
|
|
309
|
+
{
|
|
310
|
+
ref: t,
|
|
311
|
+
className: i(ye["sand-badge"], c, n),
|
|
312
|
+
...r
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
});
|
|
316
|
+
qe.displayName = "SandBadge";
|
|
317
|
+
const F = {
|
|
318
|
+
"sand-breadcrumbs": "_sand-breadcrumbs_1uxir_1",
|
|
319
|
+
"sand-breadcrumb-item": "_sand-breadcrumb-item_1uxir_10",
|
|
320
|
+
"sand-breadcrumb-link": "_sand-breadcrumb-link_1uxir_17",
|
|
321
|
+
"sand-breadcrumb-current": "_sand-breadcrumb-current_1uxir_32",
|
|
322
|
+
"sand-breadcrumb-separator": "_sand-breadcrumb-separator_1uxir_37"
|
|
323
|
+
}, Le = b(function({ items: a, className: n = "", "aria-label": r = "Breadcrumb", ...t }, c) {
|
|
324
|
+
const o = T(
|
|
325
|
+
() => a.map((u, f) => {
|
|
326
|
+
const h = f === a.length - 1;
|
|
327
|
+
return /* @__PURE__ */ s.jsxs("li", { className: F["sand-breadcrumb-item"], children: [
|
|
328
|
+
u.href && !h ? /* @__PURE__ */ s.jsx("a", { href: u.href, className: F["sand-breadcrumb-link"], children: u.label }) : /* @__PURE__ */ s.jsx(
|
|
329
|
+
"span",
|
|
330
|
+
{
|
|
331
|
+
"aria-current": h ? "page" : void 0,
|
|
332
|
+
className: h ? F["sand-breadcrumb-current"] : void 0,
|
|
333
|
+
children: u.label
|
|
334
|
+
}
|
|
335
|
+
),
|
|
336
|
+
!h && /* @__PURE__ */ s.jsx("span", { className: i(F["sand-breadcrumb-separator"], "material-symbols-rounded"), "aria-hidden": "true", children: "chevron_right" })
|
|
337
|
+
] }, `${String(u.label)}-${f}`);
|
|
338
|
+
}),
|
|
339
|
+
[a]
|
|
340
|
+
);
|
|
341
|
+
return /* @__PURE__ */ s.jsx("nav", { ref: c, "aria-label": r, className: i(F["sand-breadcrumbs"], n), ...t, children: /* @__PURE__ */ s.jsx("ol", { children: o }) });
|
|
342
|
+
});
|
|
343
|
+
Le.displayName = "SandBreadcrumbs";
|
|
344
|
+
const Se = {
|
|
345
|
+
"sand-btn": "_sand-btn_9grrt_1",
|
|
346
|
+
"sand-btn-primary": "_sand-btn-primary_9grrt_42",
|
|
347
|
+
"sand-btn-secondary": "_sand-btn-secondary_9grrt_54",
|
|
348
|
+
"sand-btn-outline": "_sand-btn-outline_9grrt_63",
|
|
349
|
+
"sand-btn-success": "_sand-btn-success_9grrt_74",
|
|
350
|
+
"sand-btn-failed": "_sand-btn-failed_9grrt_85"
|
|
351
|
+
}, Ye = b(function({ variant: a = "primary", className: n = "", type: r = "button", ...t }, c) {
|
|
352
|
+
const o = T(() => Se[`sand-btn-${a}`], [a]);
|
|
353
|
+
return /* @__PURE__ */ s.jsx(
|
|
354
|
+
"button",
|
|
355
|
+
{
|
|
356
|
+
ref: c,
|
|
357
|
+
className: i(Se["sand-btn"], o, n),
|
|
358
|
+
type: r,
|
|
359
|
+
...t
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
});
|
|
363
|
+
Ye.displayName = "SandButton";
|
|
364
|
+
const W = {
|
|
365
|
+
"sand-card": "_sand-card_i3njl_1",
|
|
366
|
+
"sand-card-header": "_sand-card-header_i3njl_15",
|
|
367
|
+
"sand-card-body": "_sand-card-body_i3njl_22",
|
|
368
|
+
"sand-card-footer": "_sand-card-footer_i3njl_26"
|
|
369
|
+
}, Ge = b(function({ header: a, footer: n, children: r, className: t = "", ...c }, o) {
|
|
370
|
+
return /* @__PURE__ */ s.jsxs("article", { ref: o, className: i(W["sand-card"], t), ...c, children: [
|
|
371
|
+
a && /* @__PURE__ */ s.jsx("header", { className: W["sand-card-header"], children: a }),
|
|
372
|
+
/* @__PURE__ */ s.jsx("div", { className: W["sand-card-body"], children: r }),
|
|
373
|
+
n && /* @__PURE__ */ s.jsx("footer", { className: W["sand-card-footer"], children: n })
|
|
374
|
+
] });
|
|
375
|
+
});
|
|
376
|
+
Ge.displayName = "SandCard";
|
|
377
|
+
const He = "_active_197ic_77", O = {
|
|
378
|
+
"sand-code-block": "_sand-code-block_197ic_1",
|
|
379
|
+
"sand-copy-btn": "_sand-copy-btn_197ic_15",
|
|
380
|
+
"sand-code-tabs": "_sand-code-tabs_197ic_41",
|
|
381
|
+
"sand-tab-headers": "_sand-tab-headers_197ic_53",
|
|
382
|
+
"sand-tab-btn": "_sand-tab-btn_197ic_60",
|
|
383
|
+
active: He
|
|
384
|
+
}, ve = b(function({ code: a, className: n = "", ...r }, t) {
|
|
385
|
+
const [c, o] = ke(!1), u = I(() => {
|
|
386
|
+
navigator.clipboard.writeText(a).then(() => {
|
|
387
|
+
o(!0), setTimeout(() => o(!1), 2e3);
|
|
388
|
+
});
|
|
389
|
+
}, [a]);
|
|
390
|
+
return /* @__PURE__ */ s.jsxs("pre", { ref: t, className: i(O["sand-code-block"], n), ...r, children: [
|
|
391
|
+
/* @__PURE__ */ s.jsx(
|
|
392
|
+
"button",
|
|
393
|
+
{
|
|
394
|
+
className: O["sand-copy-btn"],
|
|
395
|
+
onClick: u,
|
|
396
|
+
type: "button",
|
|
397
|
+
"aria-label": c ? "Code copied to clipboard" : "Copy code to clipboard",
|
|
398
|
+
children: c ? "Copied" : "Copy"
|
|
399
|
+
}
|
|
400
|
+
),
|
|
401
|
+
/* @__PURE__ */ s.jsx("code", { children: a })
|
|
402
|
+
] });
|
|
403
|
+
});
|
|
404
|
+
ve.displayName = "SandCodeBlock";
|
|
405
|
+
const Ue = b(function({ tabs: a, defaultTab: n = 0, className: r = "", onTabChange: t }, c) {
|
|
406
|
+
const [o, u] = ke(n), f = C(), h = K([]), _ = I(
|
|
407
|
+
(S) => {
|
|
408
|
+
u(S), t?.(S), h.current[S]?.focus();
|
|
409
|
+
},
|
|
410
|
+
[t]
|
|
411
|
+
), m = T(() => a[o]?.code ?? "", [o, a]);
|
|
412
|
+
return /* @__PURE__ */ s.jsxs("div", { ref: c, className: i(O["sand-code-tabs"], r), children: [
|
|
413
|
+
/* @__PURE__ */ s.jsx("div", { className: O["sand-tab-headers"], role: "tablist", "aria-label": "Code examples", children: a.map((S, y) => /* @__PURE__ */ s.jsx(
|
|
414
|
+
"button",
|
|
415
|
+
{
|
|
416
|
+
ref: (N) => {
|
|
417
|
+
h.current[y] = N;
|
|
418
|
+
},
|
|
419
|
+
className: i(O["sand-tab-btn"], o === y && O.active),
|
|
420
|
+
type: "button",
|
|
421
|
+
role: "tab",
|
|
422
|
+
"aria-selected": o === y,
|
|
423
|
+
"aria-controls": `${f}-code-panel-${y}`,
|
|
424
|
+
id: `${f}-code-tab-${y}`,
|
|
425
|
+
tabIndex: o === y ? 0 : -1,
|
|
426
|
+
onClick: () => _(y),
|
|
427
|
+
onKeyDown: (N) => ne(N, y, a.length, (g) => _(g)),
|
|
428
|
+
children: S.name
|
|
429
|
+
},
|
|
430
|
+
y
|
|
431
|
+
)) }),
|
|
432
|
+
/* @__PURE__ */ s.jsx(
|
|
433
|
+
"div",
|
|
434
|
+
{
|
|
435
|
+
role: "tabpanel",
|
|
436
|
+
id: `${f}-code-panel-${o}`,
|
|
437
|
+
"aria-labelledby": `${f}-code-tab-${o}`,
|
|
438
|
+
children: /* @__PURE__ */ s.jsx(ve, { code: m })
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
] });
|
|
442
|
+
});
|
|
443
|
+
Ue.displayName = "SandCodeTabs";
|
|
444
|
+
const We = {
|
|
445
|
+
"sand-divider": "_sand-divider_svs0p_1"
|
|
446
|
+
}, Ke = b(function({ className: a = "", ...n }, r) {
|
|
447
|
+
return /* @__PURE__ */ s.jsx("hr", { ref: r, className: i(We["sand-divider"], a), ...n });
|
|
448
|
+
});
|
|
449
|
+
Ke.displayName = "SandDivider";
|
|
450
|
+
const E = {
|
|
451
|
+
"sand-feedback": "_sand-feedback_1pp8i_1",
|
|
452
|
+
"sand-feedback-toast": "_sand-feedback-toast_1pp8i_11",
|
|
453
|
+
"sand-feedback-snackbar": "_sand-feedback-snackbar_1pp8i_24",
|
|
454
|
+
"sand-feedback-row": "_sand-feedback-row_1pp8i_33",
|
|
455
|
+
"sand-feedback-icon": "_sand-feedback-icon_1pp8i_39",
|
|
456
|
+
"sand-feedback-content": "_sand-feedback-content_1pp8i_45",
|
|
457
|
+
"sand-feedback-title": "_sand-feedback-title_1pp8i_52",
|
|
458
|
+
"sand-feedback-message": "_sand-feedback-message_1pp8i_57",
|
|
459
|
+
"sand-feedback-action": "_sand-feedback-action_1pp8i_64",
|
|
460
|
+
"sand-feedback-success": "_sand-feedback-success_1pp8i_69",
|
|
461
|
+
"sand-feedback-failed": "_sand-feedback-failed_1pp8i_81",
|
|
462
|
+
"sand-feedback-info": "_sand-feedback-info_1pp8i_93"
|
|
463
|
+
}, Ve = {
|
|
464
|
+
info: "info",
|
|
465
|
+
success: "check_circle",
|
|
466
|
+
failed: "error"
|
|
467
|
+
}, xe = b(function({ heading: a, message: n, action: r, variant: t = "info", className: c = "", mode: o, ...u }, f) {
|
|
468
|
+
const h = T(() => Ve[t], [t]), _ = t === "failed" ? "alert" : "status";
|
|
469
|
+
return /* @__PURE__ */ s.jsx(
|
|
470
|
+
"div",
|
|
471
|
+
{
|
|
472
|
+
ref: f,
|
|
473
|
+
role: _,
|
|
474
|
+
"aria-live": t === "failed" ? "assertive" : "polite",
|
|
475
|
+
className: i(
|
|
476
|
+
E["sand-feedback"],
|
|
477
|
+
E[`sand-feedback-${o}`],
|
|
478
|
+
E[`sand-feedback-${t}`],
|
|
479
|
+
c
|
|
480
|
+
),
|
|
481
|
+
...u,
|
|
482
|
+
children: /* @__PURE__ */ s.jsxs("div", { className: E["sand-feedback-row"], children: [
|
|
483
|
+
/* @__PURE__ */ s.jsx("span", { className: i(E["sand-feedback-icon"], "material-symbols-rounded"), "aria-hidden": "true", children: h }),
|
|
484
|
+
/* @__PURE__ */ s.jsxs("div", { className: E["sand-feedback-content"], children: [
|
|
485
|
+
a && /* @__PURE__ */ s.jsx("span", { className: E["sand-feedback-title"], children: a }),
|
|
486
|
+
/* @__PURE__ */ s.jsx("span", { className: E["sand-feedback-message"], children: n })
|
|
487
|
+
] }),
|
|
488
|
+
r && /* @__PURE__ */ s.jsx("div", { className: E["sand-feedback-action"], children: r })
|
|
489
|
+
] })
|
|
490
|
+
}
|
|
491
|
+
);
|
|
492
|
+
}), Je = b(function(a, n) {
|
|
493
|
+
return /* @__PURE__ */ s.jsx(xe, { ref: n, mode: "toast", ...a });
|
|
494
|
+
});
|
|
495
|
+
Je.displayName = "SandToast";
|
|
496
|
+
const Xe = b(function(a, n) {
|
|
497
|
+
return /* @__PURE__ */ s.jsx(xe, { ref: n, mode: "snackbar", ...a });
|
|
498
|
+
});
|
|
499
|
+
Xe.displayName = "SandSnackbar";
|
|
500
|
+
const z = {
|
|
501
|
+
"sand-form-group": "_sand-form-group_fyw0t_1",
|
|
502
|
+
"sand-label": "_sand-label_fyw0t_8",
|
|
503
|
+
"sand-input": "_sand-input_fyw0t_17",
|
|
504
|
+
"sand-input-error": "_sand-input-error_fyw0t_38",
|
|
505
|
+
"sand-helper-text-error": "_sand-helper-text-error_fyw0t_47"
|
|
506
|
+
}, je = b(function({ label: a, children: n, className: r = "", htmlFor: t, ...c }, o) {
|
|
507
|
+
return /* @__PURE__ */ s.jsxs("div", { ref: o, className: i(z["sand-form-group"], r), ...c, children: [
|
|
508
|
+
a && /* @__PURE__ */ s.jsx("label", { className: z["sand-label"], htmlFor: t, children: a }),
|
|
509
|
+
n
|
|
510
|
+
] });
|
|
511
|
+
});
|
|
512
|
+
je.displayName = "SandFormGroup";
|
|
513
|
+
const Ne = b(function({ error: a, className: n = "", ...r }, t) {
|
|
514
|
+
return /* @__PURE__ */ s.jsx(
|
|
515
|
+
"input",
|
|
516
|
+
{
|
|
517
|
+
ref: t,
|
|
518
|
+
className: i(z["sand-input"], a && z["sand-input-error"], n),
|
|
519
|
+
"aria-invalid": a || r["aria-invalid"],
|
|
520
|
+
...r
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
});
|
|
524
|
+
Ne.displayName = "SandInput";
|
|
525
|
+
const Ze = b(function({ label: a, helperText: n, error: r, groupClassName: t, className: c = "", "aria-describedby": o, ...u }, f) {
|
|
526
|
+
const h = C(), _ = u.id ?? h, m = n ? `${_}-help` : void 0, S = T(
|
|
527
|
+
() => [o, m].filter(Boolean).join(" ") || void 0,
|
|
528
|
+
[o, m]
|
|
529
|
+
);
|
|
530
|
+
return /* @__PURE__ */ s.jsxs(je, { label: a, className: t, htmlFor: _, children: [
|
|
531
|
+
/* @__PURE__ */ s.jsx(
|
|
532
|
+
Ne,
|
|
533
|
+
{
|
|
534
|
+
ref: f,
|
|
535
|
+
id: _,
|
|
536
|
+
error: r,
|
|
537
|
+
className: c,
|
|
538
|
+
"aria-describedby": S,
|
|
539
|
+
...u
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
n && /* @__PURE__ */ s.jsx("span", { id: m, className: r ? z["sand-helper-text-error"] : "", children: n })
|
|
543
|
+
] });
|
|
544
|
+
});
|
|
545
|
+
Ze.displayName = "SandInputGroup";
|
|
546
|
+
const Qe = {
|
|
547
|
+
"sand-kbd": "_sand-kbd_mo78g_1"
|
|
548
|
+
}, ea = b(function({ className: a = "", ...n }, r) {
|
|
549
|
+
return /* @__PURE__ */ s.jsx("kbd", { ref: r, className: i(Qe["sand-kbd"], a), ...n });
|
|
550
|
+
});
|
|
551
|
+
ea.displayName = "SandKBD";
|
|
552
|
+
const q = {
|
|
553
|
+
"sand-container": "_sand-container_174rd_1",
|
|
554
|
+
"sand-header": "_sand-header_174rd_7",
|
|
555
|
+
"sand-tool-layout": "_sand-tool-layout_174rd_17",
|
|
556
|
+
"sand-tool-panel": "_sand-tool-panel_174rd_24",
|
|
557
|
+
"sand-result-panel": "_sand-result-panel_174rd_34"
|
|
558
|
+
}, aa = b(function({ className: a = "", ...n }, r) {
|
|
559
|
+
return /* @__PURE__ */ s.jsx("div", { ref: r, className: i(q["sand-container"], a), ...n });
|
|
560
|
+
});
|
|
561
|
+
aa.displayName = "SandContainer";
|
|
562
|
+
const na = b(function({ className: a = "", ...n }, r) {
|
|
563
|
+
return /* @__PURE__ */ s.jsx("header", { ref: r, className: i(q["sand-header"], a), ...n });
|
|
564
|
+
});
|
|
565
|
+
na.displayName = "SandHeader";
|
|
566
|
+
const ge = b(function({ className: a = "", ...n }, r) {
|
|
567
|
+
return /* @__PURE__ */ s.jsx("div", { ref: r, className: i(q["sand-tool-layout"], a), ...n });
|
|
568
|
+
});
|
|
569
|
+
ge.displayName = "SandToolLayout";
|
|
570
|
+
const sa = b(function({ className: a = "", ...n }, r) {
|
|
571
|
+
return /* @__PURE__ */ s.jsx("aside", { ref: r, className: i(q["sand-tool-panel"], a), ...n });
|
|
572
|
+
});
|
|
573
|
+
sa.displayName = "SandToolPanel";
|
|
574
|
+
const ra = b(function({ className: a = "", ...n }, r) {
|
|
575
|
+
return /* @__PURE__ */ s.jsx("main", { ref: r, className: i(q["sand-result-panel"], a), ...n });
|
|
576
|
+
});
|
|
577
|
+
ra.displayName = "SandResultPanel";
|
|
578
|
+
const ta = b(
|
|
579
|
+
function({ header: a, panel: n, result: r }, t) {
|
|
580
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
581
|
+
a,
|
|
582
|
+
/* @__PURE__ */ s.jsxs(ge, { ref: t, children: [
|
|
583
|
+
n,
|
|
584
|
+
r
|
|
585
|
+
] })
|
|
586
|
+
] });
|
|
587
|
+
}
|
|
588
|
+
);
|
|
589
|
+
ta.displayName = "SandMicroserviceLayout";
|
|
590
|
+
const w = {
|
|
591
|
+
"sand-modal-root": "_sand-modal-root_uryk1_1",
|
|
592
|
+
"sand-modal-backdrop": "_sand-modal-backdrop_uryk1_11",
|
|
593
|
+
"sand-modal-panel": "_sand-modal-panel_uryk1_18",
|
|
594
|
+
"sand-modal-header": "_sand-modal-header_uryk1_29",
|
|
595
|
+
"sand-modal-title": "_sand-modal-title_uryk1_38",
|
|
596
|
+
"sand-modal-description": "_sand-modal-description_uryk1_44",
|
|
597
|
+
"sand-modal-close": "_sand-modal-close_uryk1_51",
|
|
598
|
+
"sand-modal-body": "_sand-modal-body_uryk1_73",
|
|
599
|
+
"sand-modal-footer": "_sand-modal-footer_uryk1_77"
|
|
600
|
+
}, Ee = Me(null);
|
|
601
|
+
function we() {
|
|
602
|
+
const d = De(Ee);
|
|
603
|
+
if (!d)
|
|
604
|
+
throw new Error("SandModal sub-components must be used within SandModal.");
|
|
605
|
+
return d;
|
|
606
|
+
}
|
|
607
|
+
const se = b(function({ className: a = "", ...n }, r) {
|
|
608
|
+
return /* @__PURE__ */ s.jsx("div", { ref: r, className: i(w["sand-modal-header"], a), ...n });
|
|
609
|
+
});
|
|
610
|
+
se.displayName = "SandModal.Header";
|
|
611
|
+
const re = b(function({ className: a = "", ...n }, r) {
|
|
612
|
+
return /* @__PURE__ */ s.jsx("div", { ref: r, className: i(w["sand-modal-body"], a), ...n });
|
|
613
|
+
});
|
|
614
|
+
re.displayName = "SandModal.Body";
|
|
615
|
+
const te = b(function({ className: a = "", ...n }, r) {
|
|
616
|
+
return /* @__PURE__ */ s.jsx("div", { ref: r, className: i(w["sand-modal-footer"], a), ...n });
|
|
617
|
+
});
|
|
618
|
+
te.displayName = "SandModal.Footer";
|
|
619
|
+
const de = b(function({ className: a = "", ...n }, r) {
|
|
620
|
+
const { titleId: t } = we();
|
|
621
|
+
return /* @__PURE__ */ s.jsx("div", { ref: r, id: t, className: i(w["sand-modal-title"], a), ...n });
|
|
622
|
+
});
|
|
623
|
+
de.displayName = "SandModal.Title";
|
|
624
|
+
const oe = b(function({ className: a = "", ...n }, r) {
|
|
625
|
+
const { descriptionId: t } = we();
|
|
626
|
+
return /* @__PURE__ */ s.jsx("div", { ref: r, id: t, className: i(w["sand-modal-description"], a), ...n });
|
|
627
|
+
});
|
|
628
|
+
oe.displayName = "SandModal.Description";
|
|
629
|
+
const Te = b(function({
|
|
630
|
+
open: a,
|
|
631
|
+
onClose: n,
|
|
632
|
+
title: r,
|
|
633
|
+
description: t,
|
|
634
|
+
footer: c,
|
|
635
|
+
closeOnOverlay: o = !0,
|
|
636
|
+
initialFocusRef: u,
|
|
637
|
+
children: f,
|
|
638
|
+
className: h = "",
|
|
639
|
+
..._
|
|
640
|
+
}, m) {
|
|
641
|
+
const S = C(), y = C(), N = K(null), g = K(null), A = K(null), V = T(
|
|
642
|
+
() => ({ titleId: S, descriptionId: y }),
|
|
643
|
+
[y, S]
|
|
644
|
+
), J = I(
|
|
645
|
+
(j) => {
|
|
646
|
+
g.current = j, typeof m == "function" ? m(j) : m && (m.current = j);
|
|
647
|
+
},
|
|
648
|
+
[m]
|
|
649
|
+
), M = I(
|
|
650
|
+
(j) => {
|
|
651
|
+
if (j.key === "Escape") {
|
|
652
|
+
j.preventDefault(), n();
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
if (j.key !== "Tab" || !g.current)
|
|
656
|
+
return;
|
|
657
|
+
const R = ze(g.current);
|
|
658
|
+
if (R.length === 0) {
|
|
659
|
+
j.preventDefault(), g.current.focus();
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
const L = R[0], Y = R[R.length - 1], G = document.activeElement;
|
|
663
|
+
j.shiftKey && G === L ? (j.preventDefault(), Y.focus()) : !j.shiftKey && G === Y && (j.preventDefault(), L.focus());
|
|
664
|
+
},
|
|
665
|
+
[n]
|
|
666
|
+
);
|
|
667
|
+
return Ie(() => {
|
|
668
|
+
if (!a) {
|
|
669
|
+
A.current?.focus();
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
A.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
673
|
+
const j = document.body.style.overflow;
|
|
674
|
+
return document.body.style.overflow = "hidden", (u?.current ?? N.current ?? g.current)?.focus(), window.addEventListener("keydown", M), () => {
|
|
675
|
+
document.body.style.overflow = j, window.removeEventListener("keydown", M);
|
|
676
|
+
};
|
|
677
|
+
}, [M, u, a]), a ? /* @__PURE__ */ s.jsxs("div", { className: w["sand-modal-root"], children: [
|
|
678
|
+
/* @__PURE__ */ s.jsx(
|
|
679
|
+
"button",
|
|
680
|
+
{
|
|
681
|
+
type: "button",
|
|
682
|
+
className: w["sand-modal-backdrop"],
|
|
683
|
+
"aria-label": "Close dialog",
|
|
684
|
+
onClick: o ? n : void 0
|
|
685
|
+
}
|
|
686
|
+
),
|
|
687
|
+
/* @__PURE__ */ s.jsx(
|
|
688
|
+
"div",
|
|
689
|
+
{
|
|
690
|
+
ref: J,
|
|
691
|
+
role: "dialog",
|
|
692
|
+
"aria-modal": "true",
|
|
693
|
+
"aria-labelledby": r ? S : void 0,
|
|
694
|
+
"aria-describedby": t ? y : void 0,
|
|
695
|
+
className: i(w["sand-modal-panel"], h),
|
|
696
|
+
tabIndex: -1,
|
|
697
|
+
..._,
|
|
698
|
+
children: /* @__PURE__ */ s.jsxs(Ee.Provider, { value: V, children: [
|
|
699
|
+
(r || t) && /* @__PURE__ */ s.jsxs(se, { children: [
|
|
700
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
701
|
+
r && /* @__PURE__ */ s.jsx(de, { children: r }),
|
|
702
|
+
t && /* @__PURE__ */ s.jsx(oe, { children: t })
|
|
703
|
+
] }),
|
|
704
|
+
/* @__PURE__ */ s.jsx(
|
|
705
|
+
"button",
|
|
706
|
+
{
|
|
707
|
+
ref: N,
|
|
708
|
+
type: "button",
|
|
709
|
+
className: w["sand-modal-close"],
|
|
710
|
+
onClick: n,
|
|
711
|
+
"aria-label": "Close dialog",
|
|
712
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "close" })
|
|
713
|
+
}
|
|
714
|
+
)
|
|
715
|
+
] }),
|
|
716
|
+
/* @__PURE__ */ s.jsx(re, { children: f }),
|
|
717
|
+
c && /* @__PURE__ */ s.jsx(te, { children: c })
|
|
718
|
+
] })
|
|
719
|
+
}
|
|
720
|
+
)
|
|
721
|
+
] }) : null;
|
|
722
|
+
});
|
|
723
|
+
Te.displayName = "SandModal";
|
|
724
|
+
const ba = Object.assign(Te, {
|
|
725
|
+
Header: se,
|
|
726
|
+
Body: re,
|
|
727
|
+
Footer: te,
|
|
728
|
+
Title: de,
|
|
729
|
+
Description: oe
|
|
730
|
+
}), B = {
|
|
731
|
+
"sand-pagination": "_sand-pagination_cizv5_1",
|
|
732
|
+
"sand-page-btn": "_sand-page-btn_cizv5_8",
|
|
733
|
+
"sand-page-btn-active": "_sand-page-btn-active_cizv5_36"
|
|
734
|
+
}, da = b(function({ currentPage: a, totalPages: n, onPageChange: r, className: t = "", ...c }, o) {
|
|
735
|
+
const u = T(() => Array.from({ length: n }, (_, m) => m + 1), [n]), f = I(
|
|
736
|
+
(_) => {
|
|
737
|
+
_ < 1 || _ > n || _ === a || r?.(_);
|
|
738
|
+
},
|
|
739
|
+
[a, r, n]
|
|
740
|
+
), h = I(
|
|
741
|
+
(_) => {
|
|
742
|
+
ne(_, a - 1, n, (m) => f(m + 1));
|
|
743
|
+
},
|
|
744
|
+
[a, f, n]
|
|
745
|
+
);
|
|
746
|
+
return /* @__PURE__ */ s.jsxs(
|
|
747
|
+
"nav",
|
|
748
|
+
{
|
|
749
|
+
ref: o,
|
|
750
|
+
"aria-label": "Pagination",
|
|
751
|
+
className: i(B["sand-pagination"], t),
|
|
752
|
+
onKeyDown: h,
|
|
753
|
+
...c,
|
|
754
|
+
children: [
|
|
755
|
+
/* @__PURE__ */ s.jsx(
|
|
756
|
+
"button",
|
|
757
|
+
{
|
|
758
|
+
type: "button",
|
|
759
|
+
className: B["sand-page-btn"],
|
|
760
|
+
disabled: a === 1,
|
|
761
|
+
"aria-label": "Previous page",
|
|
762
|
+
onClick: () => f(a - 1),
|
|
763
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "chevron_left" })
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
u.map((_) => /* @__PURE__ */ s.jsx(
|
|
767
|
+
"button",
|
|
768
|
+
{
|
|
769
|
+
type: "button",
|
|
770
|
+
"aria-current": _ === a ? "page" : void 0,
|
|
771
|
+
"aria-label": `Page ${_}`,
|
|
772
|
+
className: i(B["sand-page-btn"], _ === a && B["sand-page-btn-active"]),
|
|
773
|
+
onClick: () => f(_),
|
|
774
|
+
children: _
|
|
775
|
+
},
|
|
776
|
+
_
|
|
777
|
+
)),
|
|
778
|
+
/* @__PURE__ */ s.jsx(
|
|
779
|
+
"button",
|
|
780
|
+
{
|
|
781
|
+
type: "button",
|
|
782
|
+
className: B["sand-page-btn"],
|
|
783
|
+
disabled: a === n,
|
|
784
|
+
"aria-label": "Next page",
|
|
785
|
+
onClick: () => f(a + 1),
|
|
786
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "chevron_right" })
|
|
787
|
+
}
|
|
788
|
+
)
|
|
789
|
+
]
|
|
790
|
+
}
|
|
791
|
+
);
|
|
792
|
+
});
|
|
793
|
+
da.displayName = "SandPagination";
|
|
794
|
+
const x = {
|
|
795
|
+
"sand-choice-group": "_sand-choice-group_viqgz_1",
|
|
796
|
+
"sand-choice-row": "_sand-choice-row_viqgz_7",
|
|
797
|
+
"sand-choice-input": "_sand-choice-input_viqgz_16",
|
|
798
|
+
"sand-choice-control": "_sand-choice-control_viqgz_22",
|
|
799
|
+
"sand-checkbox": "_sand-checkbox_viqgz_41",
|
|
800
|
+
"sand-checkbox-icon": "_sand-checkbox-icon_viqgz_59",
|
|
801
|
+
"sand-radio": "_sand-radio_viqgz_76",
|
|
802
|
+
"sand-switch": "_sand-switch_viqgz_94",
|
|
803
|
+
"sand-choice-content": "_sand-choice-content_viqgz_123",
|
|
804
|
+
"sand-choice-label": "_sand-choice-label_viqgz_129",
|
|
805
|
+
"sand-choice-description": "_sand-choice-description_viqgz_134"
|
|
806
|
+
}, ce = ({ label: d, description: a }) => /* @__PURE__ */ s.jsxs("span", { className: x["sand-choice-content"], children: [
|
|
807
|
+
/* @__PURE__ */ s.jsx("span", { className: x["sand-choice-label"], children: d }),
|
|
808
|
+
a && /* @__PURE__ */ s.jsx("span", { className: x["sand-choice-description"], children: a })
|
|
809
|
+
] }), oa = b(function({ label: a, description: n, id: r, className: t = "", ...c }, o) {
|
|
810
|
+
const u = C(), f = r ?? u;
|
|
811
|
+
return /* @__PURE__ */ s.jsxs("label", { className: i(x["sand-choice-row"], t), htmlFor: f, children: [
|
|
812
|
+
/* @__PURE__ */ s.jsx("input", { ref: o, id: f, type: "checkbox", className: x["sand-choice-input"], ...c }),
|
|
813
|
+
/* @__PURE__ */ s.jsx("span", { className: i(x["sand-choice-control"], x["sand-checkbox"]), "aria-hidden": "true", children: /* @__PURE__ */ s.jsx("span", { className: i(x["sand-checkbox-icon"], "material-symbols-rounded"), children: "check" }) }),
|
|
814
|
+
/* @__PURE__ */ s.jsx(ce, { label: a, description: n })
|
|
815
|
+
] });
|
|
816
|
+
});
|
|
817
|
+
oa.displayName = "SandCheckbox";
|
|
818
|
+
const ca = b(function({ label: a, description: n, id: r, className: t = "", onKeyDown: c, ...o }, u) {
|
|
819
|
+
const f = C(), h = r ?? f, _ = (m) => {
|
|
820
|
+
if (c?.(m), m.defaultPrevented || !o.name)
|
|
821
|
+
return;
|
|
822
|
+
const S = Array.from(
|
|
823
|
+
document.querySelectorAll(`input[type="radio"][name="${o.name}"]`)
|
|
824
|
+
), y = S.findIndex((N) => N.id === h);
|
|
825
|
+
ne(m, y, S.length, (N) => {
|
|
826
|
+
S[N]?.focus(), S[N]?.click();
|
|
827
|
+
});
|
|
828
|
+
};
|
|
829
|
+
return /* @__PURE__ */ s.jsxs("label", { className: i(x["sand-choice-row"], t), htmlFor: h, children: [
|
|
830
|
+
/* @__PURE__ */ s.jsx("input", { ref: u, id: h, type: "radio", className: x["sand-choice-input"], onKeyDown: _, ...o }),
|
|
831
|
+
/* @__PURE__ */ s.jsx("span", { className: i(x["sand-choice-control"], x["sand-radio"]), "aria-hidden": "true" }),
|
|
832
|
+
/* @__PURE__ */ s.jsx(ce, { label: a, description: n })
|
|
833
|
+
] });
|
|
834
|
+
});
|
|
835
|
+
ca.displayName = "SandRadio";
|
|
836
|
+
const la = b(function({ label: a, description: n, id: r, className: t = "", ...c }, o) {
|
|
837
|
+
const u = C(), f = r ?? u;
|
|
838
|
+
return /* @__PURE__ */ s.jsxs("label", { className: i(x["sand-choice-row"], t), htmlFor: f, children: [
|
|
839
|
+
/* @__PURE__ */ s.jsx("input", { ref: o, id: f, type: "checkbox", role: "switch", className: x["sand-choice-input"], ...c }),
|
|
840
|
+
/* @__PURE__ */ s.jsx("span", { className: i(x["sand-choice-control"], x["sand-switch"]), "aria-hidden": "true" }),
|
|
841
|
+
/* @__PURE__ */ s.jsx(ce, { label: a, description: n })
|
|
842
|
+
] });
|
|
843
|
+
});
|
|
844
|
+
la.displayName = "SandSwitch";
|
|
845
|
+
const ia = b(function({ className: a = "", label: n, ...r }, t) {
|
|
846
|
+
return /* @__PURE__ */ s.jsx("div", { ref: t, role: "group", "aria-label": typeof n == "string" ? n : void 0, className: i(x["sand-choice-group"], a), ...r });
|
|
847
|
+
});
|
|
848
|
+
ia.displayName = "SandChoiceGroup";
|
|
849
|
+
export {
|
|
850
|
+
qe as SandBadge,
|
|
851
|
+
Le as SandBreadcrumbs,
|
|
852
|
+
Ye as SandButton,
|
|
853
|
+
Ge as SandCard,
|
|
854
|
+
oa as SandCheckbox,
|
|
855
|
+
ia as SandChoiceGroup,
|
|
856
|
+
ve as SandCodeBlock,
|
|
857
|
+
Ue as SandCodeTabs,
|
|
858
|
+
aa as SandContainer,
|
|
859
|
+
Ke as SandDivider,
|
|
860
|
+
je as SandFormGroup,
|
|
861
|
+
na as SandHeader,
|
|
862
|
+
Ne as SandInput,
|
|
863
|
+
Ze as SandInputGroup,
|
|
864
|
+
ea as SandKBD,
|
|
865
|
+
ta as SandMicroserviceLayout,
|
|
866
|
+
ba as SandModal,
|
|
867
|
+
da as SandPagination,
|
|
868
|
+
ca as SandRadio,
|
|
869
|
+
ra as SandResultPanel,
|
|
870
|
+
Xe as SandSnackbar,
|
|
871
|
+
la as SandSwitch,
|
|
872
|
+
Je as SandToast,
|
|
873
|
+
ge as SandToolLayout,
|
|
874
|
+
sa as SandToolPanel
|
|
875
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.SandUI={},f.React))})(this,(function(f,t){"use strict";var z={exports:{}},I={};var ia;function Wa(){if(ia)return I;ia=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(d,o,l){var c=null;if(l!==void 0&&(c=""+l),o.key!==void 0&&(c=""+o.key),"key"in o){l={};for(var b in o)b!=="key"&&(l[b]=o[b])}else l=o;return o=l.ref,{$$typeof:r,type:d,key:c,ref:o!==void 0?o:null,props:l}}return I.Fragment=e,I.jsx=n,I.jsxs=n,I}var O={};var ua;function Ka(){return ua||(ua=1,process.env.NODE_ENV!=="production"&&(function(){function r(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ae?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case A:return"Fragment";case da:return"Profiler";case sa:return"StrictMode";case G:return"Suspense";case H:return"SuspenseList";case $a:return"Activity"}if(typeof a=="object")switch(typeof a.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),a.$$typeof){case E:return"Portal";case x:return a.displayName||"Context";case L:return(a._context.displayName||"Context")+".Consumer";case T:var i=a.render;return a=a.displayName,a||(a=i.displayName||i.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case U:return i=a.displayName||null,i!==null?i:r(a.type)||"Memo";case ta:i=a._payload,a=a._init;try{return r(a(i))}catch{}}return null}function e(a){return""+a}function n(a){try{e(a);var i=!1}catch{i=!0}if(i){i=console;var h=i.error,v=typeof Symbol=="function"&&Symbol.toStringTag&&a[Symbol.toStringTag]||a.constructor.name||"Object";return h.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",v),e(a)}}function d(a){if(a===A)return"<>";if(typeof a=="object"&&a!==null&&a.$$typeof===ta)return"<...>";try{var i=r(a);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function o(){var a=oa.A;return a===null?null:a.getOwner()}function l(){return Error("react-stack-top-frame")}function c(a){if(La.call(a,"key")){var i=Object.getOwnPropertyDescriptor(a,"key").get;if(i&&i.isReactWarning)return!1}return a.key!==void 0}function b(a,i){function h(){za||(za=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}h.isReactWarning=!0,Object.defineProperty(a,"key",{get:h,configurable:!0})}function m(){var a=r(this.type);return Ya[a]||(Ya[a]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),a=this.props.ref,a!==void 0?a:null}function y(a,i,h,v,W,ca){var j=h.ref;return a={$$typeof:R,type:a,key:i,props:h,_owner:v},(j!==void 0?j:null)!==null?Object.defineProperty(a,"ref",{enumerable:!1,get:m}):Object.defineProperty(a,"ref",{enumerable:!1,value:null}),a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(a,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(a,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.defineProperty(a,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ca}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a}function _(a,i,h,v,W,ca){var j=i.children;if(j!==void 0)if(v)if(ee(j)){for(v=0;v<j.length;v++)p(j[v]);Object.freeze&&Object.freeze(j)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(j);if(La.call(i,"key")){j=r(a);var M=Object.keys(i).filter(function(ne){return ne!=="key"});v=0<M.length?"{key: someKey, "+M.join(": ..., ")+": ...}":"{key: someKey}",Ua[j+v]||(M=0<M.length?"{"+M.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,v,j,M,j),Ua[j+v]=!0)}if(j=null,h!==void 0&&(n(h),j=""+h),c(i)&&(n(i.key),j=""+i.key),"key"in i){h={};for(var la in i)la!=="key"&&(h[la]=i[la])}else h=i;return j&&b(h,typeof a=="function"?a.displayName||a.name||"Unknown":a),y(a,j,h,o(),W,ca)}function p(a){k(a)?a._store&&(a._store.validated=1):typeof a=="object"&&a!==null&&a.$$typeof===ta&&(a._payload.status==="fulfilled"?k(a._payload.value)&&a._payload.value._store&&(a._payload.value._store.validated=1):a._store&&(a._store.validated=1))}function k(a){return typeof a=="object"&&a!==null&&a.$$typeof===R}var S=t,R=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),sa=Symbol.for("react.strict_mode"),da=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),x=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),ta=Symbol.for("react.lazy"),$a=Symbol.for("react.activity"),ae=Symbol.for("react.client.reference"),oa=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,La=Object.prototype.hasOwnProperty,ee=Array.isArray,ra=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(a){return a()}};var za,Ya={},Ga=S.react_stack_bottom_frame.bind(S,l)(),Ha=ra(d(l)),Ua={};O.Fragment=A,O.jsx=function(a,i,h){var v=1e4>oa.recentlyCreatedOwnerStacks++;return _(a,i,h,!1,v?Error("react-stack-top-frame"):Ga,v?ra(d(a)):Ha)},O.jsxs=function(a,i,h){var v=1e4>oa.recentlyCreatedOwnerStacks++;return _(a,i,h,!0,v?Error("react-stack-top-frame"):Ga,v?ra(d(a)):Ha)}})()),O}var fa;function Va(){return fa||(fa=1,process.env.NODE_ENV==="production"?z.exports=Wa():z.exports=Ka()),z.exports}var s=Va();const ba={"sand-badge":"_sand-badge_uye3i_1","sand-badge-primary":"_sand-badge-primary_uye3i_14","sand-badge-secondary":"_sand-badge-secondary_uye3i_19","sand-badge-success":"_sand-badge-success_uye3i_24","sand-badge-failed":"_sand-badge-failed_uye3i_30"};function u(...r){return r.filter(Boolean).join(" ")}function Ja(r){return Array.from(r.querySelectorAll(["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","))).filter(e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))}function K(r,e,n,d){if(n!==0)switch(r.key){case"ArrowRight":case"ArrowDown":r.preventDefault(),d((e+1)%n);break;case"ArrowLeft":case"ArrowUp":r.preventDefault(),d((e-1+n)%n);break;case"Home":r.preventDefault(),d(0);break;case"End":r.preventDefault(),d(n-1);break}}const _a=t.forwardRef(function({variant:e="primary",className:n="",...d},o){const l=t.useMemo(()=>ba[`sand-badge-${e}`],[e]);return s.jsx("span",{ref:o,className:u(ba["sand-badge"],l,n),...d})});_a.displayName="SandBadge";const P={"sand-breadcrumbs":"_sand-breadcrumbs_1uxir_1","sand-breadcrumb-item":"_sand-breadcrumb-item_1uxir_10","sand-breadcrumb-link":"_sand-breadcrumb-link_1uxir_17","sand-breadcrumb-current":"_sand-breadcrumb-current_1uxir_32","sand-breadcrumb-separator":"_sand-breadcrumb-separator_1uxir_37"},ma=t.forwardRef(function({items:e,className:n="","aria-label":d="Breadcrumb",...o},l){const c=t.useMemo(()=>e.map((b,m)=>{const y=m===e.length-1;return s.jsxs("li",{className:P["sand-breadcrumb-item"],children:[b.href&&!y?s.jsx("a",{href:b.href,className:P["sand-breadcrumb-link"],children:b.label}):s.jsx("span",{"aria-current":y?"page":void 0,className:y?P["sand-breadcrumb-current"]:void 0,children:b.label}),!y&&s.jsx("span",{className:u(P["sand-breadcrumb-separator"],"material-symbols-rounded"),"aria-hidden":"true",children:"chevron_right"})]},`${String(b.label)}-${m}`)}),[e]);return s.jsx("nav",{ref:l,"aria-label":d,className:u(P["sand-breadcrumbs"],n),...o,children:s.jsx("ol",{children:c})})});ma.displayName="SandBreadcrumbs";const pa={"sand-btn":"_sand-btn_9grrt_1","sand-btn-primary":"_sand-btn-primary_9grrt_42","sand-btn-secondary":"_sand-btn-secondary_9grrt_54","sand-btn-outline":"_sand-btn-outline_9grrt_63","sand-btn-success":"_sand-btn-success_9grrt_74","sand-btn-failed":"_sand-btn-failed_9grrt_85"},ha=t.forwardRef(function({variant:e="primary",className:n="",type:d="button",...o},l){const c=t.useMemo(()=>pa[`sand-btn-${e}`],[e]);return s.jsx("button",{ref:l,className:u(pa["sand-btn"],c,n),type:d,...o})});ha.displayName="SandButton";const Y={"sand-card":"_sand-card_i3njl_1","sand-card-header":"_sand-card-header_i3njl_15","sand-card-body":"_sand-card-body_i3njl_22","sand-card-footer":"_sand-card-footer_i3njl_26"},ya=t.forwardRef(function({header:e,footer:n,children:d,className:o="",...l},c){return s.jsxs("article",{ref:c,className:u(Y["sand-card"],o),...l,children:[e&&s.jsx("header",{className:Y["sand-card-header"],children:e}),s.jsx("div",{className:Y["sand-card-body"],children:d}),n&&s.jsx("footer",{className:Y["sand-card-footer"],children:n})]})});ya.displayName="SandCard";const C={"sand-code-block":"_sand-code-block_197ic_1","sand-copy-btn":"_sand-copy-btn_197ic_15","sand-code-tabs":"_sand-code-tabs_197ic_41","sand-tab-headers":"_sand-tab-headers_197ic_53","sand-tab-btn":"_sand-tab-btn_197ic_60",active:"_active_197ic_77"},V=t.forwardRef(function({code:e,className:n="",...d},o){const[l,c]=t.useState(!1),b=t.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{c(!0),setTimeout(()=>c(!1),2e3)})},[e]);return s.jsxs("pre",{ref:o,className:u(C["sand-code-block"],n),...d,children:[s.jsx("button",{className:C["sand-copy-btn"],onClick:b,type:"button","aria-label":l?"Code copied to clipboard":"Copy code to clipboard",children:l?"Copied":"Copy"}),s.jsx("code",{children:e})]})});V.displayName="SandCodeBlock";const Sa=t.forwardRef(function({tabs:e,defaultTab:n=0,className:d="",onTabChange:o},l){const[c,b]=t.useState(n),m=t.useId(),y=t.useRef([]),_=t.useCallback(k=>{b(k),o?.(k),y.current[k]?.focus()},[o]),p=t.useMemo(()=>e[c]?.code??"",[c,e]);return s.jsxs("div",{ref:l,className:u(C["sand-code-tabs"],d),children:[s.jsx("div",{className:C["sand-tab-headers"],role:"tablist","aria-label":"Code examples",children:e.map((k,S)=>s.jsx("button",{ref:R=>{y.current[S]=R},className:u(C["sand-tab-btn"],c===S&&C.active),type:"button",role:"tab","aria-selected":c===S,"aria-controls":`${m}-code-panel-${S}`,id:`${m}-code-tab-${S}`,tabIndex:c===S?0:-1,onClick:()=>_(S),onKeyDown:R=>K(R,S,e.length,E=>_(E)),children:k.name},S))}),s.jsx("div",{role:"tabpanel",id:`${m}-code-panel-${c}`,"aria-labelledby":`${m}-code-tab-${c}`,children:s.jsx(V,{code:p})})]})});Sa.displayName="SandCodeTabs";const Xa={"sand-divider":"_sand-divider_svs0p_1"},ka=t.forwardRef(function({className:e="",...n},d){return s.jsx("hr",{ref:d,className:u(Xa["sand-divider"],e),...n})});ka.displayName="SandDivider";const w={"sand-feedback":"_sand-feedback_1pp8i_1","sand-feedback-toast":"_sand-feedback-toast_1pp8i_11","sand-feedback-snackbar":"_sand-feedback-snackbar_1pp8i_24","sand-feedback-row":"_sand-feedback-row_1pp8i_33","sand-feedback-icon":"_sand-feedback-icon_1pp8i_39","sand-feedback-content":"_sand-feedback-content_1pp8i_45","sand-feedback-title":"_sand-feedback-title_1pp8i_52","sand-feedback-message":"_sand-feedback-message_1pp8i_57","sand-feedback-action":"_sand-feedback-action_1pp8i_64","sand-feedback-success":"_sand-feedback-success_1pp8i_69","sand-feedback-failed":"_sand-feedback-failed_1pp8i_81","sand-feedback-info":"_sand-feedback-info_1pp8i_93"},Za={info:"info",success:"check_circle",failed:"error"},va=t.forwardRef(function({heading:e,message:n,action:d,variant:o="info",className:l="",mode:c,...b},m){const y=t.useMemo(()=>Za[o],[o]),_=o==="failed"?"alert":"status";return s.jsx("div",{ref:m,role:_,"aria-live":o==="failed"?"assertive":"polite",className:u(w["sand-feedback"],w[`sand-feedback-${c}`],w[`sand-feedback-${o}`],l),...b,children:s.jsxs("div",{className:w["sand-feedback-row"],children:[s.jsx("span",{className:u(w["sand-feedback-icon"],"material-symbols-rounded"),"aria-hidden":"true",children:y}),s.jsxs("div",{className:w["sand-feedback-content"],children:[e&&s.jsx("span",{className:w["sand-feedback-title"],children:e}),s.jsx("span",{className:w["sand-feedback-message"],children:n})]}),d&&s.jsx("div",{className:w["sand-feedback-action"],children:d})]})})}),ja=t.forwardRef(function(e,n){return s.jsx(va,{ref:n,mode:"toast",...e})});ja.displayName="SandToast";const Na=t.forwardRef(function(e,n){return s.jsx(va,{ref:n,mode:"snackbar",...e})});Na.displayName="SandSnackbar";const D={"sand-form-group":"_sand-form-group_fyw0t_1","sand-label":"_sand-label_fyw0t_8","sand-input":"_sand-input_fyw0t_17","sand-input-error":"_sand-input-error_fyw0t_38","sand-helper-text-error":"_sand-helper-text-error_fyw0t_47"},J=t.forwardRef(function({label:e,children:n,className:d="",htmlFor:o,...l},c){return s.jsxs("div",{ref:c,className:u(D["sand-form-group"],d),...l,children:[e&&s.jsx("label",{className:D["sand-label"],htmlFor:o,children:e}),n]})});J.displayName="SandFormGroup";const X=t.forwardRef(function({error:e,className:n="",...d},o){return s.jsx("input",{ref:o,className:u(D["sand-input"],e&&D["sand-input-error"],n),"aria-invalid":e||d["aria-invalid"],...d})});X.displayName="SandInput";const xa=t.forwardRef(function({label:e,helperText:n,error:d,groupClassName:o,className:l="","aria-describedby":c,...b},m){const y=t.useId(),_=b.id??y,p=n?`${_}-help`:void 0,k=t.useMemo(()=>[c,p].filter(Boolean).join(" ")||void 0,[c,p]);return s.jsxs(J,{label:e,className:o,htmlFor:_,children:[s.jsx(X,{ref:m,id:_,error:d,className:l,"aria-describedby":k,...b}),n&&s.jsx("span",{id:p,className:d?D["sand-helper-text-error"]:"",children:n})]})});xa.displayName="SandInputGroup";const Qa={"sand-kbd":"_sand-kbd_mo78g_1"},Ra=t.forwardRef(function({className:e="",...n},d){return s.jsx("kbd",{ref:d,className:u(Qa["sand-kbd"],e),...n})});Ra.displayName="SandKBD";const B={"sand-container":"_sand-container_174rd_1","sand-header":"_sand-header_174rd_7","sand-tool-layout":"_sand-tool-layout_174rd_17","sand-tool-panel":"_sand-tool-panel_174rd_24","sand-result-panel":"_sand-result-panel_174rd_34"},wa=t.forwardRef(function({className:e="",...n},d){return s.jsx("div",{ref:d,className:u(B["sand-container"],e),...n})});wa.displayName="SandContainer";const ga=t.forwardRef(function({className:e="",...n},d){return s.jsx("header",{ref:d,className:u(B["sand-header"],e),...n})});ga.displayName="SandHeader";const Z=t.forwardRef(function({className:e="",...n},d){return s.jsx("div",{ref:d,className:u(B["sand-tool-layout"],e),...n})});Z.displayName="SandToolLayout";const Ea=t.forwardRef(function({className:e="",...n},d){return s.jsx("aside",{ref:d,className:u(B["sand-tool-panel"],e),...n})});Ea.displayName="SandToolPanel";const Ta=t.forwardRef(function({className:e="",...n},d){return s.jsx("main",{ref:d,className:u(B["sand-result-panel"],e),...n})});Ta.displayName="SandResultPanel";const Ca=t.forwardRef(function({header:e,panel:n,result:d},o){return s.jsxs(s.Fragment,{children:[e,s.jsxs(Z,{ref:o,children:[n,d]})]})});Ca.displayName="SandMicroserviceLayout";const g={"sand-modal-root":"_sand-modal-root_uryk1_1","sand-modal-backdrop":"_sand-modal-backdrop_uryk1_11","sand-modal-panel":"_sand-modal-panel_uryk1_18","sand-modal-header":"_sand-modal-header_uryk1_29","sand-modal-title":"_sand-modal-title_uryk1_38","sand-modal-description":"_sand-modal-description_uryk1_44","sand-modal-close":"_sand-modal-close_uryk1_51","sand-modal-body":"_sand-modal-body_uryk1_73","sand-modal-footer":"_sand-modal-footer_uryk1_77"},Aa=t.createContext(null);function Ma(){const r=t.useContext(Aa);if(!r)throw new Error("SandModal sub-components must be used within SandModal.");return r}const Q=t.forwardRef(function({className:e="",...n},d){return s.jsx("div",{ref:d,className:u(g["sand-modal-header"],e),...n})});Q.displayName="SandModal.Header";const q=t.forwardRef(function({className:e="",...n},d){return s.jsx("div",{ref:d,className:u(g["sand-modal-body"],e),...n})});q.displayName="SandModal.Body";const $=t.forwardRef(function({className:e="",...n},d){return s.jsx("div",{ref:d,className:u(g["sand-modal-footer"],e),...n})});$.displayName="SandModal.Footer";const aa=t.forwardRef(function({className:e="",...n},d){const{titleId:o}=Ma();return s.jsx("div",{ref:d,id:o,className:u(g["sand-modal-title"],e),...n})});aa.displayName="SandModal.Title";const ea=t.forwardRef(function({className:e="",...n},d){const{descriptionId:o}=Ma();return s.jsx("div",{ref:d,id:o,className:u(g["sand-modal-description"],e),...n})});ea.displayName="SandModal.Description";const Ia=t.forwardRef(function({open:e,onClose:n,title:d,description:o,footer:l,closeOnOverlay:c=!0,initialFocusRef:b,children:m,className:y="",..._},p){const k=t.useId(),S=t.useId(),R=t.useRef(null),E=t.useRef(null),A=t.useRef(null),sa=t.useMemo(()=>({titleId:k,descriptionId:S}),[S,k]),da=t.useCallback(x=>{E.current=x,typeof p=="function"?p(x):p&&(p.current=x)},[p]),L=t.useCallback(x=>{if(x.key==="Escape"){x.preventDefault(),n();return}if(x.key!=="Tab"||!E.current)return;const T=Ja(E.current);if(T.length===0){x.preventDefault(),E.current.focus();return}const G=T[0],H=T[T.length-1],U=document.activeElement;x.shiftKey&&U===G?(x.preventDefault(),H.focus()):!x.shiftKey&&U===H&&(x.preventDefault(),G.focus())},[n]);return t.useEffect(()=>{if(!e){A.current?.focus();return}A.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const x=document.body.style.overflow;return document.body.style.overflow="hidden",(b?.current??R.current??E.current)?.focus(),window.addEventListener("keydown",L),()=>{document.body.style.overflow=x,window.removeEventListener("keydown",L)}},[L,b,e]),e?s.jsxs("div",{className:g["sand-modal-root"],children:[s.jsx("button",{type:"button",className:g["sand-modal-backdrop"],"aria-label":"Close dialog",onClick:c?n:void 0}),s.jsx("div",{ref:da,role:"dialog","aria-modal":"true","aria-labelledby":d?k:void 0,"aria-describedby":o?S:void 0,className:u(g["sand-modal-panel"],y),tabIndex:-1,..._,children:s.jsxs(Aa.Provider,{value:sa,children:[(d||o)&&s.jsxs(Q,{children:[s.jsxs("div",{children:[d&&s.jsx(aa,{children:d}),o&&s.jsx(ea,{children:o})]}),s.jsx("button",{ref:R,type:"button",className:g["sand-modal-close"],onClick:n,"aria-label":"Close dialog",children:s.jsx("span",{className:"material-symbols-rounded","aria-hidden":"true",children:"close"})})]}),s.jsx(q,{children:m}),l&&s.jsx($,{children:l})]})})]}):null});Ia.displayName="SandModal";const qa=Object.assign(Ia,{Header:Q,Body:q,Footer:$,Title:aa,Description:ea}),F={"sand-pagination":"_sand-pagination_cizv5_1","sand-page-btn":"_sand-page-btn_cizv5_8","sand-page-btn-active":"_sand-page-btn-active_cizv5_36"},Oa=t.forwardRef(function({currentPage:e,totalPages:n,onPageChange:d,className:o="",...l},c){const b=t.useMemo(()=>Array.from({length:n},(_,p)=>p+1),[n]),m=t.useCallback(_=>{_<1||_>n||_===e||d?.(_)},[e,d,n]),y=t.useCallback(_=>{K(_,e-1,n,p=>m(p+1))},[e,m,n]);return s.jsxs("nav",{ref:c,"aria-label":"Pagination",className:u(F["sand-pagination"],o),onKeyDown:y,...l,children:[s.jsx("button",{type:"button",className:F["sand-page-btn"],disabled:e===1,"aria-label":"Previous page",onClick:()=>m(e-1),children:s.jsx("span",{className:"material-symbols-rounded","aria-hidden":"true",children:"chevron_left"})}),b.map(_=>s.jsx("button",{type:"button","aria-current":_===e?"page":void 0,"aria-label":`Page ${_}`,className:u(F["sand-page-btn"],_===e&&F["sand-page-btn-active"]),onClick:()=>m(_),children:_},_)),s.jsx("button",{type:"button",className:F["sand-page-btn"],disabled:e===n,"aria-label":"Next page",onClick:()=>m(e+1),children:s.jsx("span",{className:"material-symbols-rounded","aria-hidden":"true",children:"chevron_right"})})]})});Oa.displayName="SandPagination";const N={"sand-choice-group":"_sand-choice-group_viqgz_1","sand-choice-row":"_sand-choice-row_viqgz_7","sand-choice-input":"_sand-choice-input_viqgz_16","sand-choice-control":"_sand-choice-control_viqgz_22","sand-checkbox":"_sand-checkbox_viqgz_41","sand-checkbox-icon":"_sand-checkbox-icon_viqgz_59","sand-radio":"_sand-radio_viqgz_76","sand-switch":"_sand-switch_viqgz_94","sand-choice-content":"_sand-choice-content_viqgz_123","sand-choice-label":"_sand-choice-label_viqgz_129","sand-choice-description":"_sand-choice-description_viqgz_134"},na=({label:r,description:e})=>s.jsxs("span",{className:N["sand-choice-content"],children:[s.jsx("span",{className:N["sand-choice-label"],children:r}),e&&s.jsx("span",{className:N["sand-choice-description"],children:e})]}),Pa=t.forwardRef(function({label:e,description:n,id:d,className:o="",...l},c){const b=t.useId(),m=d??b;return s.jsxs("label",{className:u(N["sand-choice-row"],o),htmlFor:m,children:[s.jsx("input",{ref:c,id:m,type:"checkbox",className:N["sand-choice-input"],...l}),s.jsx("span",{className:u(N["sand-choice-control"],N["sand-checkbox"]),"aria-hidden":"true",children:s.jsx("span",{className:u(N["sand-checkbox-icon"],"material-symbols-rounded"),children:"check"})}),s.jsx(na,{label:e,description:n})]})});Pa.displayName="SandCheckbox";const Da=t.forwardRef(function({label:e,description:n,id:d,className:o="",onKeyDown:l,...c},b){const m=t.useId(),y=d??m,_=p=>{if(l?.(p),p.defaultPrevented||!c.name)return;const k=Array.from(document.querySelectorAll(`input[type="radio"][name="${c.name}"]`)),S=k.findIndex(R=>R.id===y);K(p,S,k.length,R=>{k[R]?.focus(),k[R]?.click()})};return s.jsxs("label",{className:u(N["sand-choice-row"],o),htmlFor:y,children:[s.jsx("input",{ref:b,id:y,type:"radio",className:N["sand-choice-input"],onKeyDown:_,...c}),s.jsx("span",{className:u(N["sand-choice-control"],N["sand-radio"]),"aria-hidden":"true"}),s.jsx(na,{label:e,description:n})]})});Da.displayName="SandRadio";const Ba=t.forwardRef(function({label:e,description:n,id:d,className:o="",...l},c){const b=t.useId(),m=d??b;return s.jsxs("label",{className:u(N["sand-choice-row"],o),htmlFor:m,children:[s.jsx("input",{ref:c,id:m,type:"checkbox",role:"switch",className:N["sand-choice-input"],...l}),s.jsx("span",{className:u(N["sand-choice-control"],N["sand-switch"]),"aria-hidden":"true"}),s.jsx(na,{label:e,description:n})]})});Ba.displayName="SandSwitch";const Fa=t.forwardRef(function({className:e="",label:n,...d},o){return s.jsx("div",{ref:o,role:"group","aria-label":typeof n=="string"?n:void 0,className:u(N["sand-choice-group"],e),...d})});Fa.displayName="SandChoiceGroup",f.SandBadge=_a,f.SandBreadcrumbs=ma,f.SandButton=ha,f.SandCard=ya,f.SandCheckbox=Pa,f.SandChoiceGroup=Fa,f.SandCodeBlock=V,f.SandCodeTabs=Sa,f.SandContainer=wa,f.SandDivider=ka,f.SandFormGroup=J,f.SandHeader=ga,f.SandInput=X,f.SandInputGroup=xa,f.SandKBD=Ra,f.SandMicroserviceLayout=Ca,f.SandModal=qa,f.SandPagination=Oa,f.SandRadio=Da,f.SandResultPanel=Ta,f.SandSnackbar=Na,f.SandSwitch=Ba,f.SandToast=ja,f.SandToolLayout=Z,f.SandToolPanel=Ea,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--theme-bg: #F2F2F2;--theme-surface: #FFFFFF;--theme-surface-variant: rgb(229.25, 229.25, 229.25);--theme-text: #262626;--theme-text-muted: rgba(38, 38, 38, .6);--theme-border: rgb(229.25, 229.25, 229.25);--theme-footer-bg: #262626;--theme-footer-text: #F2F2F2;--sand-accent: orange;--sand-accent-dark: #cc8400;--sand-accent-soft: rgba(255, 165, 0, .1);--sand-accent-glow: rgba(255, 165, 0, .3);--sand-accent-muted: rgba(255, 165, 0, .18);--sand-primary: #262626;--sand-primary-light: rgb(76.25, 76.25, 76.25);--sand-primary-muted: rgba(38, 38, 38, .6);--sand-secondary: #F2F2F2;--sand-secondary-dark: rgb(229.25, 229.25, 229.25);--sand-secondary-light: #FFFFFF;--color-success: #1f9d55;--color-success-soft: rgba(31, 157, 85, .12);--color-error: #e53935;--color-error-soft: rgba(229, 57, 53, .1);--font-main: Outfit, Inter, system-ui, -apple-system, sans-serif;--font-mono: Fira Code, ui-monospace, monospace;--radius-sm: 6px;--radius-md: 12px;--radius-lg: 20px;--radius-full: 9999px;--shadow-sm: 0 4px 12px rgba(0, 0, 0, .05);--shadow-md: 0 8px 24px rgba(0, 0, 0, .08);--glow: 0 0 20px rgba(255, 165, 0, .3);--transition: all .4s cubic-bezier(.165, .84, .44, 1);--container-max: 1100px}[data-theme=dark]{--theme-bg: #101112;--theme-surface: #17191c;--theme-surface-variant: #20242a;--theme-text: #F2F2F2;--theme-text-muted: rgba(242, 242, 242, .68);--theme-border: rgba(255, 255, 255, .12);--theme-footer-bg: #0a0b0c;--theme-footer-text: #F2F2F2;--sand-accent-soft: rgba(255, 165, 0, .14);--sand-accent-muted: rgba(255, 165, 0, .22);--sand-accent-glow: rgba(255, 165, 0, .18);--shadow-sm: 0 10px 24px rgba(0, 0, 0, .28);--shadow-md: 0 22px 60px rgba(0, 0, 0, .38)}*{margin:0;padding:0;box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:var(--font-main);background-color:var(--theme-bg);color:var(--theme-text);line-height:1.6;display:flex;transition:background-color .4s ease}.u-mt-4{margin-top:1rem}.u-mb-4{margin-bottom:1rem}._sand-badge_uye3i_1{display:inline-flex;align-items:center;gap:.35rem;padding:.4rem 1rem;border-radius:var(--radius-full);font-size:.65rem;font-weight:900;letter-spacing:1px;text-transform:uppercase;border:1px solid transparent}._sand-badge-primary_uye3i_14{background:var(--sand-accent-soft);color:var(--sand-accent)}._sand-badge-secondary_uye3i_19{background:var(--theme-surface-variant);color:var(--theme-text-muted)}._sand-badge-success_uye3i_24{background:var(--color-success-soft);color:var(--color-success);border-color:color-mix(in srgb,var(--color-success) 24%,transparent)}._sand-badge-failed_uye3i_30{background:var(--color-error-soft);color:var(--color-error);border-color:color-mix(in srgb,var(--color-error) 24%,transparent)}._sand-breadcrumbs_1uxir_1{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem;color:var(--theme-text-muted);font-size:.88rem}._sand-breadcrumb-item_1uxir_10{display:inline-flex;align-items:center;gap:.45rem;min-width:0}._sand-breadcrumb-link_1uxir_17{color:inherit;text-decoration:none;padding:.2rem .35rem;border-radius:.35rem}._sand-breadcrumb-link_1uxir_17:hover{color:var(--sand-accent);background:var(--sand-accent-soft)}._sand-breadcrumb-link_1uxir_17:focus-visible{outline:3px solid color-mix(in srgb,var(--sand-accent) 55%,white);outline-offset:2px}._sand-breadcrumb-current_1uxir_32{color:var(--theme-text);font-weight:700}._sand-breadcrumb-separator_1uxir_37{font-size:1rem;opacity:.7}._sand-btn_9grrt_1{display:inline-flex;align-items:center;justify-content:center;gap:.75rem;padding:.9rem 2rem;border-radius:var(--radius-md);font-weight:700;font-size:.95rem;cursor:pointer;transition:var(--transition);border:2px solid transparent;font-family:var(--font-main);text-decoration:none;line-height:1.2;min-height:3rem;min-width:0}._sand-btn_9grrt_1:disabled{opacity:.4;cursor:not-allowed;transform:none!important;box-shadow:none!important}._sand-btn_9grrt_1:focus-visible{outline:3px solid color-mix(in srgb,var(--sand-accent) 55%,white);outline-offset:3px}._sand-btn_9grrt_1 .material-symbols-rounded{font-size:1.1rem;flex-shrink:0}@media(max-width:640px){._sand-btn_9grrt_1{width:100%;padding:.85rem 1rem;white-space:normal}}._sand-btn-primary_9grrt_42{background:var(--sand-accent);color:#fff;box-shadow:var(--glow);border-color:var(--sand-accent)}._sand-btn-primary_9grrt_42:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 12px 28px var(--sand-accent-glow);background:var(--sand-accent-dark)}._sand-btn-secondary_9grrt_54{background-color:var(--sand-primary);color:var(--sand-secondary)}._sand-btn-secondary_9grrt_54:hover:not(:disabled){background-color:var(--sand-primary-light);transform:translateY(-2px)}._sand-btn-outline_9grrt_63{background:transparent;border-color:var(--theme-border);color:var(--theme-text)}._sand-btn-outline_9grrt_63:hover:not(:disabled){border-color:var(--sand-accent);color:var(--sand-accent);background:var(--sand-accent-soft)}._sand-btn-success_9grrt_74{background:var(--color-success);color:#fff;border-color:var(--color-success)}._sand-btn-success_9grrt_74:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 12px 28px color-mix(in srgb,var(--color-success) 30%,transparent);filter:brightness(1.04)}._sand-btn-failed_9grrt_85{background:var(--color-error);color:#fff;border-color:var(--color-error)}._sand-btn-failed_9grrt_85:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 12px 28px color-mix(in srgb,var(--color-error) 28%,transparent);filter:brightness(.98)}._sand-card_i3njl_1{background-color:var(--theme-surface);border:1px solid var(--theme-border);border-radius:var(--radius-lg);overflow:hidden;transition:var(--transition);width:100%}._sand-card_i3njl_1:hover{transform:translateY(-8px);box-shadow:var(--shadow-md);border-color:var(--sand-accent)}._sand-card-header_i3njl_15{padding:1.25rem 1.5rem;border-bottom:1px solid var(--theme-border);font-weight:800;font-size:1.2rem}._sand-card-body_i3njl_22{padding:1.5rem}._sand-card-footer_i3njl_26{padding:1rem 1.5rem;background-color:var(--theme-surface-variant);border-top:1px solid var(--theme-border);display:flex;gap:1rem}@media(max-width:640px){._sand-card-header_i3njl_15,._sand-card-body_i3njl_22,._sand-card-footer_i3njl_26{padding-inline:1rem}._sand-card-footer_i3njl_26{flex-direction:column}}._sand-code-block_197ic_1{margin:0;padding:1.5rem;font-family:var(--font-mono);font-size:.85rem;line-height:1.7;color:#d1d5db;overflow-x:auto;background:var(--sand-primary);border-radius:var(--radius-lg);border:1px solid var(--theme-border);position:relative}._sand-copy-btn_197ic_15{position:absolute;top:1rem;right:1rem;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);color:var(--sand-secondary-dark);padding:.5rem .75rem;border-radius:8px;cursor:pointer;font-size:.7rem;font-weight:700;display:flex;align-items:center;gap:6px;transition:var(--transition)}._sand-copy-btn_197ic_15:hover{border-color:var(--sand-accent);color:#fff}._sand-copy-btn_197ic_15:focus-visible{outline:3px solid color-mix(in srgb,var(--sand-accent) 55%,white);outline-offset:2px}._sand-code-tabs_197ic_41{background:var(--sand-primary);border-radius:var(--radius-lg);overflow:hidden;margin-top:1rem;border:1px solid var(--theme-border)}._sand-code-tabs_197ic_41 ._sand-code-block_197ic_1{border:none;border-radius:0}._sand-tab-headers_197ic_53{display:flex;background:var(--sand-primary-light);padding:0 .75rem;overflow-x:auto}._sand-tab-btn_197ic_60{padding:.9rem 1rem;background:none;border:none;color:#f2f2f280;font-family:var(--font-main);font-weight:700;font-size:.8rem;cursor:pointer;position:relative;transition:var(--transition);white-space:nowrap}._sand-tab-btn_197ic_60:focus-visible{outline:3px solid color-mix(in srgb,var(--sand-accent) 55%,white);outline-offset:-3px}._sand-tab-btn_197ic_60._active_197ic_77{color:#fff}._sand-tab-btn_197ic_60._active_197ic_77:after{content:"";position:absolute;bottom:0;left:0;width:100%;height:3px;background:var(--sand-accent)}@media(max-width:640px){._sand-code-block_197ic_1{padding:1.1rem;font-size:.8rem}._sand-copy-btn_197ic_15{top:.75rem;right:.75rem}}._sand-divider_svs0p_1{height:1px;background:var(--theme-border);width:100%;margin:1rem 0}._sand-feedback_1pp8i_1{width:min(100%,26rem);border-radius:var(--radius-lg);border:1px solid var(--theme-border);background:linear-gradient(180deg,color-mix(in srgb,var(--theme-surface) 95%,white) 0%,var(--theme-surface) 100%);box-shadow:var(--shadow-md);color:var(--theme-text);overflow:hidden}._sand-feedback-toast_1pp8i_11{padding:1rem 1.1rem;position:relative}._sand-feedback-toast_1pp8i_11:before{content:"";position:absolute;inset:0 auto 0 0;width:.26rem;background:var(--sand-accent)}._sand-feedback-snackbar_1pp8i_24{width:min(100%,34rem);padding:.95rem 1rem;border-radius:1rem;background:linear-gradient(180deg,color-mix(in srgb,var(--sand-primary) 88%,black),color-mix(in srgb,var(--sand-primary-light) 86%,black));color:var(--sand-secondary);border-color:#ffffff14}._sand-feedback-row_1pp8i_33{display:flex;align-items:flex-start;gap:.85rem}._sand-feedback-icon_1pp8i_39{font-size:1.2rem;margin-top:.05rem;flex-shrink:0}._sand-feedback-content_1pp8i_45{display:flex;flex-direction:column;gap:.2rem;min-width:0}._sand-feedback-title_1pp8i_52{font-size:.95rem;font-weight:800}._sand-feedback-message_1pp8i_57{font-size:.84rem;line-height:1.5;color:inherit;opacity:.86}._sand-feedback-action_1pp8i_64{margin-left:auto;flex-shrink:0}._sand-feedback-success_1pp8i_69{border-color:color-mix(in srgb,var(--color-success) 22%,var(--theme-border))}._sand-feedback-success_1pp8i_69._sand-feedback-toast_1pp8i_11:before{background:var(--color-success)}._sand-feedback-success_1pp8i_69 ._sand-feedback-icon_1pp8i_39{color:var(--color-success)}._sand-feedback-failed_1pp8i_81{border-color:color-mix(in srgb,var(--color-error) 22%,var(--theme-border))}._sand-feedback-failed_1pp8i_81._sand-feedback-toast_1pp8i_11:before{background:var(--color-error)}._sand-feedback-failed_1pp8i_81 ._sand-feedback-icon_1pp8i_39{color:var(--color-error)}._sand-feedback-info_1pp8i_93._sand-feedback-toast_1pp8i_11:before{background:var(--sand-accent)}._sand-feedback-info_1pp8i_93 ._sand-feedback-icon_1pp8i_39{color:var(--sand-accent)}[data-theme=dark] ._sand-feedback_1pp8i_1{background:linear-gradient(180deg,color-mix(in srgb,var(--theme-surface) 96%,white 4%),color-mix(in srgb,var(--theme-surface-variant) 82%,black))}[data-theme=dark] ._sand-feedback-snackbar_1pp8i_24{background:linear-gradient(180deg,#1b1f24,#242a31);border-color:#ffffff1a}@media(max-width:640px){._sand-feedback-row_1pp8i_33{flex-wrap:wrap}._sand-feedback-action_1pp8i_64{margin-left:0;width:100%}}._sand-form-group_fyw0t_1{display:flex;flex-direction:column;gap:.6rem;width:100%}._sand-label_fyw0t_8{font-size:.75rem;font-weight:800;color:var(--theme-text-muted);text-transform:uppercase;letter-spacing:1.5px;cursor:pointer}._sand-input_fyw0t_17{width:100%;background-color:var(--theme-surface);border:2px solid var(--theme-border);border-radius:var(--radius-md);padding:1rem 1.25rem;font-family:inherit;color:var(--theme-text);transition:var(--transition);font-size:1rem}._sand-input_fyw0t_17:focus{outline:none;border-color:var(--sand-accent);box-shadow:0 0 0 5px var(--sand-accent-soft)}._sand-input_fyw0t_17:focus-visible{outline:3px solid color-mix(in srgb,var(--sand-accent) 40%,white);outline-offset:2px}._sand-input-error_fyw0t_38{border-color:var(--color-error);background:var(--color-error-soft)}._sand-input-error_fyw0t_38:focus{border-color:var(--color-error);box-shadow:0 0 0 5px var(--color-error-soft)}._sand-helper-text-error_fyw0t_47{color:var(--color-error);font-size:.75rem;font-weight:700}@media(max-width:640px){._sand-input_fyw0t_17{padding:.9rem 1rem;font-size:.95rem}}._sand-kbd_mo78g_1{display:inline-flex;align-items:center;justify-content:center;min-width:2.1rem;min-height:2rem;padding:.34rem .68rem;border-radius:.5rem;border:1px solid rgba(15,23,42,.08);background:linear-gradient(180deg,#fff,#f3f4f6);box-shadow:inset 0 1px #fffffff2,inset 0 -1px #94a3b82e,0 0 0 1px #ffffffb3,0 2px #cbd5e1e6,0 6px 14px #0f172a1a;color:#1f2937;font-family:var(--font-mono);font-size:.78rem;font-weight:600;line-height:1;letter-spacing:0;text-transform:uppercase;-webkit-user-select:none;user-select:none;white-space:nowrap}[data-theme=dark] ._sand-kbd_mo78g_1{border-color:#ffffff0f;background:linear-gradient(180deg,#434a54,#2a3038);box-shadow:inset 0 1px #ffffff24,inset 0 -1px #0000006b,0 0 0 1px #ffffff08,0 2px #161a20,0 8px 18px #00000057;color:#f8fafc}._sand-container_174rd_1{max-width:var(--container-max);margin:0 auto;width:100%}._sand-header_174rd_7{background:var(--theme-surface);border-bottom:1px solid var(--theme-border);padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center;gap:1rem}._sand-tool-layout_174rd_17{display:grid;grid-template-columns:320px 1fr;gap:1.5rem;align-items:stretch}._sand-tool-panel_174rd_24{background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:var(--radius-lg);padding:2rem;display:flex;flex-direction:column;gap:1.5rem}._sand-result-panel_174rd_34{background:var(--theme-surface-variant);border-radius:var(--radius-lg);padding:3rem;min-height:400px;border:2px dashed var(--theme-border);display:flex;align-items:center;justify-content:center;color:var(--theme-text-muted)}@media(max-width:900px){._sand-tool-layout_174rd_17{grid-template-columns:1fr}._sand-result-panel_174rd_34{min-height:240px}}@media(max-width:640px){._sand-header_174rd_7{padding:.9rem 1rem;flex-wrap:wrap}._sand-tool-panel_174rd_24,._sand-result-panel_174rd_34{padding:1rem}}._sand-modal-root_uryk1_1{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:1.25rem}._sand-modal-backdrop_uryk1_11{position:absolute;inset:0;background:#00000085;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}._sand-modal-panel_uryk1_18{position:relative;width:min(100%,38rem);max-height:min(88vh,48rem);overflow:auto;border-radius:var(--radius-lg);border:1px solid var(--theme-border);background:var(--theme-surface);box-shadow:0 24px 80px #00000047}._sand-modal-header_uryk1_29{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.25rem 1.25rem 1rem;border-bottom:1px solid var(--theme-border)}._sand-modal-title_uryk1_38{font-size:1.15rem;font-weight:800;line-height:1.2}._sand-modal-description_uryk1_44{margin-top:.35rem;font-size:.9rem;color:var(--theme-text-muted);line-height:1.5}._sand-modal-close_uryk1_51{display:inline-flex;align-items:center;justify-content:center;width:2.4rem;height:2.4rem;border-radius:999px;border:1px solid var(--theme-border);background:var(--theme-surface-variant);color:var(--theme-text);cursor:pointer;transition:var(--transition)}._sand-modal-close_uryk1_51:hover{color:var(--sand-accent);border-color:var(--sand-accent)}._sand-modal-close_uryk1_51:focus-visible{outline:3px solid color-mix(in srgb,var(--sand-accent) 55%,white);outline-offset:2px}._sand-modal-body_uryk1_73{padding:1.25rem}._sand-modal-footer_uryk1_77{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.75rem;padding:0 1.25rem 1.25rem}@media(max-width:640px){._sand-modal-root_uryk1_1{padding:.85rem;align-items:flex-end}._sand-modal-panel_uryk1_18{width:100%;max-height:92vh}._sand-modal-header_uryk1_29,._sand-modal-body_uryk1_73,._sand-modal-footer_uryk1_77{padding-inline:1rem}._sand-modal-footer_uryk1_77>*{width:100%}}._sand-pagination_cizv5_1{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}._sand-page-btn_cizv5_8{min-width:2.5rem;height:2.5rem;padding:0 .85rem;display:inline-flex;align-items:center;justify-content:center;border-radius:.8rem;border:1px solid var(--theme-border);background:var(--theme-surface);color:var(--theme-text);cursor:pointer;transition:var(--transition);font-weight:700}._sand-page-btn_cizv5_8:hover:not(:disabled){border-color:var(--sand-accent);color:var(--sand-accent)}._sand-page-btn_cizv5_8:focus-visible{outline:3px solid color-mix(in srgb,var(--sand-accent) 55%,white);outline-offset:2px}._sand-page-btn_cizv5_8:disabled{opacity:.45;cursor:not-allowed}._sand-page-btn-active_cizv5_36{background:var(--sand-accent);border-color:var(--sand-accent);color:#fff}._sand-choice-group_viqgz_1{display:flex;flex-direction:column;gap:.85rem}._sand-choice-row_viqgz_7{display:inline-flex;align-items:center;gap:.75rem;width:fit-content;cursor:pointer;color:var(--theme-text)}._sand-choice-input_viqgz_16{position:absolute;opacity:0;pointer-events:none}._sand-choice-control_viqgz_22{width:1.2rem;height:1.2rem;flex-shrink:0;border:2px solid var(--theme-border);background:var(--theme-surface);transition:var(--transition);position:relative}._sand-choice-input_viqgz_16:focus-visible+._sand-choice-control_viqgz_22{outline:3px solid color-mix(in srgb,var(--sand-accent) 55%,white);outline-offset:3px}._sand-choice-row_viqgz_7:hover ._sand-choice-control_viqgz_22{border-color:var(--sand-accent)}._sand-checkbox_viqgz_41{border-radius:.35rem}._sand-checkbox_viqgz_41:after{content:"";position:absolute;inset:.12rem;border-radius:.2rem;background:var(--sand-accent);transform:scale(0);transition:var(--transition)}._sand-choice-input_viqgz_16:checked+._sand-checkbox_viqgz_41:after{transform:scale(1)}._sand-checkbox-icon_viqgz_59{position:absolute;inset:0;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:.9rem;z-index:1;opacity:0;transition:var(--transition)}._sand-choice-input_viqgz_16:checked+._sand-checkbox_viqgz_41 ._sand-checkbox-icon_viqgz_59{opacity:1}._sand-radio_viqgz_76{border-radius:999px}._sand-radio_viqgz_76:after{content:"";position:absolute;inset:.22rem;border-radius:999px;background:var(--sand-accent);transform:scale(0);transition:var(--transition)}._sand-choice-input_viqgz_16:checked+._sand-radio_viqgz_76:after{transform:scale(1)}._sand-switch_viqgz_94{width:2.7rem;height:1.55rem;border-radius:999px;background:var(--theme-surface-variant)}._sand-switch_viqgz_94:after{content:"";position:absolute;top:.12rem;left:.14rem;width:1rem;height:1rem;border-radius:999px;background:var(--sand-secondary-light);box-shadow:var(--shadow-sm);transition:var(--transition)}._sand-choice-input_viqgz_16:checked+._sand-switch_viqgz_94{background:var(--sand-accent);border-color:var(--sand-accent)}._sand-choice-input_viqgz_16:checked+._sand-switch_viqgz_94:after{transform:translate(1.05rem)}._sand-choice-content_viqgz_123{display:flex;flex-direction:column;gap:.1rem}._sand-choice-label_viqgz_129{font-weight:700;font-size:.92rem}._sand-choice-description_viqgz_134{color:var(--theme-text-muted);font-size:.8rem;line-height:1.45}@media(max-width:640px){._sand-choice-row_viqgz_7{width:100%;align-items:flex-start}}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sandurtech/sandui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"build": "vite build",
|
|
8
|
+
"lint": "eslint .",
|
|
9
|
+
"test": "vitest run",
|
|
10
|
+
"test:watch": "vitest",
|
|
11
|
+
"preview": "vite preview"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css",
|
|
18
|
+
"*.scss"
|
|
19
|
+
],
|
|
20
|
+
"main": "./dist/sandui.umd.js",
|
|
21
|
+
"module": "./dist/sandui.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/sandui.js",
|
|
27
|
+
"require": "./dist/sandui.umd.js"
|
|
28
|
+
},
|
|
29
|
+
"./style.css": "./dist/style.css"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": ">=18",
|
|
33
|
+
"react-dom": ">=18"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@eslint/js": "^9.39.1",
|
|
37
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
38
|
+
"@testing-library/react": "^16.3.2",
|
|
39
|
+
"@testing-library/user-event": "^14.6.1",
|
|
40
|
+
"@types/node": "^24.12.0",
|
|
41
|
+
"@types/react": "^19.2.7",
|
|
42
|
+
"@types/react-dom": "^19.2.3",
|
|
43
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
44
|
+
"eslint": "^9.39.1",
|
|
45
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
46
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
47
|
+
"globals": "^16.5.0",
|
|
48
|
+
"jsdom": "^28.1.0",
|
|
49
|
+
"sass": "^1.98.0",
|
|
50
|
+
"typescript": "~5.9.3",
|
|
51
|
+
"typescript-eslint": "^8.48.0",
|
|
52
|
+
"vite": "^7.3.1",
|
|
53
|
+
"vite-plugin-dts": "^4.5.4",
|
|
54
|
+
"vitest": "^4.0.18"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {}
|
|
57
|
+
}
|