@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.
@@ -1 +1 @@
1
- ._popover_14mpx_1{box-shadow:var(--elevation-2);border-radius:var(--radius);overflow:auto;max-inline-size:min(90vi,50rem);min-inline-size:min(25vi,10rem);transition:transform .25s,opacity .25s;transform:translateZ(0)}._popover_14mpx_1 [data-card=true]{--_card-padding-inline: .5em;--_card-padding-block: .5em;--_card-elevation: none}._popover_14mpx_1[data-placement=bottom]{--_origin: translateY(-.25rem)}._popover_14mpx_1[data-placement=top]{--_origin: translateY(.25rem)}._popover_14mpx_1[data-placement=right]{--_origin: translateX(-.25rem)}._popover_14mpx_1[data-placement=left]{--_origin: translateX(.25rem)}._popover_14mpx_1[data-entering],._popover_14mpx_1[data-exiting]{transform:var(--_origin);opacity:0}
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}
@@ -1 +1 @@
1
- ._select_kw554_1{display:grid;gap:var(--form-input-gap)}._selected-value_kw554_6{font-size:var(--form-input-text);font-weight:var(--font-weight-bold)}._selected-value_kw554_6 ._option-description_kw554_10{display:none}._selected-value_kw554_6[data-placeholder]{font-style:italic}._trigger_kw554_19{display:flex;align-items:center;gap:.75rem;justify-content:space-between}._options-list_kw554_26{display:grid;gap:var(--form-gap);border-radius:inherit}._options-item-group_kw554_32{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_kw554_32[data-hovered],._options-item-group_kw554_32[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_kw554_32[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_kw554_32{font-size:var(--form-input-text);display:grid;gap:.25rem}._options-item_kw554_32 ._option-description_kw554_10{font-size:.875em;font-style:italic}
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}
@@ -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 = "_popover_14mpx_1", m = {
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(m.popover, o.className)
10
+ className: e(t.popover, o.className)
11
11
  }
12
12
  );
13
13
  export {
@@ -1,113 +1,115 @@
1
- import { jsxs as o, jsx as e, Fragment as m } from "react/jsx-runtime";
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 N, SelectValue as p, ListBox as y, Text as u, ListBoxItem as C } from "react-aria-components";
4
- import { P as F } from "./Popover";
5
- import { ChevronsUpDown as S, Check as T } from "lucide-react";
6
- import { O as V } from "./OutlinedButton";
7
- import { T as L } from "./TextButton";
8
- import { T as D } from "./Tooltip";
9
- import { L as j, F as I } from "./FieldError";
10
- import { B as O } from "./BaseCard";
11
- import { clsx as i } from "clsx";
12
- import '../assets/Select.css';const P = "_select_kw554_1", E = "_trigger_kw554_19", s = {
13
- select: P,
14
- "selected-value": "_selected-value_kw554_6",
15
- "option-description": "_option-description_kw554_10",
16
- trigger: E,
17
- "options-list": "_options-list_kw554_26",
18
- "options-item-group": "_options-item-group_kw554_32",
19
- "options-item": "_options-item_kw554_32"
20
- }, R = ({
21
- options: _,
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: c,
25
- name: f,
26
- disabled: g,
27
- isRequired: k,
25
+ label: n,
26
+ ariaLabel: f,
27
+ name: g,
28
+ disabled: b,
29
+ isRequired: v,
28
30
  triggerVariant: x = "filled",
29
- description: w,
30
- placeholder: n,
31
- selectedKey: v,
32
- onSelectionChange: b
31
+ description: N,
32
+ placeholder: c,
33
+ selectedKey: k,
34
+ onSelectionChange: B
33
35
  }) => {
34
- let r;
36
+ let s;
35
37
  switch (x) {
36
38
  case "filled":
37
- r = d;
39
+ s = d;
38
40
  break;
39
41
  case "outlined":
40
- r = V;
42
+ s = D;
41
43
  break;
42
44
  case "text":
43
- r = L;
45
+ s = j;
44
46
  break;
45
47
  default:
46
- r = d;
48
+ s = d;
47
49
  }
48
- return /* @__PURE__ */ o(
49
- N,
50
+ return /* @__PURE__ */ l(
51
+ C,
50
52
  {
51
- className: i(s.select),
52
- isDisabled: g,
53
- isRequired: k,
54
- name: f,
55
- value: v,
56
- onChange: b,
53
+ isDisabled: b,
54
+ isRequired: v,
55
+ name: g,
56
+ value: k,
57
+ onChange: B,
58
+ "aria-label": f,
57
59
  children: [
58
- c && /* @__PURE__ */ e(j, { children: c }),
59
- /* @__PURE__ */ e(D, { description: w, theme: a, children: /* @__PURE__ */ e(r, { theme: a, children: /* @__PURE__ */ o("span", { className: i(s.trigger), children: [
60
- n ? /* @__PURE__ */ e(
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(s["selected-value"]),
64
- children: ({ defaultChildren: t, isPlaceholder: l }) => l ? n : t
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(S, {})
69
+ /* @__PURE__ */ e(V, {})
68
70
  ] }) }) }),
69
- /* @__PURE__ */ e(I, {}),
70
- /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(O, { background: h, children: /* @__PURE__ */ e(
71
- y,
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(s["options-list"]),
74
- items: _,
75
- children: (t) => {
76
- const l = /* @__PURE__ */ o(m, { children: [
77
- /* @__PURE__ */ e(u, { children: t.displayValue }),
78
- t.description && /* @__PURE__ */ e(
79
- u,
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: i(
82
- s["option-description"]
83
+ className: t(
84
+ i["option-description"]
83
85
  ),
84
- children: t.description
86
+ children: r.description
85
87
  }
86
88
  )
87
89
  ] });
88
90
  return /* @__PURE__ */ e(
89
- C,
91
+ S,
90
92
  {
91
- className: i(
92
- s["options-item-group"]
93
+ className: t(
94
+ i["options-item-group"]
93
95
  ),
94
- id: t.key,
95
- textValue: t.displayValue,
96
- isDisabled: t.disabled,
97
- children: ({ isSelected: B }) => /* @__PURE__ */ o(m, { children: [
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: i(
102
- s["options-item"]
103
+ className: t(
104
+ i["options-item"]
103
105
  ),
104
- children: l
106
+ children: o
105
107
  }
106
108
  ),
107
- B && /* @__PURE__ */ e(T, {})
109
+ y && /* @__PURE__ */ e(L, {})
108
110
  ] })
109
111
  },
110
- t.key
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
- R as S
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
- export interface SelectProps {
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 {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adgytec/adgytec-web-ui-components",
3
3
  "private": false,
4
- "version": "1.1.2",
4
+ "version": "1.1.3",
5
5
  "type": "module",
6
6
  "sideEffects": [
7
7
  "**/*.css"