@phillips/seldon 1.5.0 → 1.6.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.
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/Button/Button.d.ts +4 -4
- package/dist/components/Button/Button.js +7 -7
- package/dist/components/DatePicker/DatePicker.d.ts +90 -0
- package/dist/components/DatePicker/DatePicker.js +92 -0
- package/dist/components/Header/Header.js +16 -16
- package/dist/components/Input/Input.js +19 -18
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -10
- package/dist/node_modules/flatpickr/dist/esm/index.js +947 -0
- package/dist/node_modules/flatpickr/dist/esm/l10n/default.js +75 -0
- package/dist/node_modules/flatpickr/dist/esm/types/options.js +80 -0
- package/dist/node_modules/flatpickr/dist/esm/utils/dates.js +90 -0
- package/dist/node_modules/flatpickr/dist/esm/utils/dom.js +45 -0
- package/dist/node_modules/flatpickr/dist/esm/utils/formatting.js +170 -0
- package/dist/node_modules/flatpickr/dist/esm/utils/index.js +23 -0
- package/dist/node_modules/flatpickr/dist/esm/utils/polyfills.js +15 -0
- package/dist/node_modules/flatpickr/dist/l10n/index.js +3471 -0
- package/dist/scss/_typography.scss +22 -11
- package/dist/scss/_vars.scss +6 -2
- package/dist/scss/components/Button/_button.scss +21 -14
- package/dist/scss/components/DatePicker/_datePicker.scss +81 -0
- package/dist/scss/components/Input/_input.scss +5 -0
- package/dist/scss/styles.scss +4 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +10 -8
- package/package.json +2 -1
|
@@ -49,20 +49,31 @@ body {
|
|
|
49
49
|
font-family: $DistinctText;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
h2,
|
|
54
|
-
h3,
|
|
55
|
-
h4 {
|
|
52
|
+
@mixin headerText {
|
|
56
53
|
color: $primary-black;
|
|
57
54
|
@include DistinctDisplay();
|
|
58
55
|
}
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
input,
|
|
62
|
-
label,
|
|
63
|
-
div,
|
|
64
|
-
a,
|
|
65
|
-
button {
|
|
57
|
+
@mixin bodyText {
|
|
66
58
|
color: $soft-black;
|
|
67
59
|
@include DistinctText();
|
|
68
|
-
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// @TODO: uncomment when site is able to be refactored
|
|
63
|
+
// h1,
|
|
64
|
+
// h2,
|
|
65
|
+
// h3,
|
|
66
|
+
// h4 {
|
|
67
|
+
// color: $primary-black;
|
|
68
|
+
// @include DistinctDisplay();
|
|
69
|
+
// }
|
|
70
|
+
|
|
71
|
+
// p,
|
|
72
|
+
// input,
|
|
73
|
+
// label,
|
|
74
|
+
// div,
|
|
75
|
+
// a,
|
|
76
|
+
// button {
|
|
77
|
+
// color: $soft-black;
|
|
78
|
+
// @include DistinctText();
|
|
79
|
+
// }
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -33,10 +33,14 @@ $articker-orange: #ff8201;
|
|
|
33
33
|
$articker-red-orange-gradient: linear-gradient(90deg, #fc1e2b, #ff8201);
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
$text-color: $pure-black;
|
|
37
|
-
|
|
38
36
|
// Font-variables
|
|
39
37
|
$DistinctDisplay: 'DistinctDisplay';
|
|
40
38
|
$DistinctDisplayItalic: 'DistinctDisplayItalic';
|
|
41
39
|
$DistinctItalic: 'DistinctItalic';
|
|
42
40
|
$DistinctText: 'DistinctText';
|
|
41
|
+
|
|
42
|
+
// Text variables
|
|
43
|
+
$header-color: $pure-black;
|
|
44
|
+
$header-family: $DistinctDisplay;
|
|
45
|
+
$text-color: $soft-black;
|
|
46
|
+
$text-family: $DistinctText;
|
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
@import '../../vars';
|
|
2
2
|
|
|
3
3
|
.#{$px}-button {
|
|
4
|
-
|
|
4
|
+
@include bodyText;
|
|
5
|
+
align-items: center;
|
|
6
|
+
background-color: $pure-black;
|
|
5
7
|
border: 0;
|
|
6
|
-
border-radius:
|
|
8
|
+
border-radius: 3em;
|
|
7
9
|
color: white;
|
|
8
10
|
cursor: pointer;
|
|
9
|
-
display: inline-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
min-width: 9rem;
|
|
14
|
+
padding: 0.5em 1.75em;
|
|
15
|
+
transition: color 0.25s, background-color 0.25s, font-weight 0.25s;
|
|
16
|
+
|
|
17
|
+
&:hover,
|
|
18
|
+
&:focus {
|
|
19
|
+
background-color: $soft-black;
|
|
20
|
+
}
|
|
15
21
|
|
|
16
22
|
&--secondary {
|
|
17
23
|
color: $text-color;
|
|
18
24
|
background-color: transparent;
|
|
19
|
-
box-shadow: rgba(0, 0, 0, 0.
|
|
25
|
+
box-shadow: rgba(0, 0, 0, 0.5) 0 0 0 1px inset;
|
|
20
26
|
}
|
|
21
27
|
|
|
22
|
-
&--
|
|
28
|
+
&--sm {
|
|
23
29
|
font-size: 0.75rem;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
|
-
&--
|
|
27
|
-
font-size:
|
|
32
|
+
&--md {
|
|
33
|
+
font-size: 1rem;
|
|
28
34
|
}
|
|
29
35
|
|
|
30
|
-
&--
|
|
31
|
-
font-size:
|
|
36
|
+
&--lg {
|
|
37
|
+
font-size: 1.05rem;
|
|
38
|
+
padding: 0.75em 1.75em;
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
* {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@import 'flatpickr/dist/flatpickr.css';
|
|
2
|
+
@import '../../vars';
|
|
3
|
+
@import '../../typography';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.flatpickr-calendar {
|
|
7
|
+
@include DistinctText;
|
|
8
|
+
|
|
9
|
+
.flatpickr-day,
|
|
10
|
+
.flatpickr-day.selected,
|
|
11
|
+
.flatpickr-day:hover,
|
|
12
|
+
.flatpickr-day:focus,
|
|
13
|
+
.flatpickr-day.startRange,
|
|
14
|
+
.flatpickr-day.endRange {
|
|
15
|
+
border-radius: 0;
|
|
16
|
+
}
|
|
17
|
+
.flatpickr-day.selected,
|
|
18
|
+
.flatpickr-day:hover,
|
|
19
|
+
.flatpickr-day:focus,
|
|
20
|
+
.flatpickr-day.startRange,
|
|
21
|
+
.flatpickr-day.endRange {
|
|
22
|
+
background: $pure-black;
|
|
23
|
+
border-color: $pure-black;
|
|
24
|
+
color: $pure-white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.flatpickr-day.today {
|
|
28
|
+
border-color: transparent;
|
|
29
|
+
@include DistinctDisplay;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
position: relative;
|
|
32
|
+
|
|
33
|
+
&::after {
|
|
34
|
+
background-color: $pure-black;
|
|
35
|
+
bottom: 2px;
|
|
36
|
+
content: '';
|
|
37
|
+
height: 0.25rem;
|
|
38
|
+
width: 0.25rem;
|
|
39
|
+
position: absolute;
|
|
40
|
+
left: 50%;
|
|
41
|
+
transform: translateX(-50%);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.flatpickr-months .flatpickr-prev-month:hover,
|
|
46
|
+
.flatpickr-months .flatpickr-next-month:hover {
|
|
47
|
+
background-color: $pure-black;
|
|
48
|
+
svg {
|
|
49
|
+
fill: $pure-white;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.flatpickr-current-month,
|
|
54
|
+
.flatpickr-monthDropdown-months,
|
|
55
|
+
.flatpickr-current-month input.cur-year {
|
|
56
|
+
@include DistinctDisplay;
|
|
57
|
+
font-size: 1rem;
|
|
58
|
+
text-transform: uppercase;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.flatpickr-weekday {
|
|
62
|
+
@include DistinctDisplay;
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.flatpickr-current-month {
|
|
67
|
+
padding: 0.65rem 0 0 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
|
|
71
|
+
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
|
|
72
|
+
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
|
|
73
|
+
-webkit-box-shadow: -10px 0 0 #e6e6e6;
|
|
74
|
+
box-shadow: -10px 0 0 #e6e6e6;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.arrowTop:before,
|
|
78
|
+
&.arrowTop:after {
|
|
79
|
+
content: unset;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -83,6 +83,10 @@ $lg: #{$px}-input--lg;
|
|
|
83
83
|
.#{$px}-input__input {
|
|
84
84
|
cursor: default;
|
|
85
85
|
}
|
|
86
|
+
|
|
87
|
+
.#{$px}-input__input {
|
|
88
|
+
background-color: rgba(239, 239, 239, 0.3);
|
|
89
|
+
}
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
// Invalid
|
|
@@ -91,6 +95,7 @@ $lg: #{$px}-input--lg;
|
|
|
91
95
|
|
|
92
96
|
.#{$px}-input__label,
|
|
93
97
|
.#{$px}-input__input,
|
|
98
|
+
.#{$px}-input__input::placeholder,
|
|
94
99
|
.#{$px}-input__validation {
|
|
95
100
|
color: inherit;
|
|
96
101
|
}
|
package/dist/scss/styles.scss
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
// 🌎 Globals
|
|
1
2
|
@import './vars';
|
|
2
3
|
// @TODO: add styles when we can do a site wide regressions QA
|
|
3
4
|
// @use 'reset';
|
|
4
5
|
@import './typography';
|
|
6
|
+
// ⚛️ Components
|
|
5
7
|
@import 'components/Button/button';
|
|
8
|
+
@import 'components/DatePicker/datePicker';
|
|
6
9
|
@import 'components/Header/header';
|
|
7
10
|
@import 'components/HeroBanner/heroBanner';
|
|
8
11
|
@import 'components/Input/input';
|
|
9
12
|
@import 'components/Toggle/toggle';
|
|
13
|
+
// 📑 Pages
|
|
10
14
|
@import 'pages/page';
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
const
|
|
3
|
-
|
|
2
|
+
const a = "phillips", p = () => {
|
|
3
|
+
};
|
|
4
|
+
function u({
|
|
4
5
|
disabled: l = !1,
|
|
5
6
|
id: r,
|
|
6
7
|
invalid: d = !1,
|
|
7
8
|
invalidText: t = "invalid",
|
|
8
9
|
readOnly: o = !1,
|
|
9
|
-
type:
|
|
10
|
+
type: n,
|
|
10
11
|
warn: v = !1,
|
|
11
12
|
warnText: e
|
|
12
13
|
}) {
|
|
@@ -14,7 +15,7 @@ function c({
|
|
|
14
15
|
disabled: !o && l,
|
|
15
16
|
invalid: !o && !l && d,
|
|
16
17
|
invalidId: `${r}-error-msg`,
|
|
17
|
-
type:
|
|
18
|
+
type: n === "toggle" ? "checkbox" : n,
|
|
18
19
|
warn: !o && !l && !d && v,
|
|
19
20
|
warnId: `${r}-warn-msg`,
|
|
20
21
|
validation: null
|
|
@@ -22,20 +23,21 @@ function c({
|
|
|
22
23
|
return i.invalid && (i.validation = /* @__PURE__ */ s(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
|
-
className: `${
|
|
26
|
+
className: `${a}-input__validation ${a}-${n}-input--invalid`,
|
|
26
27
|
id: i.invalidId,
|
|
27
28
|
children: t
|
|
28
29
|
}
|
|
29
30
|
)), i.warn && (i.validation = /* @__PURE__ */ s(
|
|
30
31
|
"div",
|
|
31
32
|
{
|
|
32
|
-
className: `${
|
|
33
|
+
className: `${a}-input__validation ${a}-${n}-input--warn`,
|
|
33
34
|
id: i.warnId,
|
|
34
35
|
children: e
|
|
35
36
|
}
|
|
36
37
|
)), i;
|
|
37
38
|
}
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
p as noOP,
|
|
41
|
+
a as px,
|
|
42
|
+
u as useNormalizedInputProps
|
|
41
43
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"prepare": "husky install"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"flatpickr": "^4.6.13",
|
|
35
36
|
"react": "^18.2.0",
|
|
36
37
|
"react-dom": "^18.2.0"
|
|
37
38
|
},
|