@phillips/seldon 1.43.0 → 1.44.0
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/chevronDown.svg.js +5 -0
- package/dist/components/Dropdown/Dropdown.d.ts +32 -0
- package/dist/components/Dropdown/Dropdown.js +49 -0
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/Dropdown/types.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -31
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +521 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +373 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +203 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +128 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +129 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +220 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +824 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +8 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -0
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Dropdown/_dropdown.scss +86 -0
- package/package.json +2 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.1313 18.2525L24.4194 9.96438C24.7123 9.67148 25.4883 9.61908 25.9346 10.0654C26.3809 10.5117 26.3285 11.2877 26.0356 11.5806L16.8432 20.773C16.6948 20.9215 16.4222 21.0081 16.1313 20.9994C15.8404 21.0081 15.5678 20.9215 15.4194 20.773L6.227 11.5806C5.9341 11.2877 5.8817 10.5117 6.32801 10.0654C6.77432 9.61908 7.55035 9.67148 7.84324 9.96438L16.1313 18.2525Z", fill: "#323232" }));
|
|
3
|
+
export {
|
|
4
|
+
l as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
import * as DropdownSelect from '@radix-ui/react-select';
|
|
3
|
+
import { DropdownItem } from './types';
|
|
4
|
+
export interface DropdownProps extends Omit<DropdownSelect.SelectProps, 'defaultValue' | 'dir'>, Omit<ComponentProps<'div'>, 'ref'> {
|
|
5
|
+
/**
|
|
6
|
+
* All options to be listed in the dropdown
|
|
7
|
+
*/
|
|
8
|
+
options: DropdownItem[];
|
|
9
|
+
/**
|
|
10
|
+
* Current selected value
|
|
11
|
+
*/
|
|
12
|
+
value: DropdownSelect.SelectProps['defaultValue'];
|
|
13
|
+
/**
|
|
14
|
+
* Pass a call back that triggers once a new value is selected
|
|
15
|
+
*/
|
|
16
|
+
onValueChange: (value: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Aria-label for specific dropdown use, e.g. Select your language
|
|
19
|
+
*/
|
|
20
|
+
label: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* ## Overview
|
|
24
|
+
*
|
|
25
|
+
* Overview of this component
|
|
26
|
+
*
|
|
27
|
+
* [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10570-6295&t=EnYSS6Hk58EiWaVg-4)
|
|
28
|
+
*
|
|
29
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-dropdown--overview)
|
|
30
|
+
*/
|
|
31
|
+
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
export default Dropdown;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import d, { useState as g } from "react";
|
|
3
|
+
import { getCommonProps as C } from "../../utils/index.js";
|
|
4
|
+
import i from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { Root as D, Trigger as $, Value as b, Icon as v, Portal as I, Content as S, ScrollUpButton as x, Viewport as R, ScrollDownButton as O, Item as P, ItemText as V } from "../../node_modules/@radix-ui/react-select/dist/index.js";
|
|
6
|
+
import c from "../../assets/chevronDown.svg.js";
|
|
7
|
+
const j = d.forwardRef(
|
|
8
|
+
({ options: l, value: a, onValueChange: s, label: t, className: _, id: m, ...h }, f) => {
|
|
9
|
+
const { className: o, ...u } = C({ id: m }, "Dropdown"), [N, w] = g(!1);
|
|
10
|
+
return /* @__PURE__ */ e("div", { className: i(o, _), id: m, ...u, ...h, children: /* @__PURE__ */ n(
|
|
11
|
+
D,
|
|
12
|
+
{
|
|
13
|
+
value: a,
|
|
14
|
+
onValueChange: (r) => {
|
|
15
|
+
s(r);
|
|
16
|
+
},
|
|
17
|
+
onOpenChange: w,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ n($, { className: `${o}__trigger`, "aria-label": t, ref: f, children: [
|
|
20
|
+
/* @__PURE__ */ e(b, { placeholder: a }),
|
|
21
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(c, { className: i({ [`${o}__trigger-icon-expanded`]: N }) }) })
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ n(S, { className: `${o}__content`, position: "popper", children: [
|
|
24
|
+
/* @__PURE__ */ e(x, { className: `${o}__scroll-button__up`, children: /* @__PURE__ */ e(c, {}) }),
|
|
25
|
+
/* @__PURE__ */ e(R, { className: `${o}__viewport`, children: l.map((r) => /* @__PURE__ */ e(
|
|
26
|
+
p,
|
|
27
|
+
{
|
|
28
|
+
value: r.value,
|
|
29
|
+
disabled: r.value === a,
|
|
30
|
+
className: o,
|
|
31
|
+
children: r.label
|
|
32
|
+
},
|
|
33
|
+
r.value
|
|
34
|
+
)) }),
|
|
35
|
+
/* @__PURE__ */ e(O, { className: `${o}__scroll-button`, children: /* @__PURE__ */ e(c, {}) })
|
|
36
|
+
] }) })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
) });
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
j.displayName = "Dropdown";
|
|
43
|
+
const p = d.forwardRef(
|
|
44
|
+
({ children: l, className: a, ...s }, t) => /* @__PURE__ */ e(P, { className: `${a}__item`, ...s, ref: t, children: /* @__PURE__ */ e(V, { children: l }) })
|
|
45
|
+
);
|
|
46
|
+
p.displayName = "DropdownSelectItem";
|
|
47
|
+
export {
|
|
48
|
+
j as default
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Dropdown, type DropdownProps } from './Dropdown';
|
package/dist/index.d.ts
CHANGED
|
@@ -36,4 +36,5 @@ export { default as UserManagement, type UserManagementProps } from './component
|
|
|
36
36
|
export { AuthState } from './components/UserManagement/types';
|
|
37
37
|
export * from './types/commonTypes';
|
|
38
38
|
export { Breadcrumb, type BreadcrumbProps } from './components/Breadcrumb';
|
|
39
|
+
export * from './components/Dropdown';
|
|
39
40
|
export { default as Video, type VideoProps } from './components/Video/Video';
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { PaddingTokens as a, defaultYear as f, emailValidation as m, encodeURLSearchParams as p, findChildrenOfType as d, generatePaddingClassName as s, getCommonProps as u, noOp as
|
|
1
|
+
import { PaddingTokens as a, defaultYear as f, emailValidation as m, encodeURLSearchParams as p, findChildrenOfType as d, generatePaddingClassName as s, getCommonProps as u, noOp as l, px as i, useNormalizedInputProps as x } from "./utils/index.js";
|
|
2
2
|
import { default as g } from "./pages/Page.js";
|
|
3
3
|
import { default as S } from "./components/Button/Button.js";
|
|
4
4
|
import { ButtonVariants as I } from "./components/Button/types.js";
|
|
5
5
|
import { default as P } from "./components/IconButton/IconButton.js";
|
|
6
6
|
import { default as k } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
7
|
-
import { default as
|
|
8
|
-
import { Grid as
|
|
9
|
-
import { default as
|
|
7
|
+
import { default as w } from "./components/Footer/Footer.js";
|
|
8
|
+
import { Grid as b } from "./components/Grid/Grid.js";
|
|
9
|
+
import { default as v } from "./components/Header/Header.js";
|
|
10
10
|
import { default as C } from "./components/Navigation/Navigation.js";
|
|
11
11
|
import { default as y } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
12
|
+
import { default as H } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
13
|
+
import { default as O } from "./components/Navigation/NavigationList/NavigationList.js";
|
|
14
|
+
import { default as U } from "./components/HeroBanner/HeroBanner.js";
|
|
15
15
|
import { default as E } from "./components/Input/Input.js";
|
|
16
16
|
import { default as Y } from "./components/Link/Link.js";
|
|
17
17
|
import { LinkVariants as q } from "./components/Link/types.js";
|
|
@@ -20,42 +20,44 @@ import { default as W } from "./components/LinkList/LinkList.js";
|
|
|
20
20
|
import { default as Z } from "./components/Row/Row.js";
|
|
21
21
|
import { default as $ } from "./components/GridItem/GridItem.js";
|
|
22
22
|
import { GridItemAlign as re } from "./components/GridItem/types.js";
|
|
23
|
-
import { default as
|
|
23
|
+
import { default as te } from "./components/Search/Search.js";
|
|
24
24
|
import { default as fe } from "./components/Select/Select.js";
|
|
25
25
|
import { default as pe } from "./components/SplitPanel/SplitPanel.js";
|
|
26
26
|
import { default as se } from "./components/Subscribe/Subscribe.js";
|
|
27
|
-
import { SubscriptionState as
|
|
27
|
+
import { SubscriptionState as le } from "./components/Subscribe/types.js";
|
|
28
28
|
import { default as xe } from "./components/Social/Social.js";
|
|
29
29
|
import { default as ge } from "./components/ViewingsList/ViewingsList.js";
|
|
30
30
|
import { default as Se } from "./components/Modal/Modal.js";
|
|
31
31
|
import { default as Ie } from "./components/Drawer/Drawer.js";
|
|
32
32
|
import { default as Pe } from "./components/ViewingsList/StatefulViewingsList.js";
|
|
33
33
|
import { TextVariants as ke } from "./components/Text/types.js";
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
34
|
+
import { default as we } from "./components/Text/Text.js";
|
|
35
|
+
import { default as be } from "./components/Accordion/Accordion.js";
|
|
36
|
+
import { default as ve } from "./components/Accordion/AccordionItem.js";
|
|
37
37
|
import { default as Ce } from "./components/UserManagement/UserManagement.js";
|
|
38
38
|
import { AuthState as ye } from "./components/UserManagement/types.js";
|
|
39
|
-
import { SupportedLanguages as
|
|
40
|
-
import { default as
|
|
39
|
+
import { SupportedLanguages as He } from "./types/commonTypes.js";
|
|
40
|
+
import { default as Oe } from "./components/Breadcrumb/Breadcrumb.js";
|
|
41
41
|
import "react/jsx-runtime";
|
|
42
42
|
import "./node_modules/classnames/index.js";
|
|
43
|
-
import { default as
|
|
43
|
+
import { default as Ue } from "./components/Dropdown/Dropdown.js";
|
|
44
|
+
import { default as Ee } from "./components/Video/Video.js";
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
be as Accordion,
|
|
47
|
+
ve as AccordionItem,
|
|
47
48
|
ye as AuthState,
|
|
48
|
-
|
|
49
|
+
Oe as Breadcrumb,
|
|
49
50
|
S as Button,
|
|
50
51
|
I as ButtonVariants,
|
|
51
52
|
Ie as Drawer,
|
|
53
|
+
Ue as Dropdown,
|
|
52
54
|
k as ErrorBoundary,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
w as Footer,
|
|
56
|
+
b as Grid,
|
|
55
57
|
$ as GridItem,
|
|
56
58
|
re as GridItemAlign,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
v as Header,
|
|
60
|
+
U as HeroBanner,
|
|
59
61
|
P as IconButton,
|
|
60
62
|
E as Input,
|
|
61
63
|
Y as Link,
|
|
@@ -65,23 +67,23 @@ export {
|
|
|
65
67
|
Se as Modal,
|
|
66
68
|
C as Navigation,
|
|
67
69
|
y as NavigationItem,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
H as NavigationItemTrigger,
|
|
71
|
+
O as NavigationList,
|
|
70
72
|
a as PaddingTokens,
|
|
71
73
|
g as Page,
|
|
72
74
|
Z as Row,
|
|
73
|
-
|
|
75
|
+
te as Search,
|
|
74
76
|
fe as Select,
|
|
75
77
|
xe as Social,
|
|
76
78
|
pe as SplitPanel,
|
|
77
79
|
Pe as StatefulViewingsList,
|
|
78
80
|
se as Subscribe,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
le as SubscriptionState,
|
|
82
|
+
He as SupportedLanguages,
|
|
83
|
+
we as Text,
|
|
82
84
|
ke as TextVariants,
|
|
83
85
|
Ce as UserManagement,
|
|
84
|
-
|
|
86
|
+
Ee as Video,
|
|
85
87
|
ge as ViewingsList,
|
|
86
88
|
f as defaultYear,
|
|
87
89
|
m as emailValidation,
|
|
@@ -89,7 +91,7 @@ export {
|
|
|
89
91
|
d as findChildrenOfType,
|
|
90
92
|
s as generatePaddingClassName,
|
|
91
93
|
u as getCommonProps,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
l as noOp,
|
|
95
|
+
i as px,
|
|
94
96
|
x as useNormalizedInputProps
|
|
95
97
|
};
|