@phillips/seldon 1.71.0 → 1.72.1

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';
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
+ };
@@ -83,8 +83,7 @@
83
83
  }
84
84
 
85
85
  @mixin media($breakpoint, $type: 'min') {
86
- @if $breakpoint == $size-sm {
87
- // $breakpoint-sm: 360px;
86
+ @if $breakpoint == $size-sm or $breakpoint == $breakpoint-sm {
88
87
  @if $type == 'min' {
89
88
  @media (min-width: $breakpoint-sm) {
90
89
  @content;
@@ -98,7 +97,7 @@
98
97
  }
99
98
  }
100
99
 
101
- @if $breakpoint == $size-md {
100
+ @if $breakpoint == $size-md or $breakpoint == $breakpoint-md {
102
101
  // $breakpoint-md: 961px;
103
102
  @if $type == 'min' {
104
103
  @media (min-width: $breakpoint-md) {
@@ -113,7 +112,7 @@
113
112
  }
114
113
  }
115
114
 
116
- @if $breakpoint == $size-lg {
115
+ @if $breakpoint == $size-lg or $breakpoint == $breakpoint-lg {
117
116
  // $breakpoint-lg: 1401px;
118
117
 
119
118
  @if $type == 'min' {
@@ -129,7 +128,7 @@
129
128
  }
130
129
  }
131
130
 
132
- @if $breakpoint == $size-xl {
131
+ @if $breakpoint == $size-xl or $breakpoint == $breakpoint-xl {
133
132
  // $breakpoint-xl: 1801px;
134
133
  @if $type == 'min' {
135
134
  @media (min-width: $breakpoint-xl) {
@@ -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';
@@ -92,21 +92,21 @@
92
92
  display: flex;
93
93
  flex-direction: row;
94
94
  justify-content: space-between;
95
- opacity: 0.75;
96
95
 
97
96
  &--hoverable {
98
97
  cursor: pointer;
99
98
 
100
- &:hover {
101
- opacity: 1;
99
+ &:hover,
100
+ &:focus-visible {
101
+ opacity: 0.75;
102
102
  }
103
103
  }
104
104
 
105
105
  &__text {
106
106
  flex: auto;
107
+ font-variation-settings: 'wght' 600;
107
108
 
108
- @include text($body2);
109
- @include DistinctDisplay;
109
+ @include text($string2);
110
110
  }
111
111
 
112
112
  &__text--lg {
@@ -115,15 +115,41 @@
115
115
 
116
116
  &__icon {
117
117
  flex: initial;
118
- height: 1.5rem;
118
+ height: 0.875rem;
119
119
  width: 1.5rem;
120
120
  }
121
121
 
122
122
  &__icon--lg {
123
- height: 2rem;
123
+ height: 1.5rem;
124
124
  width: 2rem;
125
125
  }
126
126
 
127
+ @include media($breakpoint-md) {
128
+ &__icon {
129
+ flex: initial;
130
+ height: 1rem;
131
+ width: 1.5rem;
132
+ }
133
+
134
+ &__icon--lg {
135
+ height: 1.5rem;
136
+ width: 2rem;
137
+ }
138
+ }
139
+
140
+ @include media($breakpoint-xl) {
141
+ &__icon {
142
+ flex: initial;
143
+ height: 1.25rem;
144
+ width: 1.75rem;
145
+ }
146
+
147
+ &__icon--lg {
148
+ height: 2rem;
149
+ width: 3rem;
150
+ }
151
+ }
152
+
127
153
  &--blue-fill {
128
154
  filter: brightness(0) saturate(100%) invert(51%) sepia(72%) saturate(1698%) hue-rotate(191deg) brightness(95%)
129
155
  contrast(86%);
@@ -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
+ }
@@ -178,4 +178,10 @@
178
178
  width: 100%;
179
179
  }
180
180
  }
181
+
182
+ .#{$px}-accordion-item-label__icon {
183
+ // slightly larger in header mobile than default
184
+ height: 1rem;
185
+ width: 1.5rem;
186
+ }
181
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.71.0",
3
+ "version": "1.72.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"