@konstructio/ui 0.1.2-alpha.67 → 0.1.2-alpha.69
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/dist/AdditionalOptions-C2FDVZhu.js +45 -0
- package/dist/Modal-BGcucTHv.js +120 -0
- package/dist/assets/icons/components/CloudLockOutline.d.ts +3 -0
- package/dist/assets/icons/components/CloudLockOutline.js +28 -0
- package/dist/assets/icons/components/index.d.ts +1 -0
- package/dist/assets/icons/components/index.js +106 -104
- package/dist/assets/icons/index.js +106 -104
- package/dist/components/ButtonGroup/ButtonGroup.js +65 -61
- package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +6 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +32 -30
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +3 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +4 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +37 -17
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/Modal.types.d.ts +7 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +3 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Select/Select.d.ts +1 -0
- package/dist/components/Select/Select.js +65 -42
- package/dist/components/Select/Select.types.d.ts +18 -2
- package/dist/components/Select/Select.variants.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.d.ts +3 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +11 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +4 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.d.ts +1 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +26 -0
- package/dist/components/Select/components/List/List.js +131 -132
- package/dist/components/Select/components/List/List.types.d.ts +1 -0
- package/dist/components/Select/components/List/List.variants.d.ts +1 -0
- package/dist/components/Select/components/List/List.variants.js +18 -3
- package/dist/components/Select/components/Wrapper.d.ts +3 -1
- package/dist/components/Select/components/Wrapper.js +65 -63
- package/dist/components/Select/components/index.d.ts +1 -0
- package/dist/components/Select/components/index.js +8 -6
- package/dist/components/index.js +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +106 -104
- package/dist/index.js +1 -1
- package/dist/package.json +3 -3
- package/dist/{proxy-BIRlSMN_.js → proxy-CngVm5qA.js} +1834 -1852
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/Modal--z642-Wv.js +0 -112
|
@@ -4,65 +4,66 @@ import { AlertOutlineIcon as p } from "./components/AlertOutline.js";
|
|
|
4
4
|
import { AppRepoIcon as f } from "./components/AppRepo.js";
|
|
5
5
|
import { AppsIcon as x } from "./components/Apps.js";
|
|
6
6
|
import { ArchivesIcon as l } from "./components/Archives.js";
|
|
7
|
-
import { ArrowDownIcon as
|
|
7
|
+
import { ArrowDownIcon as C } from "./components/ArrowDown.js";
|
|
8
8
|
import { ArrowLeftIcon as u } from "./components/ArrowLeft.js";
|
|
9
|
-
import { ArrowRightIcon as
|
|
10
|
-
import { ArrowUpIcon as
|
|
11
|
-
import { BarChartIcon as
|
|
9
|
+
import { ArrowRightIcon as d } from "./components/ArrowRight.js";
|
|
10
|
+
import { ArrowUpIcon as A } from "./components/ArrowUp.js";
|
|
11
|
+
import { BarChartIcon as O } from "./components/BarChart.js";
|
|
12
12
|
import { BookOpenIcon as k } from "./components/BookOpen.js";
|
|
13
|
-
import { CalendarMonthIcon as
|
|
14
|
-
import { CheckCircleIcon as
|
|
13
|
+
import { CalendarMonthIcon as S } from "./components/CalendarMonth.js";
|
|
14
|
+
import { CheckCircleIcon as E } from "./components/CheckCircle.js";
|
|
15
15
|
import { CheckIcon as b } from "./components/Check.js";
|
|
16
16
|
import { ClockAlertIcon as y } from "./components/ClockAlert.js";
|
|
17
17
|
import { ClockOutlineIcon as G } from "./components/ClockOutline.js";
|
|
18
18
|
import { CloseIcon as N } from "./components/Close.js";
|
|
19
19
|
import { CloudIcon as K } from "./components/Cloud.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
20
|
+
import { CloudLockOutlineIcon as U } from "./components/CloudLockOutline.js";
|
|
21
|
+
import { ClustersIcon as W } from "./components/Clusters.js";
|
|
22
|
+
import { CogOutlineIcon as j } from "./components/CogOutline.js";
|
|
23
|
+
import { CopyIcon as z } from "./components/Copy.js";
|
|
24
|
+
import { CpuIcon as J } from "./components/Cpu.js";
|
|
25
|
+
import { CubeIcon as Y } from "./components/Cube.js";
|
|
26
|
+
import { DatacenterIcon as _ } from "./components/Datacenter.js";
|
|
27
|
+
import { DeleteIcon as oo } from "./components/Delete.js";
|
|
28
|
+
import { DollarSignIcon as eo } from "./components/DollarSign.js";
|
|
29
|
+
import { DownloadIcon as no } from "./components/Download.js";
|
|
30
|
+
import { EditIcon as po } from "./components/Edit.js";
|
|
31
|
+
import { EllipsesIcon as fo } from "./components/Ellipses.js";
|
|
32
|
+
import { EnvironmentsIcon as xo } from "./components/Environments.js";
|
|
33
|
+
import { ErrorIcon as lo } from "./components/Error.js";
|
|
34
|
+
import { ErrorOutlineIcon as Co } from "./components/ErrorOutline.js";
|
|
35
|
+
import { ExclamationIcon as uo } from "./components/Exclamation.js";
|
|
36
|
+
import { GitIcon as ho } from "./components/Git.js";
|
|
37
|
+
import { GitOpsCatalogIcon as go } from "./components/GitOpsCatalog.js";
|
|
38
|
+
import { GridViewIcon as Po } from "./components/GridView.js";
|
|
39
|
+
import { HelpIcon as Lo } from "./components/Help.js";
|
|
40
|
+
import { HideOutlineIcon as vo } from "./components/HideOutline.js";
|
|
41
|
+
import { HomeIcon as Do } from "./components/Home.js";
|
|
42
|
+
import { IdIcon as Ro } from "./components/Id.js";
|
|
43
|
+
import { InformationOutlineIcon as Bo } from "./components/InformationOutline.js";
|
|
44
|
+
import { InvoiceListIcon as Ho } from "./components/InvoiceList.js";
|
|
45
|
+
import { KeyIcon as To } from "./components/Key.js";
|
|
46
|
+
import { LightBulbIcon as Mo } from "./components/LightBulb.js";
|
|
47
|
+
import { LoaderIcon as Vo } from "./components/Loader.js";
|
|
48
|
+
import { NetworkIcon as Xo } from "./components/Network.js";
|
|
49
|
+
import { PagesStackIcon as qo } from "./components/PagesStack.js";
|
|
50
|
+
import { PageviewIcon as Fo } from "./components/Pageview.js";
|
|
51
|
+
import { PeopleIcon as Qo } from "./components/People.js";
|
|
52
|
+
import { PhotoLibraryIcon as Zo } from "./components/PhotoLibrary.js";
|
|
53
|
+
import { PipelineIcon as $o } from "./components/Pipeline.js";
|
|
54
|
+
import { PlusIcon as rr } from "./components/Plus.js";
|
|
55
|
+
import { PowerSettingsIcon as tr } from "./components/PowerSettings.js";
|
|
56
|
+
import { PreviewIcon as cr } from "./components/Preview.js";
|
|
57
|
+
import { ReceiptLongIcon as mr } from "./components/ReceiptLong.js";
|
|
58
|
+
import { RefreshIcon as Ir } from "./components/Refresh.js";
|
|
59
|
+
import { ScatterPlotIcon as ir } from "./components/ScatterPlot.js";
|
|
60
|
+
import { SearchIcon as ar } from "./components/Search.js";
|
|
61
|
+
import { ServerIcon as sr } from "./components/Server.js";
|
|
62
|
+
import { StartIcon as wr } from "./components/Start.js";
|
|
63
|
+
import { TabNewIcon as hr } from "./components/TabNew.js";
|
|
64
|
+
import { TeamsIcon as gr } from "./components/Teams.js";
|
|
65
|
+
import { WarningIcon as Pr } from "./components/Warning.js";
|
|
66
|
+
import { XIcon as Lr } from "./components/X.js";
|
|
66
67
|
export {
|
|
67
68
|
e as AccountsIcon,
|
|
68
69
|
n as AddChartIcon,
|
|
@@ -70,63 +71,64 @@ export {
|
|
|
70
71
|
f as AppRepoIcon,
|
|
71
72
|
x as AppsIcon,
|
|
72
73
|
l as ArchivesIcon,
|
|
73
|
-
|
|
74
|
+
C as ArrowDownIcon,
|
|
74
75
|
u as ArrowLeftIcon,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
d as ArrowRightIcon,
|
|
77
|
+
A as ArrowUpIcon,
|
|
78
|
+
O as BarChartIcon,
|
|
78
79
|
k as BookOpenIcon,
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
S as CalendarMonthIcon,
|
|
81
|
+
E as CheckCircleIcon,
|
|
81
82
|
b as CheckIcon,
|
|
82
83
|
y as ClockAlertIcon,
|
|
83
84
|
G as ClockOutlineIcon,
|
|
84
85
|
N as CloseIcon,
|
|
85
86
|
K as CloudIcon,
|
|
86
|
-
U as
|
|
87
|
-
W as
|
|
88
|
-
j as
|
|
89
|
-
z as
|
|
90
|
-
J as
|
|
91
|
-
Y as
|
|
92
|
-
_ as
|
|
93
|
-
oo as
|
|
94
|
-
eo as
|
|
95
|
-
no as
|
|
96
|
-
po as
|
|
97
|
-
fo as
|
|
98
|
-
xo as
|
|
99
|
-
lo as
|
|
100
|
-
|
|
101
|
-
uo as
|
|
102
|
-
ho as
|
|
103
|
-
go as
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Do as
|
|
108
|
-
Ro as
|
|
109
|
-
Bo as
|
|
110
|
-
Ho as
|
|
111
|
-
To as
|
|
112
|
-
Mo as
|
|
113
|
-
Vo as
|
|
114
|
-
Xo as
|
|
115
|
-
qo as
|
|
116
|
-
Fo as
|
|
117
|
-
Qo as
|
|
118
|
-
Zo as
|
|
119
|
-
$o as
|
|
120
|
-
rr as
|
|
121
|
-
tr as
|
|
122
|
-
cr as
|
|
123
|
-
mr as
|
|
124
|
-
Ir as
|
|
125
|
-
ir as
|
|
126
|
-
ar as
|
|
127
|
-
|
|
128
|
-
wr as
|
|
129
|
-
|
|
130
|
-
gr as
|
|
131
|
-
|
|
87
|
+
U as CloudLockOutlineIcon,
|
|
88
|
+
W as ClustersIcon,
|
|
89
|
+
j as CogOutlineIcon,
|
|
90
|
+
z as CopyIcon,
|
|
91
|
+
J as CpuIcon,
|
|
92
|
+
Y as CubeIcon,
|
|
93
|
+
_ as DatacenterIcon,
|
|
94
|
+
oo as DeleteIcon,
|
|
95
|
+
eo as DollarSignIcon,
|
|
96
|
+
no as DownloadIcon,
|
|
97
|
+
po as EditIcon,
|
|
98
|
+
fo as EllipsesIcon,
|
|
99
|
+
xo as EnvironmentsIcon,
|
|
100
|
+
lo as ErrorIcon,
|
|
101
|
+
Co as ErrorOutlineIcon,
|
|
102
|
+
uo as ExclamationIcon,
|
|
103
|
+
ho as GitIcon,
|
|
104
|
+
go as GitOpsCatalogIcon,
|
|
105
|
+
Po as GridViewIcon,
|
|
106
|
+
Lo as HelpIcon,
|
|
107
|
+
vo as HideOutlineIcon,
|
|
108
|
+
Do as HomeIcon,
|
|
109
|
+
Ro as IdIcon,
|
|
110
|
+
Bo as InformationOutlineIcon,
|
|
111
|
+
Ho as InvoiceListIcon,
|
|
112
|
+
To as KeyIcon,
|
|
113
|
+
Mo as LightBulbIcon,
|
|
114
|
+
Vo as LoaderIcon,
|
|
115
|
+
Xo as NetworkIcon,
|
|
116
|
+
qo as PagesStackIcon,
|
|
117
|
+
Fo as PageviewIcon,
|
|
118
|
+
Qo as PeopleIcon,
|
|
119
|
+
Zo as PhotoLibraryIcon,
|
|
120
|
+
$o as PipelineIcon,
|
|
121
|
+
rr as PlusIcon,
|
|
122
|
+
tr as PowerSettingsIcon,
|
|
123
|
+
cr as PreviewIcon,
|
|
124
|
+
mr as ReceiptLongIcon,
|
|
125
|
+
Ir as RefreshIcon,
|
|
126
|
+
ir as ScatterPlotIcon,
|
|
127
|
+
ar as SearchIcon,
|
|
128
|
+
sr as ServerIcon,
|
|
129
|
+
wr as StartIcon,
|
|
130
|
+
hr as TabNewIcon,
|
|
131
|
+
gr as TeamsIcon,
|
|
132
|
+
Pr as WarningIcon,
|
|
133
|
+
Lr as XIcon
|
|
132
134
|
};
|
|
@@ -1,83 +1,85 @@
|
|
|
1
1
|
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
2
|
+
import { useMemo as q } from "react";
|
|
3
3
|
import { cn as n } from "../../utils/index.js";
|
|
4
|
-
import { buttonGroupPillVariants as
|
|
5
|
-
import { useButtonGroup as
|
|
6
|
-
import { ButtonGroupLabel as
|
|
7
|
-
import { m as
|
|
8
|
-
import { ButtonGroupItem as
|
|
9
|
-
import { ButtonGroupMessage as
|
|
10
|
-
const
|
|
4
|
+
import { buttonGroupPillVariants as z, buttonGroupVariants as A, buttonGroupWrapperVariants as E } from "./ButtonGroup.variants.js";
|
|
5
|
+
import { useButtonGroup as H } from "./hooks/useButtonGroup.js";
|
|
6
|
+
import { ButtonGroupLabel as J } from "./components/ButtonGroupLabel/ButtonGroupLabel.js";
|
|
7
|
+
import { m as Q } from "../../proxy-CngVm5qA.js";
|
|
8
|
+
import { ButtonGroupItem as T } from "./components/ButtonGroupItem/ButtonGroupItem.js";
|
|
9
|
+
import { ButtonGroupMessage as U } from "./components/ButtonGroupMessage/ButtonGroupMessage.js";
|
|
10
|
+
const X = ({
|
|
11
11
|
className: p,
|
|
12
12
|
contentClassName: f,
|
|
13
13
|
defaultValue: h,
|
|
14
|
-
|
|
14
|
+
descriptionAlign: v,
|
|
15
|
+
descriptionClassName: G,
|
|
15
16
|
disabled: o,
|
|
16
17
|
duration: l,
|
|
17
|
-
error:
|
|
18
|
-
errorClassName:
|
|
19
|
-
helperText:
|
|
20
|
-
helperTextClassName:
|
|
21
|
-
isRequired:
|
|
22
|
-
itemClassName:
|
|
23
|
-
itemLabelClassName:
|
|
18
|
+
error: b,
|
|
19
|
+
errorClassName: N,
|
|
20
|
+
helperText: y,
|
|
21
|
+
helperTextClassName: B,
|
|
22
|
+
isRequired: D,
|
|
23
|
+
itemClassName: g,
|
|
24
|
+
itemLabelClassName: x,
|
|
24
25
|
label: s,
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
labelAlign: w,
|
|
27
|
+
labelClassName: I,
|
|
28
|
+
name: K,
|
|
27
29
|
options: t,
|
|
28
|
-
pillClassName:
|
|
29
|
-
requiredClassName:
|
|
30
|
-
theme:
|
|
31
|
-
value:
|
|
32
|
-
wrapperClassName:
|
|
33
|
-
onValueChange:
|
|
30
|
+
pillClassName: S,
|
|
31
|
+
requiredClassName: V,
|
|
32
|
+
theme: $,
|
|
33
|
+
value: j,
|
|
34
|
+
wrapperClassName: F,
|
|
35
|
+
onValueChange: L
|
|
34
36
|
}) => {
|
|
35
37
|
const {
|
|
36
|
-
animationDirection:
|
|
37
|
-
groupRef:
|
|
38
|
+
animationDirection: M,
|
|
39
|
+
groupRef: C,
|
|
38
40
|
id: m,
|
|
39
41
|
selected: r,
|
|
40
|
-
handleKeyDown:
|
|
41
|
-
handleSelect:
|
|
42
|
-
} =
|
|
42
|
+
handleKeyDown: O,
|
|
43
|
+
handleSelect: P
|
|
44
|
+
} = H({
|
|
43
45
|
defaultValue: h,
|
|
44
46
|
disabled: o ?? void 0,
|
|
45
47
|
options: t,
|
|
46
|
-
value:
|
|
47
|
-
onValueChange:
|
|
48
|
-
}), u = t.length, c =
|
|
48
|
+
value: j,
|
|
49
|
+
onValueChange: L
|
|
50
|
+
}), u = t.length, c = q(
|
|
49
51
|
() => t.findIndex((e) => e.value === r),
|
|
50
52
|
[t, r]
|
|
51
53
|
);
|
|
52
54
|
return /* @__PURE__ */ d(
|
|
53
55
|
"div",
|
|
54
56
|
{
|
|
55
|
-
className: n(
|
|
56
|
-
"data-theme":
|
|
57
|
+
className: n(E(), F),
|
|
58
|
+
"data-theme": $,
|
|
57
59
|
children: [
|
|
58
60
|
s && /* @__PURE__ */ a(
|
|
59
|
-
|
|
61
|
+
J,
|
|
60
62
|
{
|
|
61
|
-
className:
|
|
63
|
+
className: I,
|
|
62
64
|
htmlFor: m,
|
|
63
|
-
isRequired:
|
|
65
|
+
isRequired: D,
|
|
64
66
|
label: s,
|
|
65
|
-
requiredClassName:
|
|
67
|
+
requiredClassName: V
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
/* @__PURE__ */ d(
|
|
69
71
|
"div",
|
|
70
72
|
{
|
|
71
|
-
ref:
|
|
73
|
+
ref: C,
|
|
72
74
|
role: "radiogroup",
|
|
73
75
|
"aria-labelledby": s ? m : void 0,
|
|
74
|
-
className: n(
|
|
76
|
+
className: n(A({ disabled: o }), p),
|
|
75
77
|
children: [
|
|
76
78
|
c >= 0 && /* @__PURE__ */ a(
|
|
77
|
-
|
|
79
|
+
Q.div,
|
|
78
80
|
{
|
|
79
81
|
"aria-hidden": "true",
|
|
80
|
-
className: n(
|
|
82
|
+
className: n(z(), S),
|
|
81
83
|
initial: !1,
|
|
82
84
|
animate: {
|
|
83
85
|
left: `calc(${c} * (100% / ${u}) + 8px)`,
|
|
@@ -91,26 +93,28 @@ const T = ({
|
|
|
91
93
|
}
|
|
92
94
|
),
|
|
93
95
|
t.map((e, i) => {
|
|
94
|
-
const
|
|
96
|
+
const R = r === e.value, W = o || e.disabled, k = !!e.description;
|
|
95
97
|
return /* @__PURE__ */ a(
|
|
96
|
-
|
|
98
|
+
T,
|
|
97
99
|
{
|
|
98
|
-
animationDirection:
|
|
99
|
-
className:
|
|
100
|
+
animationDirection: M,
|
|
101
|
+
className: g,
|
|
100
102
|
contentClassName: f,
|
|
101
|
-
|
|
103
|
+
descriptionAlign: v,
|
|
104
|
+
descriptionClassName: G,
|
|
102
105
|
duration: l,
|
|
103
|
-
hasDescription:
|
|
106
|
+
hasDescription: k,
|
|
104
107
|
index: i,
|
|
105
|
-
isDisabled: !!
|
|
108
|
+
isDisabled: !!W,
|
|
106
109
|
isFirst: i === 0,
|
|
107
110
|
isLast: i === t.length - 1,
|
|
108
|
-
isSelected:
|
|
109
|
-
|
|
111
|
+
isSelected: R,
|
|
112
|
+
labelAlign: w,
|
|
113
|
+
labelClassName: x,
|
|
110
114
|
option: e,
|
|
111
115
|
value: e.value,
|
|
112
|
-
onKeyDown:
|
|
113
|
-
onSelect:
|
|
116
|
+
onKeyDown: O,
|
|
117
|
+
onSelect: P
|
|
114
118
|
},
|
|
115
119
|
e.value
|
|
116
120
|
);
|
|
@@ -118,21 +122,21 @@ const T = ({
|
|
|
118
122
|
]
|
|
119
123
|
}
|
|
120
124
|
),
|
|
121
|
-
/* @__PURE__ */ a("input", { type: "hidden", name:
|
|
125
|
+
/* @__PURE__ */ a("input", { type: "hidden", name: K, value: r ?? "" }),
|
|
122
126
|
/* @__PURE__ */ a(
|
|
123
|
-
|
|
127
|
+
U,
|
|
124
128
|
{
|
|
125
|
-
error:
|
|
126
|
-
errorClassName:
|
|
127
|
-
helperText:
|
|
128
|
-
helperTextClassName:
|
|
129
|
+
error: b,
|
|
130
|
+
errorClassName: N,
|
|
131
|
+
helperText: y,
|
|
132
|
+
helperTextClassName: B
|
|
129
133
|
}
|
|
130
134
|
)
|
|
131
135
|
]
|
|
132
136
|
}
|
|
133
137
|
);
|
|
134
138
|
};
|
|
135
|
-
|
|
139
|
+
X.displayName = "KonstructButtonGroup";
|
|
136
140
|
export {
|
|
137
|
-
|
|
141
|
+
X as ButtonGroup
|
|
138
142
|
};
|
|
@@ -2,6 +2,8 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { Theme } from '../../domain/theme';
|
|
4
4
|
import { buttonGroupVariants } from './ButtonGroup.variants';
|
|
5
|
+
/** Horizontal text alignment for label and description */
|
|
6
|
+
export type TextAlign = 'left' | 'center' | 'right';
|
|
5
7
|
/**
|
|
6
8
|
* Configuration for a single button option in the ButtonGroup.
|
|
7
9
|
*/
|
|
@@ -53,6 +55,8 @@ export type Props = VariantProps<typeof buttonGroupVariants> & {
|
|
|
53
55
|
contentClassName?: string;
|
|
54
56
|
/** Initially selected value (uncontrolled mode) */
|
|
55
57
|
defaultValue?: string;
|
|
58
|
+
/** Horizontal alignment of the description text (default: 'left') */
|
|
59
|
+
descriptionAlign?: TextAlign;
|
|
56
60
|
/** CSS classes for description text */
|
|
57
61
|
descriptionClassName?: string;
|
|
58
62
|
/** Animation duration in seconds (default: 0.3) */
|
|
@@ -71,6 +75,8 @@ export type Props = VariantProps<typeof buttonGroupVariants> & {
|
|
|
71
75
|
itemClassName?: string;
|
|
72
76
|
/** CSS classes for the label text inside items */
|
|
73
77
|
itemLabelClassName?: string;
|
|
78
|
+
/** Horizontal alignment of the label text (default: 'left') */
|
|
79
|
+
labelAlign?: TextAlign;
|
|
74
80
|
/** Label displayed above the button group */
|
|
75
81
|
label?: string | ReactNode;
|
|
76
82
|
/** CSS classes for the label */
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { jsx as s, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as L } from "react";
|
|
3
3
|
import { cn as t } from "../../../../utils/index.js";
|
|
4
|
-
import { buttonGroupLabelVariants as
|
|
5
|
-
import { m as
|
|
6
|
-
const
|
|
4
|
+
import { buttonGroupLabelVariants as u, buttonGroupDescriptionVariants as V, buttonGroupItemContentVariants as g, buttonGroupItemVariants as w } from "./ButtonGroupItem.variants.js";
|
|
5
|
+
import { m as j } from "../../../../proxy-CngVm5qA.js";
|
|
6
|
+
const k = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" : r ? "inset(0 0 0 0)" : n === "right" ? "inset(0 0 0 100%)" : "inset(0 100% 0 0)", B = L(
|
|
7
7
|
({
|
|
8
8
|
animationDirection: r,
|
|
9
9
|
className: n,
|
|
10
|
-
contentClassName:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
contentClassName: d,
|
|
11
|
+
descriptionAlign: p,
|
|
12
|
+
descriptionClassName: h,
|
|
13
|
+
duration: b = 0.3,
|
|
14
|
+
hasDescription: f,
|
|
14
15
|
index: c,
|
|
15
16
|
isDisabled: l,
|
|
16
|
-
isFirst:
|
|
17
|
-
isLast:
|
|
17
|
+
isFirst: y,
|
|
18
|
+
isLast: N,
|
|
18
19
|
isSelected: i,
|
|
19
|
-
|
|
20
|
+
labelAlign: m,
|
|
21
|
+
labelClassName: o,
|
|
20
22
|
option: e,
|
|
21
|
-
value:
|
|
22
|
-
onKeyDown:
|
|
23
|
-
onSelect:
|
|
23
|
+
value: v,
|
|
24
|
+
onKeyDown: G,
|
|
25
|
+
onSelect: x
|
|
24
26
|
}) => /* @__PURE__ */ s(
|
|
25
27
|
"button",
|
|
26
28
|
{
|
|
@@ -30,10 +32,10 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
|
|
|
30
32
|
"data-value": e.value,
|
|
31
33
|
disabled: l,
|
|
32
34
|
tabIndex: i || c === 0 ? 0 : -1,
|
|
33
|
-
onClick: () => !l && v
|
|
34
|
-
onKeyDown: (
|
|
35
|
+
onClick: () => !l && x(v),
|
|
36
|
+
onKeyDown: (I) => G(I, c),
|
|
35
37
|
className: t(
|
|
36
|
-
|
|
38
|
+
w({ disabled: l, isFirst: y, isLast: N }),
|
|
37
39
|
"relative",
|
|
38
40
|
n
|
|
39
41
|
),
|
|
@@ -41,9 +43,9 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
|
|
|
41
43
|
"div",
|
|
42
44
|
{
|
|
43
45
|
className: t(
|
|
44
|
-
|
|
46
|
+
g({ hasDescription: f }),
|
|
45
47
|
"relative",
|
|
46
|
-
|
|
48
|
+
d
|
|
47
49
|
),
|
|
48
50
|
children: [
|
|
49
51
|
/* @__PURE__ */ a("span", { className: "relative w-full", children: [
|
|
@@ -51,8 +53,8 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
|
|
|
51
53
|
"span",
|
|
52
54
|
{
|
|
53
55
|
className: t(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
u({ selected: !1, labelAlign: m }),
|
|
57
|
+
o
|
|
56
58
|
),
|
|
57
59
|
children: [
|
|
58
60
|
/* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
|
|
@@ -64,22 +66,22 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
|
|
|
64
66
|
}
|
|
65
67
|
),
|
|
66
68
|
/* @__PURE__ */ a(
|
|
67
|
-
|
|
69
|
+
j.span,
|
|
68
70
|
{
|
|
69
71
|
className: t(
|
|
70
|
-
|
|
72
|
+
u({ selected: !0, labelAlign: m }),
|
|
71
73
|
"absolute inset-0",
|
|
72
|
-
|
|
74
|
+
o
|
|
73
75
|
),
|
|
74
76
|
"aria-hidden": "true",
|
|
75
77
|
initial: !1,
|
|
76
78
|
animate: {
|
|
77
|
-
clipPath:
|
|
79
|
+
clipPath: k(i, r)
|
|
78
80
|
},
|
|
79
81
|
transition: {
|
|
80
82
|
type: "tween",
|
|
81
83
|
ease: "linear",
|
|
82
|
-
duration:
|
|
84
|
+
duration: b
|
|
83
85
|
},
|
|
84
86
|
children: [
|
|
85
87
|
/* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
|
|
@@ -95,8 +97,8 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
|
|
|
95
97
|
"span",
|
|
96
98
|
{
|
|
97
99
|
className: t(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
V({ descriptionAlign: p }),
|
|
101
|
+
h
|
|
100
102
|
),
|
|
101
103
|
children: e.description
|
|
102
104
|
}
|
|
@@ -108,7 +110,7 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
|
|
|
108
110
|
e.value
|
|
109
111
|
)
|
|
110
112
|
);
|
|
111
|
-
|
|
113
|
+
B.displayName = "KonstructButtonGroupItem";
|
|
112
114
|
export {
|
|
113
|
-
|
|
115
|
+
B as ButtonGroupItem
|
|
114
116
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { KeyboardEvent } from 'react';
|
|
2
|
-
import { ButtonGroupOption } from '../../ButtonGroup.types';
|
|
2
|
+
import { ButtonGroupOption, TextAlign } from '../../ButtonGroup.types';
|
|
3
3
|
import { AnimationDirection } from '../../hooks';
|
|
4
4
|
export type Props = {
|
|
5
5
|
animationDirection: AnimationDirection;
|
|
6
6
|
className?: string;
|
|
7
7
|
contentClassName?: string;
|
|
8
|
+
descriptionAlign?: TextAlign;
|
|
8
9
|
descriptionClassName?: string;
|
|
9
10
|
duration?: number;
|
|
11
|
+
labelAlign?: TextAlign;
|
|
10
12
|
hasDescription: boolean;
|
|
11
13
|
index: number;
|
|
12
14
|
isDisabled: boolean;
|
package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts
CHANGED
|
@@ -17,8 +17,11 @@ export declare const buttonGroupItemContentVariants: (props?: ({
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const buttonGroupLabelVariants: (props?: ({
|
|
19
19
|
selected?: boolean | null | undefined;
|
|
20
|
+
labelAlign?: "center" | "left" | "right" | null | undefined;
|
|
20
21
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
21
22
|
/**
|
|
22
23
|
* Description text variants inside button item
|
|
23
24
|
*/
|
|
24
|
-
export declare const buttonGroupDescriptionVariants: (props?:
|
|
25
|
+
export declare const buttonGroupDescriptionVariants: (props?: ({
|
|
26
|
+
descriptionAlign?: "center" | "left" | "right" | null | undefined;
|
|
27
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|