@indico-data/design-system 2.36.4 → 2.38.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.
Files changed (70) hide show
  1. package/lib/index.css +40 -408
  2. package/lib/index.d.ts +122 -84
  3. package/lib/index.esm.css +40 -408
  4. package/lib/index.esm.js +15631 -16559
  5. package/lib/index.esm.js.map +1 -1
  6. package/lib/index.js +14165 -15092
  7. package/lib/index.js.map +1 -1
  8. package/lib/src/components/forms/date/datePicker/DatePicker.d.ts +3 -0
  9. package/lib/src/components/forms/date/datePicker/DatePicker.stories.d.ts +9 -0
  10. package/lib/src/components/forms/date/datePicker/contants.d.ts +21 -0
  11. package/lib/src/components/forms/date/datePicker/types.d.ts +48 -0
  12. package/lib/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +22 -0
  13. package/lib/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.d.ts +6 -0
  14. package/lib/src/components/forms/date/iconTriggerDatePicker/index.d.ts +1 -0
  15. package/lib/src/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +23 -0
  16. package/lib/src/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.d.ts +6 -0
  17. package/lib/src/components/forms/date/inputDatePicker/index.d.ts +1 -0
  18. package/lib/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.d.ts +23 -0
  19. package/lib/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.d.ts +6 -0
  20. package/lib/src/components/forms/date/inputDateRangePicker/index.d.ts +1 -0
  21. package/lib/src/components/forms/input/Input.d.ts +1 -0
  22. package/lib/src/components/index.d.ts +3 -0
  23. package/lib/src/components/skeleton/Skeleton.d.ts +2 -2
  24. package/lib/src/components/skeleton/Skeleton.stories.d.ts +1 -0
  25. package/lib/src/index.d.ts +4 -1
  26. package/lib/src/legacy/components/index.d.ts +1 -1
  27. package/lib/src/legacy/components/inputs/index.d.ts +0 -2
  28. package/package.json +2 -2
  29. package/src/components/forms/date/datePicker/DatePicker.mdx +41 -0
  30. package/src/components/forms/date/datePicker/DatePicker.stories.tsx +307 -0
  31. package/src/components/forms/date/datePicker/DatePicker.tsx +68 -0
  32. package/src/components/forms/date/datePicker/contants.ts +22 -0
  33. package/src/components/forms/date/datePicker/styles/DatePicker.scss +85 -0
  34. package/src/components/forms/date/datePicker/types.ts +59 -0
  35. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.mdx +17 -0
  36. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.tsx +201 -0
  37. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +89 -0
  38. package/src/components/forms/date/iconTriggerDatePicker/index.ts +1 -0
  39. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.mdx +18 -0
  40. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.tsx +208 -0
  41. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +117 -0
  42. package/src/components/forms/date/inputDatePicker/index.ts +1 -0
  43. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.mdx +18 -0
  44. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.tsx +208 -0
  45. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +117 -0
  46. package/src/components/forms/date/inputDateRangePicker/index.ts +1 -0
  47. package/src/components/forms/input/Input.tsx +3 -0
  48. package/src/components/index.ts +3 -0
  49. package/src/components/skeleton/Skeleton.stories.tsx +24 -4
  50. package/src/components/skeleton/Skeleton.tsx +4 -4
  51. package/src/index.ts +3 -2
  52. package/src/legacy/components/index.ts +0 -2
  53. package/src/legacy/components/inputs/index.ts +0 -2
  54. package/src/styles/index.scss +2 -1
  55. package/lib/src/legacy/components/inputs/DatePicker/DatePicker.d.ts +0 -15
  56. package/lib/src/legacy/components/inputs/DatePicker/DatePicker.stories.d.ts +0 -6
  57. package/lib/src/legacy/components/inputs/DatePicker/DatePicker.styles.d.ts +0 -1
  58. package/lib/src/legacy/components/inputs/DatePicker/index.d.ts +0 -1
  59. package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.d.ts +0 -21
  60. package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.stories.d.ts +0 -7
  61. package/lib/src/legacy/components/inputs/NoInputDatePicker/index.d.ts +0 -1
  62. package/src/legacy/components/inputs/DatePicker/DatePicker.stories.tsx +0 -30
  63. package/src/legacy/components/inputs/DatePicker/DatePicker.styles.ts +0 -437
  64. package/src/legacy/components/inputs/DatePicker/DatePicker.tsx +0 -165
  65. package/src/legacy/components/inputs/DatePicker/index.ts +0 -1
  66. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.scss +0 -441
  67. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.stories.tsx +0 -52
  68. package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.tsx +0 -245
  69. package/src/legacy/components/inputs/NoInputDatePicker/index.ts +0 -1
  70. /package/src/{legacy/components/inputs/NoInputDatePicker/__tests__/NoInputDatePicker.test.tsx → components/forms/date/iconTriggerDatePicker/__tests__/IconTriggerDatePicker.test.tsx} +0 -0
package/lib/index.css CHANGED
@@ -1,3 +1,4 @@
1
+ @import 'react-day-picker/style.css';
1
2
  @import './assets/fonts/mulish/mulish.css';
2
3
  :root {
3
4
  --pf-font-family-base: "Mulish", sans-serif;
@@ -1898,433 +1899,64 @@ form {
1898
1899
  background: var(--pf-floatui-background-color);
1899
1900
  }
1900
1901
 
1901
- .rdp {
1902
- --rdp-cell-size: 40px;
1903
- --rdp-accent-color: #6833d0;
1904
- --rdp-background-color: #ffffff;
1905
- --rdp-accent-color-dark: #3003e1;
1906
- --rdp-background-color-dark: #180270;
1907
- --rdp-outline: 2px solid var(--rdp-accent-color); /* Outline border for focused elements */
1908
- --rdp-outline-selected: 3px solid var(--rdp-accent-color); /* Outline border for focused _and_ selected elements */
1909
- margin: 1em;
1910
- }
1911
-
1912
- /* Hide elements for devices that are not screen readers */
1913
- .rdp-vhidden {
1914
- box-sizing: border-box;
1915
- padding: 0;
1916
- margin: 0;
1917
- background: transparent;
1918
- border: 0;
1919
- -moz-appearance: none;
1920
- -webkit-appearance: none;
1921
- appearance: none;
1922
- position: absolute !important;
1923
- top: 0;
1924
- width: 1px !important;
1925
- height: 1px !important;
1926
- padding: 0 !important;
1927
- overflow: hidden !important;
1928
- clip: rect(1px, 1px, 1px, 1px) !important;
1929
- border: 0 !important;
1930
- }
1931
-
1932
- /* Buttons */
1933
- .rdp-button_reset {
1934
- appearance: none;
1935
- position: relative;
1936
- margin: 0;
1937
- padding: 0;
1938
- cursor: default;
1939
- color: inherit;
1940
- background: none;
1941
- font: inherit;
1942
- -moz-appearance: none;
1943
- -webkit-appearance: none;
1944
- }
1945
-
1946
- .rdp-button_reset:focus-visible {
1947
- /* Make sure to reset outline only when :focus-visible is supported */
1948
- outline: none;
1902
+ :root [data-theme=light] {
1903
+ --pf-date-picker-background-color: var(--pf-white-color);
1904
+ --pf-date-picker-selected-date-background-color: var(--pf-primary-color);
1905
+ --pf-date-picker-selected-date-font-color: var(--pf-white-color);
1949
1906
  }
1950
-
1951
- .rdp-button {
1952
- border: 2px solid transparent;
1907
+ :root [data-theme=light] .rdp-root {
1908
+ --rdp-accent-color: var(--pf-link-color);
1909
+ --rdp-font-family: var(--pf-font-family-base);
1910
+ --rdp-range_middle-background-color: var(--pf-primary-color-300);
1953
1911
  }
1954
1912
 
1955
- .rdp-button[disabled]:not(.rdp-day_selected) {
1956
- opacity: 0.25;
1913
+ :root [data-theme=dark] {
1914
+ --pf-date-picker-background-color: var(--pf-primary-color-400);
1915
+ --pf-date-picker-selected-date-background-color: var(--pf-secondary-color-300);
1916
+ --pf-date-picker-selected-date-font-color: var(--pf-white-color);
1957
1917
  }
1958
-
1959
- .rdp-button:not([disabled]) {
1960
- cursor: pointer;
1918
+ :root [data-theme=dark] .rdp-root {
1919
+ --rdp-accent-color: var(--pf-link-color);
1920
+ --rdp-accent-background-color: var(--pf-primary-color-200);
1921
+ --rdp-font-family: var(--pf-font-family-base);
1922
+ --rdp-range_middle-background-color: var(--pf-primary-color-600);
1961
1923
  }
1962
1924
 
1963
- .rdp-button:focus-visible:not([disabled]) {
1964
- color: inherit;
1965
- background-color: var(--rdp-background-color);
1966
- border: var(--rdp-outline);
1925
+ .rdp-chevron {
1926
+ margin-left: var(--pf-margin-1);
1967
1927
  }
1968
1928
 
1969
1929
  .rdp-months {
1970
- display: flex;
1971
- }
1972
-
1973
- .rdp-month {
1974
- margin: 0 1em;
1975
- }
1976
-
1977
- .rdp-month:first-child {
1978
- margin-left: 0;
1979
- }
1980
-
1981
- .rdp-month:last-child {
1982
- margin-right: 0;
1983
- }
1984
-
1985
- .rdp-table {
1986
- margin: 0;
1987
- max-width: calc(var(--rdp-cell-size) * 7);
1988
- border-collapse: collapse;
1989
- }
1990
-
1991
- .rdp-with_weeknumber .rdp-table {
1992
- max-width: calc(var(--rdp-cell-size) * 8);
1993
- border-collapse: collapse;
1994
- }
1995
-
1996
- .rdp-caption {
1997
- display: flex;
1998
- align-items: center;
1999
- justify-content: space-between;
2000
- padding: 0;
2001
- text-align: left;
2002
- }
2003
-
2004
- .rdp-multiple_months .rdp-caption {
2005
- position: relative;
2006
- display: block;
2007
- text-align: center;
2008
- }
2009
-
2010
- .rdp-caption_dropdowns {
2011
- position: relative;
2012
- display: inline-flex;
2013
- }
2014
-
2015
- .rdp-caption_label {
2016
- position: relative;
2017
- z-index: 1;
2018
- display: inline-flex;
2019
- align-items: center;
2020
- margin: 0;
2021
- padding: 0 0.25em;
2022
- white-space: nowrap;
2023
- color: currentColor;
2024
- border: 0;
2025
- border: 2px solid transparent;
2026
- font-family: inherit;
2027
- font-size: 140%;
2028
- font-weight: bold;
2029
- }
2030
-
2031
- .rdp-nav {
2032
- white-space: nowrap;
2033
- }
2034
-
2035
- .rdp-multiple_months .rdp-caption_start .rdp-nav {
2036
- position: absolute;
2037
- top: 50%;
2038
- left: 0;
2039
- transform: translateY(-50%);
2040
- }
2041
-
2042
- .rdp-multiple_months .rdp-caption_end .rdp-nav {
2043
- position: absolute;
2044
- top: 50%;
2045
- right: 0;
2046
- transform: translateY(-50%);
2047
- }
2048
-
2049
- .rdp-nav_button {
2050
- display: inline-flex;
2051
- align-items: center;
2052
- justify-content: center;
2053
- width: var(--rdp-cell-size);
2054
- height: var(--rdp-cell-size);
2055
- padding: 0.25em;
2056
- border-radius: 100%;
2057
- }
2058
-
2059
- /* ---------- */
2060
- /* Dropdowns */
2061
- /* ---------- */
2062
- .rdp-dropdown_year,
2063
- .rdp-dropdown_month {
2064
- position: relative;
2065
- display: inline-flex;
2066
- align-items: center;
2067
- }
2068
-
2069
- .rdp-dropdown {
2070
- -webkit-appearance: none;
2071
- -moz-appearance: none;
2072
- appearance: none;
2073
- position: absolute;
2074
- z-index: 2;
2075
- top: 0;
2076
- bottom: 0;
2077
- left: 0;
2078
- width: 100%;
2079
- margin: 0;
2080
- padding: 0;
2081
- cursor: inherit;
2082
- opacity: 0;
2083
- border: none;
2084
- background-color: transparent;
2085
- font-family: inherit;
2086
- font-size: inherit;
2087
- line-height: inherit;
2088
- }
2089
-
2090
- .rdp-dropdown[disabled] {
2091
- opacity: unset;
2092
- color: unset;
2093
- }
2094
-
2095
- .rdp-dropdown:focus-visible:not([disabled]) + .rdp-caption_label {
2096
- background-color: var(--rdp-background-color);
2097
- border: var(--rdp-outline);
2098
- border-radius: 6px;
2099
- }
2100
-
2101
- .rdp-dropdown_icon {
2102
- margin: 0 0 0 5px;
2103
- }
2104
-
2105
- .rdp-head {
2106
- border: 0;
2107
- }
2108
-
2109
- .rdp-head_row,
2110
- .rdp-row {
2111
- height: 100%;
2112
- }
2113
-
2114
- .rdp-head_cell {
2115
- vertical-align: middle;
2116
- font-size: 0.75em;
2117
- font-weight: 700;
2118
- text-align: center;
2119
- height: 100%;
2120
- height: var(--rdp-cell-size);
2121
- padding: 0;
2122
- }
2123
-
2124
- .rdp-tbody {
2125
- border: 0;
2126
- }
2127
-
2128
- .rdp-tfoot {
2129
- margin: 0.5em;
2130
- }
2131
-
2132
- .rdp-cell {
2133
- width: var(--rdp-cell-size);
2134
- height: 100%;
2135
- height: var(--rdp-cell-size);
2136
- padding: 0;
2137
- text-align: center;
2138
- }
2139
-
2140
- .rdp-weeknumber {
2141
- font-size: 0.75em;
2142
- }
2143
-
2144
- .rdp-weeknumber,
2145
- .rdp-day {
2146
- display: flex;
2147
- overflow: hidden;
2148
- align-items: center;
2149
- justify-content: center;
2150
- box-sizing: border-box;
2151
- width: var(--rdp-cell-size);
2152
- max-width: var(--rdp-cell-size);
2153
- height: var(--rdp-cell-size);
2154
- margin: 0;
2155
- border: 2px solid transparent;
2156
- border-radius: 100%;
2157
- }
2158
-
2159
- .rdp-day_today:not(.rdp-day_outside) {
2160
- font-weight: bold;
2161
- }
2162
-
2163
- .rdp-day_selected,
2164
- .rdp-day_selected:focus-visible,
2165
- .rdp-day_selected:hover {
2166
- color: white;
2167
- opacity: 1;
2168
- background-color: var(--rdp-accent-color);
2169
- }
2170
-
2171
- .rdp-day_outside {
2172
- opacity: 0.5;
2173
- }
2174
-
2175
- .rdp-day_selected:focus-visible {
2176
- /* Since the background is the same use again the outline */
2177
- outline: var(--rdp-outline);
2178
- outline-offset: 2px;
2179
- z-index: 1;
2180
- }
2181
-
2182
- .rdp:not([dir=rtl]) .rdp-day_range_start:not(.rdp-day_range_end) {
2183
- border-top-right-radius: 0;
2184
- border-bottom-right-radius: 0;
2185
- }
2186
-
2187
- .rdp:not([dir=rtl]) .rdp-day_range_end:not(.rdp-day_range_start) {
2188
- border-top-left-radius: 0;
2189
- border-bottom-left-radius: 0;
2190
- }
2191
-
2192
- .rdp[dir=rtl] .rdp-day_range_start:not(.rdp-day_range_end) {
2193
- border-top-left-radius: 0;
2194
- border-bottom-left-radius: 0;
2195
- }
2196
-
2197
- .rdp[dir=rtl] .rdp-day_range_end:not(.rdp-day_range_start) {
2198
- border-top-right-radius: 0;
2199
- border-bottom-right-radius: 0;
2200
- }
2201
-
2202
- .rdp-day_range_end.rdp-day_range_start {
2203
- border-radius: 100%;
2204
- }
2205
-
2206
- .rdp-day_range_middle {
2207
- border-radius: 0;
2208
- }
2209
-
2210
-
2211
- /******************************
2212
- * Indico Custom Styling For Insights
2213
- *******************************/
2214
- .rdp-button:hover:not([disabled]):not(.rdp-day_selected) {
2215
- background-color: #976cec;
2216
- }
2217
-
2218
- .rdp-button,
2219
- .rdp-day {
2220
- box-shadow: none;
2221
- color: #000000;
2222
- }
2223
- .rdp-button:hover,
2224
- .rdp-day:hover {
2225
- background-color: #6833d0;
2226
- color: white;
2227
- }
2228
-
2229
- .rdp-head_cell,
2230
- .rdp-cell {
2231
- border: none;
2232
- }
2233
-
2234
- .DayPickerInput-Overlay {
2235
- border-radius: 4px;
2236
- z-index: 999;
2237
- }
2238
- .DayPickerInput-Overlay .rdp {
2239
- background: white;
2240
- z-index: 999;
2241
- border: solid 1px #000000;
2242
- border-radius: 4px;
2243
- box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.4);
2244
- }
2245
-
2246
- .rdp-caption_label {
2247
- font-weight: 400;
2248
- font-size: 14px;
2249
- color: #000000;
2250
- }
2251
-
2252
- .rdp-day_today {
2253
- background-color: #dbd5e6;
2254
- color: #ffffff;
2255
- font-weight: 400;
2256
- }
2257
-
2258
- .rdp-button_reset.rdp-button.rdp-day.rdp-day_selected {
2259
- background-color: #6833d0;
2260
- color: white;
2261
- }
2262
- .rdp-button_reset.rdp-button.rdp-day.rdp-day_selected:focus {
2263
- color: white;
1930
+ background-color: var(--pf-date-picker-background-color);
1931
+ padding: var(--pf-padding-3);
1932
+ border-radius: var(--pf-rounded);
1933
+ border: solid var(--pf-border-thin) var(--pf-border-color);
2264
1934
  }
2265
- .rdp-button_reset.rdp-button.rdp-day.rdp-day_selected:active {
2266
- color: white;
1935
+ .rdp-months .rdp-nav {
1936
+ margin-top: var(--pf-margin-3);
1937
+ margin-right: var(--pf-margin-3);
2267
1938
  }
2268
-
2269
- .rdp-head_cell {
2270
- color: #6833d0;
2271
- font-weight: 400;
1939
+ .rdp-months .rdp-month_caption {
1940
+ padding-left: var(--pf-margin-3);
2272
1941
  }
2273
1942
 
2274
- .date__picker__trigger {
2275
- color: #000000;
2276
- cursor: pointer;
1943
+ .rdp-week {
1944
+ margin-bottom: var(--pf-margin-4);
2277
1945
  }
2278
1946
 
2279
- .custom__caption {
2280
- display: flex;
2281
- justify-content: space-between;
2282
- align-items: center;
2283
- padding: 15px 5px 15px 5px;
2284
- }
2285
- .custom__caption .custom__caption__text {
2286
- font-size: 14px;
2287
- color: #000000;
2288
- margin: 0;
2289
- }
2290
- .custom__caption .custom__caption__action__button {
2291
- background: none;
1947
+ .rdp-day .rdp-day_button {
2292
1948
  border: none;
2293
- cursor: pointer;
2294
- box-shadow: none;
2295
- padding: 0 5px 0 5px;
2296
- border-radius: 60px;
2297
- color: #6833d0;
2298
- height: 20px;
2299
- width: 20px;
2300
- }
2301
- .custom__caption .custom__caption__action__button:hover {
2302
- background-color: #6833d0;
2303
- color: #ffffff;
2304
- border-radius: 20px;
2305
1949
  }
2306
- .custom__caption .custom__caption__action__button:hover .rdp-nav_icon {
2307
- color: #ffffff;
2308
- }
2309
- .custom__caption .custom__caption__action__button .rdp-nav_icon {
2310
- color: #6833d0;
1950
+ .rdp-day.rdp-today .rdp-day_button {
1951
+ background-color: var(--pf-primary-color-300);
1952
+ color: var(--pf-date-picker-selected-date-font-color);
2311
1953
  }
2312
-
2313
- .visually-hidden,
2314
- .visually-hidden-focusable:not(:focus):not(:focus-within) {
2315
- border: 0 !important;
2316
- clip: rect(0, 0, 0, 0) !important;
2317
- height: 1px !important;
2318
- margin: -1px !important;
2319
- overflow: hidden !important;
2320
- padding: 0 !important;
2321
- white-space: nowrap !important;
2322
- width: 1px !important;
1954
+ .rdp-day.rdp-selected .rdp-day_button {
1955
+ background-color: var(--pf-date-picker-selected-date-background-color);
1956
+ color: var(--pf-date-picker-selected-date-font-color);
2323
1957
  }
2324
-
2325
- .visually-hidden:not(caption),
2326
- .visually-hidden-focusable:not(:focus):not(:focus-within):not(caption) {
2327
- position: absolute !important;
1958
+ .rdp-day.rdp-range_middle .rdp-day_button {
1959
+ background-color: transparent;
2328
1960
  }
2329
1961
 
2330
1962
  :root,