@rinzai/zen 0.11.0 → 0.13.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/README.md +37 -7
- package/dist/accordion/index.d.ts +41 -0
- package/dist/accordion/index.d.ts.map +1 -0
- package/dist/accordion/index.js +81 -0
- package/dist/animated-number/index.d.ts +3 -2
- package/dist/animated-number/index.d.ts.map +1 -1
- package/dist/animated-number/index.js +40 -38
- package/dist/avatar/index.d.ts +7 -2
- package/dist/avatar/index.d.ts.map +1 -1
- package/dist/avatar/index.js +17 -11
- package/dist/backdrop/index.d.ts +4 -4
- package/dist/backdrop/index.d.ts.map +1 -1
- package/dist/backdrop/index.js +41 -39
- package/dist/badge/index.d.ts +4 -2
- package/dist/badge/index.d.ts.map +1 -1
- package/dist/badge/index.js +20 -11
- package/dist/base.css +4 -0
- package/dist/breadcrumbs/index.d.ts +1 -1
- package/dist/breadcrumbs/index.d.ts.map +1 -1
- package/dist/breadcrumbs/index.js +25 -24
- package/dist/button/index.d.ts +3 -3
- package/dist/button/index.d.ts.map +1 -1
- package/dist/button/index.js +16 -11
- package/dist/button-group/index.d.ts +13 -0
- package/dist/button-group/index.d.ts.map +1 -0
- package/dist/button-group/index.js +14 -0
- package/dist/calendar/index.d.ts +15 -8
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/index.js +97 -91
- package/dist/calendar-heatmap/index.d.ts +7 -5
- package/dist/calendar-heatmap/index.d.ts.map +1 -1
- package/dist/calendar-heatmap/index.js +32 -30
- package/dist/canvas/geometry.js +0 -1
- package/dist/canvas/index.d.ts +6 -6
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/canvas/index.js +135 -133
- package/dist/carousel/index.d.ts +27 -0
- package/dist/carousel/index.d.ts.map +1 -0
- package/dist/carousel/index.js +162 -0
- package/dist/chart/index.d.ts +5 -4
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart/index.js +137 -135
- package/dist/chart/palette.js +0 -1
- package/dist/checkbox/index.d.ts +3 -3
- package/dist/checkbox/index.d.ts.map +1 -1
- package/dist/checkbox/index.js +33 -30
- package/dist/chip/index.js +1 -1
- package/dist/code-block/index.d.ts.map +1 -1
- package/dist/code-block/index.js +27 -25
- package/dist/code-input/index.d.ts.map +1 -1
- package/dist/code-input/index.js +30 -24
- package/dist/collapse/index.d.ts +4 -3
- package/dist/collapse/index.d.ts.map +1 -1
- package/dist/collapse/index.js +42 -39
- package/dist/color-picker/index.d.ts +14 -7
- package/dist/color-picker/index.d.ts.map +1 -1
- package/dist/color-picker/index.js +139 -128
- package/dist/combobox/index.d.ts +14 -6
- package/dist/combobox/index.d.ts.map +1 -1
- package/dist/combobox/index.js +158 -146
- package/dist/command-palette/index.d.ts +4 -3
- package/dist/command-palette/index.d.ts.map +1 -1
- package/dist/command-palette/index.js +60 -57
- package/dist/confirm-dialog/index.d.ts +6 -7
- package/dist/confirm-dialog/index.d.ts.map +1 -1
- package/dist/confirm-dialog/index.js +20 -16
- package/dist/date-picker/index.d.ts +23 -14
- package/dist/date-picker/index.d.ts.map +1 -1
- package/dist/date-picker/index.js +109 -93
- package/dist/dialog/index.d.ts +3 -4
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/dialog/index.js +58 -55
- package/dist/disclosure/index.d.ts +8 -0
- package/dist/disclosure/index.d.ts.map +1 -1
- package/dist/disclosure/index.js +31 -32
- package/dist/editable-cell/index.d.ts +4 -5
- package/dist/editable-cell/index.d.ts.map +1 -1
- package/dist/editable-cell/index.js +23 -22
- package/dist/field/index.d.ts +8 -8
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +20 -18
- package/dist/filter-bar/index.d.ts +2 -2
- package/dist/filter-bar/index.d.ts.map +1 -1
- package/dist/filter-bar/index.js +38 -36
- package/dist/header/index.d.ts +1 -1
- package/dist/header/index.d.ts.map +1 -1
- package/dist/header/index.js +13 -11
- package/dist/hover-card/index.d.ts +32 -0
- package/dist/hover-card/index.d.ts.map +1 -0
- package/dist/hover-card/index.js +84 -0
- package/dist/icon-picker/index.d.ts +16 -5
- package/dist/icon-picker/index.d.ts.map +1 -1
- package/dist/icon-picker/index.js +42 -47
- package/dist/icons/micro/plus.d.ts +3 -0
- package/dist/icons/micro/plus.d.ts.map +1 -0
- package/dist/icons/micro/plus.js +17 -0
- package/dist/index.d.ts +37 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/input/index.d.ts +5 -1
- package/dist/input/index.d.ts.map +1 -1
- package/dist/input/index.js +9 -9
- package/dist/input-group/index.d.ts +4 -1
- package/dist/input-group/index.d.ts.map +1 -1
- package/dist/input-group/index.js +14 -14
- package/dist/keypad/index.d.ts +9 -7
- package/dist/keypad/index.d.ts.map +1 -1
- package/dist/keypad/index.js +22 -19
- package/dist/lib.js +112 -97
- package/dist/load-more/index.d.ts +4 -2
- package/dist/load-more/index.d.ts.map +1 -1
- package/dist/load-more/index.js +26 -23
- package/dist/locale-provider/index.d.ts +23 -0
- package/dist/locale-provider/index.d.ts.map +1 -0
- package/dist/locale-provider/index.js +35 -0
- package/dist/menu/index.d.ts +62 -9
- package/dist/menu/index.d.ts.map +1 -1
- package/dist/menu/index.js +371 -128
- package/dist/meter/index.d.ts +2 -2
- package/dist/meter/index.d.ts.map +1 -1
- package/dist/meter/index.js +4 -4
- package/dist/money-input/index.d.ts +20 -10
- package/dist/money-input/index.d.ts.map +1 -1
- package/dist/money-input/index.js +199 -190
- package/dist/month-picker/index.d.ts +17 -10
- package/dist/month-picker/index.d.ts.map +1 -1
- package/dist/month-picker/index.js +97 -86
- package/dist/navigation-menu/index.d.ts +42 -0
- package/dist/navigation-menu/index.d.ts.map +1 -0
- package/dist/navigation-menu/index.js +144 -0
- package/dist/number-field/index.d.ts +34 -0
- package/dist/number-field/index.d.ts.map +1 -0
- package/dist/number-field/index.js +119 -0
- package/dist/page-header/index.d.ts +4 -3
- package/dist/page-header/index.d.ts.map +1 -1
- package/dist/page-header/index.js +2 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/pagination/index.d.ts.map +1 -1
- package/dist/pagination/index.js +35 -33
- package/dist/progress-ring/index.d.ts +4 -3
- package/dist/progress-ring/index.d.ts.map +1 -1
- package/dist/progress-ring/index.js +11 -10
- package/dist/radio-cards/index.d.ts +9 -5
- package/dist/radio-cards/index.d.ts.map +1 -1
- package/dist/radio-cards/index.js +26 -24
- package/dist/radio-group/index.d.ts +9 -8
- package/dist/radio-group/index.d.ts.map +1 -1
- package/dist/radio-group/index.js +35 -34
- package/dist/range-slider/index.d.ts +10 -4
- package/dist/range-slider/index.d.ts.map +1 -1
- package/dist/range-slider/index.js +43 -31
- package/dist/repeat-picker/index.d.ts +13 -6
- package/dist/repeat-picker/index.d.ts.map +1 -1
- package/dist/repeat-picker/index.js +73 -61
- package/dist/resizable/index.d.ts +29 -0
- package/dist/resizable/index.d.ts.map +1 -0
- package/dist/resizable/index.js +135 -0
- package/dist/segmented/index.d.ts +8 -5
- package/dist/segmented/index.d.ts.map +1 -1
- package/dist/segmented/index.js +36 -34
- package/dist/select/index.d.ts +9 -3
- package/dist/select/index.d.ts.map +1 -1
- package/dist/select/index.js +99 -96
- package/dist/separator/index.d.ts +14 -0
- package/dist/separator/index.d.ts.map +1 -0
- package/dist/separator/index.js +15 -0
- package/dist/side-nav/index.js +1 -1
- package/dist/skeleton/index.d.ts +4 -4
- package/dist/skeleton/index.d.ts.map +1 -1
- package/dist/skeleton/index.js +4 -3
- package/dist/slider/index.d.ts +6 -3
- package/dist/slider/index.d.ts.map +1 -1
- package/dist/slider/index.js +29 -23
- package/dist/sortable/index.d.ts +10 -20
- package/dist/sortable/index.d.ts.map +1 -1
- package/dist/sortable/index.js +72 -134
- package/dist/sortable/shared.d.ts +56 -0
- package/dist/sortable/shared.d.ts.map +1 -0
- package/dist/sortable/shared.js +104 -0
- package/dist/sortable/tree-model.d.ts +46 -0
- package/dist/sortable/tree-model.d.ts.map +1 -0
- package/dist/sortable/tree-model.js +87 -0
- package/dist/sortable/tree.d.ts +31 -0
- package/dist/sortable/tree.d.ts.map +1 -0
- package/dist/sortable/tree.js +150 -0
- package/dist/sparkline/index.d.ts +1 -1
- package/dist/sparkline/index.d.ts.map +1 -1
- package/dist/sparkline/index.js +26 -25
- package/dist/spinner/index.d.ts +4 -3
- package/dist/spinner/index.d.ts.map +1 -1
- package/dist/spinner/index.js +2 -1
- package/dist/status-pill/index.d.ts.map +1 -1
- package/dist/status-pill/index.js +1 -1
- package/dist/stepper/index.d.ts +1 -1
- package/dist/stepper/index.d.ts.map +1 -1
- package/dist/stepper/index.js +31 -30
- package/dist/tab-bar/index.js +1 -1
- package/dist/table/index.d.ts +5 -5
- package/dist/table/index.d.ts.map +1 -1
- package/dist/table/index.js +66 -64
- package/dist/table/selection.d.ts +2 -2
- package/dist/table/selection.d.ts.map +1 -1
- package/dist/table/selection.js +41 -38
- package/dist/table/swipe.d.ts +1 -1
- package/dist/table/swipe.d.ts.map +1 -1
- package/dist/table/swipe.js +1 -1
- package/dist/table-of-contents/index.d.ts +4 -2
- package/dist/table-of-contents/index.d.ts.map +1 -1
- package/dist/table-of-contents/index.js +27 -25
- package/dist/tabs/index.d.ts.map +1 -1
- package/dist/tabs/index.js +90 -88
- package/dist/tag-input/index.d.ts +3 -1
- package/dist/tag-input/index.d.ts.map +1 -1
- package/dist/tag-input/index.js +61 -52
- package/dist/theme-toggle/index.d.ts +9 -8
- package/dist/theme-toggle/index.d.ts.map +1 -1
- package/dist/theme-toggle/index.js +30 -28
- package/dist/theme.css +90 -12
- package/dist/time-field/index.d.ts +31 -0
- package/dist/time-field/index.d.ts.map +1 -0
- package/dist/time-field/index.js +175 -0
- package/dist/timeline/index.js +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toast/index.d.ts.map +1 -1
- package/dist/toast/index.js +127 -125
- package/dist/toggle/index.d.ts +2 -2
- package/dist/toggle/index.d.ts.map +1 -1
- package/dist/toggle/index.js +8 -6
- package/dist/toggle-group/index.d.ts +35 -0
- package/dist/toggle-group/index.d.ts.map +1 -0
- package/dist/toggle-group/index.js +53 -0
- package/dist/toolbar/index.d.ts +19 -0
- package/dist/toolbar/index.d.ts.map +1 -0
- package/dist/toolbar/index.js +36 -0
- package/dist/tooltip/index.d.ts.map +1 -1
- package/dist/tooltip/index.js +40 -74
- package/dist/tree/index.d.ts.map +1 -1
- package/dist/tree/index.js +105 -102
- package/dist/trend/index.d.ts +2 -2
- package/dist/trend/index.d.ts.map +1 -1
- package/dist/trend/index.js +20 -19
- package/dist/utils/color.js +0 -1
- package/dist/utils/cva.js +0 -1
- package/dist/utils/cx.js +0 -1
- package/dist/utils/date.d.ts +6 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +1 -2
- package/dist/utils/direction.d.ts +7 -0
- package/dist/utils/direction.d.ts.map +1 -0
- package/dist/utils/direction.js +6 -0
- package/dist/utils/form-value.d.ts +15 -0
- package/dist/utils/form-value.d.ts.map +1 -0
- package/dist/utils/form-value.js +29 -0
- package/dist/utils/fx.js +0 -1
- package/dist/utils/merge.js +0 -1
- package/dist/utils/messages.d.ts +137 -0
- package/dist/utils/messages.d.ts.map +1 -0
- package/dist/utils/messages.js +133 -0
- package/dist/utils/money.js +0 -1
- package/dist/utils/month.js +0 -1
- package/dist/utils/motion.js +0 -1
- package/dist/utils/refs.d.ts +6 -0
- package/dist/utils/refs.d.ts.map +1 -0
- package/dist/utils/refs.js +13 -0
- package/dist/utils/repeat.d.ts +3 -1
- package/dist/utils/repeat.d.ts.map +1 -1
- package/dist/utils/repeat.js +28 -25
- package/dist/utils/roving.d.ts +17 -0
- package/dist/utils/roving.d.ts.map +1 -0
- package/dist/utils/roving.js +35 -0
- package/dist/utils/section-link.js +0 -1
- package/dist/utils/slot.d.ts.map +1 -1
- package/dist/utils/slot.js +7 -11
- package/dist/utils/status-icons.js +7 -7
- package/dist/utils/styles.d.ts +9 -2
- package/dist/utils/styles.d.ts.map +1 -1
- package/dist/utils/styles.js +6 -3
- package/dist/utils/theme-wave.js +0 -1
- package/dist/utils/theme.js +0 -1
- package/dist/utils/useAnchoredPopup.d.ts +7 -4
- package/dist/utils/useAnchoredPopup.d.ts.map +1 -1
- package/dist/utils/useAnchoredPopup.js +18 -11
- package/dist/utils/useControllable.d.ts +9 -0
- package/dist/utils/useControllable.d.ts.map +1 -0
- package/dist/utils/useControllable.js +15 -0
- package/dist/utils/useHoverPopup.d.ts +39 -0
- package/dist/utils/useHoverPopup.d.ts.map +1 -0
- package/dist/utils/useHoverPopup.js +64 -0
- package/dist/zen.css +1 -1
- package/package.json +1 -1
package/dist/utils/merge.js
CHANGED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every word Zen's components show or announce, in English. Give LocaleProvider
|
|
3
|
+
* your own for any of them (a translation, or just different wording); the rest
|
|
4
|
+
* stay English. Entries that take a value are functions.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ENGLISH: {
|
|
7
|
+
clear: string;
|
|
8
|
+
cancel: string;
|
|
9
|
+
close: string;
|
|
10
|
+
dismiss: string;
|
|
11
|
+
delete: string;
|
|
12
|
+
remove: (item: string) => string;
|
|
13
|
+
noResults: string;
|
|
14
|
+
search: string;
|
|
15
|
+
expand: string;
|
|
16
|
+
collapse: string;
|
|
17
|
+
minimum: string;
|
|
18
|
+
increase: string;
|
|
19
|
+
hour: string;
|
|
20
|
+
minute: string;
|
|
21
|
+
dayPeriod: string;
|
|
22
|
+
decrease: string;
|
|
23
|
+
maximum: string;
|
|
24
|
+
selectPlaceholder: string;
|
|
25
|
+
searchOptions: string;
|
|
26
|
+
add: (text: string) => string;
|
|
27
|
+
commands: string;
|
|
28
|
+
pickDate: string;
|
|
29
|
+
pickDates: string;
|
|
30
|
+
chooseDate: string;
|
|
31
|
+
chooseDates: string;
|
|
32
|
+
presets: string;
|
|
33
|
+
pickMonth: string;
|
|
34
|
+
chooseMonth: string;
|
|
35
|
+
previousMonth: string;
|
|
36
|
+
nextMonth: string;
|
|
37
|
+
previousYear: string;
|
|
38
|
+
nextYear: string;
|
|
39
|
+
chooseMonthAndYear: (month: string) => string;
|
|
40
|
+
backToDays: (year: number) => string;
|
|
41
|
+
chooseColour: string;
|
|
42
|
+
saturationBrightness: string;
|
|
43
|
+
saturationBrightnessValue: (saturation: number, brightness: number) => string;
|
|
44
|
+
hue: string;
|
|
45
|
+
hueValue: (degrees: number) => string;
|
|
46
|
+
opacity: string;
|
|
47
|
+
opacityValue: (percent: number) => string;
|
|
48
|
+
hex: string;
|
|
49
|
+
swatches: string;
|
|
50
|
+
colour: string;
|
|
51
|
+
icon: string;
|
|
52
|
+
none: string;
|
|
53
|
+
colourNames: {
|
|
54
|
+
blue: string;
|
|
55
|
+
orange: string;
|
|
56
|
+
teal: string;
|
|
57
|
+
amber: string;
|
|
58
|
+
pink: string;
|
|
59
|
+
green: string;
|
|
60
|
+
violet: string;
|
|
61
|
+
red: string;
|
|
62
|
+
};
|
|
63
|
+
currency: string;
|
|
64
|
+
yourCurrency: string;
|
|
65
|
+
changeCurrency: (currency: string) => string;
|
|
66
|
+
enterAmount: string;
|
|
67
|
+
notAnAmount: (example: string, short: string) => string;
|
|
68
|
+
noNegative: string;
|
|
69
|
+
rateFailed: string;
|
|
70
|
+
rateLoading: string;
|
|
71
|
+
otherCurrencies: string;
|
|
72
|
+
gettingRate: string;
|
|
73
|
+
ratesUnavailable: (home: string) => string;
|
|
74
|
+
convertedFrom: (amount: string, rate: string) => string;
|
|
75
|
+
rateOf: (currency: string, amount: string) => string;
|
|
76
|
+
repeats: string;
|
|
77
|
+
every: string;
|
|
78
|
+
howMany: string;
|
|
79
|
+
unit: string;
|
|
80
|
+
on: string;
|
|
81
|
+
day: (n: number) => string;
|
|
82
|
+
lastDay: string;
|
|
83
|
+
next: string;
|
|
84
|
+
repeatUnit: (unit: "day" | "week" | "month" | "year", count: number) => string;
|
|
85
|
+
repeatEvery: (every: number, unit: string) => string;
|
|
86
|
+
repeatOn: (rule: string, when: string) => string;
|
|
87
|
+
repeatDay: (n: number) => string;
|
|
88
|
+
repeatLastDay: string;
|
|
89
|
+
reorder: (item: string) => string;
|
|
90
|
+
pickedUp: (item: string, place: string) => string;
|
|
91
|
+
dropped: (item: string, place: string) => string;
|
|
92
|
+
movedTo: (item: string, place: string) => string;
|
|
93
|
+
putBack: (item: string, place?: string) => string;
|
|
94
|
+
place: (position: number, count: number) => string;
|
|
95
|
+
placeIn: (position: number, count: number, group: string) => string;
|
|
96
|
+
resized: (item: string, width: number, height: number) => string;
|
|
97
|
+
moved: (item: string, x: number, y: number) => string;
|
|
98
|
+
selected: (count: number) => string;
|
|
99
|
+
canvasHelp: string;
|
|
100
|
+
nothingHere: string;
|
|
101
|
+
selectAll: string;
|
|
102
|
+
selectedCount: (count: number) => string;
|
|
103
|
+
clearSelection: string;
|
|
104
|
+
selection: string;
|
|
105
|
+
legend: string;
|
|
106
|
+
readChart: (label: string) => string;
|
|
107
|
+
fromTo: (first: string, last: string) => string;
|
|
108
|
+
activeFilters: string;
|
|
109
|
+
clearAll: string;
|
|
110
|
+
removeFilter: string;
|
|
111
|
+
skipToContent: string;
|
|
112
|
+
keypad: string;
|
|
113
|
+
loadMore: string;
|
|
114
|
+
loadingMore: string;
|
|
115
|
+
progress: string;
|
|
116
|
+
onThisPage: string;
|
|
117
|
+
switchToDark: string;
|
|
118
|
+
switchToLight: string;
|
|
119
|
+
copy: string;
|
|
120
|
+
copied: string;
|
|
121
|
+
showMore: (what: string) => string;
|
|
122
|
+
pages: string;
|
|
123
|
+
page: (n: number) => string;
|
|
124
|
+
previousPage: string;
|
|
125
|
+
nextPage: string;
|
|
126
|
+
breadcrumb: string;
|
|
127
|
+
carousel: string;
|
|
128
|
+
slide: string;
|
|
129
|
+
slideOf: (n: number, total: number) => string;
|
|
130
|
+
goToSlide: (n: number) => string;
|
|
131
|
+
previousSlide: string;
|
|
132
|
+
nextSlide: string;
|
|
133
|
+
resize: string;
|
|
134
|
+
notifications: string;
|
|
135
|
+
};
|
|
136
|
+
export type Messages = typeof ENGLISH;
|
|
137
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../packages/utils/messages.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;;;;mBAOD,MAAM;;;;;;;;;;;;;;gBAgBT,MAAM;;;;;;;;;;;;;gCAeU,MAAM;uBACf,MAAM;;;4CAKe,MAAM,cAAc,MAAM;;wBAG9C,MAAM;;4BAEF,MAAM;;;;;;;;;;;;;;;;;;+BAsBH,MAAM;;2BAEV,MAAM,SAAS,MAAM;;;;;;6BAMnB,MAAM;4BACP,MAAM,QAAQ,MAAM;uBACzB,MAAM,UAAU,MAAM;;;;;;aAQhC,MAAM;;;uBAGI,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,SAAS,MAAM;yBAC9C,MAAM,QAAQ,MAAM;qBACxB,MAAM,QAAQ,MAAM;mBACtB,MAAM;;oBAIL,MAAM;qBACL,MAAM,SAAS,MAAM;oBAEtB,MAAM,SAAS,MAAM;oBACrB,MAAM,SAAS,MAAM;oBACrB,MAAM,UAAU,MAAM;sBACpB,MAAM,SAAS,MAAM;wBACnB,MAAM,SAAS,MAAM,SAAS,MAAM;oBAGxC,MAAM,SAAS,MAAM,UAAU,MAAM;kBACvC,MAAM,KAAK,MAAM,KAAK,MAAM;sBACxB,MAAM;;;;2BAOD,MAAM;;;;uBAMV,MAAM;oBACT,MAAM,QAAQ,MAAM;;;;;;;;;;;;;;qBAgBnB,MAAM;;cAEb,MAAM;;;;;;iBAMH,MAAM,SAAS,MAAM;mBACnB,MAAM;;;;;CAKxB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
//#region packages/utils/messages.ts
|
|
2
|
+
var e = {
|
|
3
|
+
clear: "Clear",
|
|
4
|
+
cancel: "Cancel",
|
|
5
|
+
close: "Close",
|
|
6
|
+
dismiss: "Dismiss",
|
|
7
|
+
delete: "Delete",
|
|
8
|
+
remove: (e) => `Remove ${e}`,
|
|
9
|
+
noResults: "No results",
|
|
10
|
+
search: "Search…",
|
|
11
|
+
expand: "Expand",
|
|
12
|
+
collapse: "Collapse",
|
|
13
|
+
minimum: "Minimum",
|
|
14
|
+
increase: "Increase",
|
|
15
|
+
hour: "Hour",
|
|
16
|
+
minute: "Minute",
|
|
17
|
+
dayPeriod: "AM/PM",
|
|
18
|
+
decrease: "Decrease",
|
|
19
|
+
maximum: "Maximum",
|
|
20
|
+
selectPlaceholder: "Select…",
|
|
21
|
+
searchOptions: "Search options",
|
|
22
|
+
add: (e) => `Add ${e}`,
|
|
23
|
+
commands: "Commands",
|
|
24
|
+
pickDate: "Pick a date",
|
|
25
|
+
pickDates: "Pick dates",
|
|
26
|
+
chooseDate: "Choose date",
|
|
27
|
+
chooseDates: "Choose dates",
|
|
28
|
+
presets: "Presets",
|
|
29
|
+
pickMonth: "Pick a month",
|
|
30
|
+
chooseMonth: "Choose month",
|
|
31
|
+
previousMonth: "Previous month",
|
|
32
|
+
nextMonth: "Next month",
|
|
33
|
+
previousYear: "Previous year",
|
|
34
|
+
nextYear: "Next year",
|
|
35
|
+
chooseMonthAndYear: (e) => `${e}, choose month and year`,
|
|
36
|
+
backToDays: (e) => `${e}, back to days`,
|
|
37
|
+
chooseColour: "Choose colour",
|
|
38
|
+
saturationBrightness: "Saturation and brightness",
|
|
39
|
+
saturationBrightnessValue: (e, t) => `Saturation ${e}%, brightness ${t}%`,
|
|
40
|
+
hue: "Hue",
|
|
41
|
+
hueValue: (e) => `Hue ${e} degrees`,
|
|
42
|
+
opacity: "Opacity",
|
|
43
|
+
opacityValue: (e) => `Opacity ${e}%`,
|
|
44
|
+
hex: "Hex",
|
|
45
|
+
swatches: "Swatches",
|
|
46
|
+
colour: "Colour",
|
|
47
|
+
icon: "Icon",
|
|
48
|
+
none: "none",
|
|
49
|
+
colourNames: {
|
|
50
|
+
blue: "Blue",
|
|
51
|
+
orange: "Orange",
|
|
52
|
+
teal: "Teal",
|
|
53
|
+
amber: "Amber",
|
|
54
|
+
pink: "Pink",
|
|
55
|
+
green: "Green",
|
|
56
|
+
violet: "Violet",
|
|
57
|
+
red: "Red"
|
|
58
|
+
},
|
|
59
|
+
currency: "Currency",
|
|
60
|
+
yourCurrency: "Your currency",
|
|
61
|
+
changeCurrency: (e) => `Currency: ${e}. Change to enter another currency`,
|
|
62
|
+
enterAmount: "Enter an amount.",
|
|
63
|
+
notAnAmount: (e, t) => `Not an amount. Try ${e} or ${t}.`,
|
|
64
|
+
noNegative: "Amount can't be negative.",
|
|
65
|
+
rateFailed: "Couldn't get today's exchange rate.",
|
|
66
|
+
rateLoading: "Still getting today's rate…",
|
|
67
|
+
otherCurrencies: "Enter in another currency, converted at today’s rate",
|
|
68
|
+
gettingRate: "Getting today’s rate…",
|
|
69
|
+
ratesUnavailable: (e) => `Couldn’t get exchange rates. Enter the amount in ${e}.`,
|
|
70
|
+
convertedFrom: (e, t) => `Converted from ${e} at ${t}`,
|
|
71
|
+
rateOf: (e, t) => `1 ${e} = ${t}`,
|
|
72
|
+
repeats: "Repeats",
|
|
73
|
+
every: "Every",
|
|
74
|
+
howMany: "How many",
|
|
75
|
+
unit: "Unit",
|
|
76
|
+
on: "On",
|
|
77
|
+
day: (e) => `Day ${e}`,
|
|
78
|
+
lastDay: "Last day",
|
|
79
|
+
next: "Next:",
|
|
80
|
+
repeatUnit: (e, t) => t === 1 ? e : `${e}s`,
|
|
81
|
+
repeatEvery: (e, t) => e === 1 ? `Every ${t}` : `Every ${e} ${t}`,
|
|
82
|
+
repeatOn: (e, t) => `${e} on ${t}`,
|
|
83
|
+
repeatDay: (e) => `day ${e}`,
|
|
84
|
+
repeatLastDay: "the last day",
|
|
85
|
+
reorder: (e) => `Reorder ${e}`,
|
|
86
|
+
pickedUp: (e, t) => `${e} picked up, ${t}. Arrow keys move it, Space drops it, Escape puts it back.`,
|
|
87
|
+
dropped: (e, t) => `${e} dropped, ${t}.`,
|
|
88
|
+
movedTo: (e, t) => `${e}, ${t}.`,
|
|
89
|
+
putBack: (e, t) => t ? `${e} put back, ${t}.` : `${e} put back.`,
|
|
90
|
+
place: (e, t) => `${e} of ${t}`,
|
|
91
|
+
placeIn: (e, t, n) => `${e} of ${t} in ${n}`,
|
|
92
|
+
resized: (e, t, n) => `${e} resized to ${t} by ${n}.`,
|
|
93
|
+
moved: (e, t, n) => `${e} moved to ${t}, ${n}.`,
|
|
94
|
+
selected: (e) => `${e} ${e === 1 ? "item" : "items"} selected.`,
|
|
95
|
+
canvasHelp: "Arrow keys move the selection, Shift with them by 10. Alt with the arrow keys resizes. Escape deselects.",
|
|
96
|
+
nothingHere: "Nothing here yet.",
|
|
97
|
+
selectAll: "Select all",
|
|
98
|
+
selectedCount: (e) => `${e} selected`,
|
|
99
|
+
clearSelection: "Clear selection",
|
|
100
|
+
selection: "Selection",
|
|
101
|
+
legend: "Legend",
|
|
102
|
+
readChart: (e) => `${e}: use the arrow keys to read values`,
|
|
103
|
+
fromTo: (e, t) => `From ${e} to ${t}`,
|
|
104
|
+
activeFilters: "Active filters",
|
|
105
|
+
clearAll: "Clear all",
|
|
106
|
+
removeFilter: "Remove filter",
|
|
107
|
+
skipToContent: "Skip to content",
|
|
108
|
+
keypad: "Keypad",
|
|
109
|
+
loadMore: "Load more",
|
|
110
|
+
loadingMore: "Loading more…",
|
|
111
|
+
progress: "Progress",
|
|
112
|
+
onThisPage: "On this page",
|
|
113
|
+
switchToDark: "Switch to dark theme",
|
|
114
|
+
switchToLight: "Switch to light theme",
|
|
115
|
+
copy: "Copy",
|
|
116
|
+
copied: "Copied",
|
|
117
|
+
showMore: (e) => `Show ${e}`,
|
|
118
|
+
pages: "Pages",
|
|
119
|
+
page: (e) => `Page ${e}`,
|
|
120
|
+
previousPage: "Previous page",
|
|
121
|
+
nextPage: "Next page",
|
|
122
|
+
breadcrumb: "Breadcrumb",
|
|
123
|
+
carousel: "carousel",
|
|
124
|
+
slide: "slide",
|
|
125
|
+
slideOf: (e, t) => `${e} of ${t}`,
|
|
126
|
+
goToSlide: (e) => `Slide ${e}`,
|
|
127
|
+
previousSlide: "Previous slide",
|
|
128
|
+
nextSlide: "Next slide",
|
|
129
|
+
resize: "Resize",
|
|
130
|
+
notifications: "Notifications (F8)"
|
|
131
|
+
};
|
|
132
|
+
//#endregion
|
|
133
|
+
export { e as ENGLISH };
|
package/dist/utils/money.js
CHANGED
package/dist/utils/month.js
CHANGED
package/dist/utils/motion.js
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
/** One ref that hands the element to each of `refs`. */
|
|
3
|
+
export declare function mergeRefs<T>(...refs: (Ref<T> | undefined)[]): (node: T | null) => void;
|
|
4
|
+
/** mergeRefs, kept the same while the refs are: a component's own ref and the one it was given. */
|
|
5
|
+
export declare function useMergedRefs<T>(...refs: (Ref<T> | undefined)[]): (node: T | null) => void;
|
|
6
|
+
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../packages/utils/refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAW,MAAM,OAAO,CAAC;AAErC,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,IAChD,MAAM,CAAC,GAAG,IAAI,UAMzB;AAED,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,4BAG/D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo as e } from "react";
|
|
3
|
+
//#region packages/utils/refs.ts
|
|
4
|
+
function t(...e) {
|
|
5
|
+
return (t) => {
|
|
6
|
+
for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function n(...n) {
|
|
10
|
+
return e(() => t(...n), n);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as mergeRefs, n as useMergedRefs };
|
package/dist/utils/repeat.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Messages } from './messages';
|
|
1
2
|
import { DateString } from './date';
|
|
2
3
|
/**
|
|
3
4
|
* How often something comes round: every `every` days, weeks, months or
|
|
@@ -11,7 +12,8 @@ export interface Repeat {
|
|
|
11
12
|
day?: number;
|
|
12
13
|
}
|
|
13
14
|
/** "Every 2 weeks on Mon, Thu", "Every month on day 5", "Every year on Sep 3" (from `start`). */
|
|
14
|
-
|
|
15
|
+
/** In `messages`' words (English unless you pass a LocaleProvider's, e.g. from useMessages). */
|
|
16
|
+
export declare function describeRepeat(repeat: Repeat, locale: string, start?: DateString, messages?: Messages): string;
|
|
15
17
|
/** The next `count` dates it falls on, from `start` (which sets the cycle) onwards, not before `from`. */
|
|
16
18
|
export declare function nextOccurrences(repeat: Repeat, start: DateString, count: number, from?: string): DateString[];
|
|
17
19
|
//# sourceMappingURL=repeat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../packages/utils/repeat.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,UAAU,EAMlB,MAAM,QAAQ,CAAC;AAEhB;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,iGAAiG;AACjG,wBAAgB,cAAc,
|
|
1
|
+
{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../packages/utils/repeat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAGH,KAAK,UAAU,EAMlB,MAAM,QAAQ,CAAC;AAEhB;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,iGAAiG;AACjG,gGAAgG;AAChG,wBAAgB,cAAc,CAC1B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,UAAU,EAClB,QAAQ,GAAE,QAAkB,GAC7B,MAAM,CAcR;AAED,0GAA0G;AAC1G,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,SAAQ,GAAG,UAAU,EAAE,CAW5G"}
|
package/dist/utils/repeat.js
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
import { addDays as
|
|
1
|
+
import { ENGLISH as e } from "./messages.js";
|
|
2
|
+
import { addDays as t, addMonthsToDate as n, dayOfWeek as r, daysBetween as i, daysInMonth as a, formatDate as o, weekdayNames as s } from "./date.js";
|
|
3
3
|
//#region packages/utils/repeat.ts
|
|
4
|
-
function
|
|
5
|
-
let { every:
|
|
6
|
-
if (
|
|
7
|
-
let n =
|
|
8
|
-
return
|
|
4
|
+
function c(t, n, r, i = e) {
|
|
5
|
+
let a = i, { every: c, unit: l } = t, u = a.repeatEvery(c, a.repeatUnit(l, c));
|
|
6
|
+
if (l === "week" && t.weekdays?.length) {
|
|
7
|
+
let e = s(n), r = [...t.weekdays].sort((e, t) => e - t).map((t) => e[t]);
|
|
8
|
+
return a.repeatOn(u, new Intl.ListFormat(n, {
|
|
9
|
+
style: "short",
|
|
10
|
+
type: "unit"
|
|
11
|
+
}).format(r));
|
|
9
12
|
}
|
|
10
|
-
return
|
|
13
|
+
return l === "month" && t.day !== void 0 ? a.repeatOn(u, t.day === -1 ? a.repeatLastDay : a.repeatDay(t.day)) : l === "year" && r ? a.repeatOn(u, o(r, n, "day")) : u;
|
|
11
14
|
}
|
|
12
|
-
function
|
|
13
|
-
let i = [], a = Math.max(1, Math.floor(e.every)), o = Math.max(0, Math.floor(
|
|
14
|
-
for (let s = o; i.length < n && s < o + n + 2; s++) for (let o of
|
|
15
|
+
function l(e, t, n, r = t) {
|
|
16
|
+
let i = [], a = Math.max(1, Math.floor(e.every)), o = Math.max(0, Math.floor(u(e.unit, t, r) / a) - 1);
|
|
17
|
+
for (let s = o; i.length < n && s < o + n + 2; s++) for (let o of d(e, t, s * a)) o >= t && o >= r && i.length < n && i.push(o);
|
|
15
18
|
return i;
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
if (e === "day") return
|
|
19
|
-
if (e === "week") return Math.floor(
|
|
20
|
-
let
|
|
21
|
-
return e === "month" ?
|
|
20
|
+
function u(e, t, n) {
|
|
21
|
+
if (e === "day") return i(t, n);
|
|
22
|
+
if (e === "week") return Math.floor(i(t, n) / 7);
|
|
23
|
+
let r = (Number(n.slice(0, 4)) - Number(t.slice(0, 4))) * 12 + Number(n.slice(5, 7)) - Number(t.slice(5, 7));
|
|
24
|
+
return e === "month" ? r : Math.floor(r / 12);
|
|
22
25
|
}
|
|
23
|
-
function
|
|
24
|
-
switch (
|
|
25
|
-
case "day": return [
|
|
26
|
+
function d(e, i, o) {
|
|
27
|
+
switch (e.unit) {
|
|
28
|
+
case "day": return [t(i, o)];
|
|
26
29
|
case "week": {
|
|
27
|
-
let
|
|
28
|
-
return
|
|
30
|
+
let n = e.weekdays?.length ? [...new Set(e.weekdays)].sort((e, t) => e - t) : [r(i)], a = t(i, -r(i) + o * 7);
|
|
31
|
+
return n.map((e) => t(a, e));
|
|
29
32
|
}
|
|
30
33
|
case "month": {
|
|
31
|
-
let
|
|
32
|
-
return [`${
|
|
34
|
+
let t = n(`${i.slice(0, 7)}-01`, o).slice(0, 7), r = a(t), s = e.day ?? Number(i.slice(8));
|
|
35
|
+
return [`${t}-${String(s === -1 ? r : Math.min(s, r)).padStart(2, "0")}`];
|
|
33
36
|
}
|
|
34
|
-
case "year": return [
|
|
37
|
+
case "year": return [n(i, o * 12)];
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
//#endregion
|
|
38
|
-
export {
|
|
41
|
+
export { c as describeRepeat, l as nextOccurrences };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KeyboardEvent, RefObject } from 'react';
|
|
2
|
+
/** The enabled elements matching `selector` in `root`, in order, leaving out those of a group nested in it. */
|
|
3
|
+
export declare function rovingItems(root: HTMLElement, selector: string): HTMLElement[];
|
|
4
|
+
/**
|
|
5
|
+
* Moves focus between a row's items with the arrow keys (in reading order;
|
|
6
|
+
* ↑↓ for a column), Home and End, wrapping. Returns whether it took the key.
|
|
7
|
+
*/
|
|
8
|
+
export declare function moveFocus(e: KeyboardEvent<HTMLElement>, selector: string, orientation?: 'horizontal' | 'vertical'): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Keeps one item of the group at `ref` in the tab order (Tab enters the group
|
|
11
|
+
* once; the arrow keys go through it): the last one focused, else the first
|
|
12
|
+
* matching `preferred` (e.g. the pressed one), else the first. Put
|
|
13
|
+
* data-zen-roving on the group's element. Off (`enabled` false) when an
|
|
14
|
+
* enclosing group, like a Toolbar, roves through the items instead.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useRovingTabIndex(ref: RefObject<HTMLElement | null>, selector: string, preferred?: string, enabled?: boolean): void;
|
|
17
|
+
//# sourceMappingURL=roving.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roving.d.ts","sourceRoot":"","sources":["../../packages/utils/roving.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAA8B,MAAM,OAAO,CAAC;AAM7E,+GAA+G;AAC/G,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAI9E;AAED;;;GAGG;AACH,wBAAgB,SAAS,CACrB,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,YAAY,GAAG,UAAyB,GACtD,OAAO,CAYT;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAClC,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,UAAO,QAuBjB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { readingKey as e } from "./direction.js";
|
|
3
|
+
import { useEffect as t, useLayoutEffect as n } from "react";
|
|
4
|
+
//#region packages/utils/roving.ts
|
|
5
|
+
var r = typeof window > "u" ? t : n;
|
|
6
|
+
function i(e, t) {
|
|
7
|
+
return [...e.querySelectorAll(t)].filter((t) => !t.matches(":disabled") && t.parentElement?.closest("[data-zen-roving]") === e);
|
|
8
|
+
}
|
|
9
|
+
function a(t, n, r = "horizontal") {
|
|
10
|
+
if (t.defaultPrevented) return !1;
|
|
11
|
+
let a = i(t.currentTarget, n), o = a.indexOf(t.target);
|
|
12
|
+
if (o === -1) return !1;
|
|
13
|
+
let [s, c] = r === "horizontal" ? ["ArrowLeft", "ArrowRight"] : ["ArrowUp", "ArrowDown"], l = e(t.key, t.currentTarget), u = {
|
|
14
|
+
[c]: o + 1,
|
|
15
|
+
[s]: o - 1,
|
|
16
|
+
Home: 0,
|
|
17
|
+
End: a.length - 1
|
|
18
|
+
}[l];
|
|
19
|
+
return u !== void 0 && (t.preventDefault(), a[(u + a.length) % a.length].focus(), !0);
|
|
20
|
+
}
|
|
21
|
+
function o(e, t, n, a = !0) {
|
|
22
|
+
r(() => {
|
|
23
|
+
let r = e.current;
|
|
24
|
+
if (!r || !a) return;
|
|
25
|
+
let o = (e) => {
|
|
26
|
+
let a = i(r, t), o = a.find((t) => t === e) ?? a.find((e) => e.dataset.zenStop !== void 0) ?? (n ? a.find((e) => e.matches(n)) : void 0) ?? a[0];
|
|
27
|
+
for (let e of a) e.tabIndex = e === o ? 0 : -1, e === o ? e.dataset.zenStop = "" : delete e.dataset.zenStop;
|
|
28
|
+
};
|
|
29
|
+
o(r.contains(document.activeElement) ? document.activeElement : null);
|
|
30
|
+
let s = (e) => o(e.target);
|
|
31
|
+
return r.addEventListener("focusin", s), () => r.removeEventListener("focusin", s);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { a as moveFocus, i as rovingItems, o as useRovingTabIndex };
|
package/dist/utils/slot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../packages/utils/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAkB,YAAY,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../packages/utils/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,cAAc,EAAkB,YAAY,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AAKnG,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErC;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,mFAoB1F"}
|
package/dist/utils/slot.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cx as e } from "./cx.js";
|
|
3
|
-
import {
|
|
3
|
+
import { mergeRefs as t } from "./refs.js";
|
|
4
|
+
import { cloneElement as n, isValidElement as r } from "react";
|
|
4
5
|
//#region packages/utils/slot.tsx
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
7
|
-
let o =
|
|
6
|
+
function i({ children: i, ...a }) {
|
|
7
|
+
if (!r(i)) return null;
|
|
8
|
+
let o = i, s = a, c = o.props, l = { ...s };
|
|
8
9
|
for (let e of Object.keys(s)) {
|
|
9
10
|
let t = s[e], n = c[e];
|
|
10
11
|
/^on[A-Z]/.test(e) && typeof t == "function" && typeof n == "function" && (l[e] = (...e) => {
|
|
@@ -14,12 +15,7 @@ function r({ children: r, ...a }) {
|
|
|
14
15
|
return l.className = e(s.className, c.className), (s.style || c.style) && (l.style = {
|
|
15
16
|
...s.style,
|
|
16
17
|
...c.style
|
|
17
|
-
}), s.ref && c.ref && (l.ref =
|
|
18
|
-
}
|
|
19
|
-
function i(...e) {
|
|
20
|
-
return (t) => {
|
|
21
|
-
for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
|
|
22
|
-
};
|
|
18
|
+
}), s.ref && c.ref && (l.ref = t(s.ref, c.ref)), n(o, l);
|
|
23
19
|
}
|
|
24
20
|
//#endregion
|
|
25
|
-
export {
|
|
21
|
+
export { i as Slot };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import t from "
|
|
2
|
+
import e from "../icons/micro/check.js";
|
|
3
|
+
import { cx as t } from "./cx.js";
|
|
4
4
|
import n from "../icons/micro/exclamation-triangle.js";
|
|
5
5
|
import r from "../icons/micro/information-circle.js";
|
|
6
6
|
import { jsx as i } from "react/jsx-runtime";
|
|
7
7
|
//#region packages/utils/status-icons.tsx
|
|
8
8
|
function a({ className: n }) {
|
|
9
|
-
return /* @__PURE__ */ i(
|
|
9
|
+
return /* @__PURE__ */ i(e, { className: t("size-3.5", n) });
|
|
10
10
|
}
|
|
11
|
-
function o({ className:
|
|
12
|
-
return /* @__PURE__ */ i(n, { className:
|
|
11
|
+
function o({ className: e }) {
|
|
12
|
+
return /* @__PURE__ */ i(n, { className: t("size-3.5", e) });
|
|
13
13
|
}
|
|
14
|
-
function s({ className:
|
|
15
|
-
return /* @__PURE__ */ i(r, { className:
|
|
14
|
+
function s({ className: e }) {
|
|
15
|
+
return /* @__PURE__ */ i(r, { className: t("size-3.5", e) });
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
export { o as AlertIcon, a as CheckIcon, s as InfoIcon };
|
package/dist/utils/styles.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** Shared field look: faint glass, a hairline in the glow colour (white would grey it out) lit by the pointer, violet glow on focus. */
|
|
2
2
|
export declare const FIELD: string;
|
|
3
|
+
/** Field heights, matching Button's sizes (sm, default, lg) so a row of both lines up. */
|
|
4
|
+
export declare const FIELD_SIZE: {
|
|
5
|
+
readonly sm: "h-8 px-2.5";
|
|
6
|
+
readonly default: "";
|
|
7
|
+
readonly lg: "h-11 px-3.5";
|
|
8
|
+
};
|
|
9
|
+
export type FieldSize = keyof typeof FIELD_SIZE;
|
|
3
10
|
/**
|
|
4
11
|
* Placeholder text in a trigger that shows one (Select, MonthPicker, DatePicker…). Fields use the same
|
|
5
12
|
* colours through placeholder: in FIELD. --zen-placeholder dims it on dark glass, so a placeholder can't
|
|
@@ -7,9 +14,9 @@ export declare const FIELD: string;
|
|
|
7
14
|
*/
|
|
8
15
|
export declare const PLACEHOLDER = "text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))]";
|
|
9
16
|
/** A picker's previous/next arrows (Calendar, MonthPicker). */
|
|
10
|
-
export declare const PICKER_NAV = "text-muted-foreground cursor-pointer hover:bg-tint/[0.07] hover:text-foreground
|
|
17
|
+
export declare const PICKER_NAV = "text-muted-foreground cursor-pointer hover:bg-tint/[0.07] hover:text-foreground grid size-8 place-items-center rounded-md outline-hidden transition-colors focus-ring";
|
|
11
18
|
/** A month in a picker's month grid (Calendar, MonthPicker); add PICKER_MONTH_ON for the chosen one. */
|
|
12
|
-
export declare const PICKER_MONTH = "cursor-pointer rounded-lg py-2 text-sm outline-hidden transition-colors disabled:cursor-not-allowed disabled:opacity-35 focus-
|
|
19
|
+
export declare const PICKER_MONTH = "cursor-pointer rounded-lg py-2 text-sm outline-hidden transition-colors disabled:cursor-not-allowed disabled:opacity-35 focus-ring hover:bg-tint/[0.07]";
|
|
13
20
|
export declare const PICKER_MONTH_ON = "bg-primary text-primary-foreground hover:bg-primary";
|
|
14
21
|
/** Glow a trigger carries while its popup is open. */
|
|
15
22
|
export declare const TRIGGER_OPEN = "border-glow/60 [--glow-border-color:transparent] shadow-glow-focus";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../packages/utils/styles.ts"],"names":[],"mappings":"AAEA,wIAAwI;AACxI,eAAO,MAAM,KAAK,QAKmC,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,WAAW,uEAAuE,CAAC;AAEhG,+DAA+D;AAC/D,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../packages/utils/styles.ts"],"names":[],"mappings":"AAEA,wIAAwI;AACxI,eAAO,MAAM,KAAK,QAKmC,CAAC;AAEtD,0FAA0F;AAC1F,eAAO,MAAM,UAAU;;;;CAAgE,CAAC;AACxF,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,UAAU,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW,uEAAuE,CAAC;AAEhG,+DAA+D;AAC/D,eAAO,MAAM,UAAU,0KACoJ,CAAC;AAE5K,wGAAwG;AACxG,eAAO,MAAM,YAAY,4JACoI,CAAC;AAC9J,eAAO,MAAM,eAAe,wDAAwD,CAAC;AAErF,sDAAsD;AACtD,eAAO,MAAM,YAAY,uEAAuE,CAAC;AAEjG,0EAA0E;AAC1E,eAAO,MAAM,OAAO,QAA+F,CAAC;AAEpH,oEAAoE;AACpE,eAAO,MAAM,KAAK,sJACqI,CAAC;AAExJ,0DAA0D;AAC1D,eAAO,MAAM,UAAU,0GACoF,CAAC;AAE5G,oHAAoH;AACpH,eAAO,MAAM,cAAc,gOACsM,CAAC;AAElO;mGACmG;AACnG,eAAO,MAAM,IAAI,QAEkG,CAAC;AAEpH;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAK4B,CAAC"}
|
package/dist/utils/styles.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { cx as e } from "./cx.js";
|
|
3
2
|
//#region packages/utils/styles.ts
|
|
4
|
-
var t = "glow-border h-10 rounded-lg border [--glow-border-color:oklch(var(--glow)/0.22)] bg-tint/[0.035] px-3 text-sm text-foreground shadow-[inset_0_1px_0_hsl(0_0%_100%/0.04)] transition-[border-color,background-color,box-shadow,--glow-border-color] duration-200 placeholder:text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))] hover:[--glow-border-color:oklch(var(--glow)/0.4)] focus-visible:border-glow/60 focus-visible:[--glow-border-color:transparent] focus-visible:bg-tint/[0.05] focus-visible:shadow-glow-focus focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50", n =
|
|
3
|
+
var t = "glow-border h-10 rounded-lg border [--glow-border-color:oklch(var(--glow)/0.22)] bg-tint/[0.035] px-3 text-sm text-foreground shadow-[inset_0_1px_0_hsl(0_0%_100%/0.04)] transition-[border-color,background-color,box-shadow,--glow-border-color] duration-200 placeholder:text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))] hover:[--glow-border-color:oklch(var(--glow)/0.4)] focus-visible:border-glow/60 focus-visible:[--glow-border-color:transparent] focus-visible:bg-tint/[0.05] focus-visible:shadow-glow-focus focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50", n = {
|
|
4
|
+
sm: "h-8 px-2.5",
|
|
5
|
+
default: "",
|
|
6
|
+
lg: "h-11 px-3.5"
|
|
7
|
+
}, r = "text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))]", i = "text-muted-foreground cursor-pointer hover:bg-tint/[0.07] hover:text-foreground grid size-8 place-items-center rounded-md outline-hidden transition-colors focus-ring", a = "cursor-pointer rounded-lg py-2 text-sm outline-hidden transition-colors disabled:cursor-not-allowed disabled:opacity-35 focus-ring hover:bg-tint/[0.07]", o = "bg-primary text-primary-foreground hover:bg-primary", s = "border-glow/60 [--glow-border-color:transparent] shadow-glow-focus", c = e(t, "inline-flex cursor-pointer items-center justify-between gap-2 whitespace-nowrap"), l = "glass glass-blur rounded-xl text-foreground shadow-[var(--popup-shadow),0_0_40px_-20px_oklch(var(--glow)/calc(0.5*var(--glow-k)))] outline-hidden", u = "glow-edge relative flex w-fit items-center gap-1 rounded-full border border-tint/5 bg-tint/[0.03] p-1", d = "absolute top-1 bottom-1 left-0 rounded-full bg-primary/15 shadow-[inset_0_0_0_1px_oklch(var(--glow)/0.35),0_0_24px_-4px_oklch(var(--glow)/calc(0.6*var(--glow-k)))] transition-[translate,width] duration-500 ease-out-soft", f = "relative z-10 cursor-pointer disabled:cursor-not-allowed rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap outline-hidden transition-[color] duration-300 select-none focus-ring text-muted-foreground hover:text-foreground aria-[current=page]:text-foreground aria-selected:text-foreground", p = "glow-border flex w-full items-center gap-1.5 h-10 rounded-lg border [--glow-border-color:oklch(var(--glow)/0.22)] bg-tint/[0.035] px-3 text-sm text-foreground shadow-[inset_0_1px_0_hsl(0_0%_100%/0.04)] transition-[border-color,background-color,box-shadow,--glow-border-color] duration-200 placeholder:text-[color:oklch(var(--muted-foreground)/var(--zen-placeholder))] hover:[--glow-border-color:oklch(var(--glow)/0.4)] focus-within:border-glow/60 focus-within:[--glow-border-color:transparent] focus-within:bg-tint/[0.05] focus-within:shadow-glow-focus focus-within:outline-hidden disabled:cursor-not-allowed disabled:opacity-50";
|
|
5
8
|
//#endregion
|
|
6
|
-
export { t as FIELD,
|
|
9
|
+
export { t as FIELD, n as FIELD_SIZE, p as FIELD_WITHIN, a as PICKER_MONTH, o as PICKER_MONTH_ON, i as PICKER_NAV, f as PILL, d as PILL_INDICATOR, u as PILL_TRACK, r as PLACEHOLDER, l as POPUP, c as TRIGGER, s as TRIGGER_OPEN };
|
package/dist/utils/theme-wave.js
CHANGED
package/dist/utils/theme.js
CHANGED
|
@@ -33,15 +33,18 @@ export declare function anchorFor(id: string): {
|
|
|
33
33
|
/**
|
|
34
34
|
* The popup's position: below the trigger (above it if there's no room below),
|
|
35
35
|
* lined up with its start or end edge, or centred on it; `width` makes it as
|
|
36
|
-
* wide as the trigger, or at least as wide.
|
|
37
|
-
*
|
|
38
|
-
*
|
|
36
|
+
* wide as the trigger, or at least as wide. `side: 'beside'` puts it after the
|
|
37
|
+
* trigger instead (before it if there's no room), its top level with the
|
|
38
|
+
* trigger's, as a submenu opens. For parts that take their own `align`/`offset`
|
|
39
|
+
* (PopoverContent, MenuContent). The same choices are kept as custom
|
|
40
|
+
* properties, for placing it where anchor positioning isn't supported.
|
|
39
41
|
*/
|
|
40
|
-
export declare function anchoredStyle(id: string, { align, offset, width }?: AnchorOptions): CSSProperties;
|
|
42
|
+
export declare function anchoredStyle(id: string, { align, offset, width, side }?: AnchorOptions): CSSProperties;
|
|
41
43
|
interface AnchorOptions {
|
|
42
44
|
align?: 'start' | 'end' | 'center';
|
|
43
45
|
offset?: number;
|
|
44
46
|
width?: 'match' | 'at-least';
|
|
47
|
+
side?: 'below' | 'beside';
|
|
45
48
|
}
|
|
46
49
|
/** Places the popup in `ref` against its trigger while it's open, where the browser can't. */
|
|
47
50
|
export declare function useAnchorFallback(ref: RefObject<HTMLElement | null>): void;
|