@ohos-ports/flowbite-datepicker 2.0.0-beta.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/.eslintignore +2 -0
- package/.eslintrc.js +73 -0
- package/.stylelintrc +12 -0
- package/CHANGELOG.md +72 -0
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/demo/index.html +582 -0
- package/demo/live-demo.js +471 -0
- package/dist/DateRangePicker.cjs.js +2996 -0
- package/dist/DateRangePicker.esm.js +2994 -0
- package/dist/DateRangePicker.umd.js +3002 -0
- package/dist/Datepicker.cjs.js +2778 -0
- package/dist/Datepicker.esm.js +2776 -0
- package/dist/Datepicker.umd.js +2784 -0
- package/dist/css/datepicker-bs4.css +276 -0
- package/dist/css/datepicker-bs4.min.css +1 -0
- package/dist/css/datepicker-bs5.css +276 -0
- package/dist/css/datepicker-bs5.min.css +1 -0
- package/dist/css/datepicker-bulma.css +258 -0
- package/dist/css/datepicker-bulma.min.css +1 -0
- package/dist/css/datepicker-foundation.css +262 -0
- package/dist/css/datepicker-foundation.min.css +1 -0
- package/dist/css/datepicker.css +306 -0
- package/dist/css/datepicker.min.css +1403 -0
- package/dist/js/datepicker-full.js +2777 -0
- package/dist/js/datepicker-full.min.js +1 -0
- package/dist/js/datepicker.js +2569 -0
- package/dist/js/datepicker.min.js +1 -0
- package/dist/js/locales/ar-tn.js +15 -0
- package/dist/js/locales/ar.js +15 -0
- package/dist/js/locales/az.js +14 -0
- package/dist/js/locales/bg.js +14 -0
- package/dist/js/locales/bm.js +18 -0
- package/dist/js/locales/bn.js +19 -0
- package/dist/js/locales/br.js +18 -0
- package/dist/js/locales/bs.js +15 -0
- package/dist/js/locales/ca.js +18 -0
- package/dist/js/locales/cs.js +19 -0
- package/dist/js/locales/cy.js +14 -0
- package/dist/js/locales/da.js +19 -0
- package/dist/js/locales/de.js +18 -0
- package/dist/js/locales/el.js +16 -0
- package/dist/js/locales/en-AU.js +18 -0
- package/dist/js/locales/en-CA.js +18 -0
- package/dist/js/locales/en-GB.js +18 -0
- package/dist/js/locales/en-IE.js +17 -0
- package/dist/js/locales/en-NZ.js +17 -0
- package/dist/js/locales/en-ZA.js +17 -0
- package/dist/js/locales/eo.js +17 -0
- package/dist/js/locales/es.js +18 -0
- package/dist/js/locales/et.js +18 -0
- package/dist/js/locales/eu.js +18 -0
- package/dist/js/locales/fa.js +17 -0
- package/dist/js/locales/fi.js +17 -0
- package/dist/js/locales/fo.js +15 -0
- package/dist/js/locales/fr-CH.js +21 -0
- package/dist/js/locales/fr.js +18 -0
- package/dist/js/locales/gl.js +16 -0
- package/dist/js/locales/he.js +15 -0
- package/dist/js/locales/hi.js +18 -0
- package/dist/js/locales/hr.js +13 -0
- package/dist/js/locales/hu.js +18 -0
- package/dist/js/locales/hy.js +18 -0
- package/dist/js/locales/id.js +15 -0
- package/dist/js/locales/is.js +14 -0
- package/dist/js/locales/it-CH.js +20 -0
- package/dist/js/locales/it.js +18 -0
- package/dist/js/locales/ja.js +17 -0
- package/dist/js/locales/ka.js +17 -0
- package/dist/js/locales/kk.js +15 -0
- package/dist/js/locales/km.js +15 -0
- package/dist/js/locales/ko.js +18 -0
- package/dist/js/locales/lt.js +19 -0
- package/dist/js/locales/lv.js +18 -0
- package/dist/js/locales/me.js +17 -0
- package/dist/js/locales/mk.js +15 -0
- package/dist/js/locales/mn.js +17 -0
- package/dist/js/locales/mr.js +18 -0
- package/dist/js/locales/ms.js +15 -0
- package/dist/js/locales/nl-BE.js +18 -0
- package/dist/js/locales/nl.js +18 -0
- package/dist/js/locales/no.js +18 -0
- package/dist/js/locales/oc.js +17 -0
- package/dist/js/locales/pl.js +17 -0
- package/dist/js/locales/pt-BR.js +17 -0
- package/dist/js/locales/pt.js +18 -0
- package/dist/js/locales/ro.js +17 -0
- package/dist/js/locales/ru.js +18 -0
- package/dist/js/locales/si.js +18 -0
- package/dist/js/locales/sk.js +18 -0
- package/dist/js/locales/sl.js +15 -0
- package/dist/js/locales/sq.js +18 -0
- package/dist/js/locales/sr-latn.js +16 -0
- package/dist/js/locales/sr.js +16 -0
- package/dist/js/locales/sv.js +17 -0
- package/dist/js/locales/sw.js +15 -0
- package/dist/js/locales/ta.js +18 -0
- package/dist/js/locales/tg.js +19 -0
- package/dist/js/locales/th.js +14 -0
- package/dist/js/locales/tk.js +18 -0
- package/dist/js/locales/tr.js +17 -0
- package/dist/js/locales/uk.js +17 -0
- package/dist/js/locales/uz-cyrl.js +18 -0
- package/dist/js/locales/uz-latn.js +18 -0
- package/dist/js/locales/vi.js +16 -0
- package/dist/js/locales/zh-CN.js +19 -0
- package/dist/js/locales/zh-TW.js +18 -0
- package/dist/locales/index.cjs.js +1028 -0
- package/dist/locales/index.esm.js +1028 -0
- package/dist/main.cjs.js +2999 -0
- package/dist/main.esm.js +2994 -0
- package/dist/main.umd.js +3005 -0
- package/docs/.nojekyll +0 -0
- package/docs/README.md +266 -0
- package/docs/_sidebar.md +6 -0
- package/docs/api.md +284 -0
- package/docs/date-string+format.md +90 -0
- package/docs/i18n.md +99 -0
- package/docs/images/datepicker-inline.jpg +0 -0
- package/docs/images/datepicker.jpg +0 -0
- package/docs/images/multidate.jpg +0 -0
- package/docs/images/picker-structure.jpg +0 -0
- package/docs/images/rangepicker.jpg +0 -0
- package/docs/images/view-days.jpg +0 -0
- package/docs/images/view-decades.jpg +0 -0
- package/docs/images/view-months.jpg +0 -0
- package/docs/images/view-years.jpg +0 -0
- package/docs/index.html +26 -0
- package/docs/options.md +354 -0
- package/docs/overview.md +174 -0
- package/extras/twoDigitToFullYear/test/twoDigitToFullYear.js +58 -0
- package/extras/twoDigitToFullYear/twoDigitToFullYear.js +26 -0
- package/js/DateRangePicker.js +210 -0
- package/js/Datepicker.js +487 -0
- package/js/datepicker-full.js +5 -0
- package/js/events/functions.js +48 -0
- package/js/events/inputFieldListeners.js +206 -0
- package/js/events/otherListeners.js +15 -0
- package/js/events/pickerListeners.js +70 -0
- package/js/i18n/base-locales.js +13 -0
- package/js/i18n/locales/ar-tn.js +15 -0
- package/js/i18n/locales/ar.js +15 -0
- package/js/i18n/locales/az.js +14 -0
- package/js/i18n/locales/bg.js +14 -0
- package/js/i18n/locales/bm.js +18 -0
- package/js/i18n/locales/bn.js +19 -0
- package/js/i18n/locales/br.js +18 -0
- package/js/i18n/locales/bs.js +15 -0
- package/js/i18n/locales/ca.js +18 -0
- package/js/i18n/locales/cs.js +19 -0
- package/js/i18n/locales/cy.js +14 -0
- package/js/i18n/locales/da.js +19 -0
- package/js/i18n/locales/de.js +18 -0
- package/js/i18n/locales/el.js +16 -0
- package/js/i18n/locales/en-AU.js +18 -0
- package/js/i18n/locales/en-CA.js +18 -0
- package/js/i18n/locales/en-GB.js +18 -0
- package/js/i18n/locales/en-IE.js +17 -0
- package/js/i18n/locales/en-NZ.js +17 -0
- package/js/i18n/locales/en-ZA.js +17 -0
- package/js/i18n/locales/eo.js +17 -0
- package/js/i18n/locales/es.js +18 -0
- package/js/i18n/locales/et.js +18 -0
- package/js/i18n/locales/eu.js +18 -0
- package/js/i18n/locales/fa.js +17 -0
- package/js/i18n/locales/fi.js +17 -0
- package/js/i18n/locales/fo.js +15 -0
- package/js/i18n/locales/fr-CH.js +21 -0
- package/js/i18n/locales/fr.js +18 -0
- package/js/i18n/locales/gl.js +16 -0
- package/js/i18n/locales/he.js +15 -0
- package/js/i18n/locales/hi.js +18 -0
- package/js/i18n/locales/hr.js +13 -0
- package/js/i18n/locales/hu.js +18 -0
- package/js/i18n/locales/hy.js +18 -0
- package/js/i18n/locales/id.js +15 -0
- package/js/i18n/locales/is.js +14 -0
- package/js/i18n/locales/it-CH.js +20 -0
- package/js/i18n/locales/it.js +18 -0
- package/js/i18n/locales/ja.js +17 -0
- package/js/i18n/locales/ka.js +17 -0
- package/js/i18n/locales/kk.js +15 -0
- package/js/i18n/locales/km.js +15 -0
- package/js/i18n/locales/ko.js +18 -0
- package/js/i18n/locales/lt.js +19 -0
- package/js/i18n/locales/lv.js +18 -0
- package/js/i18n/locales/me.js +17 -0
- package/js/i18n/locales/mk.js +15 -0
- package/js/i18n/locales/mn.js +17 -0
- package/js/i18n/locales/mr.js +18 -0
- package/js/i18n/locales/ms.js +15 -0
- package/js/i18n/locales/nl-BE.js +18 -0
- package/js/i18n/locales/nl.js +18 -0
- package/js/i18n/locales/no.js +18 -0
- package/js/i18n/locales/oc.js +17 -0
- package/js/i18n/locales/pl.js +17 -0
- package/js/i18n/locales/pt-BR.js +17 -0
- package/js/i18n/locales/pt.js +18 -0
- package/js/i18n/locales/ro.js +17 -0
- package/js/i18n/locales/ru.js +18 -0
- package/js/i18n/locales/si.js +18 -0
- package/js/i18n/locales/sk.js +18 -0
- package/js/i18n/locales/sl.js +15 -0
- package/js/i18n/locales/sq.js +18 -0
- package/js/i18n/locales/sr-latn.js +16 -0
- package/js/i18n/locales/sr.js +16 -0
- package/js/i18n/locales/sv.js +17 -0
- package/js/i18n/locales/sw.js +15 -0
- package/js/i18n/locales/ta.js +18 -0
- package/js/i18n/locales/tg.js +19 -0
- package/js/i18n/locales/th.js +14 -0
- package/js/i18n/locales/tk.js +18 -0
- package/js/i18n/locales/tr.js +17 -0
- package/js/i18n/locales/uk.js +17 -0
- package/js/i18n/locales/uz-cyrl.js +18 -0
- package/js/i18n/locales/uz-latn.js +18 -0
- package/js/i18n/locales/vi.js +16 -0
- package/js/i18n/locales/zh-CN.js +19 -0
- package/js/i18n/locales/zh-TW.js +18 -0
- package/js/lib/date-format.js +185 -0
- package/js/lib/date.js +82 -0
- package/js/lib/dom.js +55 -0
- package/js/lib/event.js +68 -0
- package/js/lib/utils.js +61 -0
- package/js/main.js +4 -0
- package/js/options/defaultOptions.js +38 -0
- package/js/options/processOptions.js +263 -0
- package/js/picker/Picker.js +334 -0
- package/js/picker/templates/calendarWeeksTemplate.js +8 -0
- package/js/picker/templates/daysTemplate.js +8 -0
- package/js/picker/templates/pickerTemplate.js +23 -0
- package/js/picker/views/DaysView.js +250 -0
- package/js/picker/views/MonthsView.js +198 -0
- package/js/picker/views/View.js +55 -0
- package/js/picker/views/YearsView.js +170 -0
- package/package.json +81 -0
- package/postcss.config.js +5 -0
- package/rollup.config.js +75 -0
- package/sass/_mixins.scss +12 -0
- package/sass/datepicker-bs4.scss +91 -0
- package/sass/datepicker-bs5.scss +91 -0
- package/sass/datepicker-bulma.scss +69 -0
- package/sass/datepicker-foundation.scss +66 -0
- package/sass/datepicker.scss +436 -0
- package/sass/index-bs4.scss +5 -0
- package/sass/index-bs5.scss +5 -0
- package/sass/index-bulma.scss +6 -0
- package/sass/index-foundation.scss +3 -0
- package/scripts/build-css.js +39 -0
- package/scripts/build-locales.js +57 -0
- package/scripts/convert-bsdp-locales.js +65 -0
- package/scripts/minify-css.js +31 -0
- package/scripts/minify-js.js +17 -0
- package/style.css +10 -0
- package/tailwind.config.js +16 -0
- package/tailwind.css +1389 -0
- package/test/DateRangePicker/DateRangePicker.js +547 -0
- package/test/DateRangePicker/api-methods.js +415 -0
- package/test/DateRangePicker/date-selection.js +472 -0
- package/test/DateRangePicker/options.js +308 -0
- package/test/Datepicker/Datepicker-object.js +236 -0
- package/test/Datepicker/api-methods.js +328 -0
- package/test/_utils/date.js +102 -0
- package/test/_utils/dom.js +70 -0
- package/test/events.js +785 -0
- package/test/inline-mode.js +45 -0
- package/test/keyboard-operation/arrow-down.js +293 -0
- package/test/keyboard-operation/arrow-left.js +255 -0
- package/test/keyboard-operation/arrow-right.js +215 -0
- package/test/keyboard-operation/arrow-up.js +461 -0
- package/test/keyboard-operation/edit-mode.js +458 -0
- package/test/keyboard-operation/keyboard-operation.js +146 -0
- package/test/mouse-operation.js +580 -0
- package/test/options/before-show.js +635 -0
- package/test/options/bulma-datepicker.sublime-workspace +1280 -0
- package/test/options/buttons.js +383 -0
- package/test/options/date-restrictions.js +802 -0
- package/test/options/format.js +281 -0
- package/test/options/multidate.js +380 -0
- package/test/options/options.js +727 -0
- package/test/options/orientation.js +410 -0
- package/test/options/pick-levle+view.js +357 -0
- package/test/test.html +94 -0
- package/test/unit/DateRangePicker.js +192 -0
- package/test/unit/Datepicker.js +307 -0
- package/test/unit/_setup.js +28 -0
- package/test/unit/lib/date-format.js +310 -0
- package/test/unit/lib/date.js +211 -0
- package/test/unit/lib/dom.js +142 -0
- package/test/unit/lib/event.js +207 -0
- package/test/unit/lib/utils.js +135 -0
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
//== foundational variables ==//
|
|
2
|
+
$black: hsl(0, 0%, 4%) !default;
|
|
3
|
+
$white: hsl(0, 0%, 100%) !default;
|
|
4
|
+
$light: hsl(0, 0%, 96%) !default; // white-ter
|
|
5
|
+
$dark: hsl(0, 0%, 21%) !default; // grey-darker
|
|
6
|
+
$link: hsl(217, 71%, 53%) !default; // blue
|
|
7
|
+
|
|
8
|
+
$grey-dark: lighten($black, 25%) !default;
|
|
9
|
+
$grey-light: darken($light, 25%) !default;
|
|
10
|
+
$grey-lighter: darken($light, 10%) !default;
|
|
11
|
+
|
|
12
|
+
//== datepicker variables ==//
|
|
13
|
+
$dp-background-color: $white !default;
|
|
14
|
+
$dp-border-color: $grey-lighter !default;
|
|
15
|
+
$dp-border-radius: 4px !default;
|
|
16
|
+
$dp-border-radius-small: 2px !default;
|
|
17
|
+
$dp-line-height-base: 1.5 !default;
|
|
18
|
+
$dp-font-size-normal: 1rem !default;
|
|
19
|
+
$dp-font-size-small: 0.75rem !default;
|
|
20
|
+
$dp-font-weight-semibold: 600 !default;
|
|
21
|
+
$dp-font-weight-bold: 700 !default;
|
|
22
|
+
$dp-dropdown-offset: 4px !default;
|
|
23
|
+
$dp-dropdown-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default;
|
|
24
|
+
$dp-dropdown-z: 20 !default;
|
|
25
|
+
|
|
26
|
+
$dp-title-background-color: $light !default;
|
|
27
|
+
|
|
28
|
+
$dp-cell-size-base: 2.25rem !default;
|
|
29
|
+
$dp-cell-focus-background-color: darken($light, 5%) !default;
|
|
30
|
+
$dp-cell-prevnext-color: hsl(0, 0%, 48%) !default; // grey
|
|
31
|
+
$dp-cell-disabled-color: $grey-lighter !default;
|
|
32
|
+
$dp-cell-selected-background-color: $link !default;
|
|
33
|
+
$dp-cell-selected-color: #fff !default; // link(blue)-invert
|
|
34
|
+
$dp-cell-selected-font-weight: 600 !default;
|
|
35
|
+
$dp-cell-today-background-color: hsl(171, 100%, 41%) !default; // turquoise (primary)
|
|
36
|
+
$dp-cell-today-color: #fff !default; // turquoise-invert
|
|
37
|
+
$dp-cell-highlighted-background-color: $light !default;
|
|
38
|
+
$dp-range-start-end-background-color: $grey-light !default;
|
|
39
|
+
$dp-range-start-end-color: $dp-cell-selected-color !default;
|
|
40
|
+
$dp-range-background-color: $grey-lighter !default;
|
|
41
|
+
$dp-range-today-background-color: $dp-cell-today-background-color !default;
|
|
42
|
+
$dp-week-color: $grey-light !default;
|
|
43
|
+
|
|
44
|
+
$dp-footer-background-color: $light !default;
|
|
45
|
+
|
|
46
|
+
$dp-input-in-edit-border-color: darken($link, 5%) !default;
|
|
47
|
+
$dp-input-in-edit-focus-box-shadow-size: 0 0 0.25em 0.25em !default;
|
|
48
|
+
|
|
49
|
+
//== non-configurable variables ==//
|
|
50
|
+
$dp-cell-shrink-threshold: $dp-cell-size-base * 10; // = 8 * 1.25
|
|
51
|
+
$dp-cell-shrinked-width: $dp-cell-size-base * 7 / 8;
|
|
52
|
+
|
|
53
|
+
//== mixins ==//
|
|
54
|
+
@import 'mixins';
|
|
55
|
+
|
|
56
|
+
//== styles ==//
|
|
57
|
+
.datepicker {
|
|
58
|
+
display: none;
|
|
59
|
+
|
|
60
|
+
&.active {
|
|
61
|
+
display: block;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.datepicker-dropdown {
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 0;
|
|
68
|
+
left: 0;
|
|
69
|
+
z-index: $dp-dropdown-z;
|
|
70
|
+
padding-top: $dp-dropdown-offset;
|
|
71
|
+
|
|
72
|
+
&.datepicker-orient-top {
|
|
73
|
+
padding-top: 0;
|
|
74
|
+
padding-bottom: $dp-dropdown-offset;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.datepicker-picker {
|
|
79
|
+
display: inline-block;
|
|
80
|
+
border-radius: $dp-border-radius;
|
|
81
|
+
background-color: $dp-background-color;
|
|
82
|
+
|
|
83
|
+
.datepicker-dropdown & {
|
|
84
|
+
box-shadow: $dp-dropdown-shadow;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
span {
|
|
88
|
+
display: block;
|
|
89
|
+
flex: 1;
|
|
90
|
+
border: 0;
|
|
91
|
+
border-radius: $dp-border-radius;
|
|
92
|
+
cursor: default;
|
|
93
|
+
text-align: center;
|
|
94
|
+
-webkit-touch-callout: none;
|
|
95
|
+
user-select: none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.datepicker-main {
|
|
100
|
+
padding: 2px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.datepicker-footer {
|
|
104
|
+
box-shadow: inset 0 1px 1px rgba($black, 0.1);
|
|
105
|
+
background-color: $dp-footer-background-color;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
%flex-container {
|
|
109
|
+
display: flex;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
%flex-wrap {
|
|
113
|
+
flex-wrap: wrap;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
%flex-basis-day {
|
|
117
|
+
flex-basis: percentage(1 / 7);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
%flex-basis-month-year {
|
|
121
|
+
flex-basis: 25%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
%datepicker-cell-height {
|
|
125
|
+
height: $dp-cell-size-base;
|
|
126
|
+
line-height: $dp-cell-size-base;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.datepicker-title {
|
|
130
|
+
box-shadow: inset 0 -1px 1px rgba($black, 0.1);
|
|
131
|
+
background-color: $dp-title-background-color;
|
|
132
|
+
padding: 0.375rem 0.75rem;
|
|
133
|
+
text-align: center;
|
|
134
|
+
font-weight: $dp-font-weight-bold;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.datepicker-controls {
|
|
138
|
+
@extend %flex-container;
|
|
139
|
+
|
|
140
|
+
.datepicker-header & {
|
|
141
|
+
padding: 2px 2px 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@if mixin-exists(dp-button) {
|
|
145
|
+
@include dp-button;
|
|
146
|
+
} @else {
|
|
147
|
+
.button {
|
|
148
|
+
$button-color: $dark;
|
|
149
|
+
$button-background-color: $white;
|
|
150
|
+
|
|
151
|
+
$button-border-color: $grey-lighter;
|
|
152
|
+
$button-border-width: 1px;
|
|
153
|
+
|
|
154
|
+
$button-padding-vertical: calc(0.375em - #{$button-border-width});
|
|
155
|
+
$button-padding-horizontal: 0.75em;
|
|
156
|
+
|
|
157
|
+
$button-hover-color: $dark; // link-hover
|
|
158
|
+
$button-hover-border-color: $grey-light; // link-hover-border
|
|
159
|
+
|
|
160
|
+
$button-focus-color: $dark; // link-focus
|
|
161
|
+
$button-focus-border-color: $link; // link-focus-border
|
|
162
|
+
$button-focus-box-shadow-size: 0 0 0 0.125em;
|
|
163
|
+
$button-focus-box-shadow-color: rgba($link, 0.25);
|
|
164
|
+
|
|
165
|
+
$button-active-color: $dark; // link-active
|
|
166
|
+
$button-active-border-color: $grey-dark; // link-active-border
|
|
167
|
+
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
position: relative;
|
|
170
|
+
align-items: center;
|
|
171
|
+
justify-content: center;
|
|
172
|
+
margin: 0;
|
|
173
|
+
border: $button-border-width solid $button-border-color;
|
|
174
|
+
border-radius: $dp-border-radius; // control-radius
|
|
175
|
+
box-shadow: none;
|
|
176
|
+
background-color: $button-background-color;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
padding: $button-padding-vertical $button-padding-horizontal;
|
|
179
|
+
height: 2.25em; // control-height
|
|
180
|
+
vertical-align: top;
|
|
181
|
+
text-align: center;
|
|
182
|
+
line-height: $dp-line-height-base; // control-line-height
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
color: $button-color;
|
|
185
|
+
font-size: $dp-font-size-normal; // size-normal
|
|
186
|
+
|
|
187
|
+
&:focus,
|
|
188
|
+
&:active {
|
|
189
|
+
outline: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&:hover {
|
|
193
|
+
border-color: $button-hover-border-color;
|
|
194
|
+
color: $button-hover-color;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:focus {
|
|
198
|
+
border-color: $button-focus-border-color;
|
|
199
|
+
color: $button-focus-color;
|
|
200
|
+
|
|
201
|
+
&:not(:active) {
|
|
202
|
+
box-shadow: $button-focus-box-shadow-size $button-focus-box-shadow-color;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&:active {
|
|
207
|
+
border-color: $button-active-border-color;
|
|
208
|
+
color: $button-active-color;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&[disabled] {
|
|
212
|
+
cursor: not-allowed;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.datepicker-header & {
|
|
216
|
+
@include dp-header-button-common;
|
|
217
|
+
|
|
218
|
+
&:hover {
|
|
219
|
+
background-color: darken($white, 2.5%);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&:focus {
|
|
223
|
+
&:not(:active) {
|
|
224
|
+
box-shadow: 0 0 0 0.125em rgba($white, 0.25);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&:active {
|
|
229
|
+
background-color: darken($white, 5%);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&[disabled] {
|
|
233
|
+
box-shadow: none;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.datepicker-footer & {
|
|
238
|
+
@include dp-footer-button-common;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.view-switch {
|
|
244
|
+
flex: auto;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.prev-btn,
|
|
248
|
+
.next-btn {
|
|
249
|
+
padding-right: 0.375rem;
|
|
250
|
+
padding-left: 0.375rem;
|
|
251
|
+
width: $dp-cell-size-base;
|
|
252
|
+
|
|
253
|
+
&.disabled {
|
|
254
|
+
visibility: hidden;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.datepicker-view {
|
|
260
|
+
@extend %flex-container;
|
|
261
|
+
|
|
262
|
+
.days-of-week {
|
|
263
|
+
@extend %flex-container;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.dow {
|
|
267
|
+
@extend %flex-basis-day;
|
|
268
|
+
height: $dp-font-size-normal * $dp-line-height-base;
|
|
269
|
+
line-height: $dp-font-size-normal * $dp-line-height-base;
|
|
270
|
+
font-size: ($dp-font-size-small + $dp-font-size-normal) / 2;
|
|
271
|
+
font-weight: $dp-font-weight-bold;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.week {
|
|
275
|
+
@extend %datepicker-cell-height;
|
|
276
|
+
width: $dp-cell-size-base;
|
|
277
|
+
color: $dp-week-color;
|
|
278
|
+
font-size: $dp-font-size-small;
|
|
279
|
+
|
|
280
|
+
@media (max-width: $dp-cell-shrink-threshold) {
|
|
281
|
+
width: $dp-cell-shrinked-width;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.datepicker-grid {
|
|
287
|
+
@extend %flex-container;
|
|
288
|
+
@extend %flex-wrap;
|
|
289
|
+
|
|
290
|
+
width: $dp-cell-size-base * 7;
|
|
291
|
+
|
|
292
|
+
@media (max-width: $dp-cell-shrink-threshold) {
|
|
293
|
+
.calendar-weeks + .days & {
|
|
294
|
+
width: $dp-cell-shrinked-width * 7;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.datepicker-cell {
|
|
300
|
+
@extend %datepicker-cell-height;
|
|
301
|
+
|
|
302
|
+
&:not(.disabled):hover {
|
|
303
|
+
background-color: darken($dp-background-color, 2.5%);
|
|
304
|
+
cursor: pointer;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&.focused:not(.selected) {
|
|
308
|
+
background-color: $dp-cell-focus-background-color;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&.selected {
|
|
312
|
+
&,
|
|
313
|
+
&:hover {
|
|
314
|
+
background-color: $dp-cell-selected-background-color;
|
|
315
|
+
color: $dp-cell-selected-color;
|
|
316
|
+
font-weight: $dp-cell-selected-font-weight;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
&.disabled {
|
|
321
|
+
color: $dp-cell-disabled-color;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
&.prev,
|
|
325
|
+
&.next {
|
|
326
|
+
&:not(.disabled) {
|
|
327
|
+
color: $dp-cell-prevnext-color;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
&.selected {
|
|
331
|
+
color: darken($dp-cell-selected-color, 10%);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
&.highlighted:not(.selected):not(.range):not(.today) {
|
|
336
|
+
border-radius: 0;
|
|
337
|
+
background-color: $dp-cell-highlighted-background-color;
|
|
338
|
+
|
|
339
|
+
&:not(.disabled):hover {
|
|
340
|
+
background-color: darken($dp-cell-highlighted-background-color, 2.5%);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&.focused {
|
|
344
|
+
background-color: $dp-cell-focus-background-color;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
&.today {
|
|
349
|
+
&:not(.selected) {
|
|
350
|
+
background-color: $dp-cell-today-background-color;
|
|
351
|
+
|
|
352
|
+
&:not(.disabled) {
|
|
353
|
+
color: $dp-cell-today-color;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
&.focused:not(.selected) {
|
|
358
|
+
background-color: darken($dp-cell-today-background-color, 2.5%);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
&%range-start-end-common {
|
|
363
|
+
background-color: $dp-range-start-end-background-color;
|
|
364
|
+
color: $dp-range-start-end-color;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
&%range-start-end-focused-common {
|
|
368
|
+
background-color: darken($dp-range-start-end-background-color, 2.5%);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
&.range-start {
|
|
372
|
+
border-radius: $dp-border-radius 0 0 $dp-border-radius;
|
|
373
|
+
|
|
374
|
+
&:not(.selected) {
|
|
375
|
+
@extend %range-start-end-common;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
&.focused:not(.selected) {
|
|
379
|
+
@extend %range-start-end-focused-common;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
&.range-end {
|
|
384
|
+
border-radius: 0 $dp-border-radius $dp-border-radius 0;
|
|
385
|
+
|
|
386
|
+
&:not(.selected) {
|
|
387
|
+
@extend %range-start-end-common;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&.focused:not(.selected) {
|
|
391
|
+
@extend %range-start-end-focused-common;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
&.range {
|
|
396
|
+
border-radius: 0;
|
|
397
|
+
background-color: $dp-range-background-color;
|
|
398
|
+
|
|
399
|
+
&:not(.disabled):not(.focused):not(.today):hover {
|
|
400
|
+
background-color: darken($dp-range-background-color, 2.5%);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
&.disabled {
|
|
404
|
+
color: darken($dp-range-background-color, 10%);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
&.focused {
|
|
408
|
+
background-color: darken($dp-range-background-color, 5%);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
@if $dp-range-today-background-color != $dp-cell-today-background-color {
|
|
412
|
+
&.today {
|
|
413
|
+
background-color: $dp-range-today-background-color;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.datepicker-view .days & {
|
|
419
|
+
@extend %flex-basis-day;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.datepicker-view.datepicker-grid & {
|
|
423
|
+
@extend %flex-basis-month-year;
|
|
424
|
+
height: $dp-cell-size-base * 2;
|
|
425
|
+
line-height: $dp-cell-size-base * 2;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.datepicker-input.in-edit {
|
|
430
|
+
border-color: $dp-input-in-edit-border-color;
|
|
431
|
+
|
|
432
|
+
&:focus,
|
|
433
|
+
&:active {
|
|
434
|
+
box-shadow: $dp-input-in-edit-focus-box-shadow-size rgba($dp-input-in-edit-border-color, 0.2);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
@import '../node_modules/bulma/sass/utilities/initial-variables';
|
|
2
|
+
@import '../node_modules/bulma/sass/utilities/functions';
|
|
3
|
+
@import '../node_modules/bulma/sass/utilities/derived-variables';
|
|
4
|
+
@import '../node_modules/bulma/sass/utilities/mixins';
|
|
5
|
+
|
|
6
|
+
@import 'datepicker-bulma';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const postcss = require('postcss');
|
|
4
|
+
const nodeSass = require('postcss-node-sass')({
|
|
5
|
+
outputStyle: 'expanded',
|
|
6
|
+
});
|
|
7
|
+
const autoprefixer = require('autoprefixer');
|
|
8
|
+
const syntax = require('postcss-scss');
|
|
9
|
+
|
|
10
|
+
const rootDir = path.dirname(__dirname);
|
|
11
|
+
const srcDir = `${rootDir}/sass`;
|
|
12
|
+
const distDir = `${rootDir}/dist/css`;
|
|
13
|
+
const files = [
|
|
14
|
+
{in: 'datepicker.scss', out: 'datepicker.css'},
|
|
15
|
+
{in: 'index-bulma.scss', out: 'datepicker-bulma.css'},
|
|
16
|
+
{in: 'index-bs4.scss', out: 'datepicker-bs4.css'},
|
|
17
|
+
{in: 'index-bs5.scss', out: 'datepicker-bs5.css'},
|
|
18
|
+
{in: 'index-foundation.scss', out: 'datepicker-foundation.css'},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
if (!fs.existsSync(distDir)) {
|
|
22
|
+
fs.mkdirSync(distDir, {recursive: true});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Promise.all(files.map((entry) => {
|
|
26
|
+
return new Promise((resolve) => {
|
|
27
|
+
const from = `${srcDir}/${entry.in}`;
|
|
28
|
+
const file = fs.readFileSync(from, 'utf8');
|
|
29
|
+
postcss([nodeSass, autoprefixer])
|
|
30
|
+
.process(file, {syntax, from, map: false})
|
|
31
|
+
.then((result) => {
|
|
32
|
+
fs.writeFileSync(`${distDir}/${entry.out}`, result.css);
|
|
33
|
+
resolve();
|
|
34
|
+
})
|
|
35
|
+
.catch((err) => {
|
|
36
|
+
console.error(err);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}));
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const rootDir = path.dirname(__dirname);
|
|
5
|
+
const srcDir = `${rootDir}/js/i18n/locales`;
|
|
6
|
+
const distDir = `${rootDir}/dist/js/locales`;
|
|
7
|
+
const indexDir = `${rootDir}/dist/locales`;
|
|
8
|
+
|
|
9
|
+
const reConvert = /export default (\{\s+)([\w'-]+):([\s\S]+\})\n\};/m;
|
|
10
|
+
const rePropNameFix = /\.('\w+-\w+')/;
|
|
11
|
+
|
|
12
|
+
if (fs.existsSync(distDir)) {
|
|
13
|
+
// empty dist dir
|
|
14
|
+
fs.readdirSync(distDir).forEach((file) => {
|
|
15
|
+
fs.unlinkSync(`${distDir}/${file}`);
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
fs.mkdirSync(distDir, {recursive: true});
|
|
19
|
+
}
|
|
20
|
+
// copy locales to dist
|
|
21
|
+
fs.readdirSync(srcDir).forEach((file) => {
|
|
22
|
+
const src = fs.readFileSync(`${srcDir}/${file}`, 'utf8');
|
|
23
|
+
const output = src
|
|
24
|
+
.replace(reConvert, '(function () $1Datepicker.locales.$2 =$3;\n}());')
|
|
25
|
+
.replace(rePropNameFix, '[$1]');
|
|
26
|
+
fs.writeFileSync(`${distDir}/${file}`, output);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Generate dist/locales/index.{esm,cjs}.js so that the "./locales" export
|
|
30
|
+
// entry (exports["./locales"] -> dist/locales/index.{cjs,esm}.js) resolves.
|
|
31
|
+
// Each source locale file exports a default object keyed by locale code; the
|
|
32
|
+
// index aggregates all of them into a single data-only module. Per docs
|
|
33
|
+
// (docs/i18n.md), consumers merge entries themselves via
|
|
34
|
+
// `Object.assign(Datepicker.locales, locales)`, so the index must NOT
|
|
35
|
+
// import Datepicker (main bundle and Datepicker.esm.js are separate
|
|
36
|
+
// module instances and side-effect registration would diverge).
|
|
37
|
+
const reDefault = /export default ([\s\S]*)$/;
|
|
38
|
+
if (!fs.existsSync(indexDir)) {
|
|
39
|
+
fs.mkdirSync(indexDir, {recursive: true});
|
|
40
|
+
}
|
|
41
|
+
const bodies = [];
|
|
42
|
+
fs.readdirSync(srcDir).sort().forEach((file) => {
|
|
43
|
+
const src = fs.readFileSync(`${srcDir}/${file}`, 'utf8');
|
|
44
|
+
const m = src.match(reDefault);
|
|
45
|
+
if (!m) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let body = m[1].trim();
|
|
49
|
+
if (body.endsWith(';')) {
|
|
50
|
+
body = body.slice(0, -1);
|
|
51
|
+
}
|
|
52
|
+
bodies.push(body);
|
|
53
|
+
});
|
|
54
|
+
const esmIndex = `const locales = Object.assign(\n {},\n${bodies.map((b) => ` ${b}`).join(',\n')}\n);\n\nexport default locales;\n`;
|
|
55
|
+
const cjsIndex = `'use strict';\n\nmodule.exports = Object.assign(\n {},\n${bodies.map((b) => ` ${b}`).join(',\n')}\n);\n`;
|
|
56
|
+
fs.writeFileSync(`${indexDir}/index.esm.js`, esmIndex);
|
|
57
|
+
fs.writeFileSync(`${indexDir}/index.cjs.js`, cjsIndex);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const usage = `USAGE:
|
|
5
|
+
|
|
6
|
+
node ${path.basename(process.argv[1])} [options] source_dir
|
|
7
|
+
|
|
8
|
+
source_dir: path to the locale directory of bootstrap-datepicker's source
|
|
9
|
+
|
|
10
|
+
Options:
|
|
11
|
+
-h|--help print this help
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
const src = process.argv[2];
|
|
15
|
+
if (!src || src === '-h' || src === '--help') {
|
|
16
|
+
console.log(usage);
|
|
17
|
+
process.exit();
|
|
18
|
+
}
|
|
19
|
+
if (!fs.existsSync(src) || !fs.statSync(src).isDirectory()) {
|
|
20
|
+
console.error(`${src} is not a directory.`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const reFilename = /^bootstrap-datepicker\.([a-z]+(-[A-Za-z]+)?)\.js$/;
|
|
25
|
+
const files = fs.readdirSync(src);
|
|
26
|
+
|
|
27
|
+
if (files.length < 2 || !reFilename.test(files[1])) {
|
|
28
|
+
console.error(`${src} is not a bootstrap-datepicker's locale directory.`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const destDir = path.resolve(__dirname, '../js/i18n/locales');
|
|
33
|
+
if (!fs.existsSync(destDir)) {
|
|
34
|
+
fs.mkdirSync(destDir, {recursive: true});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
files.forEach(file => {
|
|
38
|
+
const matched = file.match(reFilename);
|
|
39
|
+
if (!matched) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const lang = matched[1].replace('latin', 'latn');
|
|
43
|
+
if (lang === 'en-US') {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const langKey = lang.indexOf('-') > -1 ? `'${lang}'` : lang;
|
|
47
|
+
|
|
48
|
+
let contents = fs.readFileSync(path.resolve(src, file), 'utf8');
|
|
49
|
+
if (contents.indexOf('DEPRECATED') > -1) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
contents = contents
|
|
54
|
+
.replace(/\t/g, ' ')
|
|
55
|
+
.replace(/; *\( *function *\( *\$ *\) *\{/, 'export default {')
|
|
56
|
+
.replace(/ *\$\.fn\.datepicker\.dates\[.+?\] =/, ` ${langKey}:`)
|
|
57
|
+
.replace(/ *};/, ' }')
|
|
58
|
+
.replace(/ *\} *\( *jQuery *\) *\);\s*/, '};\n')
|
|
59
|
+
.replace(/ {5,}/g, ' ')
|
|
60
|
+
.replace(/: *(\S)/g, ': $1')
|
|
61
|
+
.replace(/ +\n/g, '\n')
|
|
62
|
+
.replace(/(titleFormat:.+)yyyy/, '$1y');
|
|
63
|
+
|
|
64
|
+
fs.writeFileSync(path.resolve(destDir, `${lang}.js`), contents);
|
|
65
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const postcss = require('postcss');
|
|
4
|
+
const cssnano = require('cssnano');
|
|
5
|
+
|
|
6
|
+
const distDir = `${path.dirname(__dirname)}/dist/css`;
|
|
7
|
+
const files = [
|
|
8
|
+
'datepicker',
|
|
9
|
+
'datepicker-bulma',
|
|
10
|
+
'datepicker-bs4',
|
|
11
|
+
'datepicker-bs5',
|
|
12
|
+
'datepicker-foundation',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
Promise.all(files.map((basename) => {
|
|
16
|
+
return new Promise((resolve) => {
|
|
17
|
+
const fileNameBase = `${distDir}/${basename}`;
|
|
18
|
+
const from = `${fileNameBase}.css`;
|
|
19
|
+
const file = fs.readFileSync(from, 'utf8');
|
|
20
|
+
|
|
21
|
+
postcss([cssnano])
|
|
22
|
+
.process(file, {from, map: false})
|
|
23
|
+
.then((result) => {
|
|
24
|
+
fs.writeFileSync(`${fileNameBase}.min.css`, result.css);
|
|
25
|
+
resolve();
|
|
26
|
+
})
|
|
27
|
+
.catch((err) => {
|
|
28
|
+
console.error(err);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const {minify} = require('uglify-es');
|
|
4
|
+
|
|
5
|
+
const distDir = `${path.dirname(__dirname)}/dist/js`;
|
|
6
|
+
const files = ['datepicker', 'datepicker-full'];
|
|
7
|
+
|
|
8
|
+
files.forEach((basename) => {
|
|
9
|
+
const fileNameBase = `${distDir}/${basename}`;
|
|
10
|
+
const file = fs.readFileSync(`${fileNameBase}.js`, 'utf8');
|
|
11
|
+
const {code, error} = minify(file);
|
|
12
|
+
|
|
13
|
+
if (error) {
|
|
14
|
+
throw error;
|
|
15
|
+
}
|
|
16
|
+
fs.writeFileSync(`${fileNameBase}.min.js`, code);
|
|
17
|
+
});
|
package/style.css
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
|
|
2
|
+
|
|
3
|
+
@import "tailwindcss";
|
|
4
|
+
|
|
5
|
+
@import "flowbite/src/themes/default";
|
|
6
|
+
@plugin "flowbite/plugin";
|
|
7
|
+
@source "../node_modules/flowbite";
|
|
8
|
+
|
|
9
|
+
/* input.css */
|
|
10
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
content: ["./js/**/*.js"],
|
|
3
|
+
darkMode: 'class', // or 'media' or 'class'
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {},
|
|
6
|
+
},
|
|
7
|
+
variants: {
|
|
8
|
+
extend: {},
|
|
9
|
+
},
|
|
10
|
+
plugins: [
|
|
11
|
+
// require('flowbite/plugin')
|
|
12
|
+
],
|
|
13
|
+
corePlugins: {
|
|
14
|
+
preflight: false,
|
|
15
|
+
}
|
|
16
|
+
}
|