@nearform/quantum 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -2
- package/dist/assets/build/open-source.icon.js +1 -1
- package/dist/assets/build/open-source.icon.js.map +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Accordion/index.js.map +1 -1
- package/dist/components/NativeSelect/index.d.ts +23 -0
- package/dist/components/NativeSelect/index.js +98 -0
- package/dist/components/NativeSelect/index.js.map +1 -0
- package/dist/components/Select/index.d.ts +1 -4
- package/dist/components/Select/index.js +2 -67
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/triggerVariants.d.ts +9 -0
- package/dist/components/Select/triggerVariants.js +76 -0
- package/dist/components/Select/triggerVariants.js.map +1 -0
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/Spinner/index.js.map +1 -1
- package/dist/components/ThemeToggle/index.d.ts +1 -1
- package/dist/components/ThemeToggle/index.js +6 -8
- package/dist/components/ThemeToggle/index.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/esm/assets/build/open-source.icon.js +1 -1
- package/dist/esm/assets/build/open-source.icon.js.map +1 -1
- package/dist/esm/components/Accordion/index.js +1 -1
- package/dist/esm/components/Accordion/index.js.map +1 -1
- package/dist/esm/components/NativeSelect/index.d.ts +23 -0
- package/dist/esm/components/NativeSelect/index.js +62 -0
- package/dist/esm/components/NativeSelect/index.js.map +1 -0
- package/dist/esm/components/Select/index.d.ts +1 -4
- package/dist/esm/components/Select/index.js +1 -66
- package/dist/esm/components/Select/index.js.map +1 -1
- package/dist/esm/components/Select/triggerVariants.d.ts +9 -0
- package/dist/esm/components/Select/triggerVariants.js +73 -0
- package/dist/esm/components/Select/triggerVariants.js.map +1 -0
- package/dist/esm/components/Spinner/index.js +1 -1
- package/dist/esm/components/Spinner/index.js.map +1 -1
- package/dist/esm/components/ThemeToggle/index.d.ts +1 -1
- package/dist/esm/components/ThemeToggle/index.js +1 -3
- package/dist/esm/components/ThemeToggle/index.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/theme-init.d.ts +23 -0
- package/dist/esm/theme-init.js +24 -0
- package/dist/esm/theme-init.js.map +1 -0
- package/dist/esm/theme.d.ts +6 -0
- package/dist/esm/theme.js +7 -1
- package/dist/esm/theme.js.map +1 -1
- package/dist/global.css +18 -1
- package/dist/theme-init.d.ts +23 -0
- package/dist/theme-init.js +27 -0
- package/dist/theme-init.js.map +1 -0
- package/dist/theme.js +7 -1
- package/dist/theme.js.map +1 -1
- package/package.json +12 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Quantum Component Library
|
|
2
2
|
|
|
3
|
-
 [](https://www.figma.com/design/XFbhstkgQFz8ZefAU3w2p4/1.-Quantum-Design-System?m=auto&node-id=1-5&t=nMe5iB6lqqJ52oc4-1)
|
|
3
|
+
 [](https://www.figma.com/design/XFbhstkgQFz8ZefAU3w2p4/1.-Quantum-Design-System?m=auto&node-id=1-5&t=nMe5iB6lqqJ52oc4-1) [](https://nearform.github.io/quantum/)
|
|
4
4
|
|
|
5
5
|
> A React component library based on the Quantum Design System
|
|
6
6
|
|
|
@@ -178,6 +178,94 @@ plugin hands your build a JS theme and your build inlines the values, so there
|
|
|
178
178
|
is nothing to override at runtime — change them in your own `@theme` block or
|
|
179
179
|
Tailwind config instead.
|
|
180
180
|
|
|
181
|
+
#### Colour classes that build to nothing
|
|
182
|
+
|
|
183
|
+
Two kinds of colour class compile without an error and emit no CSS, so the
|
|
184
|
+
element quietly keeps whatever colour it inherits:
|
|
185
|
+
|
|
186
|
+
- **A Tailwind hue we do not have.** On every route above our palette
|
|
187
|
+
_replaces_ Tailwind's rather than adding to it. Our neutral ramp is spelt
|
|
188
|
+
`grey`, so `bg-gray-100` is nothing, and there is no `amber`, `slate`,
|
|
189
|
+
`zinc`, `emerald`, `cyan`, `sky`, `violet`, `rose` and so on. Use our
|
|
190
|
+
semantic tokens (`foreground-muted`, `background-subtle`, `border`, ...),
|
|
191
|
+
which also come with a `-dark` pair, or a hue we do have: `grey`, `blue`,
|
|
192
|
+
`red`, `orange`, `yellow`, `green`, `teal`, `indigo`, `purple`, `pink`.
|
|
193
|
+
- **One of our ramps without a shade.** `brandGreen`, `brandMidnight`, `grey`
|
|
194
|
+
and the other hues have no default, so `bg-brandGreen` and
|
|
195
|
+
`border-brandGreen` are nothing: write `bg-brandGreen-100`. A few names are
|
|
196
|
+
also shadows, and `shadow-brandGreen`, `shadow-red` and the like are fine.
|
|
197
|
+
|
|
198
|
+
`__tests__/palette-classes.test.ts` keeps both out of this library. It reads
|
|
199
|
+
the names from Tailwind's palette and `import { colors } from
|
|
200
|
+
'@nearform/quantum'`, so the same check can be copied into your own tests.
|
|
201
|
+
|
|
202
|
+
#### Loading the typeface
|
|
203
|
+
|
|
204
|
+
Quantum is set in [Inter](https://rsms.me/inter/). The theme names it, but the
|
|
205
|
+
package does not ship the font files: load them yourself, or every visitor who
|
|
206
|
+
has not installed Inter gets the system font instead.
|
|
207
|
+
|
|
208
|
+
Self-hosting it means the page makes no third-party request for it:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
npm install @fontsource-variable/inter
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
```js
|
|
215
|
+
// your entry point, once
|
|
216
|
+
import '@fontsource-variable/inter'
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
That package registers the family as `'Inter Variable'`, which the `font-sans`
|
|
220
|
+
stack lists right after `'Inter'`, so nothing else is needed. Google Fonts and a
|
|
221
|
+
local install register `'Inter'`, which the stack leads with.
|
|
222
|
+
|
|
223
|
+
#### Opening in the right theme
|
|
224
|
+
|
|
225
|
+
`ThemeToggle` stores the chosen theme and sets the `.dark` class, but it runs
|
|
226
|
+
after your app renders, so on its own a dark page opens light and then
|
|
227
|
+
switches. `themeInitScript` closes that gap: it applies the stored choice, or
|
|
228
|
+
the operating system's, before the first paint. Inline it at the start of the
|
|
229
|
+
page's `<head>`, ahead of your stylesheet.
|
|
230
|
+
|
|
231
|
+
It is published on its own as `@nearform/quantum/theme-init`, which imports
|
|
232
|
+
nothing, so a build config can load it without React or any component. With
|
|
233
|
+
Vite, inject it into `index.html`:
|
|
234
|
+
|
|
235
|
+
```js
|
|
236
|
+
// vite.config.js
|
|
237
|
+
import { defineConfig } from 'vite'
|
|
238
|
+
import { themeInitScript } from '@nearform/quantum/theme-init'
|
|
239
|
+
|
|
240
|
+
export default defineConfig({
|
|
241
|
+
plugins: [
|
|
242
|
+
{
|
|
243
|
+
name: 'quantum-theme-init',
|
|
244
|
+
transformIndexHtml: () => [
|
|
245
|
+
{ tag: 'script', children: themeInitScript, injectTo: 'head-prepend' }
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
})
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Where you render the `<head>` yourself, as in a Next.js root layout, import it
|
|
253
|
+
from the package root and inline it there:
|
|
254
|
+
|
|
255
|
+
```jsx
|
|
256
|
+
import { themeInitScript } from '@nearform/quantum'
|
|
257
|
+
|
|
258
|
+
<html lang="en" suppressHydrationWarning>
|
|
259
|
+
<head>
|
|
260
|
+
<script dangerouslySetInnerHTML={{ __html: themeInitScript }} />
|
|
261
|
+
</head>
|
|
262
|
+
...
|
|
263
|
+
</html>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
`suppressHydrationWarning` is there because the script changes the `<html>`
|
|
267
|
+
class before React hydrates it.
|
|
268
|
+
|
|
181
269
|
## Accessibility
|
|
182
270
|
|
|
183
271
|
Components target [WCAG 2.2](https://www.w3.org/TR/WCAG22/) level AA. Every
|
|
@@ -203,11 +291,17 @@ props rather than guessing:
|
|
|
203
291
|
- **Form controls need a label.** `Input`, `Password`, `DateInput` and
|
|
204
292
|
`Textarea` take `labelText` (rendered and wired up with `htmlFor`) and
|
|
205
293
|
`helpText` (exposed through `aria-describedby`). `Checkbox`, `Radio`,
|
|
206
|
-
`Switch` and `
|
|
294
|
+
`Switch`, `SelectTrigger` and `NativeSelect` have no text of their own -- pair them with
|
|
207
295
|
`ControlLabel`, an external `<label htmlFor>`, or give them an `aria-label`.
|
|
208
296
|
A placeholder is not a label. Inside a `CheckboxGroup` or a `RadioGroup`,
|
|
209
297
|
the option's `label` prop does this, and its `description` is wired up with
|
|
210
298
|
it.
|
|
299
|
+
- **Form controls are drawn for a surface.** In light mode the resting fill
|
|
300
|
+
of `Input`, `Password`, `DateInput`, `Textarea`, `SelectTrigger` and
|
|
301
|
+
`NativeSelect` is `background-alt`, which is also the page's own colour, so
|
|
302
|
+
on the bare page a field is only its border. Put forms on a `Card`, or on
|
|
303
|
+
anything else painted `background-surface`, and the fill reads as a field
|
|
304
|
+
again.
|
|
211
305
|
- **A control inside a `FormGroup` has to pass its props on.** The group
|
|
212
306
|
derives the label's `htmlFor`, the message ids behind `aria-describedby` and
|
|
213
307
|
the `aria-invalid` flag from one id and hands them to whichever direct child
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OpenSourceIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const OpenSourceIcon = props => ((0, jsx_runtime_1.jsx)("svg", Object.assign({ viewBox: "0 0 25 26", xmlns: "http://www.w3.org/2000/svg" }, props, { children: (0, jsx_runtime_1.jsx)("
|
|
5
|
+
const OpenSourceIcon = props => ((0, jsx_runtime_1.jsx)("svg", Object.assign({ viewBox: "0 0 25 26", xmlns: "http://www.w3.org/2000/svg" }, props, { children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.25 0.0669873C12.4047 -0.0223291 12.5953 -0.0223291 12.75 0.0669873L24.2391 6.70019C24.3938 6.7895 24.4891 6.95457 24.4891 7.1332V20.3996C24.4891 20.5782 24.3938 20.7433 24.2391 20.8326L15.4062 25.9322V19.0104L18.3695 17.2995C18.4469 17.2548 18.4945 17.1723 18.4945 17.083V10.4498C18.4945 10.3605 18.4469 10.278 18.3695 10.2333L12.625 6.91669C12.5477 6.87204 12.4524 6.87204 12.375 6.91669L6.63051 10.2333C6.55316 10.278 6.50551 10.3605 6.50551 10.4498V17.083C6.50551 17.1723 6.55316 17.2548 6.63051 17.2995L9.65625 19.0464V25.9683L0.760986 20.8326C0.606286 20.7433 0.510986 20.5782 0.510986 20.3996V7.1332C0.510986 6.95457 0.606286 6.7895 0.760986 6.70019L12.25 0.0669873Z", fill: "currentColor" }) })));
|
|
6
6
|
exports.OpenSourceIcon = OpenSourceIcon;
|
|
7
7
|
//# sourceMappingURL=open-source.icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-source.icon.js","sourceRoot":"","sources":["../../../src/assets/build/open-source.icon.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,cAAc,GAAa,KAAK,CAAC,EAAE,CAAC,CAC/C,8CAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,IAAK,KAAK,cACnE,
|
|
1
|
+
{"version":3,"file":"open-source.icon.js","sourceRoot":"","sources":["../../../src/assets/build/open-source.icon.tsx"],"names":[],"mappings":";;;;AAEO,MAAM,cAAc,GAAa,KAAK,CAAC,EAAE,CAAC,CAC/C,8CAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,IAAK,KAAK,cACnE,iCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,sqBAAsqB,EACxqB,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAA;AATY,QAAA,cAAc,GAAd,cAAc,CAS1B"}
|
|
@@ -85,7 +85,7 @@ AccordionHeader.displayName = AccordionPrimitive.Header.displayName;
|
|
|
85
85
|
const AccordionTrigger = React.forwardRef((_a, ref) => {
|
|
86
86
|
var { children, className, headingLevel = 3 } = _a, props = __rest(_a, ["children", "className", "headingLevel"]);
|
|
87
87
|
const Heading = `h${headingLevel}`;
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(AccordionHeader, { asChild: true, children: (0, jsx_runtime_1.jsx)(Heading, { children: (0, jsx_runtime_1.jsxs)(AccordionPrimitive.Trigger, Object.assign({ className: (0, utils_ts_1.cn)('relative px-4 py-4 dark:text-white group flex flex-1 cursor-pointer items-center justify-between leading-none', 'focus-visible:z-10 focus-visible:outline-hidden focus-visible:shadow-brandGreen dark:focus-visible:shadow-brandGreen10', className) }, props, { ref: ref, children: [children, (0, jsx_runtime_1.jsx)(index_ts_1.BsChevronDown, { className: "ease-[cubic-bezier(0.87,_0,_0.13,_1)] transition-transform duration-300 group-data-[state=open]:rotate-180 w-3 h-3
|
|
88
|
+
return ((0, jsx_runtime_1.jsx)(AccordionHeader, { asChild: true, children: (0, jsx_runtime_1.jsx)(Heading, { children: (0, jsx_runtime_1.jsxs)(AccordionPrimitive.Trigger, Object.assign({ className: (0, utils_ts_1.cn)('relative px-4 py-4 dark:text-white group flex flex-1 cursor-pointer items-center justify-between leading-none', 'focus-visible:z-10 focus-visible:outline-hidden focus-visible:shadow-brandGreen dark:focus-visible:shadow-brandGreen10', className) }, props, { ref: ref, children: [children, (0, jsx_runtime_1.jsx)(index_ts_1.BsChevronDown, { className: "ease-[cubic-bezier(0.87,_0,_0.13,_1)] transition-transform duration-300 group-data-[state=open]:rotate-180 w-3 h-3", "aria-hidden": true })] })) }) }));
|
|
89
89
|
});
|
|
90
90
|
exports.AccordionTrigger = AccordionTrigger;
|
|
91
91
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Accordion/index.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;;;;;;;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AAU,CAGvC,CAAC,EAAiC,EAAE,GAAG,EAAE,EAAE;QAA1C,EAAE,QAAQ,EAAE,SAAS,OAAY,EAAP,KAAK,cAA/B,yBAAiC,CAAF;IAAY,OAAA,CAC5C,uBAAC,kBAAkB,CAAC,OAAO,kBACzB,SAAS,EAAE,IAAA,aAAE,EACX,yGAAyG,EACzG,SAAS,CACV,IACG,KAAK,IACT,GAAG,EAAE,GAAG,YAER,gCAAK,SAAS,EAAC,WAAW,YAAE,QAAQ,GAAO,IAChB,CAC9B,CAAA;AAAA,CAAC,AAAD,CAAC,CAAA;QAKA,gBAAgB;AAJlB,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { triggerVariants } from '../Select/triggerVariants.ts';
|
|
4
|
+
/**
|
|
5
|
+
* `size` is the field's height, as on `SelectTrigger`, rather than the HTML
|
|
6
|
+
* attribute of that name, which asks for a list box of that many rows.
|
|
7
|
+
*/
|
|
8
|
+
interface NativeSelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size'>, VariantProps<typeof triggerVariants> {
|
|
9
|
+
/** Classes for the wrapper that positions the chevron, e.g. a width. */
|
|
10
|
+
wrapperClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The browser's own `<select>`, drawn like `SelectTrigger` so the two can sit
|
|
14
|
+
* in one form. Use it where the platform's picker is the better choice -- on
|
|
15
|
+
* touch devices, in long forms, or where a test or a screen reader needs a
|
|
16
|
+
* real `<select>` -- and `Select` where the options need styling. The open
|
|
17
|
+
* list is the browser's and cannot be styled; in dark mode it follows the
|
|
18
|
+
* page through `color-scheme`.
|
|
19
|
+
*
|
|
20
|
+
* It has no placeholder: start with an empty, disabled option instead.
|
|
21
|
+
*/
|
|
22
|
+
declare const NativeSelect: React.ForwardRefExoticComponent<NativeSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
23
|
+
export { NativeSelect, type NativeSelectProps };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.NativeSelect = void 0;
|
|
48
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
49
|
+
const React = __importStar(require("react"));
|
|
50
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
51
|
+
const index_ts_1 = require("../../assets/index.js");
|
|
52
|
+
const utils_ts_1 = require("../../lib/utils.js");
|
|
53
|
+
const triggerVariants_ts_1 = require("../Select/triggerVariants.js");
|
|
54
|
+
/**
|
|
55
|
+
* The chevron sits beside the `<select>` rather than inside it, so it cannot
|
|
56
|
+
* inherit the field's text colour and is given the same one per variant.
|
|
57
|
+
*/
|
|
58
|
+
const chevronVariants = (0, class_variance_authority_1.cva)([
|
|
59
|
+
'pointer-events-none',
|
|
60
|
+
'absolute',
|
|
61
|
+
'right-3',
|
|
62
|
+
'top-1/2',
|
|
63
|
+
'-translate-y-1/2',
|
|
64
|
+
'h-2',
|
|
65
|
+
'w-2',
|
|
66
|
+
'peer-disabled:opacity-50'
|
|
67
|
+
], {
|
|
68
|
+
variants: {
|
|
69
|
+
variant: {
|
|
70
|
+
default: ['text-foreground', 'dark:text-foreground-muted-dark'],
|
|
71
|
+
error: ['text-red-700', 'dark:text-feedback-error-dark'],
|
|
72
|
+
success: ['text-green-700', 'dark:text-feedback-success-dark']
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
defaultVariants: {
|
|
76
|
+
variant: 'default'
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* The browser's own `<select>`, drawn like `SelectTrigger` so the two can sit
|
|
81
|
+
* in one form. Use it where the platform's picker is the better choice -- on
|
|
82
|
+
* touch devices, in long forms, or where a test or a screen reader needs a
|
|
83
|
+
* real `<select>` -- and `Select` where the options need styling. The open
|
|
84
|
+
* list is the browser's and cannot be styled; in dark mode it follows the
|
|
85
|
+
* page through `color-scheme`.
|
|
86
|
+
*
|
|
87
|
+
* It has no placeholder: start with an empty, disabled option instead.
|
|
88
|
+
*/
|
|
89
|
+
const NativeSelect = React.forwardRef((_a, ref) => {
|
|
90
|
+
var { variant, size, className, wrapperClassName, multiple } = _a, props = __rest(_a, ["variant", "size", "className", "wrapperClassName", "multiple"]);
|
|
91
|
+
return ((0, jsx_runtime_1.jsxs)("span", { className: (0, utils_ts_1.cn)('relative flex w-full', wrapperClassName), children: [(0, jsx_runtime_1.jsx)("select", Object.assign({ ref: ref, multiple: multiple, className: (0, utils_ts_1.cn)((0, triggerVariants_ts_1.triggerVariants)({ variant, size }), 'peer', 'cursor-pointer', 'dark:[color-scheme:dark]',
|
|
92
|
+
// A list box shows its options, so it takes their height and has
|
|
93
|
+
// no chevron to make room for
|
|
94
|
+
multiple ? 'h-auto' : 'appearance-none pr-8', className) }, props)), !multiple && ((0, jsx_runtime_1.jsx)(index_ts_1.BsChevronDown, { "aria-hidden": "true", "data-native-select-chevron": "", className: chevronVariants({ variant }) }))] }));
|
|
95
|
+
});
|
|
96
|
+
exports.NativeSelect = NativeSelect;
|
|
97
|
+
NativeSelect.displayName = 'NativeSelect';
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/NativeSelect/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EAAE,eAAe,CAAC,EAAE,OAAO,EAAE,CAAC,GACvC,CACH,IACI,CACR,CAAA;AACH,CAAC,AADE,CACF,CAAA;QAGQ,YAAY;AAFrB,YAAY,CAAC,WAAW,GAAG,cAAc,CAAA"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { triggerVariants } from './triggerVariants.ts';
|
|
4
5
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
5
6
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
7
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
7
8
|
declare const SelectPortal: React.FC<SelectPrimitive.SelectPortalProps>;
|
|
8
|
-
declare const triggerVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "error" | "success" | null | undefined;
|
|
10
|
-
size?: "lg" | "sm" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
9
|
export interface TriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, VariantProps<typeof triggerVariants> {
|
|
13
10
|
}
|
|
14
11
|
declare const SelectTrigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -52,6 +52,7 @@ const SelectPrimitive = __importStar(require("@radix-ui/react-select"));
|
|
|
52
52
|
const utils_ts_1 = require("../../lib/utils.js");
|
|
53
53
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
54
54
|
const index_ts_1 = require("../../assets/index.js");
|
|
55
|
+
const triggerVariants_ts_1 = require("./triggerVariants.js");
|
|
55
56
|
const ScrollArea = __importStar(require("@radix-ui/react-scroll-area"));
|
|
56
57
|
const Select = SelectPrimitive.Root;
|
|
57
58
|
exports.Select = Select;
|
|
@@ -61,75 +62,9 @@ const SelectValue = SelectPrimitive.Value;
|
|
|
61
62
|
exports.SelectValue = SelectValue;
|
|
62
63
|
const SelectPortal = SelectPrimitive.Portal;
|
|
63
64
|
exports.SelectPortal = SelectPortal;
|
|
64
|
-
const triggerVariants = (0, class_variance_authority_1.cva)([
|
|
65
|
-
[
|
|
66
|
-
'flex',
|
|
67
|
-
'w-full',
|
|
68
|
-
'border border-[2px]',
|
|
69
|
-
'text-foreground',
|
|
70
|
-
'items-center',
|
|
71
|
-
'justify-between',
|
|
72
|
-
'rounded-lg',
|
|
73
|
-
'px-3',
|
|
74
|
-
'py-2',
|
|
75
|
-
'text-sm',
|
|
76
|
-
'focus:outline-hidden',
|
|
77
|
-
'focus-visible:shadow-blue',
|
|
78
|
-
'disabled:cursor-not-allowed',
|
|
79
|
-
'disabled:opacity-50',
|
|
80
|
-
'[&>span]:line-clamp-1'
|
|
81
|
-
]
|
|
82
|
-
], {
|
|
83
|
-
variants: {
|
|
84
|
-
variant: {
|
|
85
|
-
default: [
|
|
86
|
-
'text-foreground',
|
|
87
|
-
'border-border',
|
|
88
|
-
'bg-grey-100',
|
|
89
|
-
'hover:border-border-hover',
|
|
90
|
-
'dark:hover:border-border-hover-dark',
|
|
91
|
-
'hover:text-foreground',
|
|
92
|
-
'focus-visible:shadow-brandGreen',
|
|
93
|
-
'dark:bg-background-alt-dark',
|
|
94
|
-
'dark:border-border-dark',
|
|
95
|
-
'dark:text-foreground-muted-dark',
|
|
96
|
-
'data-[placeholder]:text-foreground-muted',
|
|
97
|
-
'dark:focus-visible:shadow-brandGreen10'
|
|
98
|
-
],
|
|
99
|
-
error: [
|
|
100
|
-
'bg-red-50',
|
|
101
|
-
'border-feedback-error',
|
|
102
|
-
'hover:border-red-700',
|
|
103
|
-
'focus-visible:shadow-red',
|
|
104
|
-
'text-red-700',
|
|
105
|
-
'dark:bg-background-alt-dark',
|
|
106
|
-
'dark:border-feedback-error-dark',
|
|
107
|
-
'dark:text-feedback-error-dark'
|
|
108
|
-
],
|
|
109
|
-
success: [
|
|
110
|
-
'bg-green-50',
|
|
111
|
-
'border-feedback-success',
|
|
112
|
-
'hover:border-green-700',
|
|
113
|
-
'focus-visible:shadow-green',
|
|
114
|
-
'text-green-700',
|
|
115
|
-
'dark:bg-background-alt-dark',
|
|
116
|
-
'dark:border-feedback-success-dark',
|
|
117
|
-
'dark:text-feedback-success-dark'
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
size: {
|
|
121
|
-
sm: ['h-[37px]'],
|
|
122
|
-
lg: ['h-[42px]']
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
defaultVariants: {
|
|
126
|
-
variant: 'default',
|
|
127
|
-
size: 'sm'
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
65
|
const SelectTrigger = React.forwardRef((_a, ref) => {
|
|
131
66
|
var { variant, size, className, children } = _a, props = __rest(_a, ["variant", "size", "className", "children"]);
|
|
132
|
-
return ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, Object.assign({ ref: ref, className: (0, utils_ts_1.cn)(triggerVariants({ variant, size }), className) }, props, { children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, className: "ml-6", children: (0, jsx_runtime_1.jsx)(index_ts_1.BsChevronDown, { className: "h-2 w-2" }) })] })));
|
|
67
|
+
return ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, Object.assign({ ref: ref, className: (0, utils_ts_1.cn)((0, triggerVariants_ts_1.triggerVariants)({ variant, size }), className) }, props, { children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, className: "ml-6", children: (0, jsx_runtime_1.jsx)(index_ts_1.BsChevronDown, { className: "h-2 w-2" }) })] })));
|
|
133
68
|
});
|
|
134
69
|
exports.SelectTrigger = SelectTrigger;
|
|
135
70
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,MAAY,KAAK,kCAAa;AAC9B,MAAY,eAAe,mDAA8B;AAEzD,iDAAuC;AACvC,uEAA4D;AAC5D,oDAAqD;AACrD,MAAY,UAAU,wDAAmC;AAEzD,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,MAAY,KAAK,kCAAa;AAC9B,MAAY,eAAe,mDAA8B;AAEzD,iDAAuC;AACvC,uEAA4D;AAC5D,oDAAqD;AACrD,6DAAsD;AACtD,MAAY,UAAU,wDAAmC;AAEzD,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAA;QA8JjC,MAAM;AA5JR,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAA;QA6JvC,WAAW;AA3Jb,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAA;QA4JvC,WAAW;AA1Jb,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAA;QAgKzC,YAAY;AAzJd,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAgD,EAAE,GAAG,EAAE,EAAE;QAAzD,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,OAAY,EAAP,KAAK,cAA9C,4CAAgD,CAAF;IAAY,OAAA,CAC3D,wBAAC,eAAe,CAAC,OAAO,kBACtB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,aAAE,EAAC,IAAA,oCAAe,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,C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AAE,EAAE;QAA1C,EAAE,SAAS,EAAE,QAAQ,OAAY,EAAP,KAAK,cAA/B,yBAAiC,CAAF;IAAY,OAAA,CAC5C,uBAAC,eAAe,CAAC,IAAI,kBACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,aAAE,EAAC,YAAY,EAAE,EAAE,SAAS,CAAC,IACpC,KAAK,cAET,uBAAC,eAAe,CAAC,QAAQ,cAAE,QAAQ,GAA4B,IAC1C,CACxB,CAAA;AAAA,CAAC,AAAD,CAAC,CAAA;QAyBA,UAAU;AAxBZ,UAAU,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAA;AAEzD,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAuB,EAAE,GAAG,EAAE,EAAE;QAAhC,EAAE,SAAS,OAAY,EAAP,KAAK,cAArB,aAAuB,CAAF;IAAY,OAAA,CAClC,uBAAC,eAAe,CAAC,SAAS,kBACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,aAAE,EACX,6DAA6D,EAC7D,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AAAA,CAAC,AAAD,CAAC,CAAA;QAWA,eAAe;AAVjB,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC,WAAW,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The closed field of a select: `SelectTrigger`'s button and `NativeSelect`'s
|
|
3
|
+
* `<select>`, so the two look and size alike side by side. Kept out of either
|
|
4
|
+
* component's index so it is shared without becoming public API.
|
|
5
|
+
*/
|
|
6
|
+
export declare const triggerVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "error" | "success" | null | undefined;
|
|
8
|
+
size?: "lg" | "sm" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerVariants = void 0;
|
|
4
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
5
|
+
/**
|
|
6
|
+
* The closed field of a select: `SelectTrigger`'s button and `NativeSelect`'s
|
|
7
|
+
* `<select>`, so the two look and size alike side by side. Kept out of either
|
|
8
|
+
* component's index so it is shared without becoming public API.
|
|
9
|
+
*/
|
|
10
|
+
exports.triggerVariants = (0, class_variance_authority_1.cva)([
|
|
11
|
+
[
|
|
12
|
+
'flex',
|
|
13
|
+
'w-full',
|
|
14
|
+
'border border-[2px]',
|
|
15
|
+
'text-foreground',
|
|
16
|
+
'items-center',
|
|
17
|
+
'justify-between',
|
|
18
|
+
'rounded-lg',
|
|
19
|
+
'px-3',
|
|
20
|
+
'py-2',
|
|
21
|
+
'text-sm',
|
|
22
|
+
'focus:outline-hidden',
|
|
23
|
+
'focus-visible:shadow-blue',
|
|
24
|
+
'disabled:cursor-not-allowed',
|
|
25
|
+
'disabled:opacity-50',
|
|
26
|
+
'[&>span]:line-clamp-1'
|
|
27
|
+
]
|
|
28
|
+
], {
|
|
29
|
+
variants: {
|
|
30
|
+
variant: {
|
|
31
|
+
default: [
|
|
32
|
+
'text-foreground',
|
|
33
|
+
'border-border',
|
|
34
|
+
'bg-grey-100',
|
|
35
|
+
'hover:border-border-hover',
|
|
36
|
+
'dark:hover:border-border-hover-dark',
|
|
37
|
+
'hover:text-foreground',
|
|
38
|
+
'focus-visible:shadow-brandGreen',
|
|
39
|
+
'dark:bg-background-alt-dark',
|
|
40
|
+
'dark:border-border-dark',
|
|
41
|
+
'dark:text-foreground-muted-dark',
|
|
42
|
+
'data-[placeholder]:text-foreground-muted',
|
|
43
|
+
'dark:focus-visible:shadow-brandGreen10'
|
|
44
|
+
],
|
|
45
|
+
error: [
|
|
46
|
+
'bg-red-50',
|
|
47
|
+
'border-feedback-error',
|
|
48
|
+
'hover:border-red-700',
|
|
49
|
+
'focus-visible:shadow-red',
|
|
50
|
+
'text-red-700',
|
|
51
|
+
'dark:bg-background-alt-dark',
|
|
52
|
+
'dark:border-feedback-error-dark',
|
|
53
|
+
'dark:text-feedback-error-dark'
|
|
54
|
+
],
|
|
55
|
+
success: [
|
|
56
|
+
'bg-green-50',
|
|
57
|
+
'border-feedback-success',
|
|
58
|
+
'hover:border-green-700',
|
|
59
|
+
'focus-visible:shadow-green',
|
|
60
|
+
'text-green-700',
|
|
61
|
+
'dark:bg-background-alt-dark',
|
|
62
|
+
'dark:border-feedback-success-dark',
|
|
63
|
+
'dark:text-feedback-success-dark'
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
sm: ['h-[37px]'],
|
|
68
|
+
lg: ['h-[42px]']
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
defaultVariants: {
|
|
72
|
+
variant: 'default',
|
|
73
|
+
size: 'sm'
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=triggerVariants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggerVariants.js","sourceRoot":"","sources":["../../../src/components/Select/triggerVariants.ts"],"names":[],"mappings":";;;AAAA,uEAA8C;AAE9C;;;;GAIG;AACU,QAAA,eAAe,GAAG,IAAA,8BAAG,EAChC;IACE;QACE,MAAM;QACN,QAAQ;QACR,qBAAqB;QACrB,iBAAiB;QACjB,cAAc;QACd,iBAAiB;QACjB,YAAY;QACZ,MAAM;QACN,MAAM;QACN,SAAS;QACT,sBAAsB;QACtB,2BAA2B;QAC3B,6BAA6B;QAC7B,qBAAqB;QACrB,uBAAuB;KACxB;CACF,EACD;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,iBAAiB;gBACjB,eAAe;gBACf,aAAa;gBACb,2BAA2B;gBAC3B,qCAAqC;gBACrC,uBAAuB;gBACvB,iCAAiC;gBACjC,6BAA6B;gBAC7B,yBAAyB;gBACzB,iCAAiC;gBACjC,0CAA0C;gBAC1C,wCAAwC;aACzC;YACD,KAAK,EAAE;gBACL,WAAW;gBACX,uBAAuB;gBACvB,sBAAsB;gBACtB,0BAA0B;gBAC1B,cAAc;gBACd,6BAA6B;gBAC7B,iCAAiC;gBACjC,+BAA+B;aAChC;YACD,OAAO,EAAE;gBACP,aAAa;gBACb,yBAAyB;gBACzB,wBAAwB;gBACxB,4BAA4B;gBAC5B,gBAAgB;gBAChB,6BAA6B;gBAC7B,mCAAmC;gBACnC,iCAAiC;aAClC;SACF;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,CAAC,UAAU,CAAC;YAChB,EAAE,EAAE,CAAC,UAAU,CAAC;SACjB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAA"}
|
|
@@ -74,7 +74,7 @@ exports.spinnerVariants = spinnerVariants;
|
|
|
74
74
|
const Spinner = React.forwardRef((_a, ref) => {
|
|
75
75
|
var { className, size, label } = _a, props = __rest(_a, ["className", "size", "label"]);
|
|
76
76
|
const hasLabel = label != null && label.trim() !== '';
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ ref: ref, role: hasLabel ? 'status' : undefined, "aria-hidden": hasLabel ? undefined : true, className: (0, utils_ts_1.cn)('inline-flex items-center justify-center', className) }, props, { children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", "data-spinner-ring": "", className: spinnerVariants({ size }) }), hasLabel && (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: label })] })));
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ ref: ref, role: hasLabel ? 'status' : undefined, "aria-label": hasLabel ? label : undefined, "aria-hidden": hasLabel ? undefined : true, className: (0, utils_ts_1.cn)('inline-flex items-center justify-center', className) }, props, { children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", "data-spinner-ring": "", className: spinnerVariants({ size }) }), hasLabel && (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: label })] })));
|
|
78
78
|
});
|
|
79
79
|
exports.Spinner = Spinner;
|
|
80
80
|
Spinner.displayName = 'Spinner';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Spinner/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAa;AAC9B,uEAAiE;AACjE,iDAAuC;AAEvC,MAAM,eAAe,GAAG,IAAA,8BAAG,EACzB;IACE,OAAO;IACP,UAAU;IACV,cAAc;IACd,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,6BAA6B;IAC7B,0BAA0B;CAC3B,EACD;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE,kBAAkB;YAC3B,EAAE,EAAE,sBAAsB;SAC3B;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Spinner/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAa;AAC9B,uEAAiE;AACjE,iDAAuC;AAEvC,MAAM,eAAe,GAAG,IAAA,8BAAG,EACzB;IACE,OAAO;IACP,UAAU;IACV,cAAc;IACd,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,6BAA6B;IAC7B,0BAA0B;CAC3B,EACD;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE,kBAAkB;YAC3B,EAAE,EAAE,sBAAsB;SAC3B;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;QAqCiB,eAAe;AA5BjC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAC9B,CAAC,EAAoC,EAAE,GAAG,EAAE,EAAE;QAA7C,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,OAAY,EAAP,KAAK,cAAlC,8BAAoC,CAAF;IACjC,MAAM,QAAQ,GAAG,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAA;IAErD,OAAO,CACL,gDACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,gBAIzB,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,iBAC3B,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EACxC,SAAS,EAAE,IAAA,aAAE,EAAC,yCAAyC,EAAE,SAAS,CAAC,IAC/D,KAAK,eAET,gDACc,MAAM,uBACA,EAAE,EACpB,SAAS,EAAE,eAAe,CAAC,EAAE,IAAI,EAAE,CAAC,GACpC,EACD,QAAQ,IAAI,iCAAM,SAAS,EAAC,SAAS,YAAE,KAAK,GAAQ,KAChD,CACR,CAAA;AACH,CAAC,CACF,CAAA;QAGQ,OAAO;AAFhB,OAAO,CAAC,WAAW,GAAG,SAAS,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type IconButtonProps } from '../IconButton/index.tsx';
|
|
3
|
+
import { themeInitScript } from '../../theme-init.ts';
|
|
3
4
|
type Theme = 'light' | 'dark';
|
|
4
5
|
interface ThemeToggleProps extends Omit<IconButtonProps, 'icon' | 'label' | 'onClick' | 'aria-label' | 'children'> {
|
|
5
6
|
onThemeChange?: (theme: Theme) => void;
|
|
6
7
|
}
|
|
7
8
|
declare const ThemeToggle: React.ForwardRefExoticComponent<ThemeToggleProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
declare const themeInitScript = "(function(){try{var t=localStorage.getItem('theme');document.documentElement.classList.toggle('dark',t==='dark'||(t!=='light'&&matchMedia('(prefers-color-scheme: dark)').matches))}catch(e){}})()";
|
|
9
9
|
export { ThemeToggle, themeInitScript, type ThemeToggleProps, type Theme };
|
|
@@ -49,11 +49,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
49
49
|
const React = __importStar(require("react"));
|
|
50
50
|
const bs_1 = require("react-icons/bs");
|
|
51
51
|
const index_tsx_1 = require("../IconButton/index.js");
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
const theme_init_ts_1 = require("../../theme-init.js");
|
|
53
|
+
Object.defineProperty(exports, "themeInitScript", { enumerable: true, get: function () { return theme_init_ts_1.themeInitScript; } });
|
|
54
54
|
function readStored() {
|
|
55
55
|
try {
|
|
56
|
-
const stored = localStorage.getItem(
|
|
56
|
+
const stored = localStorage.getItem(theme_init_ts_1.THEME_STORAGE_KEY);
|
|
57
57
|
return stored === 'dark' || stored === 'light' ? stored : null;
|
|
58
58
|
}
|
|
59
59
|
catch (_a) {
|
|
@@ -62,7 +62,7 @@ function readStored() {
|
|
|
62
62
|
}
|
|
63
63
|
function persistTheme(theme) {
|
|
64
64
|
try {
|
|
65
|
-
localStorage.setItem(
|
|
65
|
+
localStorage.setItem(theme_init_ts_1.THEME_STORAGE_KEY, theme);
|
|
66
66
|
}
|
|
67
67
|
catch (_a) {
|
|
68
68
|
/* storage can be blocked */
|
|
@@ -77,7 +77,7 @@ function persistTheme(theme) {
|
|
|
77
77
|
*/
|
|
78
78
|
function systemQuery() {
|
|
79
79
|
return typeof window.matchMedia === 'function'
|
|
80
|
-
? window.matchMedia(
|
|
80
|
+
? window.matchMedia(theme_init_ts_1.DARK_SCHEME_QUERY)
|
|
81
81
|
: null;
|
|
82
82
|
}
|
|
83
83
|
function resolveTheme() {
|
|
@@ -103,7 +103,7 @@ function subscribe(onChange) {
|
|
|
103
103
|
applyTheme((media === null || media === void 0 ? void 0 : media.matches) ? 'dark' : 'light');
|
|
104
104
|
};
|
|
105
105
|
const onStorage = (event) => {
|
|
106
|
-
if (event.key ===
|
|
106
|
+
if (event.key === theme_init_ts_1.THEME_STORAGE_KEY || event.key === null) {
|
|
107
107
|
applyTheme(resolveTheme());
|
|
108
108
|
}
|
|
109
109
|
};
|
|
@@ -135,6 +135,4 @@ const ThemeToggle = React.forwardRef((_a, ref) => {
|
|
|
135
135
|
});
|
|
136
136
|
exports.ThemeToggle = ThemeToggle;
|
|
137
137
|
ThemeToggle.displayName = 'ThemeToggle';
|
|
138
|
-
const themeInitScript = `(function(){try{var t=localStorage.getItem('${STORAGE_KEY}');document.documentElement.classList.toggle('dark',t==='dark'||(t!=='light'&&matchMedia('${DARK_QUERY}').matches))}catch(e){}})()`;
|
|
139
|
-
exports.themeInitScript = themeInitScript;
|
|
140
138
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ThemeToggle/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAa;AAC9B,uCAA8C;AAE9C,sDAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ThemeToggle/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAa;AAC9B,uCAA8C;AAE9C,sDAA0E;AAC1E,uDAI4B;gGAD1B,+BAAe;AAKjB,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,iCAAW,CAAC,CAAA;QAChD,OAAO,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;IAChE,CAAC;eAAO,CAAC;QACP,OAAO,IA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IAED,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,YAAY,EAAE,CAAC,CAAA;IAC5B,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,MAAM,IAAI,GAAU,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAA;QACvD,YAAY,CAAC,IAAI,CAAC,CAAA;QAClB,UAAU,CAAC,IAAI,CAAC,CAAA;QAChB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,IAAI,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,MAAM,IAAI,GAAG,KAAK,KAAK,MAAM,CAAA;IAE7B,OAAO,CACL,uBAAC,sBAAU,kBACT,GAAG,EAAE,GAAG,EACR,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,IAAI,EACT,IAAI,EACF,IAAI,CAAC,CAAC,CAAC,uBAAC,UAAK,mBAAa,MAAM,GAAG,CAAC,CAAC,CAAC,uBAAC,WAAM,mBAAa,MAAM,GAAG,EAErE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,EAClD,OAAO,EAAE,MAAM,IACX,KAAK,EACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;QAIQ,WAAW;AAFpB,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA"}
|
|
@@ -24,6 +24,7 @@ export * from './Label/index.tsx';
|
|
|
24
24
|
export * from './Link/index.tsx';
|
|
25
25
|
export * from './Meter/index.tsx';
|
|
26
26
|
export * from './Modal/index.tsx';
|
|
27
|
+
export * from './NativeSelect/index.tsx';
|
|
27
28
|
export * from './Navigation/index.tsx';
|
|
28
29
|
export * from './Notice/index.tsx';
|
|
29
30
|
export * from './PageHeader/index.tsx';
|
package/dist/components/index.js
CHANGED
|
@@ -40,6 +40,7 @@ __exportStar(require("./Label/index.js"), exports);
|
|
|
40
40
|
__exportStar(require("./Link/index.js"), exports);
|
|
41
41
|
__exportStar(require("./Meter/index.js"), exports);
|
|
42
42
|
__exportStar(require("./Modal/index.js"), exports);
|
|
43
|
+
__exportStar(require("./NativeSelect/index.js"), exports);
|
|
43
44
|
__exportStar(require("./Navigation/index.js"), exports);
|
|
44
45
|
__exportStar(require("./Notice/index.js"), exports);
|
|
45
46
|
__exportStar(require("./PageHeader/index.js"), exports);
|