@bitrise/bitkit-v2 0.3.136 → 0.3.138
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/components/BitkitCalendar/components/CalendarSelect.js +11 -11
- package/dist/components/BitkitSelect/BitkitSelect.d.ts +3 -13
- package/dist/components/BitkitSelect/BitkitSelect.js +83 -72
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.d.ts +23 -4
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js +68 -34
- package/dist/theme/slot-recipes/Alert.recipe.js +6 -3
- package/dist/theme/slot-recipes/DatePickerSelect.recipe.d.ts +5 -0
- package/dist/theme/slot-recipes/Select.recipe.d.ts +6 -1
- package/dist/theme/slot-recipes/Select.recipe.js +37 -3
- package/dist/theme/slot-recipes/index.d.ts +11 -1
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { createListCollection as u } from "@chakra-ui/react/collection";
|
|
3
3
|
import { Portal as h } from "@chakra-ui/react/portal";
|
|
4
4
|
import { Select as r } from "@chakra-ui/react/select";
|
|
5
5
|
import { useSlotRecipe as f } from "@chakra-ui/react/styled-system";
|
|
6
6
|
import g from "../../../utilities/AssetSelectChevron.js";
|
|
7
7
|
import S from "../../BitkitSelectMenu/BitkitSelectMenu.js";
|
|
8
|
-
const C = (
|
|
9
|
-
const { contentProps:
|
|
10
|
-
items:
|
|
8
|
+
const C = (c) => {
|
|
9
|
+
const { contentProps: l, controlProps: n, defaultValue: s, items: a, onValueChange: d, value: p } = c, o = u({
|
|
10
|
+
items: a,
|
|
11
11
|
groupBy: (m) => m.group || ""
|
|
12
12
|
}), t = f({ key: "datePickerSelect" })();
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ i(
|
|
14
14
|
r.Root,
|
|
15
15
|
{
|
|
16
|
-
collection:
|
|
17
|
-
defaultValue:
|
|
18
|
-
onValueChange:
|
|
16
|
+
collection: o,
|
|
17
|
+
defaultValue: s,
|
|
18
|
+
onValueChange: d,
|
|
19
19
|
size: "md",
|
|
20
|
-
value:
|
|
20
|
+
value: p,
|
|
21
21
|
children: [
|
|
22
22
|
/* @__PURE__ */ e(r.HiddenSelect, {}),
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ i(r.Control, { ...n, children: [
|
|
24
24
|
/* @__PURE__ */ e(r.Trigger, { css: t.trigger, children: /* @__PURE__ */ e(r.ValueText, {}) }),
|
|
25
25
|
/* @__PURE__ */ e(r.IndicatorGroup, { css: t.indicatorGroup, children: /* @__PURE__ */ e(r.Indicator, { asChild: !0, css: t.indicator, children: /* @__PURE__ */ e(g, { width: "20", height: "20" }) }) })
|
|
26
26
|
] }),
|
|
27
|
-
/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(r.Positioner, { children: /* @__PURE__ */ e(S, { contentProps:
|
|
27
|
+
/* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(r.Positioner, { children: /* @__PURE__ */ e(S, { collection: o, contentProps: l }) }) })
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldRootProps } from '@chakra-ui/react/field';
|
|
2
2
|
import { SelectRootProps, SelectTriggerProps } from '@chakra-ui/react/select';
|
|
3
3
|
import { BitkitFieldProps } from '../BitkitField/BitkitField.tsx';
|
|
4
|
-
import { BitkitSelectContentProps } from '../BitkitSelectMenu/BitkitSelectMenu.tsx';
|
|
4
|
+
import { BitkitSelectContentProps, BitkitSelectMenuCreateItemProps, BitkitSelectMenuItemProps, BitkitSelectMenuSearchProps } from '../BitkitSelectMenu/BitkitSelectMenu.tsx';
|
|
5
5
|
export type BitkitSelectTriggerProps = SelectTriggerProps;
|
|
6
6
|
export type BitkitSelectProps = FieldRootProps & {
|
|
7
7
|
contentProps?: BitkitSelectContentProps;
|
|
@@ -9,11 +9,7 @@ export type BitkitSelectProps = FieldRootProps & {
|
|
|
9
9
|
errorText?: BitkitFieldProps['errorText'];
|
|
10
10
|
helperText?: BitkitFieldProps['helperText'];
|
|
11
11
|
isLoading?: boolean;
|
|
12
|
-
items: Array<
|
|
13
|
-
group?: string;
|
|
14
|
-
value: string;
|
|
15
|
-
label: string;
|
|
16
|
-
}>;
|
|
12
|
+
items: Array<BitkitSelectMenuItemProps>;
|
|
17
13
|
label?: BitkitFieldProps['label'];
|
|
18
14
|
onValueChange?: (newVal: string) => void;
|
|
19
15
|
optional?: BitkitFieldProps['optional'];
|
|
@@ -25,12 +21,6 @@ export type BitkitSelectProps = FieldRootProps & {
|
|
|
25
21
|
triggerProps?: BitkitSelectTriggerProps;
|
|
26
22
|
value?: string;
|
|
27
23
|
warningText?: BitkitFieldProps['warningText'];
|
|
28
|
-
} &
|
|
29
|
-
hasSearch: true;
|
|
30
|
-
onSearchChange?: (searchText: string) => void;
|
|
31
|
-
} | {
|
|
32
|
-
hasSearch?: false;
|
|
33
|
-
onSearchChange?: never;
|
|
34
|
-
});
|
|
24
|
+
} & BitkitSelectMenuCreateItemProps & BitkitSelectMenuSearchProps;
|
|
35
25
|
declare const BitkitSelect: import('react').ForwardRefExoticComponent<BitkitSelectProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
36
26
|
export default BitkitSelect;
|
|
@@ -1,84 +1,95 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { Box as L } from "@chakra-ui/react/box";
|
|
3
|
+
import { createListCollection as j } from "@chakra-ui/react/collection";
|
|
4
|
+
import { Portal as F } from "@chakra-ui/react/portal";
|
|
5
|
+
import { Select as r, useSelectContext as H } from "@chakra-ui/react/select";
|
|
6
|
+
import { forwardRef as R } from "react";
|
|
7
|
+
import A from "../../utilities/AssetSelectChevron.js";
|
|
8
|
+
import E from "../BitkitField/BitkitField.js";
|
|
9
|
+
import G from "../BitkitSelectMenu/BitkitSelectMenu.js";
|
|
10
|
+
import M from "../../icons/IconErrorCircleFilled.js";
|
|
11
|
+
import N from "../../icons/IconWarningYellow.js";
|
|
12
|
+
const W = ({ placeholder: i, state: n, size: m }) => {
|
|
13
|
+
const o = H().selectedItems, c = o[0]?.icon, a = o[0]?.label, s = m === "md" ? "16" : "24";
|
|
14
|
+
return o[0] ? /* @__PURE__ */ e(r.ValueText, { placeholder: i || n === "readOnly" ? "(not selected)" : "Select an option", children: /* @__PURE__ */ d(L, { display: "flex", alignItems: "center", gap: "8", children: [
|
|
15
|
+
c && /* @__PURE__ */ e(c, { size: s }),
|
|
16
|
+
a
|
|
17
|
+
] }) }) : /* @__PURE__ */ e(r.ValueText, { placeholder: i ?? (n === "readOnly" ? "(not selected)" : "Select an option") });
|
|
18
|
+
}, Y = R((i, n) => {
|
|
12
19
|
const {
|
|
13
|
-
contentProps:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
contentProps: m,
|
|
21
|
+
createItemHref: h,
|
|
22
|
+
createItemLabel: o,
|
|
23
|
+
createItemProps: c,
|
|
24
|
+
defaultValue: a,
|
|
25
|
+
errorText: s,
|
|
26
|
+
hasSearch: g,
|
|
27
|
+
helperText: S,
|
|
28
|
+
isLoading: I,
|
|
29
|
+
items: x,
|
|
30
|
+
label: C,
|
|
31
|
+
onCreateItem: v,
|
|
32
|
+
onSearchChange: y,
|
|
33
|
+
onValueChange: V,
|
|
34
|
+
optional: b,
|
|
35
|
+
placeholder: B,
|
|
36
|
+
selectProps: P,
|
|
37
|
+
size: l = "md",
|
|
38
|
+
state: t,
|
|
39
|
+
tooltip: T,
|
|
40
|
+
triggerProps: z,
|
|
41
|
+
value: u,
|
|
42
|
+
warningText: k,
|
|
43
|
+
...w
|
|
44
|
+
} = i, O = t === "error" || !!s, f = j({
|
|
45
|
+
items: x,
|
|
46
|
+
groupBy: (p) => p.group || ""
|
|
36
47
|
});
|
|
37
48
|
return /* @__PURE__ */ e(
|
|
38
|
-
|
|
49
|
+
E,
|
|
39
50
|
{
|
|
40
|
-
disabled:
|
|
41
|
-
errorText:
|
|
42
|
-
helperText:
|
|
43
|
-
invalid:
|
|
44
|
-
label:
|
|
45
|
-
optional:
|
|
46
|
-
readOnly:
|
|
47
|
-
ref:
|
|
48
|
-
tooltip:
|
|
49
|
-
warningText:
|
|
50
|
-
...
|
|
51
|
-
children: /* @__PURE__ */
|
|
51
|
+
disabled: t === "disabled",
|
|
52
|
+
errorText: s,
|
|
53
|
+
helperText: S,
|
|
54
|
+
invalid: O,
|
|
55
|
+
label: C,
|
|
56
|
+
optional: b,
|
|
57
|
+
readOnly: t === "readOnly",
|
|
58
|
+
ref: n,
|
|
59
|
+
tooltip: T,
|
|
60
|
+
warningText: k,
|
|
61
|
+
...w,
|
|
62
|
+
children: /* @__PURE__ */ d(
|
|
52
63
|
r.Root,
|
|
53
64
|
{
|
|
54
|
-
collection:
|
|
55
|
-
size:
|
|
56
|
-
...
|
|
57
|
-
defaultValue:
|
|
58
|
-
onValueChange: (
|
|
59
|
-
value:
|
|
65
|
+
collection: f,
|
|
66
|
+
size: l,
|
|
67
|
+
...P,
|
|
68
|
+
defaultValue: a ? [a] : void 0,
|
|
69
|
+
onValueChange: (p) => V?.(p.value[0]),
|
|
70
|
+
value: u ? [u] : void 0,
|
|
60
71
|
children: [
|
|
61
72
|
/* @__PURE__ */ e(r.HiddenSelect, {}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */ e(r.Trigger, { ...
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
) }),
|
|
69
|
-
/* @__PURE__ */ l(r.IndicatorGroup, { children: [
|
|
70
|
-
o === "error" && /* @__PURE__ */ e(r.Indicator, { children: /* @__PURE__ */ e(L, { size: t === "lg" ? "24" : "16", color: "icon/negative" }) }),
|
|
71
|
-
o === "warning" && /* @__PURE__ */ e(r.Indicator, { children: /* @__PURE__ */ e(R, { size: t === "lg" ? "24" : "16" }) }),
|
|
72
|
-
/* @__PURE__ */ e(r.Indicator, { asChild: !0, children: /* @__PURE__ */ e(O, {}) })
|
|
73
|
+
/* @__PURE__ */ d(r.Control, { children: [
|
|
74
|
+
/* @__PURE__ */ e(r.Trigger, { ...z, children: /* @__PURE__ */ e(W, { placeholder: B, size: l, state: t }) }),
|
|
75
|
+
/* @__PURE__ */ d(r.IndicatorGroup, { children: [
|
|
76
|
+
t === "error" && /* @__PURE__ */ e(r.Indicator, { children: /* @__PURE__ */ e(M, { size: l === "lg" ? "24" : "16", color: "icon/negative" }) }),
|
|
77
|
+
t === "warning" && /* @__PURE__ */ e(r.Indicator, { children: /* @__PURE__ */ e(N, { size: l === "lg" ? "24" : "16" }) }),
|
|
78
|
+
/* @__PURE__ */ e(r.Indicator, { asChild: !0, children: /* @__PURE__ */ e(A, {}) })
|
|
73
79
|
] })
|
|
74
80
|
] }),
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
|
|
81
|
+
/* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(r.Positioner, { children: /* @__PURE__ */ e(
|
|
82
|
+
G,
|
|
77
83
|
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
collection: f,
|
|
85
|
+
createItemHref: h,
|
|
86
|
+
createItemLabel: o,
|
|
87
|
+
createItemProps: c,
|
|
88
|
+
contentProps: m,
|
|
89
|
+
isLoading: I,
|
|
90
|
+
onCreateItem: v,
|
|
91
|
+
...g ? { hasSearch: !0, onSearchChange: y } : { hasSearch: !1 },
|
|
92
|
+
size: l
|
|
82
93
|
}
|
|
83
94
|
) }) })
|
|
84
95
|
]
|
|
@@ -87,7 +98,7 @@ const A = z((d, s) => {
|
|
|
87
98
|
}
|
|
88
99
|
);
|
|
89
100
|
});
|
|
90
|
-
|
|
101
|
+
Y.displayName = "BitkitSelect";
|
|
91
102
|
export {
|
|
92
|
-
|
|
103
|
+
Y as default
|
|
93
104
|
};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import { ListCollection } from '@chakra-ui/react/collection';
|
|
1
2
|
import { SelectContentProps } from '@chakra-ui/react/select';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
4
|
+
import { BitkitIconComponent } from '../../icons';
|
|
5
|
+
export type BitkitSelectMenuCreateItemProps = {
|
|
6
|
+
createItemHref?: string;
|
|
7
|
+
createItemLabel?: string;
|
|
8
|
+
createItemProps?: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
9
|
+
onCreateItem?: () => void;
|
|
10
|
+
};
|
|
11
|
+
export type BitkitSelectMenuSearchProps = {
|
|
4
12
|
hasSearch?: boolean;
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
size?: 'md' | 'lg';
|
|
7
13
|
} & ({
|
|
8
14
|
hasSearch: true;
|
|
9
15
|
onSearchChange?: (searchText: string) => void;
|
|
@@ -11,6 +17,19 @@ export type BitkitSelectMenuProps = {
|
|
|
11
17
|
hasSearch?: false;
|
|
12
18
|
onSearchChange?: never;
|
|
13
19
|
});
|
|
20
|
+
export type BitkitSelectMenuItemProps = {
|
|
21
|
+
value: string;
|
|
22
|
+
label: string;
|
|
23
|
+
group?: string;
|
|
24
|
+
icon?: BitkitIconComponent;
|
|
25
|
+
};
|
|
26
|
+
export type BitkitSelectMenuProps = {
|
|
27
|
+
collection: ListCollection<BitkitSelectMenuItemProps>;
|
|
28
|
+
contentProps?: BitkitSelectContentProps;
|
|
29
|
+
isLoading?: boolean;
|
|
30
|
+
size?: 'md' | 'lg';
|
|
31
|
+
variant?: 'select' | 'combobox';
|
|
32
|
+
} & BitkitSelectMenuCreateItemProps & BitkitSelectMenuSearchProps;
|
|
14
33
|
export type BitkitSelectContentProps = SelectContentProps;
|
|
15
34
|
declare const BitkitSelectMenu: import('react').ForwardRefExoticComponent<BitkitSelectMenuProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
35
|
export default BitkitSelectMenu;
|
|
@@ -1,42 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Box as l } from "@chakra-ui/react/box";
|
|
3
|
+
import { Combobox as z } from "@chakra-ui/react/combobox";
|
|
4
|
+
import { Input as v } from "@chakra-ui/react/input";
|
|
5
|
+
import { InputGroup as G } from "@chakra-ui/react/input-group";
|
|
6
|
+
import { Select as L } from "@chakra-ui/react/select";
|
|
7
|
+
import { Separator as j } from "@chakra-ui/react/separator";
|
|
8
|
+
import { Spinner as B } from "@chakra-ui/react/spinner";
|
|
9
|
+
import { useSlotRecipe as M } from "@chakra-ui/react/styled-system";
|
|
10
|
+
import { Text as d } from "@chakra-ui/react/text";
|
|
11
|
+
import { forwardRef as P } from "react";
|
|
12
|
+
import w from "../../icons/IconMagnifier.js";
|
|
13
|
+
import N from "../../icons/IconCheck.js";
|
|
14
|
+
import R from "../../icons/IconPlus.js";
|
|
15
|
+
const E = P((f, h) => {
|
|
16
|
+
const {
|
|
17
|
+
collection: u,
|
|
18
|
+
contentProps: I = {},
|
|
19
|
+
hasSearch: x = !1,
|
|
20
|
+
isLoading: S = !1,
|
|
21
|
+
onSearchChange: g,
|
|
22
|
+
size: s,
|
|
23
|
+
variant: y = "select",
|
|
24
|
+
createItemLabel: b = "Create item",
|
|
25
|
+
onCreateItem: m,
|
|
26
|
+
createItemHref: n,
|
|
27
|
+
createItemProps: C
|
|
28
|
+
} = f, o = y === "combobox" ? z : L, r = M({ key: "select" })({ size: s }), i = s === "md" ? "16" : "24";
|
|
29
|
+
return /* @__PURE__ */ t(o.Content, { css: r.content, ref: h, ...I, children: [
|
|
30
|
+
x && /* @__PURE__ */ e(
|
|
31
|
+
G,
|
|
18
32
|
{
|
|
19
|
-
startElement: /* @__PURE__ */ e(
|
|
20
|
-
css:
|
|
21
|
-
children: /* @__PURE__ */ e(
|
|
33
|
+
startElement: /* @__PURE__ */ e(w, { size: i, color: "icon/tertiary" }),
|
|
34
|
+
css: r.searchInputGroup,
|
|
35
|
+
children: /* @__PURE__ */ e(v, { placeholder: "Search...", css: r.searchInput, onChange: (c) => g?.(c.target.value) })
|
|
22
36
|
}
|
|
23
37
|
),
|
|
24
|
-
/* @__PURE__ */ e(
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
] }) : u.group().map(([
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ e(
|
|
30
|
-
/* @__PURE__ */ e(
|
|
38
|
+
/* @__PURE__ */ e(l, { overflowY: "auto", children: S ? /* @__PURE__ */ t(l, { display: "flex", alignItems: "center", gap: "12", justifyContent: "left", css: r.item, children: [
|
|
39
|
+
/* @__PURE__ */ e(B, { variant: "purple" }),
|
|
40
|
+
/* @__PURE__ */ e(d, { color: "text/secondary", textStyle: "body/md/regular", children: "Loading..." })
|
|
41
|
+
] }) : u.group().map(([c, k]) => /* @__PURE__ */ t(o.ItemGroup, { children: [
|
|
42
|
+
c && /* @__PURE__ */ t(o.ItemGroupLabel, { css: r.itemGroupLabel, children: [
|
|
43
|
+
/* @__PURE__ */ e(d, { color: "text/tertiary", flexShrink: "0", textStyle: "heading/h6", children: c }),
|
|
44
|
+
/* @__PURE__ */ e(j, { flex: "1" })
|
|
31
45
|
] }),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
k.map((a) => {
|
|
47
|
+
const p = a.icon;
|
|
48
|
+
return /* @__PURE__ */ t(o.Item, { css: r.item, item: a, children: [
|
|
49
|
+
/* @__PURE__ */ t(l, { display: "flex", alignItems: "center", gap: "8", children: [
|
|
50
|
+
p && /* @__PURE__ */ e(p, { color: "icon/primary", size: i }),
|
|
51
|
+
a.label
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ e(o.ItemIndicator, { asChild: !0, children: /* @__PURE__ */ e(N, { size: i, css: r.itemIndicator }) })
|
|
54
|
+
] }, a.value);
|
|
55
|
+
})
|
|
56
|
+
] }, c)) }),
|
|
57
|
+
(n || m) && /* @__PURE__ */ t(
|
|
58
|
+
l,
|
|
59
|
+
{
|
|
60
|
+
as: n ? "a" : "button",
|
|
61
|
+
css: r.createItem,
|
|
62
|
+
...n ? { href: n } : {},
|
|
63
|
+
onClick: m,
|
|
64
|
+
...C,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ e(R, { size: i, color: "button/secondary/icon" }),
|
|
67
|
+
b
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
)
|
|
37
71
|
] });
|
|
38
72
|
});
|
|
39
|
-
|
|
73
|
+
E.displayName = "BitkitSelectMenu";
|
|
40
74
|
export {
|
|
41
|
-
|
|
75
|
+
E as default
|
|
42
76
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { alertAnatomy as t } from "@chakra-ui/react/anatomy";
|
|
2
2
|
import { defineSlotRecipe as r } from "@chakra-ui/react/styled-system";
|
|
3
3
|
import { rem as o } from "../themeUtils.js";
|
|
4
|
-
const
|
|
4
|
+
const n = r({
|
|
5
5
|
className: "alert",
|
|
6
6
|
slots: t.keys(),
|
|
7
7
|
base: {
|
|
@@ -32,7 +32,10 @@ const e = r({
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
description: {
|
|
35
|
-
textStyle: "comp/notification/message"
|
|
35
|
+
textStyle: "comp/notification/message",
|
|
36
|
+
"&:first-child": {
|
|
37
|
+
marginBlockStart: "2"
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
variants: {
|
|
@@ -104,5 +107,5 @@ const e = r({
|
|
|
104
107
|
}
|
|
105
108
|
});
|
|
106
109
|
export {
|
|
107
|
-
|
|
110
|
+
n as default
|
|
108
111
|
};
|
|
@@ -33,6 +33,11 @@ declare const datePickerSelectSlotRecipe: import('@chakra-ui/react').SlotRecipeD
|
|
|
33
33
|
textStyle: "body/md/regular";
|
|
34
34
|
'--input-height': string;
|
|
35
35
|
} | undefined;
|
|
36
|
+
createItem?: {
|
|
37
|
+
color: "text/primary";
|
|
38
|
+
py: "16";
|
|
39
|
+
textStyle: "body/md/regular";
|
|
40
|
+
} | undefined;
|
|
36
41
|
};
|
|
37
42
|
};
|
|
38
43
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const selectSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "label" | "root" | "item" | "itemIndicator" | "trigger" | "positioner" | "indicator" | "list" | "clearTrigger" | "control" | "valueText" | "itemText" | "itemGroup" | "itemGroupLabel" | "indicatorGroup" | "searchInputGroup" | "searchInput", {
|
|
1
|
+
export declare const selectSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "label" | "root" | "item" | "itemIndicator" | "trigger" | "positioner" | "indicator" | "list" | "clearTrigger" | "control" | "valueText" | "itemText" | "itemGroup" | "itemGroupLabel" | "indicatorGroup" | "searchInputGroup" | "searchInput" | "createItemContainer" | "createItem", {
|
|
2
2
|
size: {
|
|
3
3
|
md: {
|
|
4
4
|
item: {
|
|
@@ -22,6 +22,11 @@ export declare const selectSlotRecipe: import('@chakra-ui/react').SlotRecipeDefi
|
|
|
22
22
|
textStyle: "body/md/regular";
|
|
23
23
|
'--input-height': string;
|
|
24
24
|
};
|
|
25
|
+
createItem: {
|
|
26
|
+
color: "text/primary";
|
|
27
|
+
py: "16";
|
|
28
|
+
textStyle: "body/md/regular";
|
|
29
|
+
};
|
|
25
30
|
trigger: {
|
|
26
31
|
textStyle: "body/md/regular";
|
|
27
32
|
py: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { selectAnatomy as t } from "@chakra-ui/react/anatomy";
|
|
2
2
|
import { defineSlotRecipe as o } from "@chakra-ui/react/styled-system";
|
|
3
3
|
import { rem as e } from "../themeUtils.js";
|
|
4
|
-
const
|
|
4
|
+
const a = o({
|
|
5
5
|
className: "select",
|
|
6
|
-
slots: [...t.keys(), "searchInputGroup", "searchInput"],
|
|
6
|
+
slots: [...t.keys(), "searchInputGroup", "searchInput", "createItemContainer", "createItem"],
|
|
7
7
|
base: {
|
|
8
8
|
trigger: {
|
|
9
9
|
display: "flex",
|
|
@@ -129,6 +129,35 @@ const l = o({
|
|
|
129
129
|
borderColor: "border/minimal",
|
|
130
130
|
appearance: "none",
|
|
131
131
|
paddingLeft: "16"
|
|
132
|
+
},
|
|
133
|
+
createItem: {
|
|
134
|
+
borderTop: "1px solid",
|
|
135
|
+
borderColor: "border/minimal",
|
|
136
|
+
display: "flex",
|
|
137
|
+
alignItems: "center",
|
|
138
|
+
gap: "12",
|
|
139
|
+
paddingInlineEnd: "24",
|
|
140
|
+
paddingInlineStart: "16",
|
|
141
|
+
py: "20",
|
|
142
|
+
color: "text/primary",
|
|
143
|
+
textStyle: "body/lg/regular",
|
|
144
|
+
textDecoration: "none",
|
|
145
|
+
width: "100%",
|
|
146
|
+
cursor: "pointer",
|
|
147
|
+
textAlign: "start",
|
|
148
|
+
_hover: {
|
|
149
|
+
bg: "button/secondary/bg-hover",
|
|
150
|
+
textDecoration: "none",
|
|
151
|
+
_active: {
|
|
152
|
+
bg: "button/secondary/bg-active"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
_active: {
|
|
156
|
+
bg: "button/secondary/bg-active"
|
|
157
|
+
},
|
|
158
|
+
_focusVisible: {
|
|
159
|
+
outlineOffset: "-3px"
|
|
160
|
+
}
|
|
132
161
|
}
|
|
133
162
|
},
|
|
134
163
|
variants: {
|
|
@@ -155,6 +184,11 @@ const l = o({
|
|
|
155
184
|
textStyle: "body/md/regular",
|
|
156
185
|
"--input-height": e(24)
|
|
157
186
|
},
|
|
187
|
+
createItem: {
|
|
188
|
+
color: "text/primary",
|
|
189
|
+
py: "16",
|
|
190
|
+
textStyle: "body/md/regular"
|
|
191
|
+
},
|
|
158
192
|
trigger: {
|
|
159
193
|
textStyle: "body/md/regular",
|
|
160
194
|
py: e(9)
|
|
@@ -168,5 +202,5 @@ const l = o({
|
|
|
168
202
|
}
|
|
169
203
|
});
|
|
170
204
|
export {
|
|
171
|
-
|
|
205
|
+
a as selectSlotRecipe
|
|
172
206
|
};
|
|
@@ -292,6 +292,11 @@ declare const slotRecipes: {
|
|
|
292
292
|
textStyle: "body/md/regular";
|
|
293
293
|
'--input-height': string;
|
|
294
294
|
} | undefined;
|
|
295
|
+
createItem?: {
|
|
296
|
+
color: "text/primary";
|
|
297
|
+
py: "16";
|
|
298
|
+
textStyle: "body/md/regular";
|
|
299
|
+
} | undefined;
|
|
295
300
|
};
|
|
296
301
|
};
|
|
297
302
|
}>;
|
|
@@ -499,7 +504,7 @@ declare const slotRecipes: {
|
|
|
499
504
|
};
|
|
500
505
|
};
|
|
501
506
|
}>;
|
|
502
|
-
select: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "label" | "root" | "item" | "itemIndicator" | "trigger" | "positioner" | "indicator" | "list" | "clearTrigger" | "control" | "valueText" | "itemText" | "itemGroup" | "itemGroupLabel" | "indicatorGroup" | "searchInputGroup" | "searchInput", {
|
|
507
|
+
select: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "label" | "root" | "item" | "itemIndicator" | "trigger" | "positioner" | "indicator" | "list" | "clearTrigger" | "control" | "valueText" | "itemText" | "itemGroup" | "itemGroupLabel" | "indicatorGroup" | "searchInputGroup" | "searchInput" | "createItemContainer" | "createItem", {
|
|
503
508
|
size: {
|
|
504
509
|
md: {
|
|
505
510
|
item: {
|
|
@@ -523,6 +528,11 @@ declare const slotRecipes: {
|
|
|
523
528
|
textStyle: "body/md/regular";
|
|
524
529
|
'--input-height': string;
|
|
525
530
|
};
|
|
531
|
+
createItem: {
|
|
532
|
+
color: "text/primary";
|
|
533
|
+
py: "16";
|
|
534
|
+
textStyle: "body/md/regular";
|
|
535
|
+
};
|
|
526
536
|
trigger: {
|
|
527
537
|
textStyle: "body/md/regular";
|
|
528
538
|
py: string;
|