@bekk-basen/neutral-ui-do-not-use 0.0.0-dev.85c9640 → 0.0.0-dev.ca83f19

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 CHANGED
@@ -116,7 +116,18 @@ Når du lanserer en komponent, husk å:
116
116
  ```ts
117
117
  export { Button, buttonVariants } from "@/components/button/button"
118
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`.
119
+ 3. Inkluder pathen i `tsconfig.lib.json` under `include`. Eksempel:
120
+ ```json
121
+ "include": [
122
+ "src/components/button"
123
+ ]
124
+ ```
125
+ 4. Opprett en release på GitHub. Versjonen som publiseres til npm hentes fra git-taggen på releasen (f.eks. tag
126
+ 5. `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
127
 
122
128
  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.
129
+
130
+ ## Pre-commit hooks
131
+
132
+ Dette prosjektet bruker pre-commit hooks, se
133
+ [dokumentasjon](https://www.notion.so/bekks/Pre-commit-hooks-secret-scanning-28e6bd30854180ab9c32ef639156b5d5).
@@ -0,0 +1,9 @@
1
+ import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
2
+ import { ComponentProps } from 'react';
3
+ type AvatarProps = {
4
+ src?: string;
5
+ alt: string;
6
+ } & Omit<ComponentProps<typeof BaseAvatar.Root>, "children">;
7
+ declare function Avatar({ src, alt, className, ...rootProps }: AvatarProps): import("react/jsx-runtime").JSX.Element;
8
+ export { Avatar, type AvatarProps };
9
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAK3C,KAAK,WAAW,GAAG;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAA;AAE5D,iBAAS,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE,WAAW,2CAwBjE;AAED,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,CAAA"}
@@ -1 +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"}
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;AAGvE,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAO3C,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,2CAwC9D;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA;AACnB,YAAY,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';
2
+ import { FocusEventHandler, Ref } from 'react';
3
+ type ComboboxOption = {
4
+ value: string;
5
+ label: string;
6
+ };
7
+ type ComboboxProps = Omit<ComboboxPrimitive.Root.Props<string, false>, "children" | "items"> & {
8
+ /** The selectable options. Keep the array referentially stable. */
9
+ items: readonly ComboboxOption[];
10
+ placeholder?: string;
11
+ /** Whether a selected value can be cleared with the clear button. */
12
+ clearable?: boolean;
13
+ className?: string;
14
+ /**
15
+ * A ref to the input. Give this to form libraries (e.g. `field.ref` from
16
+ * React Hook Form) so focusing the control works.
17
+ */
18
+ inputRef?: Ref<HTMLInputElement>;
19
+ onFocus?: FocusEventHandler<HTMLInputElement>;
20
+ onBlur?: FocusEventHandler<HTMLInputElement>;
21
+ "aria-label"?: string;
22
+ "aria-labelledby"?: string;
23
+ };
24
+ declare function Combobox({ items, placeholder, clearable, className, disabled, inputRef, onFocus, onBlur, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
25
+ export { Combobox };
26
+ export type { ComboboxProps, ComboboxOption };
27
+ //# sourceMappingURL=combobox.d.ts.map
@@ -0,0 +1 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
1
+ /**
2
+ * True when rendered inside our `Field`. Base UI's `Field.Item` / `Field.Label`
3
+ * throw without a `Field.Root` ancestor, so controls that want to use them must
4
+ * check first and fall back to plain markup.
5
+ */
6
+ declare const InsideFieldContext: import('react').Context<boolean>;
7
+ export { InsideFieldContext };
8
+ //# sourceMappingURL=field-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-context.d.ts","sourceRoot":"","sources":["../../../../src/components/form/field/field-context.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,kCAAuB,CAAA;AAE/C,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { Field as FieldPrimitive } from '@base-ui/react/field';
2
+ type FieldProps = FieldPrimitive.Root.Props;
3
+ declare function Field({ className, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
4
+ type FieldLabelProps = Omit<FieldPrimitive.Label.Props, "render">;
5
+ declare function FieldLabel({ children, nativeLabel, ...props }: FieldLabelProps): import("react/jsx-runtime").JSX.Element;
6
+ type FieldDescriptionProps = Omit<FieldPrimitive.Description.Props, "render">;
7
+ declare function FieldDescription({ children, ...props }: FieldDescriptionProps): import("react/jsx-runtime").JSX.Element;
8
+ type FieldErrorProps = Omit<FieldPrimitive.Error.Props, "render">;
9
+ declare function FieldError({ children, className, ...props }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
10
+ export { Field, FieldLabel, FieldDescription, FieldError };
11
+ export type { FieldProps, FieldLabelProps, FieldDescriptionProps, FieldErrorProps, };
12
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/components/form/field/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAO9D,KAAK,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAA;AAE3C,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAUjD;AAED,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAEjE,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,WAAkB,EAClB,GAAG,KAAK,EACT,EAAE,eAAe,2CAajB;AAED,KAAK,qBAAqB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAE7E,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CAYtE;AAED,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAEjE,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAkBrE;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAA;AAC1D,YAAY,EACV,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,eAAe,GAChB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Form as FormPrimitive } from '@base-ui/react/form';
2
+ type FormProps = FormPrimitive.Props;
3
+ declare function Form({ className, ...props }: FormProps): import("react/jsx-runtime").JSX.Element;
4
+ export { Form };
5
+ export type { FormProps };
6
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form/form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAK3D,KAAK,SAAS,GAAG,aAAa,CAAC,KAAK,CAAA;AAEpC,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAQ/C;AAED,OAAO,EAAE,IAAI,EAAE,CAAA;AACf,YAAY,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { Select as SelectPrimitive } from '@base-ui/react/select';
2
+ import { ReactNode } from 'react';
3
+ type SelectOption = {
4
+ value: string;
5
+ label: ReactNode;
6
+ };
7
+ type SelectProps = Omit<SelectPrimitive.Root.Props<string, false>, "children" | "items"> & {
8
+ /** The selectable options. Keep the array referentially stable. */
9
+ items: readonly SelectOption[];
10
+ placeholder?: ReactNode;
11
+ className?: string;
12
+ "aria-label"?: string;
13
+ "aria-labelledby"?: string;
14
+ };
15
+ declare function Select({ items, placeholder, className, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
16
+ export { Select };
17
+ export type { SelectProps, SelectOption };
18
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/components/form/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,KAAK,WAAW,GAAG,IAAI,CACrB,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,EACzC,UAAU,GAAG,OAAO,CACrB,GAAG;IACF,mEAAmE;IACnE,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IAC9B,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,GAAG,KAAK,EACT,EAAE,WAAW,2CAgDb;AAED,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { Field } from '@base-ui/react/field';
2
+ declare const textareaVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
3
+ type TextareaProps = Omit<Field.Control.Props, "render"> & {
4
+ className?: string;
5
+ };
6
+ declare function Textarea({ className, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
7
+ export { Textarea, textareaVariants };
8
+ export type { TextareaProps };
9
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/form/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAM5C,QAAA,MAAM,gBAAgB,oFAAuB,CAAA;AAE7C,KAAK,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CASvD;AAED,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA;AACrC,YAAY,EAAE,aAAa,EAAE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,18 @@ export { Checkbox } from './components/form/checkbox/checkbox';
4
4
  export type { CheckboxProps } from './components/form/checkbox/checkbox';
5
5
  export { CheckboxGroup } from './components/form/checkbox-group/checkbox-group';
6
6
  export type { CheckboxGroupProps } from './components/form/checkbox-group/checkbox-group';
7
+ export { Textarea, textareaVariants } from './components/form/textarea/textarea';
8
+ export type { TextareaProps } from './components/form/textarea/textarea';
9
+ export { Combobox } from './components/form/combobox/combobox';
10
+ export type { ComboboxProps, ComboboxOption, } from './components/form/combobox/combobox';
11
+ export { Select } from './components/form/select/select';
12
+ export type { SelectProps, SelectOption } from './components/form/select/select';
13
+ export { Field, FieldLabel, FieldDescription, FieldError, } from './components/form/field/field';
14
+ export type { FieldProps, FieldLabelProps, FieldDescriptionProps, FieldErrorProps, } from './components/form/field/field';
15
+ export { Form } from './components/form/form/form';
16
+ export type { FormProps } from './components/form/form/form';
7
17
  export { IconsToggle } from './components/form/icons-toggle/icons-toggle';
8
18
  export type { IconsToggleProps } from './components/form/icons-toggle/icons-toggle';
19
+ export { Avatar } from './components/avatar/avatar';
20
+ export type { AvatarProps } from './components/avatar/avatar';
9
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
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,C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