@phillips/seldon 1.79.0 → 1.79.2
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/build/buildUtils.d.ts +1 -0
- package/dist/build/buildUtils.test.d.ts +1 -0
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +18 -0
- package/dist/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/components/Accordion/AccordionItem.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +16 -0
- package/dist/components/Breadcrumb/Breadcrumb.test.d.ts +1 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.stories.d.ts +31 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Carousel/Carousel.d.ts +3 -3
- package/dist/components/Carousel/Carousel.stories.d.ts +22 -0
- package/dist/components/Carousel/Carousel.test.d.ts +1 -0
- package/dist/components/Carousel/CarouselContent.d.ts +1 -1
- package/dist/components/Carousel/CarouselDots.d.ts +1 -1
- package/dist/components/Carousel/CarouselItem.d.ts +1 -1
- package/dist/components/Carousel/utils.d.ts +3 -3
- package/dist/components/Collapsible/Collapsible.d.ts +1 -1
- package/dist/components/Collapsible/Collapsible.stories.d.ts +28 -0
- package/dist/components/Collapsible/Collapsible.test.d.ts +1 -0
- package/dist/components/Collapsible/CollapsibleContent.d.ts +1 -1
- package/dist/components/Collapsible/CollapsibleTrigger.d.ts +1 -1
- package/dist/components/ContentPeek/ContentPeek.d.ts +1 -1
- package/dist/components/ContentPeek/ContentPeek.stories.d.ts +33 -0
- package/dist/components/ContentPeek/ContentPeek.test.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +90 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +360 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/components/Detail/Detail.d.ts +1 -1
- package/dist/components/Detail/Detail.stories.d.ts +14 -0
- package/dist/components/Detail/Detail.test.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.stories.d.ts +14 -0
- package/dist/components/Drawer/Drawer.test.d.ts +1 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.stories.d.ts +24 -0
- package/dist/components/Dropdown/Dropdown.test.d.ts +1 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.test.d.ts +1 -0
- package/dist/components/Grid/Grid.stories.d.ts +14 -0
- package/dist/components/Grid/Grid.test.d.ts +1 -0
- package/dist/components/GridItem/GridItem.d.ts +1 -1
- package/dist/components/GridItem/GridItem.stories.d.ts +30 -0
- package/dist/components/GridItem/GridItem.test.d.ts +1 -0
- package/dist/components/GridItem/gridItemUtils.d.ts +1 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +33 -0
- package/dist/components/IconButton/IconButton.test.d.ts +1 -0
- package/dist/components/Input/Input.stories.d.ts +324 -0
- package/dist/components/Input/Input.test.d.ts +1 -0
- package/dist/components/Link/Link.stories.d.ts +40 -0
- package/dist/components/Link/Link.test.d.ts +1 -0
- package/dist/components/Link/utils.test.d.ts +1 -0
- package/dist/components/LinkBlock/LinkBlock.stories.d.ts +28 -0
- package/dist/components/LinkBlock/LinkBlock.test.d.ts +1 -0
- package/dist/components/LinkList/LinkList.d.ts +2 -2
- package/dist/components/LinkList/LinkList.stories.d.ts +21 -0
- package/dist/components/LinkList/LinkList.test.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.stories.d.ts +11 -0
- package/dist/components/Modal/Modal.test.d.ts +1 -0
- package/dist/components/Navigation/Navigation.d.ts +1 -1
- package/dist/components/Navigation/Navigation.stories.d.ts +15 -0
- package/dist/components/Navigation/Navigation.test.d.ts +1 -0
- package/dist/components/Navigation/NavigationItem/NavigationItem.d.ts +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationItem.stories.d.ts +8 -0
- package/dist/components/Navigation/NavigationItem/NavigationItem.test.d.ts +1 -0
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.d.ts +1 -1
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.test.d.ts +1 -0
- package/dist/components/Navigation/NavigationList/NavigationList.test.d.ts +1 -0
- package/dist/components/PageContentWrapper/PageContentWrapper.d.ts +1 -2
- package/dist/components/PageContentWrapper/PageContentWrapper.stories.d.ts +6 -0
- package/dist/components/PageContentWrapper/PageContentWrapper.test.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.stories.d.ts +99 -0
- package/dist/components/Pagination/Pagination.test.d.ts +1 -0
- package/dist/components/Pagination/utils.d.ts +1 -1
- package/dist/components/PinchZoom/PinchZoom.stories.d.ts +13 -0
- package/dist/components/PinchZoom/PinchZoom.test.d.ts +1 -0
- package/dist/components/Row/Row.d.ts +2 -2
- package/dist/components/Row/Row.stories.d.ts +12 -0
- package/dist/components/Row/Row.test.d.ts +1 -0
- package/dist/components/Search/Search.d.ts +2 -2
- package/dist/components/Search/Search.js +110 -117
- package/dist/components/Search/Search.stories.d.ts +17 -0
- package/dist/components/Search/Search.test.d.ts +1 -0
- package/dist/components/Search/SearchButton.d.ts +1 -1
- package/dist/components/Search/SearchResults/SearchResults.d.ts +2 -1
- package/dist/components/Search/SearchResults/SearchResults.js +25 -15
- package/dist/components/Search/SearchResults/SearchResults.test.d.ts +1 -0
- package/dist/components/SeldonImage/SeldonImage.d.ts +1 -1
- package/dist/components/SeldonImage/SeldonImage.stories.d.ts +36 -0
- package/dist/components/SeldonImage/SeldonImage.test.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +92 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/SplitPanel/SplitPanel.stories.d.ts +12 -0
- package/dist/components/SplitPanel/SplitPanel.test.d.ts +1 -0
- package/dist/components/Tabs/TabTrigger.d.ts +1 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +19 -0
- package/dist/components/Tabs/Tabs.test.d.ts +1 -0
- package/dist/components/Tabs/TabsContainer.d.ts +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.stories.d.ts +36 -0
- package/dist/components/Text/Text.test.d.ts +1 -0
- package/dist/components/Text/utils.test.d.ts +1 -0
- package/dist/components/TextSymbol/TextSymbol.stories.d.ts +22 -0
- package/dist/components/TextSymbol/TextSymbol.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +97 -0
- package/dist/components/Toggle/Toggle.test.d.ts +1 -0
- package/dist/components/Video/Video.stories.d.ts +14 -0
- package/dist/components/Video/Video.test.d.ts +1 -0
- package/dist/components/Video/index.d.ts +1 -0
- package/dist/design/colors-tokens/ColorCard.d.ts +20 -0
- package/dist/pages/Page.stories.d.ts +12 -0
- package/dist/patterns/DetailList/DetailList.d.ts +1 -1
- package/dist/patterns/DetailList/DetailList.stories.d.ts +7 -0
- package/dist/patterns/DetailList/DetailList.test.d.ts +1 -0
- package/dist/patterns/DetailList/utils.test.d.ts +1 -0
- package/dist/patterns/HeroBanner/HeroBanner.stories.d.ts +10 -0
- package/dist/patterns/HeroBanner/HeroBanner.test.d.ts +1 -0
- package/dist/patterns/LanguageSelector/LanguageSelector.d.ts +1 -1
- package/dist/patterns/LanguageSelector/LanguageSelector.stories.d.ts +22 -0
- package/dist/patterns/LanguageSelector/LanguageSelector.test.d.ts +1 -0
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.d.ts +1 -1
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.stories.d.ts +33 -0
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.test.d.ts +1 -0
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.d.ts +1 -1
- package/dist/patterns/SaleHeaderBanner/SaleHeaderCountdown.d.ts +1 -1
- package/dist/patterns/Social/Social.stories.d.ts +13 -0
- package/dist/patterns/Social/Social.test.d.ts +1 -0
- package/dist/patterns/Subscribe/Subscribe.stories.d.ts +21 -0
- package/dist/patterns/Subscribe/Subscribe.test.d.ts +1 -0
- package/dist/patterns/UserManagement/UserManagement.d.ts +1 -1
- package/dist/patterns/UserManagement/UserManagement.stories.d.ts +16 -0
- package/dist/patterns/UserManagement/UserManagement.test.d.ts +1 -0
- package/dist/patterns/ViewingsList/StatefulViewingsList.d.ts +1 -1
- package/dist/patterns/ViewingsList/ViewingsList.d.ts +1 -1
- package/dist/patterns/ViewingsList/ViewingsList.stories.d.ts +116 -0
- package/dist/patterns/ViewingsList/ViewingsList.test.d.ts +1 -0
- package/dist/patterns/ViewingsList/ViewingsListCard.d.ts +1 -1
- package/dist/patterns/ViewingsList/ViewingsListCard.stories.d.ts +46 -0
- package/dist/patterns/ViewingsList/utils.d.ts +51 -0
- package/dist/providers/SeldonProvider/SeldonProvider.stories.d.ts +6 -0
- package/dist/providers/SeldonProvider/SeldonProvider.test.d.ts +1 -0
- package/dist/providers/SeldonProvider/utils.d.ts +1 -1
- package/dist/scss/components/TextSymbol/_textSymbol.scss +3 -1
- package/dist/site-furniture/Footer/Footer.stories.d.ts +7 -0
- package/dist/site-furniture/Footer/Footer.test.d.ts +1 -0
- package/dist/site-furniture/Header/Header.d.ts +1 -2
- package/dist/site-furniture/Header/Header.stories.d.ts +33 -0
- package/dist/site-furniture/Header/Header.test.d.ts +1 -0
- package/dist/utils/hooks.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/testUtils.d.ts +2 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
import { PaddingTokens } from '../../utils';
|
|
3
|
-
import GridItem,
|
|
3
|
+
import { default as GridItem, GridItemProps } from '../GridItem/GridItem';
|
|
4
4
|
export interface RowProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
5
|
/** These children can be an array of GridItem components */
|
|
6
6
|
children: React.ReactElement<GridItemProps, typeof GridItem> | React.ReactElement<GridItemProps, typeof GridItem>[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RowProps } from './Row';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, element: CustomElement, padding, className, ...props }: RowProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Playground: {
|
|
8
|
+
({ children, ...props }: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
args: {
|
|
10
|
+
children: import("react/jsx-runtime").JSX.Element[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SearchResultsProps } from './SearchResults/SearchResults';
|
|
3
3
|
export interface SearchProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as j, px as D, encodeURLSearchParams as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import i, { useEffect as V } from "react";
|
|
3
|
+
import { getCommonProps as j, px as D, encodeURLSearchParams as I } from "../../utils/index.js";
|
|
4
|
+
import _ from "../../node_modules/classnames/index.js";
|
|
5
5
|
import H from "../Input/Input.js";
|
|
6
6
|
import O from "../Link/Link.js";
|
|
7
7
|
import A from "./SearchResults/SearchResults.js";
|
|
@@ -12,37 +12,37 @@ import { HeaderContext as U } from "../../site-furniture/Header/Header.js";
|
|
|
12
12
|
import { SearchButton as q } from "./SearchButton.js";
|
|
13
13
|
import z from "../../node_modules/react-transition-group/esm/CSSTransition.js";
|
|
14
14
|
const ne = ({
|
|
15
|
-
onSearch:
|
|
16
|
-
onCancel:
|
|
17
|
-
searchResults:
|
|
18
|
-
state:
|
|
19
|
-
defaultValue:
|
|
15
|
+
onSearch: S,
|
|
16
|
+
onCancel: o,
|
|
17
|
+
searchResults: R = [],
|
|
18
|
+
state: c = "idle",
|
|
19
|
+
defaultValue: E = "",
|
|
20
20
|
className: b,
|
|
21
21
|
placeholder: w = "",
|
|
22
|
-
searchButtonText:
|
|
22
|
+
searchButtonText: l = "Search",
|
|
23
23
|
loadingText: C = "Search In Progress...",
|
|
24
|
-
invalidText:
|
|
25
|
-
getAllResultsText:
|
|
26
|
-
getAllResultsLink:
|
|
27
|
-
...
|
|
24
|
+
invalidText: L = "Invalid search",
|
|
25
|
+
getAllResultsText: P = (r) => `View all results for ${r}`,
|
|
26
|
+
getAllResultsLink: v = (r) => `/Search?Search=${r}`,
|
|
27
|
+
...x
|
|
28
28
|
}) => {
|
|
29
|
-
var
|
|
30
|
-
const { className: r, "data-testid":
|
|
31
|
-
|
|
29
|
+
var N;
|
|
30
|
+
const { className: r, "data-testid": d, ...T } = j(x, "Search"), m = i.useContext(U), h = i.useRef(null), p = i.useRef(null), $ = i.useRef(null), t = m.isSearchExpanded, s = (N = h.current) == null ? void 0 : N.value, k = S ? (e) => {
|
|
31
|
+
S(e.target.value);
|
|
32
32
|
} : void 0;
|
|
33
|
-
M(
|
|
34
|
-
|
|
33
|
+
M($, (e) => {
|
|
34
|
+
o == null || o(), u(!1), e.stopPropagation();
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const g = (e) => {
|
|
37
37
|
var n;
|
|
38
38
|
if (e.stopPropagation(), e.key === "Enter") {
|
|
39
39
|
if (e.preventDefault(), s && s.length > 2) {
|
|
40
|
-
const y =
|
|
40
|
+
const y = I(v(s));
|
|
41
41
|
window.location.href = y;
|
|
42
42
|
}
|
|
43
43
|
e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.click();
|
|
44
44
|
}
|
|
45
|
-
e.key === "Escape" && ((n = p.current) == null || n.reset(),
|
|
45
|
+
e.key === "Escape" && ((n = p.current) == null || n.reset(), m.setIsSearchExpanded(!1));
|
|
46
46
|
};
|
|
47
47
|
V(() => {
|
|
48
48
|
var e;
|
|
@@ -51,111 +51,104 @@ const ne = ({
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
}, [t]);
|
|
54
|
-
const
|
|
54
|
+
const u = (e) => {
|
|
55
55
|
var n;
|
|
56
|
-
(n = p.current) == null || n.reset(),
|
|
56
|
+
(n = p.current) == null || n.reset(), m.setIsSearchExpanded(e);
|
|
57
57
|
};
|
|
58
|
-
return /* @__PURE__ */ a("div", { className: `${r}__container`, children: /* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
return /* @__PURE__ */ a("div", { className: `${r}__container`, children: /* @__PURE__ */ f("div", { className: `${r}__container__inner`, ref: $, children: [
|
|
59
|
+
/* @__PURE__ */ a(K, { variant: F.heading4, className: `${r}__container__inner__label`, children: l }),
|
|
60
|
+
/* @__PURE__ */ a(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
...T,
|
|
64
|
+
className: _(r, b, { [`${r}--active`]: t }),
|
|
65
|
+
"data-testid": d,
|
|
66
|
+
role: "search",
|
|
67
|
+
...x,
|
|
68
|
+
children: /* @__PURE__ */ f(
|
|
69
|
+
"form",
|
|
68
70
|
{
|
|
69
|
-
|
|
70
|
-
className:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
children:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
z,
|
|
94
|
-
{
|
|
95
|
-
in: t,
|
|
96
|
-
classNames: `${D}-input`,
|
|
97
|
-
addEndListener: () => {
|
|
98
|
-
},
|
|
99
|
-
children: /* @__PURE__ */ a(
|
|
100
|
-
H,
|
|
101
|
-
{
|
|
102
|
-
"aria-hidden": !t,
|
|
103
|
-
className: `${r}__input`,
|
|
104
|
-
id: "search-input",
|
|
105
|
-
hideLabel: !0,
|
|
106
|
-
labelText: d,
|
|
107
|
-
placeholder: t ? w : "",
|
|
108
|
-
type: "text",
|
|
109
|
-
defaultValue: R,
|
|
110
|
-
invalid: l === "invalid",
|
|
111
|
-
invalidText: k,
|
|
112
|
-
onKeyDown: $,
|
|
113
|
-
onChange: T,
|
|
114
|
-
ref: h
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
/* @__PURE__ */ a(
|
|
120
|
-
q,
|
|
71
|
+
"data-testid": `${d}-form`,
|
|
72
|
+
className: _(`${r}__form`, {
|
|
73
|
+
[`${r}__form--active`]: t
|
|
74
|
+
}),
|
|
75
|
+
ref: p,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ f(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: _(`${r}__content-wrapper`, {
|
|
81
|
+
[`${r}__content-wrapper--active`]: t
|
|
82
|
+
}),
|
|
83
|
+
role: "combobox",
|
|
84
|
+
"aria-haspopup": "listbox",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ a(
|
|
87
|
+
z,
|
|
88
|
+
{
|
|
89
|
+
in: t,
|
|
90
|
+
classNames: `${D}-input`,
|
|
91
|
+
addEndListener: () => {
|
|
92
|
+
},
|
|
93
|
+
children: /* @__PURE__ */ a(
|
|
94
|
+
H,
|
|
121
95
|
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
96
|
+
"aria-hidden": !t,
|
|
97
|
+
className: `${r}__input`,
|
|
98
|
+
id: "search-input",
|
|
99
|
+
hideLabel: !0,
|
|
100
|
+
labelText: l,
|
|
101
|
+
placeholder: t ? w : "",
|
|
102
|
+
type: "text",
|
|
103
|
+
defaultValue: E,
|
|
104
|
+
invalid: c === "invalid",
|
|
105
|
+
invalidText: L,
|
|
106
|
+
onKeyDown: g,
|
|
107
|
+
onChange: k,
|
|
108
|
+
ref: h
|
|
129
109
|
}
|
|
130
110
|
)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ a(
|
|
114
|
+
q,
|
|
115
|
+
{
|
|
116
|
+
className: r,
|
|
117
|
+
searchButtonText: l,
|
|
118
|
+
state: c,
|
|
119
|
+
testId: d,
|
|
120
|
+
isSearchExpanded: t,
|
|
121
|
+
setIsSearchExpanded: u,
|
|
122
|
+
onCancel: o
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
s && s.length > 2 ? /* @__PURE__ */ a(
|
|
129
|
+
A,
|
|
130
|
+
{
|
|
131
|
+
autoCompleteResults: R,
|
|
132
|
+
isLoading: c === "loading",
|
|
133
|
+
loadingText: C,
|
|
134
|
+
onKeyDown: g,
|
|
135
|
+
userInputValue: s,
|
|
136
|
+
closeSearch: u,
|
|
137
|
+
children: /* @__PURE__ */ a("li", { className: `${r}__result`, children: /* @__PURE__ */ a(
|
|
138
|
+
O,
|
|
136
139
|
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
loadingText: C,
|
|
140
|
-
onKeyDown: $,
|
|
141
|
-
userInputValue: s,
|
|
142
|
-
children: /* @__PURE__ */ a("li", { className: `${r}__result`, children: /* @__PURE__ */ a(
|
|
143
|
-
O,
|
|
144
|
-
{
|
|
145
|
-
href: ((e) => N(S(e)))(s),
|
|
146
|
-
children: /* @__PURE__ */ a("p", { children: L(s) })
|
|
147
|
-
}
|
|
148
|
-
) }, "viewAllSearchResults")
|
|
140
|
+
href: ((e) => I(v(e)))(s),
|
|
141
|
+
children: /* @__PURE__ */ a("p", { children: P(s) })
|
|
149
142
|
}
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
143
|
+
) }, "viewAllSearchResults")
|
|
144
|
+
}
|
|
145
|
+
) : null
|
|
146
|
+
]
|
|
154
147
|
}
|
|
155
148
|
)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
) });
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] }) });
|
|
159
152
|
};
|
|
160
153
|
export {
|
|
161
154
|
ne as default
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { SearchProps } from './Search';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: SearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
story: {
|
|
9
|
+
height: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
layout: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Playground: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,4 +4,4 @@ export declare const SearchButton: ({ state, isSearchExpanded, setIsSearchExpand
|
|
|
4
4
|
testId: string;
|
|
5
5
|
isSearchExpanded: boolean;
|
|
6
6
|
setIsSearchExpanded: React.Dispatch<React.SetStateAction<boolean>>;
|
|
7
|
-
} & Pick<SearchProps, "
|
|
7
|
+
} & Pick<SearchProps, "state" | "searchButtonText" | "onCancel"> & ComponentProps<"button">) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -11,6 +11,7 @@ export interface SearchResultsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
11
11
|
loadingText?: string;
|
|
12
12
|
onKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
13
13
|
userInputValue?: string;
|
|
14
|
+
closeSearch: (value: boolean) => void;
|
|
14
15
|
}
|
|
15
|
-
declare const SearchResults: ({ autoCompleteResults, isLoading, children, loadingText, onKeyDown, userInputValue, }: React.PropsWithChildren<SearchResultsProps>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const SearchResults: ({ autoCompleteResults, isLoading, children, loadingText, onKeyDown, userInputValue, closeSearch, }: React.PropsWithChildren<SearchResultsProps>) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default SearchResults;
|
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { px as
|
|
3
|
-
import
|
|
2
|
+
import { px as e } from "../../../utils/index.js";
|
|
3
|
+
import f from "../../Link/Link.js";
|
|
4
4
|
import { LinkVariants as L } from "../../Link/types.js";
|
|
5
5
|
const w = ({
|
|
6
|
-
autoCompleteResults:
|
|
7
|
-
isLoading:
|
|
8
|
-
children:
|
|
9
|
-
loadingText:
|
|
6
|
+
autoCompleteResults: l = [],
|
|
7
|
+
isLoading: t,
|
|
8
|
+
children: i,
|
|
9
|
+
loadingText: c = "Loading...",
|
|
10
10
|
onKeyDown: o,
|
|
11
|
-
userInputValue: h = ""
|
|
11
|
+
userInputValue: h = "",
|
|
12
|
+
closeSearch: d
|
|
12
13
|
}) => {
|
|
13
|
-
const m = Array.isArray(
|
|
14
|
-
function
|
|
15
|
-
return s.split(new RegExp(`(${
|
|
16
|
-
(
|
|
14
|
+
const m = Array.isArray(l) && l.length > 0;
|
|
15
|
+
function _(s, a) {
|
|
16
|
+
return s.split(new RegExp(`(${a})`, "gi")).map(
|
|
17
|
+
(n, u) => n.toLocaleLowerCase() === a.toLocaleLowerCase() ? /* @__PURE__ */ r("strong", { children: n }, u) : n
|
|
17
18
|
);
|
|
18
19
|
}
|
|
19
|
-
return /* @__PURE__ */ r("div", { className: `${
|
|
20
|
-
|
|
21
|
-
m &&
|
|
22
|
-
|
|
20
|
+
return /* @__PURE__ */ r("div", { className: `${e}-search__results`, children: /* @__PURE__ */ p("ul", { "data-testid": "search-results", className: `${e}-search__results-container`, children: [
|
|
21
|
+
t ? /* @__PURE__ */ r("li", { className: `${e}-search__result`, children: c }) : null,
|
|
22
|
+
m && l.map((s, a) => /* @__PURE__ */ r("li", { className: `${e}-search__result`, children: /* @__PURE__ */ r(
|
|
23
|
+
f,
|
|
24
|
+
{
|
|
25
|
+
href: s.url,
|
|
26
|
+
onKeyDown: o,
|
|
27
|
+
onClick: () => d(!1),
|
|
28
|
+
variant: L.snwFlyoutLink,
|
|
29
|
+
children: /* @__PURE__ */ r("span", { "data-testid": `search-result-${a}`, className: "${px}-search__result__label", children: _(s.label, h) })
|
|
30
|
+
}
|
|
31
|
+
) }, s.id)),
|
|
32
|
+
i
|
|
23
33
|
] }) });
|
|
24
34
|
};
|
|
25
35
|
export {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -43,5 +43,5 @@ export interface SeldonImageProps extends ComponentProps<'div'> {
|
|
|
43
43
|
*
|
|
44
44
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-seldonimage--overview)
|
|
45
45
|
*/
|
|
46
|
-
declare const SeldonImage: import(
|
|
46
|
+
declare const SeldonImage: import('react').ForwardRefExoticComponent<Omit<SeldonImageProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
47
47
|
export default SeldonImage;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SeldonImageProps } from './SeldonImage';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<Omit<SeldonImageProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Playground: {
|
|
8
|
+
(props: SeldonImageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
args: {
|
|
10
|
+
src: string;
|
|
11
|
+
aspectRatio: string;
|
|
12
|
+
};
|
|
13
|
+
argTypes: {};
|
|
14
|
+
};
|
|
15
|
+
export declare const CircleImage: {
|
|
16
|
+
(props: SeldonImageProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
args: {
|
|
18
|
+
src: string;
|
|
19
|
+
aspectRatio: string;
|
|
20
|
+
objectFit: string;
|
|
21
|
+
imageStyle: {
|
|
22
|
+
borderRadius: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
argTypes: {};
|
|
26
|
+
};
|
|
27
|
+
export declare const BlurBackground: {
|
|
28
|
+
(props: SeldonImageProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
args: {
|
|
30
|
+
src: string;
|
|
31
|
+
aspectRatio: string;
|
|
32
|
+
objectFit: string;
|
|
33
|
+
hasBlurBackground: boolean;
|
|
34
|
+
};
|
|
35
|
+
argTypes: {};
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { SelectProps } from './Select';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<Omit<SelectProps, "ref"> & import('react').RefAttributes<HTMLSelectElement>>;
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
interface StoryProps extends SelectProps {
|
|
8
|
+
playgroundWidth: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Playground: {
|
|
11
|
+
({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
args: {
|
|
13
|
+
playgroundWidth: number;
|
|
14
|
+
className: string;
|
|
15
|
+
defaultValue: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
invalid: boolean;
|
|
18
|
+
invalidText: string;
|
|
19
|
+
labelText: string;
|
|
20
|
+
readOnly: boolean;
|
|
21
|
+
size: string;
|
|
22
|
+
warn: boolean;
|
|
23
|
+
warnText: string;
|
|
24
|
+
};
|
|
25
|
+
argTypes: {
|
|
26
|
+
defaultValue: {
|
|
27
|
+
control: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
disabled: {
|
|
32
|
+
control: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
invalid: {
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
invalidText: {
|
|
42
|
+
control: {
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
labelText: {
|
|
47
|
+
control: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
onChange: {
|
|
52
|
+
action: string;
|
|
53
|
+
};
|
|
54
|
+
onClick: {
|
|
55
|
+
action: string;
|
|
56
|
+
};
|
|
57
|
+
playgroundWidth: {
|
|
58
|
+
control: {
|
|
59
|
+
type: string;
|
|
60
|
+
min: number;
|
|
61
|
+
max: number;
|
|
62
|
+
step: number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
size: {
|
|
66
|
+
options: string[];
|
|
67
|
+
control: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
value: {
|
|
72
|
+
control: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readOnly: {
|
|
77
|
+
control: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
warn: {
|
|
82
|
+
control: {
|
|
83
|
+
type: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
warnText: {
|
|
87
|
+
control: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SplitPanelProps } from './SplitPanel';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, className, element: Element, hasBorder, ...props }: SplitPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Playground: {
|
|
8
|
+
(props: SplitPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
args: {
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -21,5 +21,5 @@ export interface TabTriggerProps extends ComponentProps<'div'> {
|
|
|
21
21
|
* @param {TabTriggerProps} props - The props for the TabTrigger component.
|
|
22
22
|
* @returns {JSX.Element} The rendered TabTrigger component.
|
|
23
23
|
*/
|
|
24
|
-
declare const TabTrigger: import(
|
|
24
|
+
declare const TabTrigger: import('react').ForwardRefExoticComponent<Omit<TabTriggerProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default TabTrigger;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TabsContainerProps } from './TabsContainer';
|
|
2
|
+
import { TabContentProps } from './TabsContent';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<Omit<TabsContainerProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export declare const Playground: {
|
|
9
|
+
(props: TabsContainerProps & TabContentProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
args: {
|
|
11
|
+
tabs: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
argTypes: {};
|
|
17
|
+
};
|
|
18
|
+
export declare const BrowseTabSelected: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const ComponentLabels: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -43,5 +43,5 @@ export interface TabsContainerProps extends ComponentProps<'div'> {
|
|
|
43
43
|
*
|
|
44
44
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-tabs--overview)
|
|
45
45
|
*/
|
|
46
|
-
declare const TabsContainer: import(
|
|
46
|
+
declare const TabsContainer: import('react').ForwardRefExoticComponent<Omit<TabsContainerProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
47
47
|
export default TabsContainer;
|
|
@@ -19,5 +19,5 @@ export interface TabContentProps extends ComponentProps<'div'> {
|
|
|
19
19
|
* @param {TabContentProps} props - The props for the TabContent component.
|
|
20
20
|
* @returns {JSX.Element} The rendered TabContent component.
|
|
21
21
|
*/
|
|
22
|
-
declare const TabsContent: import(
|
|
22
|
+
declare const TabsContent: import('react').ForwardRefExoticComponent<Omit<TabContentProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
23
|
export default TabsContent;
|