@getgreenline/blaze-ui 1.0.4 → 1.0.6
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 +36 -47
- package/build/components/button.d.ts +1 -1
- package/build/components/button.js +14 -14
- package/build/components/button.js.map +1 -1
- package/build/components/card.d.ts +10 -0
- package/build/components/card.d.ts.map +1 -0
- package/build/components/card.js +51 -0
- package/build/components/card.js.map +1 -0
- package/build/components/input.js +1 -1
- package/build/components/input.js.map +1 -1
- package/build/components/label.js +1 -1
- package/build/components/label.js.map +1 -1
- package/build/components/popover.d.ts +8 -0
- package/build/components/popover.d.ts.map +1 -0
- package/build/components/popover.js +69 -0
- package/build/components/popover.js.map +1 -0
- package/build/components/segmented-control.d.ts +24 -0
- package/build/components/segmented-control.d.ts.map +1 -0
- package/build/components/segmented-control.js +94 -0
- package/build/components/segmented-control.js.map +1 -0
- package/build/components/switch.d.ts +23 -1
- package/build/components/switch.d.ts.map +1 -1
- package/build/components/switch.js +14 -2
- package/build/components/switch.js.map +1 -1
- package/build/index.d.ts +3 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +18 -3
- package/build/index.js.map +1 -1
- package/build/index.mjs +17 -1
- package/package.json +7 -5
- package/src/styles/blaze-ui.css +163 -0
- package/tailwind.config.js +6 -0
- package/build/styles/blaze-ui.css +0 -97
- package/build/styles/blaze-ui.css.map +0 -1
- package/build/styles/styles.d.ts +0 -3
- package/build/styles/styles.d.ts.map +0 -1
- package/build/styles/styles.js +0 -8
- package/build/styles/styles.js.map +0 -1
- package/src/styles/styles.ts +0 -5
package/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Blaze UI Package
|
|
2
2
|
|
|
3
3
|
This workspace publishes the `@getgreenline/blaze-ui` component library used by
|
|
4
|
-
our React applications.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
our React applications. Components are authored in TypeScript and consume the
|
|
5
|
+
Tailwind authoring file at `src/styles/blaze-ui.css`. Host applications are now
|
|
6
|
+
expected to compile that stylesheet themselves—`tailwindcss` is listed as a peer
|
|
7
|
+
dependency so consuming projects can control their own Tailwind pipeline.
|
|
7
8
|
|
|
8
9
|
## Build pipeline
|
|
9
10
|
|
|
@@ -11,70 +12,58 @@ required for consumers).
|
|
|
11
12
|
|
|
12
13
|
1. `clean` – removes the `build/` directory so every build starts from a clean
|
|
13
14
|
slate.
|
|
14
|
-
2. `tsc -p tsconfig.json` – emits CommonJS JavaScript and declaration files
|
|
15
|
-
|
|
16
|
-
3. `node ./scripts/build-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- **Unwrap Tailwind layers.** Tailwind v4 wraps generated tokens and utility
|
|
24
|
-
classes in `@layer` blocks. Legacy consumers (e.g. Bootstrap apps) have
|
|
25
|
-
unlayered CSS that would otherwise win the cascade, so the build flattens
|
|
26
|
-
these layers before minifying.
|
|
27
|
-
- **Namespace utilities.** After Tailwind runs we rewrite every generated
|
|
28
|
-
selector to use a `tw-` prefix (for example `tw-inline-flex`,
|
|
29
|
-
`hover:tw-bg-primary/90`) and apply the same rewrite to the transpiled
|
|
30
|
-
JavaScript strings in `build/`. Source files stay clean—developers author
|
|
31
|
-
classes without `tw-`, and the build step applies the prefix for the published
|
|
32
|
-
artefacts so they cannot clash with Bootstrap/global styles.
|
|
33
|
-
- **Re-append design tokens.** After optimisation we append the raw `:root` and
|
|
34
|
-
`.dark` variable blocks. This guarantees the design tokens (e.g. `--primary`,
|
|
35
|
-
`--primary-foreground`) exist even if a host application does not use
|
|
36
|
-
Tailwind, and ensures they override Bootstrap's global variables.
|
|
37
|
-
|
|
38
|
-
Because the output is fully compiled, downstream applications **must not** run
|
|
39
|
-
Tailwind themselves. Consumers simply import the distributed stylesheet from
|
|
40
|
-
this package.
|
|
15
|
+
2. `tsc -p tsconfig.json` – emits CommonJS JavaScript and declaration files into
|
|
16
|
+
`build/`.
|
|
17
|
+
3. `node ./scripts/build-entry.mjs` – generates an ES module entry point that
|
|
18
|
+
re-exports everything from the CommonJS bundle for ESM consumers.
|
|
19
|
+
|
|
20
|
+
CSS is no longer compiled during the package build. Consumers must import the
|
|
21
|
+
Tailwind authoring file so their own Tailwind setup produces the required
|
|
22
|
+
utilities and tokens.
|
|
41
23
|
|
|
42
24
|
## Local development
|
|
43
25
|
|
|
44
26
|
- `yarn workspace @getgreenline/blaze-ui dev` – watch TypeScript sources.
|
|
45
|
-
- `yarn workspace @getgreenline/blaze-ui build` – clean + compile TS +
|
|
46
|
-
|
|
27
|
+
- `yarn workspace @getgreenline/blaze-ui build` – clean + compile TS + build ESM
|
|
28
|
+
entry (required before publishing).
|
|
47
29
|
|
|
48
|
-
If you add new utilities or tokens, update `src/styles/blaze-ui.css` and
|
|
49
|
-
|
|
50
|
-
`tw-animate-css`).
|
|
30
|
+
If you add new utilities or tokens, update `src/styles/blaze-ui.css` and ensure
|
|
31
|
+
Storybook/host apps pick up the changes via their Tailwind builds.
|
|
51
32
|
|
|
52
33
|
## Consuming the package
|
|
53
34
|
|
|
54
|
-
|
|
35
|
+
Add Blaze UI's stylesheet to your Tailwind entry file (or another file that is
|
|
36
|
+
processed by Tailwind):
|
|
55
37
|
|
|
56
|
-
```
|
|
57
|
-
import
|
|
38
|
+
```css
|
|
39
|
+
@import "@getgreenline/blaze-ui/src/styles/blaze-ui.css";
|
|
58
40
|
```
|
|
59
41
|
|
|
60
|
-
|
|
42
|
+
The import can live alongside your existing Tailwind directives. When your
|
|
43
|
+
application runs its Tailwind build it will produce the utilities and tokens
|
|
44
|
+
required by Blaze UI. The included `tailwind.config.js` sets `prefix: "tw"`,
|
|
45
|
+
so the generated utilities are namespaced (e.g. `tw:bg-primary`). If your app
|
|
46
|
+
overrides the Tailwind config for that entry point, remember to preserve the
|
|
47
|
+
same prefix. Components are then imported normally:
|
|
61
48
|
|
|
62
49
|
```tsx
|
|
63
|
-
import { Button } from
|
|
50
|
+
import { Button } from "@getgreenline/blaze-ui";
|
|
64
51
|
```
|
|
65
52
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
Because the compiled CSS is no longer bundled with the package, make sure the
|
|
54
|
+
consumer application has `tailwindcss@>=4.0.0` installed and that your build
|
|
55
|
+
includes Blaze UI's sources in the content graph (the `@source` entries inside
|
|
56
|
+
`blaze-ui.css` cover the workspace by default). Tailwind will generate prefixed
|
|
57
|
+
utilities that match the component markup out of the box.
|
|
69
58
|
|
|
70
59
|
## Publishing checklist
|
|
71
60
|
|
|
72
61
|
1. Bump `version` in `package.json`.
|
|
73
62
|
2. Run `yarn workspace @getgreenline/blaze-ui build`.
|
|
74
|
-
3. Optionally verify the
|
|
75
|
-
|
|
63
|
+
3. Optionally verify the components in Storybook or a host app after running its
|
|
64
|
+
Tailwind build.
|
|
76
65
|
4. Use the root scripts (`yarn release:ui`, `yarn release:ui:dry-run`, or
|
|
77
66
|
`yarn release:ui:otp`) to publish.
|
|
78
67
|
|
|
79
|
-
These notes
|
|
80
|
-
|
|
68
|
+
These notes reflect the simplified pipeline where Blaze UI ships only TypeScript
|
|
69
|
+
artefacts and expects consumers to compile Tailwind locally.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, loading, children, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -51,21 +51,21 @@ const React = __importStar(require("react"));
|
|
|
51
51
|
const react_slot_1 = require("@radix-ui/react-slot");
|
|
52
52
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
53
53
|
const utils_1 = require("../lib/utils");
|
|
54
|
-
const buttonVariants = (0, class_variance_authority_1.cva)("tw
|
|
54
|
+
const buttonVariants = (0, class_variance_authority_1.cva)("tw:inline-flex tw:items-center tw:justify-center tw:gap-2 tw:whitespace-nowrap tw:rounded-md tw:text-sm tw:font-medium tw:transition-all disabled:tw:pointer-events-none disabled:tw:opacity-50 [&_svg]:tw:pointer-events-none [&_svg:not([class*='size-'])]:tw:size-4 tw:shrink-0 [&_svg]:tw:shrink-0 tw:outline-none focus-visible:tw:border-ring focus-visible:tw:ring-ring/50 focus-visible:tw:ring-[3px] aria-invalid:tw:ring-destructive/20 dark:aria-invalid:tw:ring-destructive/40 aria-invalid:tw:border-destructive", {
|
|
55
55
|
variants: {
|
|
56
56
|
variant: {
|
|
57
|
-
default: "tw
|
|
58
|
-
destructive: "tw
|
|
59
|
-
outline: "tw
|
|
60
|
-
secondary: "tw
|
|
61
|
-
ghost: "hover:tw
|
|
62
|
-
link: "tw
|
|
57
|
+
default: "tw:bg-primary tw:text-primary-foreground tw:shadow-xs hover:tw:bg-primary/90",
|
|
58
|
+
destructive: "tw:bg-destructive tw:text-white tw:shadow-xs hover:tw:bg-destructive/90 focus-visible:tw:ring-destructive/20 dark:focus-visible:tw:ring-destructive/40 dark:tw:bg-destructive/60",
|
|
59
|
+
outline: "tw:border tw:bg-background tw:shadow-xs hover:tw:bg-accent hover:tw:text-accent-foreground dark:tw:bg-input/30 dark:tw:border-input dark:hover:tw:bg-input/50",
|
|
60
|
+
secondary: "tw:bg-secondary tw:text-secondary-foreground tw:shadow-xs hover:tw:bg-secondary/80",
|
|
61
|
+
ghost: "hover:tw:bg-accent hover:tw:text-accent-foreground dark:hover:tw:bg-accent/50",
|
|
62
|
+
link: "tw:text-primary tw:underline-offset-4 hover:tw:underline",
|
|
63
63
|
},
|
|
64
64
|
size: {
|
|
65
|
-
default: "tw
|
|
66
|
-
sm: "tw
|
|
67
|
-
lg: "tw
|
|
68
|
-
icon: "tw
|
|
65
|
+
default: "tw:h-9 tw:px-4 tw:py-2 has-[>svg]:tw:px-3",
|
|
66
|
+
sm: "tw:h-8 tw:rounded-md tw:gap-1.5 tw:px-3 has-[>svg]:tw:px-2.5",
|
|
67
|
+
lg: "tw:h-10 tw:rounded-md tw:px-6 has-[>svg]:tw:px-4",
|
|
68
|
+
icon: "tw:size-9",
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
defaultVariants: {
|
|
@@ -93,14 +93,14 @@ function Button(_a) {
|
|
|
93
93
|
return node;
|
|
94
94
|
};
|
|
95
95
|
const renderedChildren = wrapTextNodes(children);
|
|
96
|
-
const spinner = ((0, jsx_runtime_1.jsx)("span", { "data-loading-spinner": true, "aria-hidden": "true", className: "tw
|
|
96
|
+
const spinner = ((0, jsx_runtime_1.jsx)("span", { "data-loading-spinner": true, "aria-hidden": "true", className: "tw:absolute tw:inset-0 tw:flex tw:items-center tw:justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "tw:inline-block tw:size-4 tw:animate-spin tw:rounded-full tw:border-2 tw:border-current tw:border-t-transparent" }) }));
|
|
97
97
|
if (asChild) {
|
|
98
98
|
const onlyChild = React.Children.only(renderedChildren);
|
|
99
99
|
const childWithSpinner = React.cloneElement(onlyChild, undefined, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [loading && spinner, (_b = onlyChild.props) === null || _b === void 0 ? void 0 : _b.children] }));
|
|
100
100
|
return ((0, jsx_runtime_1.jsx)(Comp, Object.assign({ "data-slot": "button", "aria-busy": loading || undefined, "aria-disabled": (props === null || props === void 0 ? void 0 : props.disabled) || loading || undefined, className: (0, utils_1.cn)(buttonVariants({ variant, size, className }), loading &&
|
|
101
|
-
"tw
|
|
101
|
+
"tw:relative [&>*:not([data-loading-spinner])]:tw:opacity-0 [&>*:not([data-loading-spinner])]:tw:transition-opacity") }, props, { children: childWithSpinner })));
|
|
102
102
|
}
|
|
103
103
|
return ((0, jsx_runtime_1.jsxs)(Comp, Object.assign({ "data-slot": "button", "aria-busy": loading || undefined, "aria-disabled": (props === null || props === void 0 ? void 0 : props.disabled) || loading || undefined, disabled: (props === null || props === void 0 ? void 0 : props.disabled) || loading, className: (0, utils_1.cn)(buttonVariants({ variant, size, className }), loading &&
|
|
104
|
-
"tw
|
|
104
|
+
"tw:relative [&>*:not([data-loading-spinner])]:tw:opacity-0 [&>*:not([data-loading-spinner])]:tw:transition-opacity") }, props, { children: [loading && spinner, renderedChildren] })));
|
|
105
105
|
}
|
|
106
106
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HS,wBAAM;;AA/Hf,6CAA8B;AAC9B,qDAA2C;AAC3C,uEAAiE;AAEjE,wCAAiC;AAEjC,MAAM,cAAc,GAAG,IAAA,8BAAG,EACxB,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HS,wBAAM;;AA/Hf,6CAA8B;AAC9B,qDAA2C;AAC3C,uEAAiE;AAEjE,wCAAiC;AAEjC,MAAM,cAAc,GAAG,IAAA,8BAAG,EACxB,+fAA+f,EAC/f;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,8EAA8E;YAChF,WAAW,EACT,kLAAkL;YACpL,OAAO,EACL,+JAA+J;YACjK,SAAS,EACP,oFAAoF;YACtF,KAAK,EACH,+EAA+E;YACjF,IAAI,EAAE,0DAA0D;SACjE;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,2CAA2C;YACpD,EAAE,EAAE,8DAA8D;YAClE,EAAE,EAAE,kDAAkD;YACtD,IAAI,EAAE,WAAW;SACl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iCACE,SAAS,EAAC,iHAAiH,GAC3H,GACG,CACR,CAAA;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAuB,CAAA;QAC7E,MAAM,gBAAgB,GAAG,KAAK,CAAC,YAAY,CACzC,SAAS,EACT,SAAS,EACT,6DACG,OAAO,IAAI,OAAO,EAClB,MAAA,SAAS,CAAC,KAAK,0CAAE,QAAQ,IACzB,CACJ,CAAA;QAED,OAAO,CACL,uBAAC,IAAI,+BACO,QAAQ,eACP,OAAO,IAAI,SAAS,mBAChB,CAAC,KAAa,aAAb,KAAK,uBAAL,KAAK,CAAU,QAAQ,KAAI,OAAO,IAAI,SAAS,EAC/D,SAAS,EAAE,IAAA,UAAE,EACX,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC5C,OAAO;gBACL,oHAAoH,CACvH,IACG,KAAK,cAER,gBAAgB,IACZ,CACR,CAAA;IACH,CAAC;IAED,OAAO,CACL,wBAAC,IAAI,+BACO,QAAQ,eACP,OAAO,IAAI,SAAS,mBAChB,CAAC,KAAa,aAAb,KAAK,uBAAL,KAAK,CAAU,QAAQ,KAAI,OAAO,IAAI,SAAS,EAC/D,QAAQ,EAAE,CAAC,KAAa,aAAb,KAAK,uBAAL,KAAK,CAAU,QAAQ,KAAI,OAAO,EAC7C,SAAS,EAAE,IAAA,UAAE,EACX,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC5C,OAAO;YACL,oHAAoH,CACvH,IACG,KAAK,eAER,OAAO,IAAI,OAAO,EAClB,gBAAgB,KACZ,CACR,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
10
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Card = Card;
|
|
15
|
+
exports.CardHeader = CardHeader;
|
|
16
|
+
exports.CardFooter = CardFooter;
|
|
17
|
+
exports.CardTitle = CardTitle;
|
|
18
|
+
exports.CardAction = CardAction;
|
|
19
|
+
exports.CardDescription = CardDescription;
|
|
20
|
+
exports.CardContent = CardContent;
|
|
21
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
+
const utils_1 = require("../lib/utils");
|
|
23
|
+
function Card(_a) {
|
|
24
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card", className: (0, utils_1.cn)("tw:bg-card tw:text-card-foreground tw:flex tw:flex-col tw:gap-6 tw:rounded-xl tw:border tw:py-6 tw:shadow-sm", className) }, props)));
|
|
26
|
+
}
|
|
27
|
+
function CardHeader(_a) {
|
|
28
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-header", className: (0, utils_1.cn)("@container/card-header tw:grid tw:auto-rows-min tw:grid-rows-[auto_auto] tw:items-start tw:gap-1.5 tw:px-6 has-data-[slot=card-action]:tw:grid-cols-[1fr_auto] [.border-b]:tw:pb-6", className) }, props)));
|
|
30
|
+
}
|
|
31
|
+
function CardTitle(_a) {
|
|
32
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-title", className: (0, utils_1.cn)("tw:leading-none tw:font-semibold", className) }, props)));
|
|
34
|
+
}
|
|
35
|
+
function CardDescription(_a) {
|
|
36
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-description", className: (0, utils_1.cn)("tw:text-muted-foreground tw:text-sm", className) }, props)));
|
|
38
|
+
}
|
|
39
|
+
function CardAction(_a) {
|
|
40
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-action", className: (0, utils_1.cn)("tw:col-start-2 tw:row-span-2 tw:row-start-1 tw:self-start tw:justify-self-end", className) }, props)));
|
|
42
|
+
}
|
|
43
|
+
function CardContent(_a) {
|
|
44
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-content", className: (0, utils_1.cn)("tw:px-6", className) }, props)));
|
|
46
|
+
}
|
|
47
|
+
function CardFooter(_a) {
|
|
48
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-footer", className: (0, utils_1.cn)("tw:flex tw:items-center tw:px-6 [.border-t]:tw:pt-6", className) }, props)));
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAoFE,oBAAI;AACJ,gCAAU;AACV,gCAAU;AACV,8BAAS;AACT,gCAAU;AACV,0CAAe;AACf,kCAAW;;AAxFb,wCAAiC;AAEjC,SAAS,IAAI,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACjC,OAAO,CACL,2DACY,MAAM,EAChB,SAAS,EAAE,IAAA,UAAE,EACX,8GAA8G,EAC9G,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACvC,OAAO,CACL,2DACY,aAAa,EACvB,SAAS,EAAE,IAAA,UAAE,EACX,oLAAoL,EACpL,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACtC,OAAO,CACL,2DACY,YAAY,EACtB,SAAS,EAAE,IAAA,UAAE,EAAC,kCAAkC,EAAE,SAAS,CAAC,IACxD,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IAC5C,OAAO,CACL,2DACY,kBAAkB,EAC5B,SAAS,EAAE,IAAA,UAAE,EAAC,qCAAqC,EAAE,SAAS,CAAC,IAC3D,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACvC,OAAO,CACL,2DACY,aAAa,EACvB,SAAS,EAAE,IAAA,UAAE,EACX,+EAA+E,EAC/E,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACxC,OAAO,CACL,2DACY,cAAc,EACxB,SAAS,EAAE,IAAA,UAAE,EAAC,SAAS,EAAE,SAAS,CAAC,IAC/B,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACvC,OAAO,CACL,2DACY,aAAa,EACvB,SAAS,EAAE,IAAA,UAAE,EAAC,qDAAqD,EAAE,SAAS,CAAC,IAC3E,KAAK,EACT,CACH,CAAA;AACH,CAAC"}
|
|
@@ -50,7 +50,7 @@ const React = __importStar(require("react"));
|
|
|
50
50
|
const utils_1 = require("../lib/utils");
|
|
51
51
|
const Input = React.forwardRef((_a, ref) => {
|
|
52
52
|
var { className, type } = _a, props = __rest(_a, ["className", "type"]);
|
|
53
|
-
return ((0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, type: type, "data-slot": "input", className: (0, utils_1.cn)("file:tw
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, type: type, "data-slot": "input", className: (0, utils_1.cn)("file:tw:text-foreground placeholder:tw:text-muted-foreground selection:tw:bg-primary selection:tw:text-primary-foreground dark:tw:bg-input/30 tw:border-input tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:shadow-xs tw:transition-[color,box-shadow] tw:outline-none file:tw:inline-flex file:tw:h-7 file:tw:border-0 file:tw:bg-transparent file:tw:text-sm file:tw:font-medium disabled:tw:pointer-events-none disabled:tw:cursor-not-allowed disabled:tw:opacity-50 md:tw:text-sm", "focus-visible:tw:border-ring focus-visible:tw:ring-ring/50 focus-visible:tw:ring-[3px]", "aria-invalid:tw:ring-destructive/20 dark:aria-invalid:tw:ring-destructive/40 aria-invalid:tw:border-destructive", className) }, props)));
|
|
54
54
|
});
|
|
55
55
|
exports.Input = Input;
|
|
56
56
|
Input.displayName = "Input";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,wCAAiC;AAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAA6B,EAAE,GAAG,EAAE,EAAE;QAAtC,EAAE,SAAS,EAAE,IAAI,OAAY,EAAP,KAAK,cAA3B,qBAA6B,CAAF;IAAY,OAAA,CACxC,gDACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,IAAA,UAAE,EACX,
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,wCAAiC;AAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAA6B,EAAE,GAAG,EAAE,EAAE;QAAtC,EAAE,SAAS,EAAE,IAAI,OAAY,EAAP,KAAK,cAA3B,qBAA6B,CAAF;IAAY,OAAA,CACxC,gDACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,IAAA,UAAE,EACX,ghBAAghB,EAChhB,wFAAwF,EACxF,iHAAiH,EACjH,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;CAAA,CAAC,CAAA;AAIO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
|
|
@@ -53,7 +53,7 @@ const LabelPrimitive = __importStar(require("@radix-ui/react-label"));
|
|
|
53
53
|
const utils_1 = require("../lib/utils");
|
|
54
54
|
const Label = React.forwardRef((_a, ref) => {
|
|
55
55
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
56
|
-
return ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, Object.assign({ ref: ref, "data-slot": "label", className: (0, utils_1.cn)("tw
|
|
56
|
+
return ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, Object.assign({ ref: ref, "data-slot": "label", className: (0, utils_1.cn)("tw:flex tw:items-center tw:gap-2 tw:text-sm tw:leading-none tw:font-medium tw:select-none group-data-disabled:tw:pointer-events-none group-data-disabled:tw:opacity-50 peer-disabled:tw:cursor-not-allowed peer-disabled:tw:opacity-50", className) }, props)));
|
|
57
57
|
});
|
|
58
58
|
exports.Label = Label;
|
|
59
59
|
Label.displayName = (_a = LabelPrimitive.Root.displayName) !== null && _a !== void 0 ? _a : "Label";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,6CAA8B;AAC9B,sEAAuD;AAEvD,wCAAiC;AAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAuB,EAAE,GAAG,EAAE,EAAE;QAAhC,EAAE,SAAS,OAAY,EAAP,KAAK,cAArB,aAAuB,CAAF;IAAY,OAAA,CAClC,uBAAC,cAAc,CAAC,IAAI,kBAClB,GAAG,EAAE,GAAG,eACE,OAAO,EACjB,SAAS,EAAE,IAAA,UAAE,EACX,
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,6CAA8B;AAC9B,sEAAuD;AAEvD,wCAAiC;AAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAuB,EAAE,GAAG,EAAE,EAAE;QAAhC,EAAE,SAAS,OAAY,EAAP,KAAK,cAArB,aAAuB,CAAF;IAAY,OAAA,CAClC,uBAAC,cAAc,CAAC,IAAI,kBAClB,GAAG,EAAE,GAAG,eACE,OAAO,EACjB,SAAS,EAAE,IAAA,UAAE,EACX,wOAAwO,EACxO,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;CAAA,CAAC,CAAA;AAIO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,MAAA,cAAc,CAAC,IAAI,CAAC,WAAW,mCAAI,OAAO,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare function Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
8
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAEzE;AAED,QAAA,MAAM,cAAc,sKAKlB,CAAA;AAGF,QAAA,MAAM,cAAc,gKAiBlB,CAAA;AAGF,QAAA,MAAM,aAAa,+JAKjB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
+
var t = {};
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
+
t[p] = s[p];
|
|
40
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
+
t[p[i]] = s[p[i]];
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = void 0;
|
|
49
|
+
exports.Popover = Popover;
|
|
50
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
51
|
+
const React = __importStar(require("react"));
|
|
52
|
+
const PopoverPrimitive = __importStar(require("@radix-ui/react-popover"));
|
|
53
|
+
const utils_1 = require("../lib/utils");
|
|
54
|
+
function Popover(props) {
|
|
55
|
+
return (0, jsx_runtime_1.jsx)(PopoverPrimitive.Root, Object.assign({ "data-slot": "popover" }, props));
|
|
56
|
+
}
|
|
57
|
+
const PopoverTrigger = React.forwardRef((props, ref) => ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Trigger, Object.assign({ ref: ref, "data-slot": "popover-trigger" }, props))));
|
|
58
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
59
|
+
PopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;
|
|
60
|
+
const PopoverContent = React.forwardRef((_a, ref) => {
|
|
61
|
+
var { className, align = "center", sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(PopoverPrimitive.Content, Object.assign({ ref: ref, "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: (0, utils_1.cn)("tw:bg-popover tw:text-popover-foreground data-[state=open]:tw:animate-in data-[state=closed]:tw:animate-out data-[state=closed]:tw:fade-out-0 data-[state=open]:tw:fade-in-0 data-[state=closed]:tw:zoom-out-95 data-[state=open]:tw:zoom-in-95 data-[side=bottom]:tw:slide-in-from-top-2 data-[side=left]:tw:slide-in-from-right-2 data-[side=right]:tw:slide-in-from-left-2 data-[side=top]:tw:slide-in-from-bottom-2 tw:z-50 tw:w-72 tw:origin-[var(--radix-popover-content-transform-origin)] tw:rounded-md tw:border tw:p-4 tw:shadow-md tw:outline-hidden", className) }, props)) }));
|
|
63
|
+
});
|
|
64
|
+
exports.PopoverContent = PopoverContent;
|
|
65
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
66
|
+
const PopoverAnchor = React.forwardRef((props, ref) => ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Anchor, Object.assign({ ref: ref, "data-slot": "popover-anchor" }, props))));
|
|
67
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
68
|
+
PopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;
|
|
69
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/components/popover.tsx"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BAAgB,CAAC,MAAM,kBAAC,GAAG,EAAE,GAAG,eAAY,gBAAgB,IAAK,KAAK,EAAI,CAC5E,CAAC,CAAA;AAGgD,sCAAa;AAF/D,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare const segmentedControlVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
4
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare const segmentedControlItemVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
10
|
+
interface SegmentedControlOption {
|
|
11
|
+
value: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
interface SegmentedControlProps extends VariantProps<typeof segmentedControlVariants> {
|
|
15
|
+
options: SegmentedControlOption[];
|
|
16
|
+
value: string;
|
|
17
|
+
onValueChange: (value: string) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
ariaLabelledBy?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function SegmentedControl({ options, value, onValueChange, className, ariaLabel, ariaLabelledBy, variant, size, }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { segmentedControlItemVariants, segmentedControlVariants };
|
|
24
|
+
//# sourceMappingURL=segmented-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../src/components/segmented-control.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAOjE,QAAA,MAAM,wBAAwB;;;mFAwB7B,CAAA;AAED,QAAA,MAAM,4BAA4B;;;mFA8BjC,CAAA;AAED,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,qBAAsB,SAAQ,YAAY,CAAC,OAAO,wBAAwB,CAAC;IACnF,OAAO,EAAE,sBAAsB,EAAE,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,cAAc,EACd,OAAO,EACP,IAAI,GACL,EAAE,qBAAqB,2CA4EvB;AAED,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,CAAA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.segmentedControlVariants = exports.segmentedControlItemVariants = void 0;
|
|
5
|
+
exports.SegmentedControl = SegmentedControl;
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const utils_1 = require("../lib/utils");
|
|
10
|
+
const segmentedControlVariants = (0, class_variance_authority_1.cva)("inline-flex tw:inline-flex items-center tw:items-center rounded-lg tw:rounded-lg border tw:border border-transparent tw:border-transparent", {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-muted tw:bg-muted",
|
|
14
|
+
destructive: "bg-destructive/10 tw:bg-destructive/10 border-destructive/20 tw:border-destructive/20",
|
|
15
|
+
outline: "bg-background tw:bg-background border-input tw:border-input",
|
|
16
|
+
secondary: "bg-secondary/70 tw:bg-secondary/70",
|
|
17
|
+
ghost: "bg-transparent tw:bg-transparent",
|
|
18
|
+
link: "bg-transparent tw:bg-transparent border-none tw:border-none",
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
default: "p-1 tw:p-1",
|
|
22
|
+
sm: "p-0.5 tw:p-0.5",
|
|
23
|
+
lg: "p-1.5 tw:p-1.5",
|
|
24
|
+
icon: "p-1 tw:p-1",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "default",
|
|
29
|
+
size: "default",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
exports.segmentedControlVariants = segmentedControlVariants;
|
|
33
|
+
const segmentedControlItemVariants = (0, class_variance_authority_1.cva)("relative tw:relative rounded-md tw:rounded-md font-medium tw:font-medium transition-all tw:transition-all duration-200 tw:duration-200 focus-visible:outline-none focus-visible:tw:outline-none focus-visible:ring-2 focus-visible:tw:ring-2 focus-visible:ring-ring focus-visible:tw:ring-ring focus-visible:ring-offset-2 focus-visible:tw:ring-offset-2 focus:z-10 focus:tw:z-10", {
|
|
34
|
+
variants: {
|
|
35
|
+
variant: {
|
|
36
|
+
default: "text-muted-foreground tw:text-muted-foreground hover:text-foreground hover:tw:text-foreground hover:bg-background/50 hover:tw:bg-background/50 data-[state=active]:bg-background data-[state=active]:tw:bg-background data-[state=active]:text-foreground data-[state=active]:tw:text-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
|
|
37
|
+
destructive: "text-destructive tw:text-destructive hover:text-destructive hover:tw:text-destructive hover:bg-destructive/10 hover:tw:bg-destructive/10 data-[state=active]:bg-destructive data-[state=active]:tw:bg-destructive data-[state=active]:text-destructive-foreground data-[state=active]:tw:text-destructive-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
|
|
38
|
+
outline: "text-muted-foreground tw:text-muted-foreground hover:text-foreground hover:tw:text-foreground hover:bg-muted/50 hover:tw:bg-muted/50 data-[state=active]:bg-background data-[state=active]:tw:bg-background data-[state=active]:text-foreground data-[state=active]:tw:text-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
|
|
39
|
+
secondary: "text-secondary-foreground tw:text-secondary-foreground hover:text-secondary-foreground hover:tw:text-secondary-foreground hover:bg-secondary/60 hover:tw:bg-secondary/60 data-[state=active]:bg-secondary data-[state=active]:tw:bg-secondary data-[state=active]:text-secondary-foreground data-[state=active]:tw:text-secondary-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
|
|
40
|
+
ghost: "text-foreground/80 tw:text-foreground/80 hover:text-foreground hover:tw:text-foreground hover:bg-muted/40 hover:tw:bg-muted/40 data-[state=active]:bg-muted data-[state=active]:tw:bg-muted data-[state=active]:text-foreground data-[state=active]:tw:text-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
|
|
41
|
+
link: "text-primary tw:text-primary hover:text-primary hover:tw:text-primary hover:underline hover:tw:underline data-[state=active]:text-primary data-[state=active]:tw:text-primary data-[state=active]:underline data-[state=active]:tw:underline data-[state=active]:shadow-none data-[state=active]:tw:shadow-none",
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
default: "px-4 tw:px-4 py-2 tw:py-2 text-sm tw:text-sm",
|
|
45
|
+
sm: "px-3 tw:px-3 py-1.5 tw:py-1.5 text-xs tw:text-xs",
|
|
46
|
+
lg: "px-5 tw:px-5 py-2.5 tw:py-2.5 text-base tw:text-base",
|
|
47
|
+
icon: "px-2 tw:px-2 py-2 tw:py-2 text-sm tw:text-sm",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "default",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
exports.segmentedControlItemVariants = segmentedControlItemVariants;
|
|
56
|
+
function SegmentedControl({ options, value, onValueChange, className, ariaLabel, ariaLabelledBy, variant, size, }) {
|
|
57
|
+
const resolvedVariant = variant !== null && variant !== void 0 ? variant : "default";
|
|
58
|
+
const resolvedSize = size !== null && size !== void 0 ? size : "default";
|
|
59
|
+
const containerRef = (0, react_1.useRef)(null);
|
|
60
|
+
const handleKeyDown = (event, currentIndex) => {
|
|
61
|
+
var _a, _b, _c, _d;
|
|
62
|
+
let newIndex = currentIndex;
|
|
63
|
+
switch (event.key) {
|
|
64
|
+
case "ArrowLeft":
|
|
65
|
+
case "ArrowUp":
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
newIndex = currentIndex > 0 ? currentIndex - 1 : options.length - 1;
|
|
68
|
+
break;
|
|
69
|
+
case "ArrowRight":
|
|
70
|
+
case "ArrowDown":
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
newIndex = currentIndex < options.length - 1 ? currentIndex + 1 : 0;
|
|
73
|
+
break;
|
|
74
|
+
case "Home":
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
newIndex = 0;
|
|
77
|
+
break;
|
|
78
|
+
case "End":
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
newIndex = options.length - 1;
|
|
81
|
+
break;
|
|
82
|
+
default:
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
onValueChange((_b = (_a = options[newIndex]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "");
|
|
86
|
+
const buttons = (_c = containerRef.current) === null || _c === void 0 ? void 0 : _c.querySelectorAll("button");
|
|
87
|
+
(_d = buttons === null || buttons === void 0 ? void 0 : buttons[newIndex]) === null || _d === void 0 ? void 0 : _d.focus();
|
|
88
|
+
};
|
|
89
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, className: (0, utils_1.cn)(segmentedControlVariants({ variant, size }), className), role: "tablist", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-orientation": "horizontal", "data-slot": "segmented-control", "data-variant": resolvedVariant, "data-size": resolvedSize, children: options.map((option, index) => {
|
|
90
|
+
const isSelected = value === option.value;
|
|
91
|
+
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", role: "tab", "aria-selected": isSelected, "aria-controls": `panel-${option.value}`, id: `tab-${option.value}`, tabIndex: isSelected ? 0 : -1, onClick: () => onValueChange(option.value), onKeyDown: (e) => handleKeyDown(e, index), className: segmentedControlItemVariants({ variant, size }), "aria-describedby": isSelected ? `${option.value}-description` : undefined, "data-state": isSelected ? "active" : "inactive", "data-variant": resolvedVariant, "data-slot": "segmented-control-item", children: [option.label, isSelected && (0, jsx_runtime_1.jsx)("span", { className: "sr-only tw:sr-only", children: ", currently selected" })] }, option.value));
|
|
92
|
+
}) }));
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=segmented-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.js","sourceRoot":"","sources":["../../src/components/segmented-control.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;AAgFZ,4CAqFC;;AApKD,uEAAiE;AAGjE,iCAA8B;AAE9B,wCAAiC;AAEjC,MAAM,wBAAwB,GAAG,IAAA,8BAAG,EAClC,4IAA4I,EAC5I;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,sBAAsB;YAC/B,WAAW,EAAE,uFAAuF;YACpG,OAAO,EAAE,6DAA6D;YACtE,SAAS,EAAE,oCAAoC;YAC/C,KAAK,EAAE,kCAAkC;YACzC,IAAI,EAAE,6DAA6D;SACpE;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,YAAY;YACrB,EAAE,EAAE,gBAAgB;YACpB,EAAE,EAAE,gBAAgB;YACpB,IAAI,EAAE,YAAY;SACnB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB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,KAAK,EAAE,EACtC,EAAE,EAAE,OAAO,MAAM,CAAC,KAAK,EAAE,EACzB,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAC1C,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,EACzC,SAAS,EAAE,4BAA4B,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,sBACxC,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,SAAS,gBAC5D,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,kBAChC,eAAe,eACnB,wBAAwB,aAEjC,MAAM,CAAC,KAAK,EACZ,UAAU,IAAI,iCAAM,SAAS,EAAC,oBAAoB,qCAA4B,KAhB1E,MAAM,CAAC,KAAK,CAiBV,CACV,CAAA;QACH,CAAC,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
3
|
-
|
|
3
|
+
import { Label } from "./label";
|
|
4
|
+
type SwitchBaseProps = Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, "aria-label" | "aria-labelledby">;
|
|
5
|
+
type SwitchPropsWithLabel = SwitchBaseProps & {
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
labelProps?: React.ComponentPropsWithoutRef<typeof Label>;
|
|
8
|
+
"aria-label"?: never;
|
|
9
|
+
"aria-labelledby"?: never;
|
|
10
|
+
};
|
|
11
|
+
type SwitchPropsWithAriaLabel = SwitchBaseProps & {
|
|
12
|
+
label?: undefined;
|
|
13
|
+
labelProps?: never;
|
|
14
|
+
"aria-label": string;
|
|
15
|
+
"aria-labelledby"?: string;
|
|
16
|
+
};
|
|
17
|
+
type SwitchPropsWithAriaLabelledBy = SwitchBaseProps & {
|
|
18
|
+
label?: undefined;
|
|
19
|
+
labelProps?: never;
|
|
20
|
+
"aria-label"?: string;
|
|
21
|
+
"aria-labelledby": string;
|
|
22
|
+
};
|
|
23
|
+
type SwitchProps = SwitchPropsWithLabel | SwitchPropsWithAriaLabel | SwitchPropsWithAriaLabelledBy;
|
|
24
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
25
|
export { Switch };
|
|
26
|
+
export type { SwitchProps };
|
|
5
27
|
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAGzD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,KAAK,eAAe,GAAG,IAAI,CACzB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EAC3D,YAAY,GAAG,iBAAiB,CACjC,CAAA;AAED,KAAK,oBAAoB,GAAG,eAAe,GAAG;IAC5C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,KAAK,CAAC,CAAA;IACzD,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAC1B,CAAA;AA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