@phillips/seldon 1.70.0 → 1.72.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.
@@ -0,0 +1,18 @@
1
+ import { ComponentProps } from 'react';
2
+ export interface DetailProps extends ComponentProps<'div'> {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ /**
7
+ * ## Overview
8
+ *
9
+ * A simple component for displaying value with a label. Layout style is handled by the [DetailList](/docs/patterns-detaillist--overview)
10
+ *
11
+ * [Figma Link](https://www.figma.com/design/hxqgsE26wM7hII0WaUaDfF/RW---TIMED-Lot-Details-(PDP)?node-id=189-5590&node-type=instance&m=dev)
12
+ *
13
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-detail--overview)
14
+ *
15
+ */
16
+ declare const Detail: import("react").ForwardRefExoticComponent<Omit<DetailProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
+ export type DetailComponent = ReturnType<typeof Detail>;
18
+ export default Detail;
@@ -0,0 +1,14 @@
1
+ import { jsxs as r, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as t } from "react";
3
+ import { getCommonProps as i } from "../../utils/index.js";
4
+ const c = t(({ className: s, ...a }, m) => {
5
+ const { className: e, ...o } = i(a, "Detail");
6
+ return /* @__PURE__ */ r("div", { ...o, className: `${e} ${s}`, ...a, ref: m, children: [
7
+ /* @__PURE__ */ l("dt", { className: `${e}__label`, children: a.label }),
8
+ /* @__PURE__ */ l("dd", { className: `${e}__value`, children: a.value })
9
+ ] });
10
+ });
11
+ c.displayName = "Detail";
12
+ export {
13
+ c as default
14
+ };
@@ -0,0 +1 @@
1
+ export { default as Detail, type DetailProps, type DetailComponent } from './Detail';
@@ -42,7 +42,7 @@ const ne = ({
42
42
  }
43
43
  e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.click();
44
44
  }
45
- e.key === "Escape" && (o.setIsSearchExpanded(!1), (n = p.current) == null || n.reset());
45
+ e.key === "Escape" && ((n = p.current) == null || n.reset(), o.setIsSearchExpanded(!1));
46
46
  };
47
47
  V(() => {
48
48
  var e;
@@ -53,7 +53,7 @@ const ne = ({
53
53
  }, [t]);
54
54
  const g = (e) => {
55
55
  var n;
56
- o.setIsSearchExpanded(e), (n = p.current) == null || n.reset();
56
+ (n = p.current) == null || n.reset(), o.setIsSearchExpanded(e);
57
57
  };
58
58
  return /* @__PURE__ */ a("div", { className: `${r}__container`, children: /* @__PURE__ */ u(
59
59
  "div",
package/dist/index.d.ts CHANGED
@@ -46,4 +46,6 @@ export * from './components/Collapsible';
46
46
  export * from './providers/SeldonProvider';
47
47
  export { default as PageContentWrapper } from './components/PageContentWrapper/PageContentWrapper';
48
48
  export * from './components/Carousel';
49
+ export * from './components/Detail';
50
+ export * from './patterns/DetailList';
49
51
  export * from './components/PinchZoom';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { PaddingTokens as f, SpacingTokens as p, defaultYear as l, emailValidation as m, encodeURLSearchParams as s, findChildrenExcludingTypes as d, findChildrenOfType as u, generatePaddingClassName as i, getCommonProps as n, noOp as x, px as g, useNormalizedInputProps as c } from "./utils/index.js";
1
+ import { PaddingTokens as f, SpacingTokens as l, defaultYear as p, emailValidation as s, encodeURLSearchParams as m, findChildrenExcludingTypes as d, findChildrenOfType as u, generatePaddingClassName as i, getCommonProps as x, noOp as n, px as g, useNormalizedInputProps as c } from "./utils/index.js";
2
2
  import { default as C } from "./pages/Page.js";
3
- import { default as L } from "./components/Button/Button.js";
3
+ import { default as P } from "./components/Button/Button.js";
4
4
  import { ButtonVariants as T } from "./components/Button/types.js";
5
5
  import { default as b } from "./components/IconButton/IconButton.js";
6
6
  import { default as B } from "./components/ErrorBoundary/ErrorBoundary.js";
@@ -20,14 +20,14 @@ import { default as _ } from "./components/LinkList/LinkList.js";
20
20
  import { default as ee } from "./components/Row/Row.js";
21
21
  import { default as re } from "./components/GridItem/GridItem.js";
22
22
  import { GridItemAlign as ae } from "./components/GridItem/types.js";
23
- import { default as pe } from "./components/Search/Search.js";
24
- import { default as me } from "./components/Select/Select.js";
23
+ import { default as le } from "./components/Search/Search.js";
24
+ import { default as se } from "./components/Select/Select.js";
25
25
  import { default as de } from "./components/SplitPanel/SplitPanel.js";
26
26
  import { default as ie } from "./patterns/Subscribe/Subscribe.js";
27
- import { SubscriptionState as xe } from "./patterns/Subscribe/types.js";
27
+ import { SubscriptionState as ne } from "./patterns/Subscribe/types.js";
28
28
  import { default as ce } from "./patterns/Social/Social.js";
29
29
  import { default as Ce } from "./patterns/ViewingsList/ViewingsList.js";
30
- import { default as Le } from "./components/Modal/Modal.js";
30
+ import { default as Pe } from "./components/Modal/Modal.js";
31
31
  import { default as Te } from "./components/Drawer/Drawer.js";
32
32
  import { default as be } from "./components/Pagination/Pagination.js";
33
33
  import { default as Be } from "./patterns/ViewingsList/StatefulViewingsList.js";
@@ -50,15 +50,17 @@ import { default as $e } from "./components/Video/Video.js";
50
50
  import { default as oo } from "./patterns/LanguageSelector/LanguageSelector.js";
51
51
  import { default as to } from "./components/ContentPeek/ContentPeek.js";
52
52
  import { default as fo } from "./components/Collapsible/Collapsible.js";
53
- import { default as lo } from "./components/Collapsible/CollapsibleContent.js";
54
- import { default as so } from "./components/Collapsible/CollapsibleTrigger.js";
53
+ import { default as po } from "./components/Collapsible/CollapsibleContent.js";
54
+ import { default as mo } from "./components/Collapsible/CollapsibleTrigger.js";
55
55
  import { SeldonProvider as io } from "./providers/SeldonProvider.js";
56
- import { default as xo } from "./components/PageContentWrapper/PageContentWrapper.js";
56
+ import { default as no } from "./components/PageContentWrapper/PageContentWrapper.js";
57
57
  import { default as co } from "./components/Carousel/Carousel.js";
58
58
  import { default as Co } from "./components/Carousel/CarouselContent.js";
59
- import { default as Lo } from "./components/Carousel/CarouselItem.js";
59
+ import { default as Po } from "./components/Carousel/CarouselItem.js";
60
60
  import { default as To } from "./components/Carousel/CarouselDots.js";
61
- import { default as bo } from "./components/PinchZoom/PinchZoom.js";
61
+ import { default as bo } from "./components/Detail/Detail.js";
62
+ import { default as Bo } from "./patterns/DetailList/DetailList.js";
63
+ import { default as Ao } from "./components/PinchZoom/PinchZoom.js";
62
64
  export {
63
65
  He as Accordion,
64
66
  Oe as AccordionItem,
@@ -66,16 +68,18 @@ export {
66
68
  ze as AccordionVariants,
67
69
  Ze as AuthState,
68
70
  Ke as Breadcrumb,
69
- L as Button,
71
+ P as Button,
70
72
  T as ButtonVariants,
71
73
  co as Carousel,
72
74
  Co as CarouselContent,
73
75
  To as CarouselDots,
74
- Lo as CarouselItem,
76
+ Po as CarouselItem,
75
77
  fo as Collapsible,
76
- lo as CollapsibleContent,
77
- so as CollapsibleTrigger,
78
+ po as CollapsibleContent,
79
+ mo as CollapsibleTrigger,
78
80
  to as ContentPeek,
81
+ bo as Detail,
82
+ Bo as DetailList,
79
83
  Te as Drawer,
80
84
  Xe as Dropdown,
81
85
  B as ErrorBoundary,
@@ -92,26 +96,26 @@ export {
92
96
  Q as LinkBlock,
93
97
  _ as LinkList,
94
98
  J as LinkVariants,
95
- Le as Modal,
99
+ Pe as Modal,
96
100
  G as Navigation,
97
101
  H as NavigationItem,
98
102
  O as NavigationItemTrigger,
99
103
  U as NavigationList,
100
104
  f as PaddingTokens,
101
105
  C as Page,
102
- xo as PageContentWrapper,
106
+ no as PageContentWrapper,
103
107
  be as Pagination,
104
- bo as PinchZoom,
108
+ Ao as PinchZoom,
105
109
  ee as Row,
106
- pe as Search,
110
+ le as Search,
107
111
  io as SeldonProvider,
108
- me as Select,
112
+ se as Select,
109
113
  ce as Social,
110
- p as SpacingTokens,
114
+ l as SpacingTokens,
111
115
  de as SplitPanel,
112
116
  Be as StatefulViewingsList,
113
117
  ie as Subscribe,
114
- xe as SubscriptionState,
118
+ ne as SubscriptionState,
115
119
  qe as SupportedLanguages,
116
120
  ve as Text,
117
121
  ye as TextSymbolVariants,
@@ -120,14 +124,14 @@ export {
120
124
  We as UserManagement,
121
125
  $e as Video,
122
126
  Ce as ViewingsList,
123
- l as defaultYear,
124
- m as emailValidation,
125
- s as encodeURLSearchParams,
127
+ p as defaultYear,
128
+ s as emailValidation,
129
+ m as encodeURLSearchParams,
126
130
  d as findChildrenExcludingTypes,
127
131
  u as findChildrenOfType,
128
132
  i as generatePaddingClassName,
129
- n as getCommonProps,
130
- x as noOp,
133
+ x as getCommonProps,
134
+ n as noOp,
131
135
  g as px,
132
136
  c as useNormalizedInputProps
133
137
  };
@@ -0,0 +1,29 @@
1
+ import { ComponentProps } from 'react';
2
+ import { DetailComponent } from '../../components/Detail';
3
+ import { DetailListAlignment } from './types';
4
+ export interface DetailListProps extends ComponentProps<'dl'> {
5
+ /**
6
+ * Determines whether each Details' label and value are aligned in columns or justified
7
+ */
8
+ alignment: DetailListAlignment;
9
+ /**
10
+ * The Detail components to render
11
+ */
12
+ children: DetailComponent[];
13
+ /**
14
+ * Whether to render separators between each Detail component
15
+ */
16
+ hasSeparators: boolean;
17
+ }
18
+ /**
19
+ * ## Overview
20
+ *
21
+ * A container for displaying a list of [Detail](/docs/components-detail--overview) components. The alignment prop determines whether each Detail's label and value are aligned in columns or justified. Separators can also be added between each Detail component.
22
+ *
23
+ * [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=11364-24078&m=dev)
24
+ *
25
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/patterns-detaillist--overview)
26
+ *
27
+ */
28
+ declare const DetailList: import("react").ForwardRefExoticComponent<Omit<DetailListProps, "ref"> & import("react").RefAttributes<HTMLDListElement>>;
29
+ export default DetailList;
@@ -0,0 +1,39 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as N } from "react";
3
+ import f from "../../node_modules/classnames/index.js";
4
+ import { getCommonProps as $, px as s } from "../../utils/index.js";
5
+ import { DetailListAlignment as m } from "./types.js";
6
+ import { getDetailKey as j } from "./utils.js";
7
+ const D = N(
8
+ ({ alignment: o, className: p, children: t, hasSeparators: l, ...a }, u) => {
9
+ const { className: e, ...c } = $(a, "DetailList");
10
+ return /* @__PURE__ */ r(
11
+ "dl",
12
+ {
13
+ ...c,
14
+ className: f(e, p, {
15
+ [`${s}-columns`]: o === m.columns,
16
+ [`${s}-justified`]: o === m.justified
17
+ }),
18
+ ...a,
19
+ ref: u,
20
+ children: t == null ? void 0 : t.map((i, d) => /* @__PURE__ */ r(
21
+ "div",
22
+ {
23
+ className: f(`${e}-wrapper`, {
24
+ [`${s}-has-separators`]: l,
25
+ [`${s}-columns`]: o === m.columns,
26
+ [`${s}-justified`]: o === m.justified
27
+ }),
28
+ children: i
29
+ },
30
+ j(i, d)
31
+ ))
32
+ }
33
+ );
34
+ }
35
+ );
36
+ D.displayName = "DetailList";
37
+ export {
38
+ D as default
39
+ };
@@ -0,0 +1 @@
1
+ export { default as DetailList, type DetailListProps } from './DetailList';
@@ -0,0 +1,4 @@
1
+ export declare enum DetailListAlignment {
2
+ columns = "columns",
3
+ justified = "justified"
4
+ }
@@ -0,0 +1,4 @@
1
+ var r = /* @__PURE__ */ ((u) => (u.columns = "columns", u.justified = "justified", u))(r || {});
2
+ export {
3
+ r as DetailListAlignment
4
+ };
@@ -0,0 +1,2 @@
1
+ import { DetailComponent } from '../../components/Detail';
2
+ export declare const getDetailKey: (child: DetailComponent, index: number) => string;
@@ -0,0 +1,11 @@
1
+ import { isValidElement as a } from "react";
2
+ const o = (e, t) => {
3
+ if (a(e)) {
4
+ const { label: r, value: l } = e.props;
5
+ return `detail-${r}-${l}`;
6
+ }
7
+ return `detail-${t}`;
8
+ };
9
+ export {
10
+ o as getDetailKey
11
+ };
@@ -48,4 +48,6 @@
48
48
  // Site Furniture
49
49
  @use 'site-furniture/Header/header';
50
50
  @use 'site-furniture/Footer/footer';
51
+ @use 'components/Detail/detail';
52
+ @use 'patterns/DetailList/detailList';
51
53
  @use 'components/PinchZoom/pinchZoom';
@@ -0,0 +1,34 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-detail {
4
+ align-items: center;
5
+ align-items: flex-start;
6
+ align-self: stretch;
7
+ color: $pure-black;
8
+ display: flex;
9
+ gap: $spacing-md;
10
+
11
+ @include text($string2);
12
+
13
+ &__label {
14
+ flex-shrink: 0;
15
+ font-variation-settings: 'wght' 600;
16
+ width: 160px;
17
+
18
+ @media (max-width: $breakpoint-lg) {
19
+ width: 128px;
20
+ }
21
+
22
+ @media (max-width: $breakpoint-md) {
23
+ width: 128px;
24
+ }
25
+
26
+ @media (max-width: $breakpoint-sm) {
27
+ width: 96px;
28
+ }
29
+ }
30
+
31
+ &__value {
32
+ font-variation-settings: 'wght' 400;
33
+ }
34
+ }
@@ -0,0 +1,37 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-detail-list {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: $spacing-sm;
7
+
8
+ &-wrapper {
9
+ .#{$px}-detail {
10
+ padding: 0;
11
+ }
12
+ }
13
+
14
+ .#{$px}-columns {
15
+ .#{px}-detail {
16
+ justify-content: start;
17
+ }
18
+ }
19
+
20
+ .#{$px}-justified {
21
+ .#{$px}-detail {
22
+ justify-content: space-between;
23
+ }
24
+ }
25
+
26
+ .#{$px}-has-separators {
27
+ border-top: 1px solid $light-gray;
28
+
29
+ &:last-child {
30
+ border-bottom: 1px solid $light-gray;
31
+ }
32
+
33
+ .#{$px}-detail {
34
+ padding: $spacing-sm 0;
35
+ }
36
+ }
37
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.70.0",
3
+ "version": "1.72.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"