@popsure/dirty-swan 0.66.4 → 0.66.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.66.4",
3
+ "version": "0.66.5",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -116,11 +116,11 @@ export const TopIconTypes = () => {
116
116
  <div className="mb16 fw-bold">Icon Type</div>
117
117
  <InfoCard
118
118
  title="Help Center"
119
- topIcon={<img src="https://placehold.co/80x80" alt="Banner" />}
119
+ topIcon={<img src="https://placehold.co/80x80/transparent/F00" alt="Banner" />}
120
120
  topIconType="icon"
121
121
  onClick={() => console.log('Icon type clicked!')}
122
122
  >
123
- Icon is displayed in a circular way without any background.
123
+ Icon is displayed in a rounded square with orange background.
124
124
  </InfoCard>
125
125
  </div>
126
126
  <div className="w50">
@@ -131,7 +131,7 @@ export const TopIconTypes = () => {
131
131
  topIconType="iconWithBackground"
132
132
  onClick={() => console.log('Icon type clicked!')}
133
133
  >
134
- Icon is displayed in a circular background with the orange color.
134
+ Icon is displayed in a rounded square with the orange background.
135
135
  </InfoCard>
136
136
  </div>
137
137
  </div>
@@ -142,9 +142,8 @@ export const TopIconTypes = () => {
142
142
  title="Image Gallery"
143
143
  topIcon={
144
144
  <img
145
- src="https://placehold.co/80x80"
145
+ src="https://placehold.co/80x80/transparent/F00"
146
146
  alt="Image"
147
- style={{ borderRadius: '8px' }}
148
147
  />
149
148
  }
150
149
  topIconType="image"
@@ -24,6 +24,7 @@ export const InfoCard = ({
24
24
  ...cardProps
25
25
  }: InfoCardProps) => {
26
26
  const isIconType = topIconType === 'icon' || topIconType === 'iconWithBackground';
27
+ const isFloatingType = isIconType || topIconType === 'image';
27
28
 
28
29
  return (
29
30
  <Card
@@ -33,10 +34,8 @@ export const InfoCard = ({
33
34
  {isIconType ? (
34
35
  <div
35
36
  className={classNames(
36
- 'd-flex ai-center jc-center br-circle p16',
37
- styles.topIconWrapper, {
38
- 'bg-orange-200': topIconType === 'iconWithBackground'
39
- }
37
+ 'd-flex ai-center jc-center p16 bg-orange-200',
38
+ styles.topIconWrapper,
40
39
  )}
41
40
  >
42
41
  {topIcon}
@@ -44,7 +43,8 @@ export const InfoCard = ({
44
43
  ) : (
45
44
  <div className={classNames(
46
45
  'd-flex ai-center jc-center',
47
- { [styles.topIconBanner]: topIconType === 'banner' }
46
+ { [styles.topIconBanner]: topIconType === 'banner' },
47
+ { [styles.topIconImage]: topIconType === 'image' },
48
48
  )}>
49
49
  {topIcon}
50
50
  </div>
@@ -61,6 +61,7 @@ export const InfoCard = ({
61
61
  titleVariant='medium'
62
62
  description={children}
63
63
  descriptionVariant='small'
64
+ dropShadow={false}
64
65
  actionIcon={null}
65
66
  showActionIcon={false}
66
67
  classNames={{
@@ -68,16 +69,17 @@ export const InfoCard = ({
68
69
  wrapper: classNames({
69
70
  [styles.wrapper]: true,
70
71
  [styles.disabled]: disabled,
71
- 'pt40': topIcon && isIconType,
72
- 'mt40': topIcon && isIconType,
72
+ 'pt40': topIcon && isFloatingType,
73
+ 'mt40': topIcon && isFloatingType,
73
74
  [styles.bannerWrapper]: topIcon && topIconType === 'banner',
74
75
  }),
75
76
  label: classNames({
76
- [styles.floatingLabel]: topIcon && topIconType !== 'image',
77
+ [styles.floatingLabel]: topIcon && (isFloatingType || topIconType === 'banner'),
77
78
  }),
78
79
  title: classNames(
79
80
  {'mt16': topIcon && topIconType === 'banner'},
80
- 'd-flex ai-center jc-center ta-center my8'
81
+ 'd-flex ai-center jc-center ta-center mb8',
82
+ styles.title,
81
83
  ),
82
84
  description: 'ta-center',
83
85
  contentWrapper: styles.contentWrapper,
@@ -5,21 +5,31 @@
5
5
  padding-top: 124px;
6
6
  }
7
7
 
8
+ .wrapper {
9
+ border-radius: 12px;
10
+ border: 1px solid $ds-neutral-300;
11
+ }
12
+
13
+ .buttonWrapper {
14
+ border-radius: 12px;
15
+ }
16
+
8
17
  .buttonWrapper:focus .wrapper {
9
18
  border-color: $ds-neutral-700;
10
- box-shadow: $bs-xs, 0 0 0 1px $ds-neutral-700;
19
+ box-shadow: 0 0 0 1px $ds-neutral-700;
11
20
  }
12
21
 
13
22
  .buttonWrapper:focus-visible .wrapper {
14
23
  overflow: hidden;
15
24
  border-color: $ds-neutral-900;
16
- box-shadow: $bs-xs, 0 0 0 1px $ds-neutral-900;
25
+ box-shadow: 0 0 0 1px $ds-neutral-900;
17
26
  }
18
27
 
19
28
  .topIconWrapper {
20
29
  position: absolute;
21
30
  width: 80px;
22
31
  height: 80px;
32
+ border-radius: 12px;
23
33
 
24
34
  left: 50%;
25
35
  transform: translateX(-50%) translateY(-80px);
@@ -29,6 +39,25 @@
29
39
  }
30
40
  }
31
41
 
42
+ .topIconImage {
43
+ position: absolute;
44
+ width: 80px;
45
+ height: 80px;
46
+ border-radius: 12px;
47
+ background-color: $ds-orange-200;
48
+ overflow: hidden;
49
+
50
+ left: 50%;
51
+ transform: translateX(-50%) translateY(-80px);
52
+
53
+ img {
54
+ width: 100%;
55
+ height: 100%;
56
+ object-fit: cover;
57
+ border-radius: 12px;
58
+ }
59
+ }
60
+
32
61
  .topIconBanner {
33
62
  position: absolute;
34
63
  top: -123px;
@@ -40,8 +69,8 @@
40
69
 
41
70
  img {
42
71
  position: absolute;
43
- border-top-left-radius: 6px;
44
- border-top-right-radius: 6px;
72
+ border-top-left-radius: 12px;
73
+ border-top-right-radius: 12px;
45
74
  top: 0;
46
75
  left: 0;
47
76
  width: 100%;
@@ -52,6 +81,10 @@
52
81
  }
53
82
  }
54
83
 
84
+ .title {
85
+ margin-top: 20px;
86
+ }
87
+
55
88
  .contentWrapper {
56
89
  gap: 0!important;
57
90
  }
@@ -63,4 +96,4 @@
63
96
  .disabled {
64
97
  opacity: 0.25;
65
98
  cursor: not-allowed;
66
- }
99
+ }
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 6L9.5 11L5 13M10 6L13 9L15 8M10 6L8 2M15 8L18 11M15 8L18 3M18 11L15 13L19 16M18 11H21M19 16H13L9 20M19 16L22 18M19 16L21 11M9 20V15L5 13M9 20L8.15789 22M5 13L2 14M22 11H21" stroke="#26262E" stroke-width="2" stroke-linecap="round"/>
3
+ <path d="M7 9L4 7" stroke="#26262E" stroke-width="2" stroke-linecap="round"/>
4
+ </svg>
@@ -0,0 +1,15 @@
1
+ /* Generated file. Do not modify. */
2
+ import { createElement } from 'react';
3
+ import { IconWrapper } from '../IconWrapper';
4
+ import type { IconWrapperProps } from '../IconWrapper';
5
+ export default (props: IconWrapperProps) =>
6
+ createElement(
7
+ IconWrapper,
8
+ props,
9
+ <path
10
+ stroke="#26262E"
11
+ strokeLinecap="round"
12
+ strokeWidth={2}
13
+ d="m10 6-.5 5L5 13m5-7 3 3 2-1m-5-2L8 2m7 6 3 3m-3-3 3-5m0 8-3 2 4 3m-1-5h3m-2 5h-6l-4 4m10-4 3 2m-3-2 2-5M9 20v-5l-4-2m4 7-.842 2M5 13l-3 1m20-3h-1M7 9 4 7"
14
+ />
15
+ );
@@ -63,6 +63,7 @@ export { default as BoxesAdd2Icon } from './BoxesAdd2';
63
63
  export { default as BoxesMultipleFilledIcon } from './BoxesMultipleFilled';
64
64
  export { default as BoxesMultipleIcon } from './BoxesMultiple';
65
65
  export { default as BriefcaseIcon } from './Briefcase';
66
+ export { default as BrokenGlassIcon } from './BrokenGlass';
66
67
  export { default as CalculatorIcon } from './Calculator';
67
68
  export { default as CalendarIcon } from './Calendar';
68
69
  export { default as CameraOffIcon } from './CameraOff';