@adgytec/adgytec-web-ui-components 1.1.2 → 1.1.3
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/assets/Popover.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._popover_1lrhq_1{box-shadow:var(--elevation-2);border-radius:var(--radius);overflow:auto;max-inline-size:min(90vi,var(--_max-inline-size, 50rem));min-inline-size:min(90vi,var(--_min-inline-size, 10rem));transition:transform .25s,opacity .25s;transform:translateZ(0)}._popover_1lrhq_1 [data-card=true]{--_card-padding-inline: .5em;--_card-padding-block: .5em;--_card-elevation: none}._popover_1lrhq_1[data-placement=bottom]{--_origin: translateY(-.25rem)}._popover_1lrhq_1[data-placement=top]{--_origin: translateY(.25rem)}._popover_1lrhq_1[data-placement=right]{--_origin: translateX(-.25rem)}._popover_1lrhq_1[data-placement=left]{--_origin: translateX(.25rem)}._popover_1lrhq_1[data-entering],._popover_1lrhq_1[data-exiting]{transform:var(--_origin);opacity:0}
|
package/dist/assets/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_16rnl_1{display:block;margin-block-end:var(--form-input-gap)}._selected-value_16rnl_6{font-size:var(--form-input-text);font-weight:var(--font-weight-bold)}._selected-value_16rnl_6 ._option-description_16rnl_10{display:none}._selected-value_16rnl_6[data-placeholder]{font-style:italic}._popover_16rnl_19{--_max-inline-size: var(--trigger-width);--_min-inline-size: 15rem;inline-size:var(--trigger-width)}._trigger_16rnl_26{display:flex;align-items:center;gap:.75rem;justify-content:space-between}._options-list_16rnl_33{display:grid;gap:var(--form-gap);border-radius:inherit}._options-item-group_16rnl_39{display:flex;gap:.5rem;align-items:center;justify-content:space-between;cursor:pointer;border-radius:inherit;padding-inline:.75rem;padding-block:.5rem;color:var(--_item-color);background-color:var(--_item-background);transition:background-color .25s,color .25s}._options-item-group_16rnl_39[data-hovered],._options-item-group_16rnl_39[data-focus-visible]{--_item-background: hsl(from var(--_card-background) h s calc(l + 10) );--_item-color: hsl(from var(--_card-color) h s calc(l + 10) )}._options-item-group_16rnl_39[data-selected]{--_item-background: hsl(from var(--_card-background) h s calc(l - 10) );--_item-color: hsl(from var(--_card-color) h s calc(l - 10) )}._options-item_16rnl_39{font-size:var(--form-input-text);display:grid;gap:.25rem}._options-item_16rnl_39 ._option-description_16rnl_10{font-size:.875em;font-style:italic}
|
package/dist/chunks/Popover
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { Popover as p } from "react-aria-components";
|
|
3
3
|
import e from "clsx";
|
|
4
|
-
import '../assets/Popover.css';const s = "
|
|
4
|
+
import '../assets/Popover.css';const s = "_popover_1lrhq_1", t = {
|
|
5
5
|
popover: s
|
|
6
6
|
}, c = (o) => /* @__PURE__ */ r(
|
|
7
7
|
p,
|
|
8
8
|
{
|
|
9
9
|
...o,
|
|
10
|
-
className: e(
|
|
10
|
+
className: e(t.popover, o.className)
|
|
11
11
|
}
|
|
12
12
|
);
|
|
13
13
|
export {
|
package/dist/chunks/Select
CHANGED
|
@@ -1,113 +1,115 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
2
2
|
import { F as d } from "./FilledButton";
|
|
3
|
-
import { Select as
|
|
4
|
-
import { P as
|
|
5
|
-
import { ChevronsUpDown as
|
|
6
|
-
import { O as
|
|
7
|
-
import { T as
|
|
8
|
-
import { T as
|
|
9
|
-
import { L as
|
|
10
|
-
import { B as
|
|
11
|
-
import { clsx as
|
|
12
|
-
import '../assets/Select.css';const
|
|
13
|
-
|
|
14
|
-
"selected-value": "_selected-
|
|
15
|
-
"option-description": "_option-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"options-
|
|
19
|
-
"options-item": "_options-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
import { Select as C, SelectValue as p, ListBox as F, Text as _, ListBoxItem as S } from "react-aria-components";
|
|
4
|
+
import { P as T } from "./Popover";
|
|
5
|
+
import { ChevronsUpDown as V, Check as L } from "lucide-react";
|
|
6
|
+
import { O as D } from "./OutlinedButton";
|
|
7
|
+
import { T as j } from "./TextButton";
|
|
8
|
+
import { T as w } from "./Tooltip";
|
|
9
|
+
import { L as I, F as O } from "./FieldError";
|
|
10
|
+
import { B as P } from "./BaseCard";
|
|
11
|
+
import { clsx as t } from "clsx";
|
|
12
|
+
import '../assets/Select.css';const E = "_label_16rnl_1", U = "_popover_16rnl_19", $ = "_trigger_16rnl_26", i = {
|
|
13
|
+
label: E,
|
|
14
|
+
"selected-value": "_selected-value_16rnl_6",
|
|
15
|
+
"option-description": "_option-description_16rnl_10",
|
|
16
|
+
popover: U,
|
|
17
|
+
trigger: $,
|
|
18
|
+
"options-list": "_options-list_16rnl_33",
|
|
19
|
+
"options-item-group": "_options-item-group_16rnl_39",
|
|
20
|
+
"options-item": "_options-item_16rnl_39"
|
|
21
|
+
}, X = ({
|
|
22
|
+
options: u,
|
|
22
23
|
cardBackground: h = "gradient",
|
|
23
24
|
triggerTheme: a = "inverse-surface",
|
|
24
|
-
label:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
label: n,
|
|
26
|
+
ariaLabel: f,
|
|
27
|
+
name: g,
|
|
28
|
+
disabled: b,
|
|
29
|
+
isRequired: v,
|
|
28
30
|
triggerVariant: x = "filled",
|
|
29
|
-
description:
|
|
30
|
-
placeholder:
|
|
31
|
-
selectedKey:
|
|
32
|
-
onSelectionChange:
|
|
31
|
+
description: N,
|
|
32
|
+
placeholder: c,
|
|
33
|
+
selectedKey: k,
|
|
34
|
+
onSelectionChange: B
|
|
33
35
|
}) => {
|
|
34
|
-
let
|
|
36
|
+
let s;
|
|
35
37
|
switch (x) {
|
|
36
38
|
case "filled":
|
|
37
|
-
|
|
39
|
+
s = d;
|
|
38
40
|
break;
|
|
39
41
|
case "outlined":
|
|
40
|
-
|
|
42
|
+
s = D;
|
|
41
43
|
break;
|
|
42
44
|
case "text":
|
|
43
|
-
|
|
45
|
+
s = j;
|
|
44
46
|
break;
|
|
45
47
|
default:
|
|
46
|
-
|
|
48
|
+
s = d;
|
|
47
49
|
}
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
|
|
50
|
+
return /* @__PURE__ */ l(
|
|
51
|
+
C,
|
|
50
52
|
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
isDisabled: b,
|
|
54
|
+
isRequired: v,
|
|
55
|
+
name: g,
|
|
56
|
+
value: k,
|
|
57
|
+
onChange: B,
|
|
58
|
+
"aria-label": f,
|
|
57
59
|
children: [
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
|
|
60
|
+
n && /* @__PURE__ */ e(I, { className: t(i.label), children: n }),
|
|
61
|
+
/* @__PURE__ */ e(w, { description: N, theme: a, children: /* @__PURE__ */ e(s, { theme: a, children: /* @__PURE__ */ l("span", { className: t(i.trigger), children: [
|
|
62
|
+
c ? /* @__PURE__ */ e(
|
|
61
63
|
p,
|
|
62
64
|
{
|
|
63
|
-
className: i
|
|
64
|
-
children: ({ defaultChildren:
|
|
65
|
+
className: t(i["selected-value"]),
|
|
66
|
+
children: ({ defaultChildren: r, isPlaceholder: o }) => o ? c : r
|
|
65
67
|
}
|
|
66
68
|
) : /* @__PURE__ */ e(p, {}),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e(V, {})
|
|
68
70
|
] }) }) }),
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
|
|
71
|
+
/* @__PURE__ */ e(O, {}),
|
|
72
|
+
/* @__PURE__ */ e(T, { className: t(i.popover), children: /* @__PURE__ */ e(P, { background: h, children: /* @__PURE__ */ e(
|
|
73
|
+
F,
|
|
72
74
|
{
|
|
73
|
-
className: i
|
|
74
|
-
items:
|
|
75
|
-
children: (
|
|
76
|
-
const
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
className: t(i["options-list"]),
|
|
76
|
+
items: u,
|
|
77
|
+
children: (r) => {
|
|
78
|
+
const o = /* @__PURE__ */ l(m, { children: [
|
|
79
|
+
/* @__PURE__ */ e(_, { children: r.displayValue }),
|
|
80
|
+
r.description && /* @__PURE__ */ e(
|
|
81
|
+
_,
|
|
80
82
|
{
|
|
81
|
-
className:
|
|
82
|
-
|
|
83
|
+
className: t(
|
|
84
|
+
i["option-description"]
|
|
83
85
|
),
|
|
84
|
-
children:
|
|
86
|
+
children: r.description
|
|
85
87
|
}
|
|
86
88
|
)
|
|
87
89
|
] });
|
|
88
90
|
return /* @__PURE__ */ e(
|
|
89
|
-
|
|
91
|
+
S,
|
|
90
92
|
{
|
|
91
|
-
className:
|
|
92
|
-
|
|
93
|
+
className: t(
|
|
94
|
+
i["options-item-group"]
|
|
93
95
|
),
|
|
94
|
-
id:
|
|
95
|
-
textValue:
|
|
96
|
-
isDisabled:
|
|
97
|
-
children: ({ isSelected:
|
|
96
|
+
id: r.key,
|
|
97
|
+
textValue: r.displayValue,
|
|
98
|
+
isDisabled: r.disabled,
|
|
99
|
+
children: ({ isSelected: y }) => /* @__PURE__ */ l(m, { children: [
|
|
98
100
|
/* @__PURE__ */ e(
|
|
99
101
|
"div",
|
|
100
102
|
{
|
|
101
|
-
className:
|
|
102
|
-
|
|
103
|
+
className: t(
|
|
104
|
+
i["options-item"]
|
|
103
105
|
),
|
|
104
|
-
children:
|
|
106
|
+
children: o
|
|
105
107
|
}
|
|
106
108
|
),
|
|
107
|
-
|
|
109
|
+
y && /* @__PURE__ */ e(L, {})
|
|
108
110
|
] })
|
|
109
111
|
},
|
|
110
|
-
|
|
112
|
+
r.key
|
|
111
113
|
);
|
|
112
114
|
}
|
|
113
115
|
}
|
|
@@ -117,5 +119,5 @@ import '../assets/Select.css';const P = "_select_kw554_1", E = "_trigger_kw554_1
|
|
|
117
119
|
);
|
|
118
120
|
};
|
|
119
121
|
export {
|
|
120
|
-
|
|
122
|
+
X as S
|
|
121
123
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SelectProps } from './types';
|
|
2
|
-
export declare const Select: ({ options, cardBackground, triggerTheme, label, name, disabled, isRequired, triggerVariant, description, placeholder, selectedKey, onSelectionChange, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Select: ({ options, cardBackground, triggerTheme, label, ariaLabel, name, disabled, isRequired, triggerVariant, description, placeholder, selectedKey, onSelectionChange, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,12 +8,18 @@ export type SelectOptions = {
|
|
|
8
8
|
description?: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type AccessibleName = {
|
|
12
|
+
label: string;
|
|
13
|
+
ariaLabel?: never;
|
|
14
|
+
} | {
|
|
15
|
+
label?: never;
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
};
|
|
18
|
+
export type SelectProps = AccessibleName & {
|
|
12
19
|
options: SelectOptions[];
|
|
13
20
|
cardBackground?: CardBackground;
|
|
14
21
|
triggerTheme?: ColorTheme;
|
|
15
22
|
isRequired?: boolean;
|
|
16
|
-
label?: string;
|
|
17
23
|
name?: string;
|
|
18
24
|
disabled?: boolean;
|
|
19
25
|
placeholder?: string;
|
|
@@ -21,4 +27,5 @@ export interface SelectProps {
|
|
|
21
27
|
triggerVariant?: ButtonVariant;
|
|
22
28
|
selectedKey?: Key;
|
|
23
29
|
onSelectionChange?: (key: Key | null) => void;
|
|
24
|
-
}
|
|
30
|
+
};
|
|
31
|
+
export {};
|