@konstructio/ui 0.1.0-alpha.11 → 0.1.0-alpha.13

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.
@@ -1,24 +1,27 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { R as s } from "../../index-CvfCCTEO.js";
3
- import { List as n } from "./components/List.js";
4
- import f from "./components/Trigger.js";
5
- import { Content as p } from "./components/Content.js";
6
- import { rootVariants as g } from "./Tabs.variants.js";
7
- import { cn as c } from "../../utils/index.js";
8
- const t = ({ children: o, theme: a, className: m, orientation: r, ...i }) => /* @__PURE__ */ e(
9
- s,
2
+ import { R as n } from "../../index-CvfCCTEO.js";
3
+ import { cn as s } from "../../utils/index.js";
4
+ import { rootVariants as p } from "./Tabs.variants.js";
5
+ import { List as f } from "./components/List.js";
6
+ import { Trigger as g } from "./components/Trigger.js";
7
+ import { Content as c } from "./components/Content.js";
8
+ const t = ({ children: o, theme: m, className: a, orientation: r, ...i }) => /* @__PURE__ */ e(
9
+ n,
10
10
  {
11
11
  ...i,
12
- "data-theme": a,
12
+ "data-theme": m,
13
13
  "data-orientation": r,
14
14
  "aria-orientation": r,
15
- className: c(g({ variant: r, className: m })),
15
+ className: s(p({ variant: r, className: a })),
16
16
  children: o
17
17
  }
18
18
  );
19
- t.List = n;
20
- t.Trigger = f;
21
- t.Content = p;
19
+ t.List = f;
20
+ t.Trigger = g;
21
+ t.Content = c;
22
22
  export {
23
- t as default
23
+ c as Content,
24
+ f as List,
25
+ t as Tabs,
26
+ g as Trigger
24
27
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { C as m } from "../../../index-CvfCCTEO.js";
3
- import { contentVariants as a } from "../Tabs.variants.js";
4
- import { cn as e } from "../../../utils/index.js";
3
+ import { cn as a } from "../../../utils/index.js";
4
+ import { contentVariants as e } from "../Tabs.variants.js";
5
5
  const c = ({
6
6
  children: t,
7
7
  className: o,
@@ -10,7 +10,7 @@ const c = ({
10
10
  m,
11
11
  {
12
12
  ...r,
13
- className: e(a({ variant: "default", className: o })),
13
+ className: a(e({ variant: "default", className: o })),
14
14
  children: t
15
15
  }
16
16
  );
@@ -1,16 +1,16 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { L as n } from "../../../index-CvfCCTEO.js";
3
- import { listVariants as t } from "../Tabs.variants.js";
4
- import { cn as a } from "../../../utils/index.js";
3
+ import { cn as t } from "../../../utils/index.js";
4
+ import { listVariants as a } from "../Tabs.variants.js";
5
5
  const p = ({
6
6
  children: i,
7
7
  className: s,
8
8
  orientation: m,
9
9
  ...o
10
- }) => /* @__PURE__ */ r("div", { className: a(t({ variant: "default" })), children: /* @__PURE__ */ r(
10
+ }) => /* @__PURE__ */ r("div", { className: t(a({ variant: "default" })), children: /* @__PURE__ */ r(
11
11
  n,
12
12
  {
13
- className: a(t({ variant: m, className: s })),
13
+ className: t(a({ variant: m, className: s })),
14
14
  ...o,
15
15
  children: i
16
16
  }
@@ -1,26 +1,26 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { Typography as e } from "../../Typography/Typography.js";
3
- import { T as m } from "../../../index-CvfCCTEO.js";
2
+ import { T as e } from "../../../index-CvfCCTEO.js";
3
+ import { Typography as m } from "../../Typography/Typography.js";
4
4
  import { cn as n } from "../../../utils/index.js";
5
5
  import { triggerVariants as p } from "../Tabs.variants.js";
6
- const v = ({
6
+ const l = ({
7
7
  tab: i,
8
- label: a,
8
+ label: o,
9
9
  isActive: t,
10
- className: o
11
- }) => /* @__PURE__ */ r(m, { value: i, children: /* @__PURE__ */ r(
12
- e,
10
+ className: a
11
+ }) => /* @__PURE__ */ r(e, { value: i, children: /* @__PURE__ */ r(
12
+ m,
13
13
  {
14
14
  variant: "body2",
15
15
  className: n(
16
16
  p({
17
17
  variant: t ? "active" : "inactive",
18
- className: o
18
+ className: a
19
19
  })
20
20
  ),
21
- children: a
21
+ children: o
22
22
  }
23
23
  ) });
24
24
  export {
25
- v as default
25
+ l as Trigger
26
26
  };
@@ -0,0 +1,8 @@
1
+ import { Content as t } from "./Content.js";
2
+ import { List as f } from "./List.js";
3
+ import { Trigger as p } from "./Trigger.js";
4
+ export {
5
+ t as Content,
6
+ f as List,
7
+ p as Trigger
8
+ };
@@ -3,19 +3,19 @@ import { AlertDialog as p } from "./AlertDialog/AlertDialog.js";
3
3
  import { Autocomplete as x } from "./Autocomplete/Autocomplete.js";
4
4
  import { Badge as a } from "./Badge/Badge.js";
5
5
  import { Breadcrumb as d } from "./Breadcrumb/Breadcrumb.js";
6
- import { Button as l } from "./Button/Button.js";
6
+ import { Button as n } from "./Button/Button.js";
7
7
  import { Card as u } from "./Card/Card.js";
8
- import { Checkbox as T } from "./Checkbox/Checkbox.js";
9
- import { DatePicker as S } from "./Datepicker/DatePicker.js";
10
- import { Divider as v } from "./Divider/Divider.js";
11
- import { Dropdown as N } from "./Dropdown/Dropdown.js";
12
- import { Filter as s } from "./Filter/Filter.js";
13
- import { Input as C } from "./Input/Input.js";
8
+ import { Checkbox as c } from "./Checkbox/Checkbox.js";
9
+ import { DatePicker as s } from "./Datepicker/DatePicker.js";
10
+ import { Divider as S } from "./Divider/Divider.js";
11
+ import { Dropdown as B } from "./Dropdown/Dropdown.js";
12
+ import { Filter as N } from "./Filter/Filter.js";
13
+ import { Input as A } from "./Input/Input.js";
14
14
  import { Loading as k } from "./Loading/Loading.js";
15
15
  import { M as F } from "../Modal-CrG0m703.js";
16
- import { NumberInput as M } from "./NumberInput/NumberInput.js";
17
- import { ProgressBar as y } from "./ProgressBar/ProgressBar.js";
18
- import { Radio as L } from "./Radio/Radio.js";
16
+ import { NumberInput as L } from "./NumberInput/NumberInput.js";
17
+ import { ProgressBar as P } from "./ProgressBar/ProgressBar.js";
18
+ import { Radio as I } from "./Radio/Radio.js";
19
19
  import { RadioCard as j } from "./RadioCard/RadioCard.js";
20
20
  import { RadioCardGroup as z } from "./RadioCardGroup/RadioCardGroup.js";
21
21
  import { RadioGroup as H } from "./RadioGroup/RadioGroup.js";
@@ -24,48 +24,54 @@ import { Sidebar as U } from "./Sidebar/Sidebar.js";
24
24
  import { Slider as W } from "./Slider/Slider.js";
25
25
  import { Switch as Y } from "./Switch/Switch.js";
26
26
  import { Table as _ } from "./Table/Table.js";
27
- import { Tag as oo } from "./Tag/Tag.js";
28
- import { TagSelect as eo } from "./TagSelect/TagSelect.js";
29
- import { TextArea as po } from "./TextArea/TextArea.js";
30
- import { TimePicker as xo } from "./TimePicker/TimePicker.js";
31
- import { Toast as ao } from "./Toast/Toast.js";
32
- import { Tooltip as go } from "./Tooltip/Tooltip.js";
33
- import { Typography as no } from "./Typography/Typography.js";
34
- import { BadgeMultiSelect as co } from "./Filter/components/BadgeDropdown/BadgeMultiSelect.js";
27
+ import { Tabs as oo } from "./Tabs/Tabs.js";
28
+ import { Tag as eo } from "./Tag/Tag.js";
29
+ import { TagSelect as po } from "./TagSelect/TagSelect.js";
30
+ import { TextArea as xo } from "./TextArea/TextArea.js";
31
+ import { TimePicker as ao } from "./TimePicker/TimePicker.js";
32
+ import { Toast as go } from "./Toast/Toast.js";
33
+ import { Tooltip as lo } from "./Tooltip/Tooltip.js";
34
+ import { Typography as To } from "./Typography/Typography.js";
35
+ import { BadgeMultiSelect as bo } from "./Filter/components/BadgeDropdown/BadgeMultiSelect.js";
35
36
  import { DateFilterDropdown as Do } from "./Filter/components/DateFilterDropdown/DateFilterDropdown.js";
36
- import { Footer as bo } from "./Sidebar/components/Footer/Footer.js";
37
- import { Logo as Bo } from "./Sidebar/components/Logo/Logo.js";
37
+ import { Footer as vo } from "./Sidebar/components/Footer/Footer.js";
38
+ import { Logo as Co } from "./Sidebar/components/Logo/Logo.js";
38
39
  import { Navigation as Ro } from "./Sidebar/components/Navigation/Navigation.js";
39
- import { NavigationGroup as Ao } from "./Sidebar/components/NavigationGroup/NavigationGroup.js";
40
- import { NavigationOption as ho } from "./Sidebar/components/NavigationOption/NavigationOption.js";
41
- import { NavigationSeparator as wo } from "./Sidebar/components/NavigationSeparator/NavigationSeparator.js";
40
+ import { NavigationGroup as ho } from "./Sidebar/components/NavigationGroup/NavigationGroup.js";
41
+ import { NavigationOption as wo } from "./Sidebar/components/NavigationOption/NavigationOption.js";
42
+ import { NavigationSeparator as Go } from "./Sidebar/components/NavigationSeparator/NavigationSeparator.js";
43
+ import { List as Mo } from "./Tabs/components/List.js";
44
+ import { Trigger as yo } from "./Tabs/components/Trigger.js";
45
+ import { Content as Oo } from "./Tabs/components/Content.js";
42
46
  export {
43
47
  e as Alert,
44
48
  p as AlertDialog,
45
49
  x as Autocomplete,
46
50
  a as Badge,
47
- co as BadgeMultiSelect,
51
+ bo as BadgeMultiSelect,
48
52
  d as Breadcrumb,
49
- l as Button,
53
+ n as Button,
50
54
  u as Card,
51
- T as Checkbox,
55
+ c as Checkbox,
56
+ Oo as Content,
52
57
  Do as DateFilterDropdown,
53
- S as DatePicker,
54
- v as Divider,
55
- N as Dropdown,
56
- s as Filter,
57
- bo as Footer,
58
- C as Input,
58
+ s as DatePicker,
59
+ S as Divider,
60
+ B as Dropdown,
61
+ N as Filter,
62
+ vo as Footer,
63
+ A as Input,
64
+ Mo as List,
59
65
  k as Loading,
60
- Bo as Logo,
66
+ Co as Logo,
61
67
  F as Modal,
62
68
  Ro as Navigation,
63
- Ao as NavigationGroup,
64
- ho as NavigationOption,
65
- wo as NavigationSeparator,
66
- M as NumberInput,
67
- y as ProgressBar,
68
- L as Radio,
69
+ ho as NavigationGroup,
70
+ wo as NavigationOption,
71
+ Go as NavigationSeparator,
72
+ L as NumberInput,
73
+ P as ProgressBar,
74
+ I as Radio,
69
75
  j as RadioCard,
70
76
  z as RadioCardGroup,
71
77
  H as RadioGroup,
@@ -74,11 +80,13 @@ export {
74
80
  W as Slider,
75
81
  Y as Switch,
76
82
  _ as Table,
77
- oo as Tag,
78
- eo as TagSelect,
79
- po as TextArea,
80
- xo as TimePicker,
81
- ao as Toast,
82
- go as Tooltip,
83
- no as Typography
83
+ oo as Tabs,
84
+ eo as Tag,
85
+ po as TagSelect,
86
+ xo as TextArea,
87
+ ao as TimePicker,
88
+ go as Toast,
89
+ lo as Tooltip,
90
+ yo as Trigger,
91
+ To as Typography
84
92
  };
package/dist/index.d.ts CHANGED
@@ -6,12 +6,15 @@ import { Context } from 'react';
6
6
  import { DayPickerProps } from 'react-day-picker';
7
7
  import { FC } from 'react';
8
8
  import { ForwardRefExoticComponent } from 'react';
9
+ import { FunctionComponent } from 'react';
9
10
  import { getAllTimezones } from 'countries-and-timezones';
10
11
  import { HTMLAttributes } from 'react';
11
12
  import { HtmlHTMLAttributes } from 'react';
12
13
  import { InputHTMLAttributes } from 'react';
14
+ import { JSX } from 'react/jsx-runtime';
13
15
  import { PropsWithChildren } from 'react';
14
16
  import { ReactNode } from 'react';
17
+ import * as ReactTabs from '@radix-ui/react-tabs';
15
18
  import { RefAttributes } from 'react';
16
19
  import { SliderProps } from '@radix-ui/react-slider';
17
20
  import { VariantProps } from 'class-variance-authority';
@@ -167,6 +170,8 @@ declare const checkboxVariants: (props?: ({
167
170
  checked?: boolean | null | undefined;
168
171
  } & ClassProp) | undefined) => string;
169
172
 
173
+ export declare const Content: ({ children, className, ...rest }: ReactTabs.TabsContentProps) => JSX.Element;
174
+
170
175
  export declare const DateFilterDropdown: FC<DateFilterDropdownProps>;
171
176
 
172
177
  declare type DateFilterDropdownProps = {
@@ -259,6 +264,12 @@ declare const inputVariants: (props?: ({
259
264
  variant?: "error" | "default" | null | undefined;
260
265
  } & ClassProp) | undefined) => string;
261
266
 
267
+ export declare const List: FunctionComponent<ListProps>;
268
+
269
+ declare interface ListProps extends React.HTMLAttributes<HTMLDivElement>, PropsWithChildren {
270
+ orientation: 'horizontal' | 'vertical';
271
+ }
272
+
262
273
  export declare const Loading: FC<LoadingProps>;
263
274
 
264
275
  declare type LoadingProps = InputHTMLAttributes<SVGSVGElement> & VariantProps<typeof loadingVariants> & {
@@ -571,6 +582,16 @@ declare interface TableProps extends React.HTMLAttributes<HTMLTableElement>, Pro
571
582
 
572
583
  declare const tableVariants: (props?: ClassProp | undefined) => string;
573
584
 
585
+ export declare const Tabs: FunctionComponent<TabsProps> & {
586
+ List: FunctionComponent<ListProps>;
587
+ Trigger: FunctionComponent<TriggerProps>;
588
+ Content: FunctionComponent<ReactTabs.TabsContentProps>;
589
+ };
590
+
591
+ declare interface TabsProps extends ReactTabs.TabsProps, PropsWithChildren {
592
+ theme?: Theme;
593
+ }
594
+
574
595
  export declare const Tag: FC<TagProps>;
575
596
 
576
597
  declare type TagProps = {
@@ -680,6 +701,18 @@ declare const tooltipVariants: (props?: ({
680
701
  position?: "left" | "right" | "bottom" | "top" | null | undefined;
681
702
  } & ClassProp) | undefined) => string;
682
703
 
704
+ export declare const Trigger: FunctionComponent<TriggerProps>;
705
+
706
+ declare interface TriggerProps extends VariantProps<typeof triggerVariants>, React.HTMLAttributes<HTMLDivElement> {
707
+ tab: string;
708
+ label: string;
709
+ isActive: boolean;
710
+ }
711
+
712
+ declare const triggerVariants: (props?: ({
713
+ variant?: "default" | "active" | "inactive" | null | undefined;
714
+ } & ClassProp) | undefined) => string;
715
+
683
716
  export declare const Typography: FC<TypographyProps>;
684
717
 
685
718
  declare interface TypographyProps extends InputHTMLAttributes<HTMLParagraphElement>, VariantProps<typeof typographyVariants> {
package/dist/index.js CHANGED
@@ -3,19 +3,19 @@ import { AlertDialog as p } from "./components/AlertDialog/AlertDialog.js";
3
3
  import { Autocomplete as x } from "./components/Autocomplete/Autocomplete.js";
4
4
  import { Badge as a } from "./components/Badge/Badge.js";
5
5
  import { Breadcrumb as d } from "./components/Breadcrumb/Breadcrumb.js";
6
- import { Button as l } from "./components/Button/Button.js";
7
- import { Card as u } from "./components/Card/Card.js";
6
+ import { Button as n } from "./components/Button/Button.js";
7
+ import { Card as T } from "./components/Card/Card.js";
8
8
  import { Checkbox as c } from "./components/Checkbox/Checkbox.js";
9
- import { DatePicker as s } from "./components/Datepicker/DatePicker.js";
10
- import { Divider as D } from "./components/Divider/Divider.js";
11
- import { Dropdown as b } from "./components/Dropdown/Dropdown.js";
12
- import { Filter as C } from "./components/Filter/Filter.js";
9
+ import { DatePicker as b } from "./components/Datepicker/DatePicker.js";
10
+ import { Divider as v } from "./components/Divider/Divider.js";
11
+ import { Dropdown as D } from "./components/Dropdown/Dropdown.js";
12
+ import { Filter as B } from "./components/Filter/Filter.js";
13
13
  import { BadgeMultiSelect as R } from "./components/Filter/components/BadgeDropdown/BadgeMultiSelect.js";
14
14
  import { DateFilterDropdown as P } from "./components/Filter/components/DateFilterDropdown/DateFilterDropdown.js";
15
15
  import { Input as w } from "./components/Input/Input.js";
16
16
  import { Loading as G } from "./components/Loading/Loading.js";
17
- import { M as y } from "./Modal-CrG0m703.js";
18
- import { NumberInput as L } from "./components/NumberInput/NumberInput.js";
17
+ import { M } from "./Modal-CrG0m703.js";
18
+ import { NumberInput as I } from "./components/NumberInput/NumberInput.js";
19
19
  import { ProgressBar as j } from "./components/ProgressBar/ProgressBar.js";
20
20
  import { Radio as z } from "./components/Radio/Radio.js";
21
21
  import { RadioCard as H } from "./components/RadioCard/RadioCard.js";
@@ -30,19 +30,23 @@ import { NavigationOption as po } from "./components/Sidebar/components/Navigati
30
30
  import { NavigationSeparator as xo } from "./components/Sidebar/components/NavigationSeparator/NavigationSeparator.js";
31
31
  import { Sidebar as ao } from "./components/Sidebar/Sidebar.js";
32
32
  import { Slider as go } from "./components/Slider/Slider.js";
33
- import { Switch as no } from "./components/Switch/Switch.js";
34
- import { Table as To } from "./components/Table/Table.js";
35
- import { Tag as ho } from "./components/Tag/Tag.js";
36
- import { TagSelect as vo } from "./components/TagSelect/TagSelect.js";
37
- import { TextArea as So } from "./components/TextArea/TextArea.js";
38
- import { TimePicker as Bo } from "./components/TimePicker/TimePicker.js";
39
- import { Toast as No } from "./components/Toast/Toast.js";
40
- import { Tooltip as Ao } from "./components/Tooltip/Tooltip.js";
41
- import { Typography as ko } from "./components/Typography/Typography.js";
42
- import { ThemeContext as Fo } from "./contexts/theme.context.js";
43
- import { useTheme as Mo } from "./contexts/theme.hook.js";
44
- import { ThemeProvider as Io } from "./contexts/theme.provider.js";
45
- import { useToggle as Oo } from "./hooks/useToggle.js";
33
+ import { Switch as lo } from "./components/Switch/Switch.js";
34
+ import { Table as uo } from "./components/Table/Table.js";
35
+ import { Tabs as so } from "./components/Tabs/Tabs.js";
36
+ import { List as ho } from "./components/Tabs/components/List.js";
37
+ import { Trigger as Co } from "./components/Tabs/components/Trigger.js";
38
+ import { Content as So } from "./components/Tabs/components/Content.js";
39
+ import { Tag as No } from "./components/Tag/Tag.js";
40
+ import { TagSelect as Ao } from "./components/TagSelect/TagSelect.js";
41
+ import { TextArea as ko } from "./components/TextArea/TextArea.js";
42
+ import { TimePicker as Fo } from "./components/TimePicker/TimePicker.js";
43
+ import { Toast as Lo } from "./components/Toast/Toast.js";
44
+ import { Tooltip as yo } from "./components/Tooltip/Tooltip.js";
45
+ import { Typography as Oo } from "./components/Typography/Typography.js";
46
+ import { ThemeContext as qo } from "./contexts/theme.context.js";
47
+ import { useTheme as Eo } from "./contexts/theme.hook.js";
48
+ import { ThemeProvider as Jo } from "./contexts/theme.provider.js";
49
+ import { useToggle as Qo } from "./hooks/useToggle.js";
46
50
  export {
47
51
  e as Alert,
48
52
  p as AlertDialog,
@@ -50,24 +54,26 @@ export {
50
54
  a as Badge,
51
55
  R as BadgeMultiSelect,
52
56
  d as Breadcrumb,
53
- l as Button,
54
- u as Card,
57
+ n as Button,
58
+ T as Card,
55
59
  c as Checkbox,
60
+ So as Content,
56
61
  P as DateFilterDropdown,
57
- s as DatePicker,
58
- D as Divider,
59
- b as Dropdown,
60
- C as Filter,
62
+ b as DatePicker,
63
+ v as Divider,
64
+ D as Dropdown,
65
+ B as Filter,
61
66
  Y as Footer,
62
67
  w as Input,
68
+ ho as List,
63
69
  G as Loading,
64
70
  _ as Logo,
65
- y as Modal,
71
+ M as Modal,
66
72
  oo as Navigation,
67
73
  eo as NavigationGroup,
68
74
  po as NavigationOption,
69
75
  xo as NavigationSeparator,
70
- L as NumberInput,
76
+ I as NumberInput,
71
77
  j as ProgressBar,
72
78
  z as Radio,
73
79
  H as RadioCard,
@@ -76,17 +82,19 @@ export {
76
82
  W as Range,
77
83
  ao as Sidebar,
78
84
  go as Slider,
79
- no as Switch,
80
- To as Table,
81
- ho as Tag,
82
- vo as TagSelect,
83
- So as TextArea,
84
- Fo as ThemeContext,
85
- Io as ThemeProvider,
86
- Bo as TimePicker,
87
- No as Toast,
88
- Ao as Tooltip,
89
- ko as Typography,
90
- Mo as useTheme,
91
- Oo as useToggle
85
+ lo as Switch,
86
+ uo as Table,
87
+ so as Tabs,
88
+ No as Tag,
89
+ Ao as TagSelect,
90
+ ko as TextArea,
91
+ qo as ThemeContext,
92
+ Jo as ThemeProvider,
93
+ Fo as TimePicker,
94
+ Lo as Toast,
95
+ yo as Tooltip,
96
+ Co as Trigger,
97
+ Oo as Typography,
98
+ Eo as useTheme,
99
+ Qo as useToggle
92
100
  };
package/dist/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.0-alpha.10",
5
+ "version": "0.1.0-alpha.12",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.0-alpha.11",
5
+ "version": "0.1.0-alpha.13",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",