@phillips/seldon 1.88.1 → 1.89.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,55 @@
1
+ export interface I18nObject {
2
+ clearAllLabel?: string;
3
+ }
4
+ export interface TagsListProps {
5
+ /**
6
+ * Unique id for component testing
7
+ */
8
+ id: string;
9
+ /**
10
+ * Base class for TagsList component.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * Child element pass in to display as item content.
15
+ */
16
+ children?: React.ReactNode;
17
+ /**
18
+ * `onRemove` callback provides the tag that is to be removed as a string
19
+ */
20
+ onClear: () => void;
21
+ /**
22
+ * Clear All label is translatable
23
+ */
24
+ clearAllLabel?: string;
25
+ }
26
+ export interface TagProps {
27
+ /**
28
+ * Unique id for component testing
29
+ */
30
+ id: string;
31
+ /**
32
+ * Base class for TagsList component.
33
+ */
34
+ className?: string;
35
+ /**
36
+ * `onRemove` callback provides the tag that is to be removed as a string
37
+ */
38
+ onRemove: (tag: string) => void;
39
+ /**
40
+ * Tag item label.
41
+ */
42
+ label: string;
43
+ }
44
+ export declare const Tag: ({ id, className, onRemove, label }: TagProps) => import("react/jsx-runtime").JSX.Element;
45
+ /**
46
+ * ## Overview
47
+ *
48
+ * Overview of Tags component
49
+ *
50
+ * [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=11648-3225&node-type=canvas&m=dev)
51
+ *
52
+ * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-tags--overview)
53
+ */
54
+ declare const TagsList: import('react').ForwardRefExoticComponent<TagsListProps & import('react').RefAttributes<HTMLDivElement>>;
55
+ export default TagsList;
@@ -0,0 +1,43 @@
1
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import $ from "../../node_modules/classnames/index.js";
4
+ import { getCommonProps as g, px as a } from "../../utils/index.js";
5
+ import N from "../Button/Button.js";
6
+ import { ButtonVariants as v } from "../Button/types.js";
7
+ import h from "../../assets/chevronRight.svg.js";
8
+ const u = p(
9
+ ({ className: l, children: t, clearAllLabel: e = "Clear All", onClear: n, ...s }, c) => {
10
+ const r = "tags-list", { className: d, ...f } = g(s, "TagsList"), { id: i } = s;
11
+ return /* @__PURE__ */ m(
12
+ "div",
13
+ {
14
+ className: $(`${a}-${r}`, d, l),
15
+ ...f,
16
+ ...s,
17
+ "data-testid": `${r}-${i}`,
18
+ ref: c,
19
+ children: [
20
+ t,
21
+ Array.isArray(t) && t.length > 0 && /* @__PURE__ */ m(
22
+ N,
23
+ {
24
+ onClick: n,
25
+ "data-testid": `${i}-clear-all-button`,
26
+ className: `${a}-${r}--clear`,
27
+ "aria-label": e,
28
+ variant: v.tertiary,
29
+ children: [
30
+ /* @__PURE__ */ o("div", { className: `${a}-left-arrow`, children: /* @__PURE__ */ o(h, {}) }),
31
+ /* @__PURE__ */ o("div", { className: `${a}-label`, children: e })
32
+ ]
33
+ }
34
+ )
35
+ ]
36
+ }
37
+ );
38
+ }
39
+ );
40
+ u.displayName = "Tags";
41
+ export {
42
+ u as default
43
+ };
@@ -0,0 +1,27 @@
1
+ import { TagsListProps } from './Tags';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').ForwardRefExoticComponent<TagsListProps & import('react').RefAttributes<HTMLDivElement>>;
5
+ };
6
+ export default meta;
7
+ interface StoryProps extends TagsListProps {
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
+ };
16
+ argTypes: {
17
+ onClear: {
18
+ action: string;
19
+ };
20
+ playgroundWidth: {
21
+ control: {
22
+ type: string;
23
+ min: number;
24
+ };
25
+ };
26
+ };
27
+ };
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ export { default as ViewingsList, type ViewingsListProps } from './patterns/View
33
33
  export { default as Modal, type ModalProps } from './components/Modal/Modal';
34
34
  export { default as Drawer } from './components/Drawer/Drawer';
35
35
  export { default as Pagination, type PaginationProps, type PaginationOption, type PaginationOptionValue, } from './components/Pagination/Pagination';
36
+ export { default as TagsList } from './components/Tags/Tags';
36
37
  export { default as StatefulViewingsList, type StatefulViewingsListProps, } from './patterns/ViewingsList/StatefulViewingsList';
37
38
  export * from './components/Text';
38
39
  export * from './components/TextSymbol';
package/dist/index.js CHANGED
@@ -56,77 +56,78 @@ import { default as co } from "./patterns/ViewingsList/ViewingsList.js";
56
56
  import { default as So } from "./components/Modal/Modal.js";
57
57
  import { default as Po } from "./components/Drawer/Drawer.js";
58
58
  import { default as Io } from "./components/Pagination/Pagination.js";
59
- import { default as To } from "./patterns/ViewingsList/StatefulViewingsList.js";
60
- import { TextVariants as Ao } from "./components/Text/types.js";
61
- import { default as vo } from "./components/Text/Text.js";
62
- import { TextSymbolVariants as yo } from "./components/TextSymbol/types.js";
63
- import { default as Do } from "./components/TextSymbol/TextSymbol.js";
64
- import { default as Ro } from "./components/Accordion/Accordion.js";
65
- import { default as Mo } from "./components/Accordion/AccordionItem.js";
66
- import { AccordionItemVariant as Go, AccordionVariants as Oo } from "./components/Accordion/types.js";
67
- import { default as Eo } from "./patterns/UserManagement/UserManagement.js";
68
- import { AuthState as Uo } from "./patterns/UserManagement/types.js";
69
- import { SupportedLanguages as zo } from "./types/commonTypes.js";
70
- import { default as jo } from "./components/Breadcrumb/Breadcrumb.js";
59
+ import { default as To } from "./components/Tags/Tags.js";
60
+ import { default as Ao } from "./patterns/ViewingsList/StatefulViewingsList.js";
61
+ import { TextVariants as vo } from "./components/Text/types.js";
62
+ import { default as yo } from "./components/Text/Text.js";
63
+ import { TextSymbolVariants as Do } from "./components/TextSymbol/types.js";
64
+ import { default as Ro } from "./components/TextSymbol/TextSymbol.js";
65
+ import { default as Mo } from "./components/Accordion/Accordion.js";
66
+ import { default as Go } from "./components/Accordion/AccordionItem.js";
67
+ import { AccordionItemVariant as Wo, AccordionVariants as Eo } from "./components/Accordion/types.js";
68
+ import { default as Uo } from "./patterns/UserManagement/UserManagement.js";
69
+ import { AuthState as zo } from "./patterns/UserManagement/types.js";
70
+ import { SupportedLanguages as jo } from "./types/commonTypes.js";
71
+ import { default as Jo } from "./components/Breadcrumb/Breadcrumb.js";
71
72
  import "react/jsx-runtime";
72
73
  import "./node_modules/classnames/index.js";
73
- import { default as Jo } from "./components/Dropdown/Dropdown.js";
74
- import { default as Xo } from "./components/Video/Video.js";
75
- import { default as $o } from "./patterns/LanguageSelector/LanguageSelector.js";
76
- import { default as ot } from "./components/ContentPeek/ContentPeek.js";
77
- import { default as rt } from "./components/Collapsible/Collapsible.js";
78
- import { default as ft } from "./components/Collapsible/CollapsibleContent.js";
79
- import { default as lt } from "./components/Collapsible/CollapsibleTrigger.js";
80
- import { SeldonProvider as dt } from "./providers/SeldonProvider/SeldonProvider.js";
81
- import { default as ut } from "./components/PageContentWrapper/PageContentWrapper.js";
82
- import { default as nt } from "./components/Carousel/Carousel.js";
83
- import { default as gt } from "./components/Carousel/CarouselContent.js";
84
- import { default as Ct } from "./components/Carousel/CarouselItem.js";
85
- import { default as Lt } from "./components/Carousel/CarouselDots.js";
86
- import { default as ht } from "./components/Detail/Detail.js";
87
- import { default as bt } from "./patterns/DetailList/DetailList.js";
88
- import { DetailListAlignment as kt } from "./patterns/DetailList/types.js";
89
- import { default as Vt } from "./components/PinchZoom/PinchZoom.js";
90
- import { default as wt } from "./components/Tabs/TabsContainer.js";
91
- import { default as Bt } from "./components/Tabs/TabsContent.js";
92
- import { default as Nt } from "./components/SeldonImage/SeldonImage.js";
93
- import { default as Ft } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
94
- import { default as Ht } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
95
- import { AuctionState as Ot } from "./patterns/SaleHeaderBanner/types.js";
96
- import { default as Et } from "./components/Countdown/Countdown.js";
97
- import { CountdownVariants as Ut } from "./components/Countdown/types.js";
74
+ import { default as Xo } from "./components/Dropdown/Dropdown.js";
75
+ import { default as $o } from "./components/Video/Video.js";
76
+ import { default as ot } from "./patterns/LanguageSelector/LanguageSelector.js";
77
+ import { default as rt } from "./components/ContentPeek/ContentPeek.js";
78
+ import { default as ft } from "./components/Collapsible/Collapsible.js";
79
+ import { default as lt } from "./components/Collapsible/CollapsibleContent.js";
80
+ import { default as dt } from "./components/Collapsible/CollapsibleTrigger.js";
81
+ import { SeldonProvider as ut } from "./providers/SeldonProvider/SeldonProvider.js";
82
+ import { default as nt } from "./components/PageContentWrapper/PageContentWrapper.js";
83
+ import { default as gt } from "./components/Carousel/Carousel.js";
84
+ import { default as Ct } from "./components/Carousel/CarouselContent.js";
85
+ import { default as Lt } from "./components/Carousel/CarouselItem.js";
86
+ import { default as ht } from "./components/Carousel/CarouselDots.js";
87
+ import { default as bt } from "./components/Detail/Detail.js";
88
+ import { default as kt } from "./patterns/DetailList/DetailList.js";
89
+ import { DetailListAlignment as Vt } from "./patterns/DetailList/types.js";
90
+ import { default as wt } from "./components/PinchZoom/PinchZoom.js";
91
+ import { default as Bt } from "./components/Tabs/TabsContainer.js";
92
+ import { default as Nt } from "./components/Tabs/TabsContent.js";
93
+ import { default as Ft } from "./components/SeldonImage/SeldonImage.js";
94
+ import { default as Ht } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
95
+ import { default as Ot } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
96
+ import { AuctionState as Et } from "./patterns/SaleHeaderBanner/types.js";
97
+ import { default as Ut } from "./components/Countdown/Countdown.js";
98
+ import { CountdownVariants as zt } from "./components/Countdown/types.js";
98
99
  export {
99
- Ro as Accordion,
100
- Mo as AccordionItem,
101
- Go as AccordionItemVariant,
102
- Oo as AccordionVariants,
100
+ Mo as Accordion,
101
+ Go as AccordionItem,
102
+ Wo as AccordionItemVariant,
103
+ Eo as AccordionVariants,
103
104
  S as AccountCircle,
104
105
  P as ArrowPrev,
105
- Ot as AuctionState,
106
- Uo as AuthState,
107
- jo as Breadcrumb,
106
+ Et as AuctionState,
107
+ zo as AuthState,
108
+ Jo as Breadcrumb,
108
109
  Ce as Button,
109
110
  Le as ButtonVariants,
110
111
  I as Calendar,
111
- nt as Carousel,
112
- gt as CarouselContent,
113
- Lt as CarouselDots,
114
- Ct as CarouselItem,
112
+ gt as Carousel,
113
+ Ct as CarouselContent,
114
+ ht as CarouselDots,
115
+ Lt as CarouselItem,
115
116
  T as ChevronDown,
116
117
  A as ChevronNext,
117
118
  v as ChevronRight,
118
119
  y as Close,
119
- rt as Collapsible,
120
- ft as CollapsibleContent,
121
- lt as CollapsibleTrigger,
122
- ot as ContentPeek,
123
- Et as Countdown,
124
- Ut as CountdownVariants,
125
- ht as Detail,
126
- bt as DetailList,
127
- kt as DetailListAlignment,
120
+ ft as Collapsible,
121
+ lt as CollapsibleContent,
122
+ dt as CollapsibleTrigger,
123
+ rt as ContentPeek,
124
+ Ut as Countdown,
125
+ zt as CountdownVariants,
126
+ bt as Detail,
127
+ kt as DetailList,
128
+ Vt as DetailListAlignment,
128
129
  Po as Drawer,
129
- Jo as Dropdown,
130
+ Xo as Dropdown,
130
131
  be as ErrorBoundary,
131
132
  R as Facebook,
132
133
  D as FavoriteOutline,
@@ -141,7 +142,7 @@ export {
141
142
  he as IconButton,
142
143
  Ee as Input,
143
144
  Y as Instagram,
144
- $o as LanguageSelector,
145
+ ot as LanguageSelector,
145
146
  Ue as Link,
146
147
  je as LinkBlock,
147
148
  Je as LinkList,
@@ -156,38 +157,39 @@ export {
156
157
  He as NavigationList,
157
158
  f as PaddingTokens,
158
159
  pe as Page,
159
- ut as PageContentWrapper,
160
+ nt as PageContentWrapper,
160
161
  Io as Pagination,
161
162
  K as PhillipsLogo,
162
- Vt as PinchZoom,
163
+ wt as PinchZoom,
163
164
  _ as Plus,
164
165
  ee as React,
165
166
  W as Reddit,
166
167
  Xe as Row,
167
168
  ie as SSRMediaQuery,
168
- Ft as SaleHeaderBanner,
169
- Ht as SaleHeaderBrowseAuctions,
169
+ Ht as SaleHeaderBanner,
170
+ Ot as SaleHeaderBrowseAuctions,
170
171
  ro as Search,
171
- Nt as SeldonImage,
172
- dt as SeldonProvider,
172
+ Ft as SeldonImage,
173
+ ut as SeldonProvider,
173
174
  fo as Select,
174
175
  te as Share,
175
176
  io as Social,
176
177
  s as SpacingTokens,
177
178
  lo as SplitPanel,
178
179
  ae as Spotify,
179
- To as StatefulViewingsList,
180
+ Ao as StatefulViewingsList,
180
181
  po as Subscribe,
181
182
  xo as SubscriptionState,
182
- zo as SupportedLanguages,
183
- wt as TabsContainer,
184
- Bt as TabsContent,
185
- vo as Text,
186
- yo as TextSymbolVariants,
187
- Do as TextSymbols,
188
- Ao as TextVariants,
189
- Eo as UserManagement,
190
- Xo as Video,
183
+ jo as SupportedLanguages,
184
+ Bt as TabsContainer,
185
+ Nt as TabsContent,
186
+ To as TagsList,
187
+ yo as Text,
188
+ Do as TextSymbolVariants,
189
+ Ro as TextSymbols,
190
+ vo as TextVariants,
191
+ Uo as UserManagement,
192
+ $o as Video,
191
193
  co as ViewingsList,
192
194
  se as WeChat,
193
195
  me as Youtube,
@@ -149,6 +149,7 @@ $breakpoint-xl: 1801px;
149
149
  --link-label-line-height: 0.75rem;
150
150
  --button-label-size: 0.75rem;
151
151
  --button-label-line-height: 1rem;
152
+ --button-tertiary-height: 1.75rem;
152
153
  --badge-label-size: 0.5rem;
153
154
  --badge-label-line-height: 0.67rem;
154
155
  --snw-header-link-size: 1rem;
@@ -290,6 +291,7 @@ $link-label-size: var(--link-label-size);
290
291
  $button-label-size: var(--button-label-size);
291
292
  $link-label-line-height: var(--link-label-line-height);
292
293
  $button-label-line-height: var(--button-label-line-height);
294
+ $button-tertiary-height: var(--button-tertiary-height);
293
295
  $badge-label-size: var(--badge-label-size);
294
296
  $badge-label-line-height: var(--badge-label-line-height);
295
297
  $snw-header-link-size: var(--snw-header-link-size);
@@ -36,6 +36,7 @@
36
36
  @use 'components/ContentPeek/contentPeek';
37
37
  @use 'components/PageContentWrapper/pageContentWrapper';
38
38
  @use 'components/Carousel/carousel';
39
+ @use 'components/Tags/tags';
39
40
  @use 'components/Countdown/countdown';
40
41
  @use 'components/Countdown/duration';
41
42
 
@@ -0,0 +1,137 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-tags-list {
4
+ align-items: center;
5
+ display: flex;
6
+ flex-flow: row wrap;
7
+ gap: $spacing-sm;
8
+
9
+ .#{$px}-tag {
10
+ align-items: center;
11
+ background-color: $pure-white;
12
+ border: 1px solid $button-hover;
13
+ border-radius: 6.25rem;
14
+ cursor: default;
15
+ display: flex;
16
+ gap: 0;
17
+ height: $button-tertiary-height;
18
+ justify-content: center;
19
+ padding: 0 $spacing-xsm 0 $spacing-sm;
20
+
21
+ &__label {
22
+ color: $button-hover;
23
+ font-size: 0.75rem;
24
+ font-variation-settings: 'wght' 600;
25
+ text-align: center;
26
+ }
27
+
28
+ &__button {
29
+ align-items: center;
30
+ display: flex;
31
+ gap: $spacing-micro;
32
+ height: $button-tertiary-height;
33
+ justify-content: center;
34
+ padding: 0;
35
+
36
+ &--close {
37
+ height: 1.25rem;
38
+ width: 1.25rem;
39
+
40
+ svg {
41
+ height: 1rem;
42
+ width: 1rem;
43
+
44
+ path {
45
+ fill: $button-hover;
46
+ }
47
+
48
+ &:focus {
49
+ fill: $pure-black;
50
+ }
51
+ }
52
+
53
+ &:hover {
54
+ background-color: $pure-white;
55
+
56
+ svg {
57
+ path {
58
+ fill: $pure-black;
59
+ }
60
+ }
61
+ }
62
+
63
+ &:focus {
64
+ svg {
65
+ path {
66
+ fill: $pure-black;
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ &--clear {
75
+ align-items: center;
76
+ border-color: $pure-white;
77
+ display: flex;
78
+ gap: 0;
79
+ height: 2rem;
80
+
81
+ &:hover {
82
+ cursor: pointer;
83
+
84
+ .#{$px}-left-arrow {
85
+ svg {
86
+ fill: $pure-black;
87
+
88
+ path {
89
+ fill: $pure-black;
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+ &:focus-visible {
96
+ border-color: $button-hover;
97
+ border-radius: 6.25rem;
98
+ gap: 0;
99
+ outline-offset: 0;
100
+ padding: 0;
101
+ }
102
+
103
+ .#{$px}-left-arrow {
104
+ transform: rotateX(-1);
105
+
106
+ svg {
107
+ height: 1rem;
108
+ width: 1rem;
109
+ }
110
+
111
+ &:hover {
112
+ background: $pure-white;
113
+
114
+ svg {
115
+ fill: $pure-black;
116
+
117
+ path {
118
+ fill: $pure-black;
119
+ }
120
+ }
121
+ }
122
+
123
+ &:focus-visible {
124
+ &:focus-visible {
125
+ outline: none;
126
+ outline-offset: none;
127
+ }
128
+ }
129
+ }
130
+
131
+ .#{$px}-label {
132
+ color: $pure-black;
133
+ font-size: 0.875rem;
134
+ font-variation-settings: 'wght' 600;
135
+ }
136
+ }
137
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.88.1",
3
+ "version": "1.89.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"