@bekk-basen/neutral-ui-do-not-use 0.0.0-pr.24.00fbebe
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 +122 -0
- package/dist/components/button/button.d.ts +36 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/form/checkbox/checkbox.d.ts +24 -0
- package/dist/components/form/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/form/checkbox-group/checkbox-group.d.ts +8 -0
- package/dist/components/form/checkbox-group/checkbox-group.d.ts.map +1 -0
- package/dist/components/form/icons-toggle/icons-toggle.d.ts +74 -0
- package/dist/components/form/icons-toggle/icons-toggle.d.ts.map +1 -0
- package/dist/components/text/text.d.ts +18 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1333 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +4 -0
- package/package.json +75 -0
package/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Komponentbibliotek for Bekk nøytral profil - IKKE BRUK HVIS DU IKKE ER BASEN
|
|
2
|
+
|
|
3
|
+
Dette er en veldig tidlig prototype av av et komponentbibliotek for Bekk sin nøytrale profil. Det er ikke ment å
|
|
4
|
+
brukes av andre enn Basen, og det er ikke i nærheten av å være stabilt.
|
|
5
|
+
|
|
6
|
+
## Installere komponentbiblioteket i en annen React-app
|
|
7
|
+
Biblioteket publiseres til npm som `@bekk-basen/neutral-ui-do-not-use`.
|
|
8
|
+
|
|
9
|
+
Installer siste release:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @bekk-basen/neutral-ui-do-not-use@latest
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Preview-versjoner
|
|
16
|
+
Hver merge til `main` og hver pull request publiseres automatisk til npm med sin egen dist-tag, slik at andre apper
|
|
17
|
+
(for eksempel preview-deployments) kan ta i bruk en spesifikk versjon av biblioteket:
|
|
18
|
+
|
|
19
|
+
- `@dev` – siste bygg fra `main`
|
|
20
|
+
- `@pr-<nummer>` – siste bygg fra en gitt pull request (for eksempel `@pr-42`)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @bekk-basen/neutral-ui-do-not-use@dev
|
|
24
|
+
npm install @bekk-basen/neutral-ui-do-not-use@pr-42
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Preview-versjoner har en flytende `0.0.0-…`-versjon uten sammenheng med releases. Dist-tag-en peker alltid på det nyeste bygget.
|
|
28
|
+
|
|
29
|
+
## Bruke komponentbiblioteket i en annen React-app
|
|
30
|
+
Importer pakkens stylesheet én gang i appens entry point:
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import "@bekk-basen/neutral-ui-do-not-use/styles.css"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Nå kan du bruke komponenter fra komponentbiblioteket:
|
|
37
|
+
```tsx
|
|
38
|
+
import { Button } from "@bekk-basen/neutral-ui-do-not-use"
|
|
39
|
+
|
|
40
|
+
export function Example() {
|
|
41
|
+
return <Button>Fortsett</Button>
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### GT America-fonten
|
|
46
|
+
|
|
47
|
+
Navbar-komponenten i `bekk-neutral-ui` bruker GT America-fonten. Komponentbiblioteket
|
|
48
|
+
leveres imidlertid ikke med GT America-fontfiler. Hvis produktet ditt har lisens for GT America, host fonten i din
|
|
49
|
+
egen applikasjon og registrer den ved å følge disse stegene:
|
|
50
|
+
|
|
51
|
+
**1. Legg til fontfilen i appen din**
|
|
52
|
+
|
|
53
|
+
For eksempel:
|
|
54
|
+
|
|
55
|
+
```txt
|
|
56
|
+
public/fonts/GT-America-Expanded-Medium.woff2
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**2. Registrer fonten i appens CSS**
|
|
60
|
+
|
|
61
|
+
```css
|
|
62
|
+
@font-face {
|
|
63
|
+
font-family: "GT America Expanded";
|
|
64
|
+
src: url("/fonts/GT-America-Expanded-Medium.woff2") format("woff2");
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
font-style: normal;
|
|
67
|
+
font-display: swap;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Guider for utviklere
|
|
72
|
+
|
|
73
|
+
### Lokal utvikling
|
|
74
|
+
|
|
75
|
+
Kjør den lokale docs-appen:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm run dev
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Bygg npm pakke:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm run build:lib
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Valider filene som ville blitt publisert:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm pack --dry-run
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Lag en lokal tgz av biblioteket for testing i en annen app:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm pack
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Utvikle en ny komponent
|
|
100
|
+
Det anbefales å la AI utvikle nye komponenter ved å følge instruksjonene i [`CLAUDE.md`](CLAUDE.md).
|
|
101
|
+
|
|
102
|
+
Etter at komponenten er implementert:
|
|
103
|
+
1. Verifiser at den ser korrekt ut i den lokale docs-appen (`npm run dev`).
|
|
104
|
+
2. Test den i en annen app med en lokal tarball (`npm pack`, installer deretter `.tgz`-filen).
|
|
105
|
+
3. La en designer gjøre en QA av komponenten mot Figma-designet.
|
|
106
|
+
|
|
107
|
+
Når alle tre stegene er godkjent, er komponenten klar til å lanseres.
|
|
108
|
+
|
|
109
|
+
### Lansere en komponent
|
|
110
|
+
Når du lanserer en komponent, husk å:
|
|
111
|
+
1. Sett `status: ReleaseStatus.Released` i `src/docs/index.ts`. Eksempel:
|
|
112
|
+
```ts
|
|
113
|
+
{ name: "Button", ..., status: ReleaseStatus.Released }
|
|
114
|
+
```
|
|
115
|
+
2. Eksporter den fra `src/index.ts`. Eksempel:
|
|
116
|
+
```ts
|
|
117
|
+
export { Button, buttonVariants } from "@/components/button/button"
|
|
118
|
+
```
|
|
119
|
+
3. Opprett en release på GitHub. Versjonen som publiseres til npm hentes fra git-taggen på releasen (f.eks. tag
|
|
120
|
+
4. `v0.8.0` gir npm-versjon `0.8.0`). Du trenger ikke å endre `version`-feltet i `package.json` – det står permanent på `0.0.0`.
|
|
121
|
+
|
|
122
|
+
Når releasen opprettes, bygger og publiserer GitHub Actions automatisk biblioteket til npm med dist-tag-en `latest`. Versjonering trenger ikke å følge semver strengt, men hver release-tag må være en gyldig npm-versjon som ikke er publisert fra før.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "secondary" | null | undefined;
|
|
5
|
+
size?: "lg" | "sm" | null | undefined;
|
|
6
|
+
iconOnly?: boolean | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
type ButtonProps = Omit<ButtonPrimitive.Props, "disabled"> & VariantProps<typeof buttonVariants> & {
|
|
9
|
+
isPending?: boolean;
|
|
10
|
+
/** @deprecated Avoid disabled buttons — they hurt accessibility and discoverability. Prefer `isPending` for in-flight actions, or keep the button enabled and show validation/error feedback. */
|
|
11
|
+
disabled?: ButtonPrimitive.Props["disabled"];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @param variant - `"primary"` (default) or `"secondary"`
|
|
15
|
+
*
|
|
16
|
+
* @param size - `"sm"` (default) or `"lg"`.
|
|
17
|
+
*
|
|
18
|
+
* @param iconOnly - `true` if button contains only an icon. Always provide an `aria-label` when using this.
|
|
19
|
+
*
|
|
20
|
+
* @param isPending - `true` to show a centered spinner and block interaction. The button width is unchanged.
|
|
21
|
+
*
|
|
22
|
+
* @param disabled - **Deprecated.** Avoid disabled buttons — prefer `isPending` for in-flight actions, or keep the button enabled and show validation feedback.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <Button variant="primary" size="sm">Click me</Button>
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <Button iconOnly><Info /></Button>
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* <Button isPending>Saving…</Button>
|
|
32
|
+
*/
|
|
33
|
+
declare function Button({ className, variant, size, iconOnly, isPending, disabled, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export { Button, buttonVariants };
|
|
35
|
+
export type { ButtonProps };
|
|
36
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,cAAc;;;;8EAoBlB,CAAA;AAEF,KAAK,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,GACxD,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iMAAiM;IACjM,QAAQ,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;CAC7C,CAAA;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CAuBb;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type CheckboxProps = Omit<CheckboxPrimitive.Root.Props, "disabled" | "indeterminate"> & {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @param label - Label rendered next to the checkbox. Accepts any `ReactNode`.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <Checkbox label="Jeg godtar vilkår og betingelser" />
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <Checkbox
|
|
14
|
+
* label={
|
|
15
|
+
* <>
|
|
16
|
+
* Jeg godtar <Link href="#">vilkår og betingelser</Link>
|
|
17
|
+
* </>
|
|
18
|
+
* }
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
declare function Checkbox({ className, label, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { Checkbox };
|
|
23
|
+
export type { CheckboxProps };
|
|
24
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/form/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAEvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,KAAK,aAAa,GAAG,IAAI,CACvB,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAC5B,UAAU,GAAG,eAAe,CAC7B,GAAG;IACF,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CA0B9D;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA;AACnB,YAAY,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CheckboxGroup as CheckboxGroupPrimitive } from '@base-ui/react/checkbox-group';
|
|
2
|
+
type CheckboxGroupProps = Omit<CheckboxGroupPrimitive.Props, "disabled"> & {
|
|
3
|
+
orientation?: "row" | "column";
|
|
4
|
+
};
|
|
5
|
+
declare function CheckboxGroup({ className, orientation, ...props }: CheckboxGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { CheckboxGroup };
|
|
7
|
+
export type { CheckboxGroupProps };
|
|
8
|
+
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../../../src/components/form/checkbox-group/checkbox-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAKvF,KAAK,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG;IACzE,WAAW,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;CAC/B,CAAA;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAYpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAA;AACxB,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* A pill-shaped toggle with two icon options. Clicking anywhere on the toggle
|
|
5
|
+
* switches to the other option. Exactly one option is always active.
|
|
6
|
+
*
|
|
7
|
+
* @param options Pair of `{ value, icon, label }` objects.
|
|
8
|
+
*
|
|
9
|
+
* @param variant `"filled"` (default) — active item has a solid background.
|
|
10
|
+
* `"stroked"` — outlined border style.
|
|
11
|
+
*
|
|
12
|
+
* @param name When set, renders a hidden `<input>` so the active value is
|
|
13
|
+
* included in the nearest `<form>`'s submit data.
|
|
14
|
+
*
|
|
15
|
+
* @example — uncontrolled
|
|
16
|
+
* <IconsToggle
|
|
17
|
+
* options={[
|
|
18
|
+
* { value: "grid", icon: <LayoutGrid />, label: "Rutenett" },
|
|
19
|
+
* { value: "list", icon: <AlignJustify />, label: "Liste" },
|
|
20
|
+
* ]}
|
|
21
|
+
* defaultValue="grid"
|
|
22
|
+
* />
|
|
23
|
+
*
|
|
24
|
+
* @example — uncontrolled in a form
|
|
25
|
+
* <IconsToggle
|
|
26
|
+
* name="view"
|
|
27
|
+
* options={[
|
|
28
|
+
* { value: "grid", icon: <LayoutGrid />, label: "Rutenett" },
|
|
29
|
+
* { value: "list", icon: <AlignJustify />, label: "Liste" },
|
|
30
|
+
* ]}
|
|
31
|
+
* defaultValue="grid"
|
|
32
|
+
* />
|
|
33
|
+
*
|
|
34
|
+
* @example — controlled
|
|
35
|
+
* const [view, setView] = useState<"grid" | "list">("grid")
|
|
36
|
+
* <IconsToggle
|
|
37
|
+
* options={[...]}
|
|
38
|
+
* value={view}
|
|
39
|
+
* onValueChange={setView}
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
42
|
+
declare function IconsToggle<A extends string, B extends string>({ options, title, variant, value: controlledValue, defaultValue, onValueChange, name, className, }: IconsToggleProps<A, B>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export { IconsToggle };
|
|
44
|
+
declare const iconsToggleVariants: (props?: ({
|
|
45
|
+
variant?: "filled" | "stroked" | null | undefined;
|
|
46
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
47
|
+
interface IconsToggleOption<Value extends string> {
|
|
48
|
+
/** Unique identifier of this option */
|
|
49
|
+
value: Value;
|
|
50
|
+
/** Icon displayed inside the toggle for this option. Can be any React node, but must be equal
|
|
51
|
+
* in width to the other option's icon */
|
|
52
|
+
icon: ReactNode;
|
|
53
|
+
/** Accessible label for this option */
|
|
54
|
+
label: string;
|
|
55
|
+
}
|
|
56
|
+
interface IconsToggleBaseProps<A extends string, B extends string> extends VariantProps<typeof iconsToggleVariants> {
|
|
57
|
+
options: [IconsToggleOption<A>, IconsToggleOption<B>];
|
|
58
|
+
title: string;
|
|
59
|
+
/** The identifier for the control in a form */
|
|
60
|
+
name?: string;
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
interface IconsToggleControlledProps<A extends string, B extends string> extends IconsToggleBaseProps<A, B> {
|
|
64
|
+
value: A | B;
|
|
65
|
+
defaultValue?: never;
|
|
66
|
+
onValueChange: (value: A | B) => void;
|
|
67
|
+
}
|
|
68
|
+
interface IconsToggleUncontrolledProps<A extends string, B extends string> extends IconsToggleBaseProps<A, B> {
|
|
69
|
+
value?: never;
|
|
70
|
+
defaultValue?: A | B;
|
|
71
|
+
onValueChange?: (value: A | B) => void;
|
|
72
|
+
}
|
|
73
|
+
export type IconsToggleProps<A extends string, B extends string> = IconsToggleControlledProps<A, B> | IconsToggleUncontrolledProps<A, B>;
|
|
74
|
+
//# sourceMappingURL=icons-toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons-toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/form/icons-toggle/icons-toggle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,iBAAS,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,EACvD,OAAO,EACP,KAAK,EACL,OAAkB,EAClB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,SAAS,GACV,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,2CA2CxB;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AAEtB,QAAA,MAAM,mBAAmB;;8EAUvB,CAAA;AAEF,UAAU,iBAAiB,CAAC,KAAK,SAAS,MAAM;IAC9C,uCAAuC;IACvC,KAAK,EAAE,KAAK,CAAA;IACZ;8CAC0C;IAC1C,IAAI,EAAE,SAAS,CAAA;IACf,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,oBAAoB,CAC5B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAChB,SAAQ,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAChD,OAAO,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,0BAA0B,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CACrE,SAAQ,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC;IAClC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;IACZ,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAA;CACtC;AAED,UAAU,4BAA4B,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CACvE,SAAQ,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAA;CACvC;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAC3D,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,GAChC,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
declare const textVariants: (props?: ({
|
|
3
|
+
variant?: "button" | "body" | "headline" | "headline-sm" | "headline-xs" | "body-bold" | "body-sm-bold" | "body-sm" | "description" | null | undefined;
|
|
4
|
+
color?: "inherit" | "default" | "white" | "background" | "surface" | "divider-dark" | "informative" | "error" | "warning" | "success" | "info" | "interactive" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
type TextVariant = NonNullable<VariantProps<typeof textVariants>["variant"]>;
|
|
7
|
+
type TextColor = NonNullable<VariantProps<typeof textVariants>["color"]>;
|
|
8
|
+
type TextOwnProps<E extends React.ElementType> = {
|
|
9
|
+
variant?: TextVariant;
|
|
10
|
+
color?: TextColor;
|
|
11
|
+
as?: E;
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
type TextProps<E extends React.ElementType> = TextOwnProps<E> & Omit<React.ComponentPropsWithoutRef<E>, keyof TextOwnProps<E>>;
|
|
16
|
+
declare function Text<E extends React.ElementType = "p">({ variant, color, as, className, ...props }: TextProps<E>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export { Text, textVariants };
|
|
18
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/text/text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,YAAY;;;8EAgChB,CAAA;AAcF,KAAK,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AAC5E,KAAK,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;AAExE,KAAK,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IAAI;IAC/C,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,KAAK,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IAAI,YAAY,CAAC,CAAC,CAAC,GAC3D,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;AAEhE,iBAAS,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,EAAE,EAC/C,OAAgB,EAChB,KAAK,EACL,EAAE,EACF,SAAS,EACT,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,CAAC,CAAC,2CASd;AAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Button, buttonVariants } from './components/button/button';
|
|
2
|
+
export type { ButtonProps } from './components/button/button';
|
|
3
|
+
export { Checkbox } from './components/form/checkbox/checkbox';
|
|
4
|
+
export type { CheckboxProps } from './components/form/checkbox/checkbox';
|
|
5
|
+
export { CheckboxGroup } from './components/form/checkbox-group/checkbox-group';
|
|
6
|
+
export type { CheckboxGroupProps } from './components/form/checkbox-group/checkbox-group';
|
|
7
|
+
export { IconsToggle } from './components/form/icons-toggle/icons-toggle';
|
|
8
|
+
export type { IconsToggleProps } from './components/form/icons-toggle/icons-toggle';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AAErB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AACnE,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAA;AAC/E,YAAY,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAA;AACzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA"}
|