@frontify/fondue-components 29.0.0 → 29.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fondue-components111.js +15 -3
- package/dist/fondue-components111.js.map +1 -1
- package/dist/fondue-components112.js +127 -5
- package/dist/fondue-components112.js.map +1 -1
- package/dist/fondue-components113.js +11 -17
- package/dist/fondue-components113.js.map +1 -1
- package/dist/fondue-components114.js +36 -14
- package/dist/fondue-components114.js.map +1 -1
- package/dist/fondue-components115.js +14 -15
- package/dist/fondue-components115.js.map +1 -1
- package/dist/fondue-components116.js +15 -111
- package/dist/fondue-components116.js.map +1 -1
- package/dist/fondue-components117.js +110 -12
- package/dist/fondue-components117.js.map +1 -1
- package/dist/fondue-components118.js +13 -17
- package/dist/fondue-components118.js.map +1 -1
- package/dist/fondue-components119.js +17 -13
- package/dist/fondue-components119.js.map +1 -1
- package/dist/fondue-components120.js +12 -126
- package/dist/fondue-components120.js.map +1 -1
- package/dist/fondue-components121.js +217 -11
- package/dist/fondue-components121.js.map +1 -1
- package/dist/fondue-components122.js +17 -34
- package/dist/fondue-components122.js.map +1 -1
- package/dist/fondue-components123.js +14 -214
- package/dist/fondue-components123.js.map +1 -1
- package/dist/fondue-components124.js +149 -17
- package/dist/fondue-components124.js.map +1 -1
- package/dist/fondue-components125.js +44 -16
- package/dist/fondue-components125.js.map +1 -1
- package/dist/fondue-components126.js +4 -150
- package/dist/fondue-components126.js.map +1 -1
- package/dist/fondue-components127.js +4 -44
- package/dist/fondue-components127.js.map +1 -1
- package/dist/fondue-components128.js +28 -169
- package/dist/fondue-components128.js.map +1 -1
- package/dist/fondue-components130.js +41 -9
- package/dist/fondue-components130.js.map +1 -1
- package/dist/fondue-components131.js +6 -256
- package/dist/fondue-components131.js.map +1 -1
- package/dist/fondue-components132.js +11 -28
- package/dist/fondue-components132.js.map +1 -1
- package/dist/fondue-components133.js +74 -0
- package/dist/fondue-components133.js.map +1 -0
- package/dist/fondue-components134.js +14 -40
- package/dist/fondue-components134.js.map +1 -1
- package/dist/fondue-components135.js +7 -6
- package/dist/fondue-components135.js.map +1 -1
- package/dist/fondue-components136.js +88 -11
- package/dist/fondue-components136.js.map +1 -1
- package/dist/fondue-components137.js +79 -69
- package/dist/fondue-components137.js.map +1 -1
- package/dist/fondue-components138.js +30 -14
- package/dist/fondue-components138.js.map +1 -1
- package/dist/fondue-components139.js +170 -7
- package/dist/fondue-components139.js.map +1 -1
- package/dist/fondue-components140.js +57 -86
- package/dist/fondue-components140.js.map +1 -1
- package/dist/fondue-components141.js +9 -81
- package/dist/fondue-components141.js.map +1 -1
- package/dist/fondue-components142.js +254 -29
- package/dist/fondue-components142.js.map +1 -1
- package/dist/fondue-components145.js +2 -2
- package/dist/fondue-components147.js +2 -2
- package/dist/fondue-components148.js +1 -1
- package/dist/fondue-components43.js +2 -2
- package/dist/fondue-components50.js +1 -1
- package/dist/fondue-components60.js +2 -2
- package/dist/fondue-components61.js +3 -3
- package/dist/fondue-components62.js +2 -2
- package/dist/fondue-components74.js +2 -2
- package/dist/fondue-components77.js +1 -1
- package/dist/fondue-components78.js +1 -1
- package/dist/fondue-components79.js +1 -1
- package/dist/fondue-components82.js +1 -1
- package/dist/fondue-components84.js +2 -2
- package/dist/fondue-components90.js +2 -2
- package/dist/fondue-components91.js +2 -2
- package/dist/fondue-components92.js +2 -2
- package/dist/fondue-components93.js +2 -2
- package/dist/fondue-components94.js +1 -1
- package/dist/fondue-components95.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/fondue-components129.js +0 -63
- package/dist/fondue-components129.js.map +0 -1
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
const o = "
|
|
2
|
-
root: o
|
|
1
|
+
const o = "_root_18649_5", c = "_caret_18649_43", t = "_colorName_18649_58", _ = "_colorIndicator_18649_61", n = "_button_18649_82", r = "_actions_18649_113", a = "_clearIcon_18649_122", s = {
|
|
2
|
+
root: o,
|
|
3
|
+
caret: c,
|
|
4
|
+
colorName: t,
|
|
5
|
+
colorIndicator: _,
|
|
6
|
+
button: n,
|
|
7
|
+
actions: r,
|
|
8
|
+
clearIcon: a
|
|
3
9
|
};
|
|
4
10
|
export {
|
|
5
|
-
|
|
11
|
+
r as actions,
|
|
12
|
+
n as button,
|
|
13
|
+
c as caret,
|
|
14
|
+
a as clearIcon,
|
|
15
|
+
_ as colorIndicator,
|
|
16
|
+
t as colorName,
|
|
17
|
+
s as default,
|
|
6
18
|
o as root
|
|
7
19
|
};
|
|
8
20
|
//# sourceMappingURL=fondue-components111.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components111.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components111.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1,8 +1,130 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
1
|
+
import { useCallback as c } from "react";
|
|
2
|
+
import { deepEqual as f } from "./fondue-components139.js";
|
|
3
|
+
import { defaultSortableTransition as x, Sortable as R } from "./fondue-components84.js";
|
|
4
|
+
import { isSortable as rr } from "./fondue-components84.js";
|
|
5
|
+
import { useInstance as T } from "@dnd-kit/react";
|
|
6
|
+
import { useDeepSignal as V, useOnValueChange as i, useIsomorphicLayoutEffect as k, useOnElementChange as m, useImmediateEffect as q } from "./fondue-components140.js";
|
|
7
|
+
import { currentValue as v } from "./fondue-components141.js";
|
|
8
|
+
import { batch as L } from "./fondue-components142.js";
|
|
9
|
+
var N = Object.defineProperty, U = Object.defineProperties, z = Object.getOwnPropertyDescriptors, I = Object.getOwnPropertySymbols, A = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable, j = (o, t, a) => t in o ? N(o, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[t] = a, _ = (o, t) => {
|
|
10
|
+
for (var a in t || (t = {}))
|
|
11
|
+
A.call(t, a) && j(o, a, t[a]);
|
|
12
|
+
if (I)
|
|
13
|
+
for (var a of I(t))
|
|
14
|
+
B.call(t, a) && j(o, a, t[a]);
|
|
15
|
+
return o;
|
|
16
|
+
}, F = (o, t) => U(o, z(t));
|
|
17
|
+
function Y(o) {
|
|
18
|
+
const {
|
|
19
|
+
accept: t,
|
|
20
|
+
collisionDetector: a,
|
|
21
|
+
collisionPriority: b,
|
|
22
|
+
id: O,
|
|
23
|
+
data: p,
|
|
24
|
+
element: h,
|
|
25
|
+
handle: y,
|
|
26
|
+
index: g,
|
|
27
|
+
group: D,
|
|
28
|
+
disabled: P,
|
|
29
|
+
feedback: d,
|
|
30
|
+
modifiers: S,
|
|
31
|
+
sensors: w,
|
|
32
|
+
target: C,
|
|
33
|
+
type: E
|
|
34
|
+
} = o, l = _(_({}, x), o.transition), r = T((e) => new R(
|
|
35
|
+
F(_({}, o), {
|
|
36
|
+
transition: l,
|
|
37
|
+
register: !1,
|
|
38
|
+
handle: v(y),
|
|
39
|
+
element: v(h),
|
|
40
|
+
target: v(C),
|
|
41
|
+
feedback: d
|
|
42
|
+
}),
|
|
43
|
+
e
|
|
44
|
+
)), u = V(r, G);
|
|
45
|
+
return i(O, () => r.id = O), k(() => {
|
|
46
|
+
L(() => {
|
|
47
|
+
r.group = D, r.index = g;
|
|
48
|
+
});
|
|
49
|
+
}, [r, D, g]), i(E, () => r.type = E), i(
|
|
50
|
+
t,
|
|
51
|
+
() => r.accept = t,
|
|
52
|
+
void 0,
|
|
53
|
+
f
|
|
54
|
+
), i(p, () => p && (r.data = p)), i(
|
|
55
|
+
g,
|
|
56
|
+
() => {
|
|
57
|
+
var e;
|
|
58
|
+
(e = r.manager) != null && e.dragOperation.status.idle && (l != null && l.idle) && r.refreshShape();
|
|
59
|
+
},
|
|
60
|
+
q
|
|
61
|
+
), m(y, (e) => r.handle = e), m(h, (e) => r.element = e), m(C, (e) => r.target = e), i(P, () => r.disabled = P === !0), i(w, () => r.sensors = w), i(
|
|
62
|
+
a,
|
|
63
|
+
() => r.collisionDetector = a
|
|
64
|
+
), i(
|
|
65
|
+
b,
|
|
66
|
+
() => r.collisionPriority = b
|
|
67
|
+
), i(d, () => r.feedback = d ?? "default"), i(
|
|
68
|
+
l,
|
|
69
|
+
() => r.transition = l,
|
|
70
|
+
void 0,
|
|
71
|
+
f
|
|
72
|
+
), i(
|
|
73
|
+
S,
|
|
74
|
+
() => r.modifiers = S,
|
|
75
|
+
void 0,
|
|
76
|
+
f
|
|
77
|
+
), i(
|
|
78
|
+
o.alignment,
|
|
79
|
+
() => r.alignment = o.alignment
|
|
80
|
+
), {
|
|
81
|
+
sortable: u,
|
|
82
|
+
get isDragging() {
|
|
83
|
+
return u.isDragging;
|
|
84
|
+
},
|
|
85
|
+
get isDropping() {
|
|
86
|
+
return u.isDropping;
|
|
87
|
+
},
|
|
88
|
+
get isDragSource() {
|
|
89
|
+
return u.isDragSource;
|
|
90
|
+
},
|
|
91
|
+
get isDropTarget() {
|
|
92
|
+
return u.isDropTarget;
|
|
93
|
+
},
|
|
94
|
+
handleRef: c(
|
|
95
|
+
(e) => {
|
|
96
|
+
r.handle = e ?? void 0;
|
|
97
|
+
},
|
|
98
|
+
[r]
|
|
99
|
+
),
|
|
100
|
+
ref: c(
|
|
101
|
+
(e) => {
|
|
102
|
+
var n, s;
|
|
103
|
+
!e && ((n = r.element) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.element = e ?? void 0);
|
|
104
|
+
},
|
|
105
|
+
[r]
|
|
106
|
+
),
|
|
107
|
+
sourceRef: c(
|
|
108
|
+
(e) => {
|
|
109
|
+
var n, s;
|
|
110
|
+
!e && ((n = r.source) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.source = e ?? void 0);
|
|
111
|
+
},
|
|
112
|
+
[r]
|
|
113
|
+
),
|
|
114
|
+
targetRef: c(
|
|
115
|
+
(e) => {
|
|
116
|
+
var n, s;
|
|
117
|
+
!e && ((n = r.target) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.target = e ?? void 0);
|
|
118
|
+
},
|
|
119
|
+
[r]
|
|
120
|
+
)
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function G(o, t, a) {
|
|
124
|
+
return !!(o === "isDragSource" && !a && t);
|
|
125
|
+
}
|
|
5
126
|
export {
|
|
6
|
-
|
|
127
|
+
rr as isSortable,
|
|
128
|
+
Y as useSortable
|
|
7
129
|
};
|
|
8
130
|
//# sourceMappingURL=fondue-components112.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components112.js","sources":["../src/components/Badge/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type RgbaColor } from './types';\n\nexport const DEFAULT_COLOR = { red: 255, green: 255, blue: 255, alpha: 1, name: '' };\n\n/**\n * Converts a color object to a CSS color string.\n * @param {RgbaColor} color - The color object to be converted.\n * @returns {string}\n * @example\n * colorToCss({ red: 255, green: 255, blue: 255, alpha: 1 }); // 'rgba(255, 255, 255, 1)'\n * @example\n * colorToCss({ red: 255, green: 87, blue: 51, alpha: 1 }); // 'rgba(255, 87, 51, 1)'\n * @example\n * colorToCss({ red: 0, green: 0, blue: 0, alpha: 0 }); // 'rgba(0, 0, 0, 0)'\n */\nexport const colorToCss = (color?: RgbaColor) => {\n if (!color) {\n return undefined;\n }\n return `rgba(${color.red}, ${color.green}, ${color.blue}, ${color.alpha ?? 1})`;\n};\n"],"names":["colorToCss","color"],"mappings":"AAiBO,MAAMA,IAAa,CAACC,MAAsB;AAC7C,MAAKA;AAGL,WAAO,QAAQA,EAAM,GAAG,KAAKA,EAAM,KAAK,KAAKA,EAAM,IAAI,KAAKA,EAAM,SAAS,CAAC;AAChF;"}
|
|
1
|
+
{"version":3,"file":"fondue-components112.js","sources":["../../../node_modules/.pnpm/@dnd-kit+react@0.3.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/react/sortable.js"],"sourcesContent":["import { useCallback } from 'react';\nimport { batch, deepEqual } from '@dnd-kit/state';\nimport { defaultSortableTransition, Sortable } from '@dnd-kit/dom/sortable';\nexport { isSortable, isSortableOperation } from '@dnd-kit/dom/sortable';\nimport { useInstance } from '@dnd-kit/react';\nimport { useDeepSignal, useOnValueChange, useIsomorphicLayoutEffect, useImmediateEffect, useOnElementChange } from '@dnd-kit/react/hooks';\nimport { currentValue } from '@dnd-kit/react/utilities';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction useSortable(input) {\n const {\n accept,\n collisionDetector,\n collisionPriority,\n id,\n data,\n element,\n handle,\n index,\n group,\n disabled,\n feedback,\n modifiers,\n sensors,\n target,\n type\n } = input;\n const transition = __spreadValues(__spreadValues({}, defaultSortableTransition), input.transition);\n const sortable = useInstance((manager) => {\n return new Sortable(\n __spreadProps(__spreadValues({}, input), {\n transition,\n register: false,\n handle: currentValue(handle),\n element: currentValue(element),\n target: currentValue(target),\n feedback\n }),\n manager\n );\n });\n const trackedSortable = useDeepSignal(sortable, shouldUpdateSynchronously);\n useOnValueChange(id, () => sortable.id = id);\n useIsomorphicLayoutEffect(() => {\n batch(() => {\n sortable.group = group;\n sortable.index = index;\n });\n }, [sortable, group, index]);\n useOnValueChange(type, () => sortable.type = type);\n useOnValueChange(\n accept,\n () => sortable.accept = accept,\n void 0,\n deepEqual\n );\n useOnValueChange(data, () => data && (sortable.data = data));\n useOnValueChange(\n index,\n () => {\n var _a;\n if (((_a = sortable.manager) == null ? void 0 : _a.dragOperation.status.idle) && (transition == null ? void 0 : transition.idle)) {\n sortable.refreshShape();\n }\n },\n useImmediateEffect\n );\n useOnElementChange(handle, (handle2) => sortable.handle = handle2);\n useOnElementChange(element, (element2) => sortable.element = element2);\n useOnElementChange(target, (target2) => sortable.target = target2);\n useOnValueChange(disabled, () => sortable.disabled = disabled === true);\n useOnValueChange(sensors, () => sortable.sensors = sensors);\n useOnValueChange(\n collisionDetector,\n () => sortable.collisionDetector = collisionDetector\n );\n useOnValueChange(\n collisionPriority,\n () => sortable.collisionPriority = collisionPriority\n );\n useOnValueChange(feedback, () => sortable.feedback = feedback != null ? feedback : \"default\");\n useOnValueChange(\n transition,\n () => sortable.transition = transition,\n void 0,\n deepEqual\n );\n useOnValueChange(\n modifiers,\n () => sortable.modifiers = modifiers,\n void 0,\n deepEqual\n );\n useOnValueChange(\n input.alignment,\n () => sortable.alignment = input.alignment\n );\n return {\n sortable: trackedSortable,\n get isDragging() {\n return trackedSortable.isDragging;\n },\n get isDropping() {\n return trackedSortable.isDropping;\n },\n get isDragSource() {\n return trackedSortable.isDragSource;\n },\n get isDropTarget() {\n return trackedSortable.isDropTarget;\n },\n handleRef: useCallback(\n (element2) => {\n sortable.handle = element2 != null ? element2 : void 0;\n },\n [sortable]\n ),\n ref: useCallback(\n (element2) => {\n var _a, _b;\n if (!element2 && ((_a = sortable.element) == null ? void 0 : _a.isConnected) && !((_b = sortable.manager) == null ? void 0 : _b.dragOperation.status.idle)) {\n return;\n }\n sortable.element = element2 != null ? element2 : void 0;\n },\n [sortable]\n ),\n sourceRef: useCallback(\n (element2) => {\n var _a, _b;\n if (!element2 && ((_a = sortable.source) == null ? void 0 : _a.isConnected) && !((_b = sortable.manager) == null ? void 0 : _b.dragOperation.status.idle)) {\n return;\n }\n sortable.source = element2 != null ? element2 : void 0;\n },\n [sortable]\n ),\n targetRef: useCallback(\n (element2) => {\n var _a, _b;\n if (!element2 && ((_a = sortable.target) == null ? void 0 : _a.isConnected) && !((_b = sortable.manager) == null ? void 0 : _b.dragOperation.status.idle)) {\n return;\n }\n sortable.target = element2 != null ? element2 : void 0;\n },\n [sortable]\n )\n };\n}\nfunction shouldUpdateSynchronously(key, oldValue, newValue) {\n if (key === \"isDragSource\" && !newValue && oldValue) return true;\n return false;\n}\n\nexport { useSortable };\n//# sourceMappingURL=sortable.js.map\n//# sourceMappingURL=sortable.js.map"],"names":["__defProp","__defProps","__getOwnPropDescs","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","__spreadProps","useSortable","input","accept","collisionDetector","collisionPriority","id","data","element","handle","index","group","disabled","feedback","modifiers","sensors","target","type","transition","defaultSortableTransition","sortable","useInstance","manager","Sortable","currentValue","trackedSortable","useDeepSignal","shouldUpdateSynchronously","useOnValueChange","useIsomorphicLayoutEffect","batch","deepEqual","_a","useImmediateEffect","useOnElementChange","handle2","element2","target2","useCallback","_b","oldValue","newValue"],"mappings":";;;;;;;;AAQA,IAAIA,IAAY,OAAO,gBACnBC,IAAa,OAAO,kBACpBC,IAAoB,OAAO,2BAC3BC,IAAsB,OAAO,uBAC7BC,IAAe,OAAO,UAAU,gBAChCC,IAAe,OAAO,UAAU,sBAChCC,IAAkB,CAACC,GAAKC,GAAKC,MAAUD,KAAOD,IAAMP,EAAUO,GAAKC,GAAK,EAAE,YAAY,IAAM,cAAc,IAAM,UAAU,IAAM,OAAAC,EAAK,CAAE,IAAIF,EAAIC,CAAG,IAAIC,GACtJC,IAAiB,CAACC,GAAGC,MAAM;AAC7B,WAASC,KAAQD,MAAMA,IAAI,CAAA;AACzB,IAA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|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
1
|
+
import { createContext as t, useContext as r } from "react";
|
|
2
|
+
const e = t({
|
|
3
|
+
itemId: "",
|
|
4
|
+
dragHandleRef: () => null,
|
|
5
|
+
hasHandle: !1
|
|
6
|
+
});
|
|
7
|
+
e.displayName = "OrderableItemContext";
|
|
8
|
+
const a = e.Provider, n = () => r(e);
|
|
10
9
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
a as clearIcon,
|
|
15
|
-
_ as colorIndicator,
|
|
16
|
-
t as colorName,
|
|
17
|
-
s as default,
|
|
18
|
-
o as root
|
|
10
|
+
e as OrderableItemContext,
|
|
11
|
+
a as OrderableItemContextProvider,
|
|
12
|
+
n as useOrderableItemContext
|
|
19
13
|
};
|
|
20
14
|
//# sourceMappingURL=fondue-components113.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components113.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components113.js","sources":["../src/components/OrderableList/hooks/useOrderedListItemContext.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { createContext, useContext } from 'react';\n\ntype OrderableItemContextType = {\n itemId: string;\n dragHandleRef: (element: Element | null) => void;\n hasHandle: boolean;\n selected?: boolean;\n onSelect?: (isSelected: boolean) => void;\n};\n\nexport const OrderableItemContext = createContext<OrderableItemContextType>({\n itemId: '',\n dragHandleRef: () => null,\n hasHandle: false,\n});\nOrderableItemContext.displayName = 'OrderableItemContext';\n\nexport const OrderableItemContextProvider = OrderableItemContext.Provider;\n\nexport const useOrderableItemContext = (): OrderableItemContextType => useContext(OrderableItemContext);\n"],"names":["OrderableItemContext","createContext","OrderableItemContextProvider","useOrderableItemContext","useContext"],"mappings":";AAYO,MAAMA,IAAuBC,EAAwC;AAAA,EACxE,QAAQ;AAAA,EACR,eAAe,MAAM;AAAA,EACrB,WAAW;AACf,CAAC;AACDD,EAAqB,cAAc;AAE5B,MAAME,IAA+BF,EAAqB,UAEpDG,IAA0B,MAAgCC,EAAWJ,CAAoB;"}
|
|
@@ -1,17 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f } from "react";
|
|
3
|
+
import { getItemTitle as p } from "./fondue-components80.js";
|
|
4
|
+
import { useOrderableListAnnounce as u } from "./fondue-components81.js";
|
|
5
|
+
import { useOrderableItemContext as b } from "./fondue-components113.js";
|
|
6
|
+
import l from "./fondue-components83.js";
|
|
7
|
+
const I = f(({ children: t }, o) => {
|
|
8
|
+
const { itemId: c, onSelect: n, selected: r, hasHandle: d } = b(), m = u();
|
|
9
|
+
if (!n)
|
|
10
|
+
return (
|
|
11
|
+
// eslint-disable-next-line jsx-a11y-x/no-noninteractive-tabindex
|
|
12
|
+
/* @__PURE__ */ s("div", { className: l.content, ref: o, tabIndex: d ? 0 : void 0, children: t })
|
|
13
|
+
);
|
|
14
|
+
const a = () => {
|
|
15
|
+
const e = !r;
|
|
16
|
+
n(e), m(`${p(c)} ${e ? "selected" : "unselected"}`);
|
|
17
|
+
}, i = (e) => {
|
|
18
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ s(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: l.content,
|
|
24
|
+
ref: o,
|
|
25
|
+
role: "button",
|
|
26
|
+
tabIndex: 0,
|
|
27
|
+
"aria-pressed": !!r,
|
|
28
|
+
onClick: a,
|
|
29
|
+
onKeyDown: i,
|
|
30
|
+
"data-clickable": !0,
|
|
31
|
+
children: t
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
I.displayName = "OrderableListItemContent";
|
|
14
36
|
export {
|
|
15
|
-
|
|
37
|
+
I as OrderableListItemContent
|
|
16
38
|
};
|
|
17
39
|
//# sourceMappingURL=fondue-components114.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components114.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components114.js","sources":["../src/components/OrderableList/OrderableListItemContent.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type KeyboardEvent, type ReactNode } from 'react';\n\nimport { getItemTitle } from './helpers/getItemTitle';\nimport { useOrderableListAnnounce } from './hooks/useOrderableListAnnounce';\nimport { useOrderableItemContext } from './hooks/useOrderedListItemContext';\nimport styles from './styles/orderable-list.module.scss';\n\nexport const OrderableListItemContent = forwardRef<HTMLDivElement, { children: ReactNode }>(({ children }, ref) => {\n const { itemId, onSelect, selected, hasHandle } = useOrderableItemContext();\n const announce = useOrderableListAnnounce();\n\n if (!onSelect) {\n return (\n // eslint-disable-next-line jsx-a11y-x/no-noninteractive-tabindex\n <div className={styles.content} ref={ref} tabIndex={hasHandle ? 0 : undefined}>\n {children}\n </div>\n );\n }\n\n const handleSelect = () => {\n const newSelected = !selected;\n onSelect(newSelected);\n announce(`${getItemTitle(itemId)} ${newSelected ? 'selected' : 'unselected'}`);\n };\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleSelect();\n }\n };\n\n return (\n <div\n className={styles.content}\n ref={ref}\n role=\"button\"\n tabIndex={0}\n aria-pressed={Boolean(selected)}\n onClick={handleSelect}\n onKeyDown={handleKeyDown}\n data-clickable\n >\n {children}\n </div>\n );\n});\nOrderableListItemContent.displayName = 'OrderableListItemContent';\n"],"names":["OrderableListItemContent","forwardRef","children","ref","itemId","onSelect","selected","hasHandle","useOrderableItemContext","announce","useOrderableListAnnounce","jsx","styles","handleSelect","newSelected","getItemTitle","handleKeyDown","event"],"mappings":";;;;;;AASO,MAAMA,IAA2BC,EAAoD,CAAC,EAAE,UAAAC,EAAA,GAAYC,MAAQ;AAC/G,QAAM,EAAE,QAAAC,GAAQ,UAAAC,GAAU,UAAAC,GAAU,WAAAC,EAAA,IAAcC,EAAA,GAC5CC,IAAWC,EAAA;AAEjB,MAAI,CAACL;AACD;AAAA;AAAA,MAEI,gBAAAM,EAAC,OAAA,EAAI,WAAWC,EAAO,SAAS,KAAAT,GAAU,UAAUI,IAAY,IAAI,QAC/D,UAAAL,EAAA,CACL;AAAA;AAIR,QAAMW,IAAe,MAAM;AACvB,UAAMC,IAAc,CAACR;AACrB,IAAAD,EAASS,CAAW,GACpBL,EAAS,GAAGM,EAAaX,CAAM,CAAC,IAAIU,IAAc,aAAa,YAAY,EAAE;AAAA,EACjF,GAEME,IAAgB,CAACC,MAAyB;AAC5C,KAAIA,EAAM,QAAQ,WAAWA,EAAM,QAAQ,SACvCA,EAAM,eAAA,GACNJ,EAAA;AAAA,EAER;AAEA,SACI,gBAAAF;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAWC,EAAO;AAAA,MAClB,KAAAT;AAAA,MACA,MAAK;AAAA,MACL,UAAU;AAAA,MACV,gBAAc,EAAQG;AAAA,MACtB,SAASO;AAAA,MACT,WAAWG;AAAA,MACX,kBAAc;AAAA,MAEb,UAAAd;AAAA,IAAA;AAAA,EAAA;AAGb,CAAC;AACDF,EAAyB,cAAc;"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { format as o } from "date-fns";
|
|
2
|
+
import { transformDateRangeToPickerDateRange as i, transformDatePickerDateToDate as e } from "./fondue-components128.js";
|
|
3
|
+
const y = (r) => !!(r && "from" in r && "to" in r), M = (r) => {
|
|
4
|
+
const t = e(r);
|
|
5
|
+
if (t)
|
|
6
|
+
return o(t, "MMMM d, yyyy");
|
|
7
|
+
}, a = (r) => {
|
|
8
|
+
const t = i(r);
|
|
9
|
+
if (!(t != null && t.from) || !(t != null && t.to))
|
|
10
|
+
return;
|
|
11
|
+
const n = t.from.getFullYear() === t.to.getFullYear();
|
|
12
|
+
return n && t.from.getMonth() === t.to.getMonth() ? `${o(t.from, "MMM d")}–${o(t.to, "d, yyyy")}` : n ? `${o(t.from, "MMM d")}–${o(t.to, "MMM d, yyyy")}` : `${o(t.from, "MMM d, yyyy")}–${o(t.to, "MMM d, yyyy")}`;
|
|
13
|
+
}, g = (r) => y(r) ? a(r) : M(r);
|
|
9
14
|
export {
|
|
10
|
-
|
|
11
|
-
n as button,
|
|
12
|
-
a as caret,
|
|
13
|
-
_ as clearIcon,
|
|
14
|
-
o as dateName,
|
|
15
|
-
e as default,
|
|
16
|
-
t as root
|
|
15
|
+
g as getDateDisplayString
|
|
17
16
|
};
|
|
18
17
|
//# sourceMappingURL=fondue-components115.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components115.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components115.js","sources":["../src/components/DatePicker/helpers/dateDisplayFormatter.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { format } from 'date-fns';\n\nimport { type DatePickerDate, type DatePickerDateRange } from '../types';\n\nimport { transformDateRangeToPickerDateRange, transformDatePickerDateToDate } from './dateTransformer';\n\nconst isDateRange = (selected?: DatePickerDateRange | DatePickerDate): selected is DatePickerDateRange => {\n return Boolean(selected && 'from' in selected && 'to' in selected);\n};\n\nconst getSingleDateDisplayString = (selected?: DatePickerDate): string | undefined => {\n const singleDate = transformDatePickerDateToDate(selected);\n if (!singleDate) {\n return undefined;\n }\n return format(singleDate, 'MMMM d, yyyy');\n};\n\nconst getDateRangeDisplayString = (selected?: DatePickerDateRange): string | undefined => {\n const dateRange = transformDateRangeToPickerDateRange(selected);\n if (!dateRange?.from || !dateRange?.to) {\n return undefined;\n }\n\n const isSameYear = dateRange.from.getFullYear() === dateRange.to.getFullYear();\n\n const isSameMonth = isSameYear && dateRange.from.getMonth() === dateRange.to.getMonth();\n\n if (isSameMonth) {\n return `${format(dateRange.from, 'MMM d')}\\u2013${format(dateRange.to, 'd, yyyy')}`;\n }\n\n if (isSameYear) {\n return `${format(dateRange.from, 'MMM d')}\\u2013${format(dateRange.to, 'MMM d, yyyy')}`;\n }\n\n return `${format(dateRange.from, 'MMM d, yyyy')}\\u2013${format(dateRange.to, 'MMM d, yyyy')}`;\n};\n\nexport const getDateDisplayString = (selected?: DatePickerDateRange | DatePickerDate): string | undefined => {\n if (isDateRange(selected)) {\n return getDateRangeDisplayString(selected);\n }\n return getSingleDateDisplayString(selected);\n};\n"],"names":["isDateRange","selected","getSingleDateDisplayString","singleDate","transformDatePickerDateToDate","format","getDateRangeDisplayString","dateRange","transformDateRangeToPickerDateRange","isSameYear","getDateDisplayString"],"mappings":";;AAQA,MAAMA,IAAc,CAACC,MACV,GAAQA,KAAY,UAAUA,KAAY,QAAQA,IAGvDC,IAA6B,CAACD,MAAkD;AAClF,QAAME,IAAaC,EAA8BH,CAAQ;AACzD,MAAKE;AAGL,WAAOE,EAAOF,GAAY,cAAc;AAC5C,GAEMG,IAA4B,CAACL,MAAuD;AACtF,QAAMM,IAAYC,EAAoCP,CAAQ;AAC9D,MAAI,EAACM,KAAA,QAAAA,EAAW,SAAQ,EAACA,KAAA,QAAAA,EAAW;AAChC;AAGJ,QAAME,IAAaF,EAAU,KAAK,kBAAkBA,EAAU,GAAG,YAAA;AAIjE,SAFoBE,KAAcF,EAAU,KAAK,eAAeA,EAAU,GAAG,SAAA,IAGlE,GAAGF,EAAOE,EAAU,MAAM,OAAO,CAAC,IAASF,EAAOE,EAAU,IAAI,SAAS,CAAC,KAGjFE,IACO,GAAGJ,EAAOE,EAAU,MAAM,OAAO,CAAC,IAASF,EAAOE,EAAU,IAAI,aAAa,CAAC,KAGlF,GAAGF,EAAOE,EAAU,MAAM,aAAa,CAAC,IAASF,EAAOE,EAAU,IAAI,aAAa,CAAC;AAC/F,GAEaG,IAAuB,CAACT,MAC7BD,EAAYC,CAAQ,IACbK,EAA0BL,CAAQ,IAEtCC,EAA2BD,CAAQ;"}
|
|
@@ -1,114 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const N = h(
|
|
10
|
-
({ "data-test-id": t = "fondue-date-picker-calendar", disabledDates: o, ...a }, s) => {
|
|
11
|
-
const d = b(), {
|
|
12
|
-
dir: l,
|
|
13
|
-
translations: { dateLocale: n }
|
|
14
|
-
} = g(), i = $(() => {
|
|
15
|
-
var u;
|
|
16
|
-
return a.mode === "single" ? a.selected : (u = a.selected) == null ? void 0 : u.from;
|
|
17
|
-
}, [a]);
|
|
18
|
-
return /* @__PURE__ */ r("div", { ref: s, "data-test-id": t, className: e.wrapper, children: /* @__PURE__ */ r(
|
|
19
|
-
w,
|
|
20
|
-
{
|
|
21
|
-
navLayout: "around",
|
|
22
|
-
"data-test-id": t,
|
|
23
|
-
locale: n,
|
|
24
|
-
components: v(),
|
|
25
|
-
showOutsideDays: !0,
|
|
26
|
-
disabled: o,
|
|
27
|
-
defaultMonth: i,
|
|
28
|
-
dir: l,
|
|
29
|
-
timeZone: "UTC",
|
|
30
|
-
classNames: {
|
|
31
|
-
root: `${d.root} ${e.root}`,
|
|
32
|
-
day: `${e.day}`,
|
|
33
|
-
selected: `${e.selected}`,
|
|
34
|
-
week: `${d.week} ${e.week}`,
|
|
35
|
-
weekday: `${e.weekday}`,
|
|
36
|
-
weekdays: `${d.weekdays} ${e.weekdays}`,
|
|
37
|
-
range_start: `${e.selectedStart}`,
|
|
38
|
-
range_end: `${e.selectedEnd}`,
|
|
39
|
-
range_middle: `${e.selectedMiddle}`,
|
|
40
|
-
disabled: `${e.disabled}`,
|
|
41
|
-
outside: `${e.outside}`
|
|
42
|
-
},
|
|
43
|
-
...a,
|
|
44
|
-
modifiersClassNames: {
|
|
45
|
-
hoverAfter: `${e.hoverAfter}`,
|
|
46
|
-
hoverBefore: `${e.hoverBefore}`,
|
|
47
|
-
hoverSelected: `${e.hoverSelected}`
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
) });
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
N.displayName = "DatePickerCalendar";
|
|
54
|
-
const v = () => ({
|
|
55
|
-
DayButton: ({ day: t, modifiers: o, onClick: a, onMouseEnter: s, onMouseLeave: d, ...l }) => {
|
|
56
|
-
const n = p(null);
|
|
57
|
-
return y(() => {
|
|
58
|
-
var i;
|
|
59
|
-
o.focused && ((i = n.current) == null || i.focus());
|
|
60
|
-
}, [o.focused]), /* @__PURE__ */ r(
|
|
61
|
-
"button",
|
|
62
|
-
{
|
|
63
|
-
...l,
|
|
64
|
-
ref: n,
|
|
65
|
-
className: e.dayButton,
|
|
66
|
-
onClick: a,
|
|
67
|
-
onMouseEnter: s,
|
|
68
|
-
onMouseLeave: d,
|
|
69
|
-
type: "button",
|
|
70
|
-
children: /* @__PURE__ */ r("div", { className: `${e.dayContent} ${e.button}`, children: t.date.getDate() })
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
},
|
|
74
|
-
PreviousMonthButton: ({
|
|
75
|
-
onClick: t,
|
|
76
|
-
"aria-label": o,
|
|
77
|
-
"aria-disabled": a
|
|
78
|
-
}) => /* @__PURE__ */ r("div", { className: `${e.toggleMonthButtonContainer} `, children: /* @__PURE__ */ r(
|
|
79
|
-
c,
|
|
80
|
-
{
|
|
81
|
-
emphasis: "weak",
|
|
82
|
-
size: "small",
|
|
83
|
-
aspect: "square",
|
|
84
|
-
"aria-label": o,
|
|
85
|
-
"aria-disabled": a,
|
|
86
|
-
onPress: (s) => {
|
|
87
|
-
s && (t == null || t(s));
|
|
88
|
-
},
|
|
89
|
-
children: /* @__PURE__ */ r(f, { size: 16 })
|
|
90
|
-
}
|
|
91
|
-
) }),
|
|
92
|
-
NextMonthButton: ({
|
|
93
|
-
onClick: t,
|
|
94
|
-
"aria-label": o,
|
|
95
|
-
"aria-disabled": a
|
|
96
|
-
}) => /* @__PURE__ */ r("div", { className: `${e.toggleMonthButtonContainer} ${e.nextMonthButtonContainer}`, children: /* @__PURE__ */ r(
|
|
97
|
-
c,
|
|
98
|
-
{
|
|
99
|
-
emphasis: "weak",
|
|
100
|
-
size: "small",
|
|
101
|
-
aspect: "square",
|
|
102
|
-
"aria-label": o,
|
|
103
|
-
"aria-disabled": a,
|
|
104
|
-
onPress: (s) => {
|
|
105
|
-
s && (t == null || t(s));
|
|
106
|
-
},
|
|
107
|
-
children: /* @__PURE__ */ r(m, { size: 16 })
|
|
108
|
-
}
|
|
109
|
-
) })
|
|
110
|
-
});
|
|
1
|
+
const t = "_root_v3an7_5", a = "_caret_v3an7_44", o = "_dateName_v3an7_59", n = "_button_v3an7_80", c = "_actions_v3an7_93", _ = "_clearIcon_v3an7_101", e = {
|
|
2
|
+
root: t,
|
|
3
|
+
caret: a,
|
|
4
|
+
dateName: o,
|
|
5
|
+
button: n,
|
|
6
|
+
actions: c,
|
|
7
|
+
clearIcon: _
|
|
8
|
+
};
|
|
111
9
|
export {
|
|
112
|
-
|
|
10
|
+
c as actions,
|
|
11
|
+
n as button,
|
|
12
|
+
a as caret,
|
|
13
|
+
_ as clearIcon,
|
|
14
|
+
o as dateName,
|
|
15
|
+
e as default,
|
|
16
|
+
t as root
|
|
113
17
|
};
|
|
114
18
|
//# sourceMappingURL=fondue-components116.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components116.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components116.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,16 +1,114 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { IconArrowRight as m, IconArrowLeft as f } from "@frontify/fondue-icons";
|
|
3
|
+
import { forwardRef as h, useMemo as $, useRef as p, useEffect as y } from "react";
|
|
4
|
+
import { getDefaultClassNames as b, DayPicker as w } from "react-day-picker";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { Button as c } from "./fondue-components6.js";
|
|
7
|
+
import { useFondueTheme as g } from "./fondue-components39.js";
|
|
8
|
+
import e from "./fondue-components130.js";
|
|
9
|
+
const N = h(
|
|
10
|
+
({ "data-test-id": t = "fondue-date-picker-calendar", disabledDates: o, ...a }, s) => {
|
|
11
|
+
const d = b(), {
|
|
12
|
+
dir: l,
|
|
13
|
+
translations: { dateLocale: n }
|
|
14
|
+
} = g(), i = $(() => {
|
|
15
|
+
var u;
|
|
16
|
+
return a.mode === "single" ? a.selected : (u = a.selected) == null ? void 0 : u.from;
|
|
17
|
+
}, [a]);
|
|
18
|
+
return /* @__PURE__ */ r("div", { ref: s, "data-test-id": t, className: e.wrapper, children: /* @__PURE__ */ r(
|
|
19
|
+
w,
|
|
20
|
+
{
|
|
21
|
+
navLayout: "around",
|
|
22
|
+
"data-test-id": t,
|
|
23
|
+
locale: n,
|
|
24
|
+
components: v(),
|
|
25
|
+
showOutsideDays: !0,
|
|
26
|
+
disabled: o,
|
|
27
|
+
defaultMonth: i,
|
|
28
|
+
dir: l,
|
|
29
|
+
timeZone: "UTC",
|
|
30
|
+
classNames: {
|
|
31
|
+
root: `${d.root} ${e.root}`,
|
|
32
|
+
day: `${e.day}`,
|
|
33
|
+
selected: `${e.selected}`,
|
|
34
|
+
week: `${d.week} ${e.week}`,
|
|
35
|
+
weekday: `${e.weekday}`,
|
|
36
|
+
weekdays: `${d.weekdays} ${e.weekdays}`,
|
|
37
|
+
range_start: `${e.selectedStart}`,
|
|
38
|
+
range_end: `${e.selectedEnd}`,
|
|
39
|
+
range_middle: `${e.selectedMiddle}`,
|
|
40
|
+
disabled: `${e.disabled}`,
|
|
41
|
+
outside: `${e.outside}`
|
|
42
|
+
},
|
|
43
|
+
...a,
|
|
44
|
+
modifiersClassNames: {
|
|
45
|
+
hoverAfter: `${e.hoverAfter}`,
|
|
46
|
+
hoverBefore: `${e.hoverBefore}`,
|
|
47
|
+
hoverSelected: `${e.hoverSelected}`
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
) });
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
N.displayName = "DatePickerCalendar";
|
|
54
|
+
const v = () => ({
|
|
55
|
+
DayButton: ({ day: t, modifiers: o, onClick: a, onMouseEnter: s, onMouseLeave: d, ...l }) => {
|
|
56
|
+
const n = p(null);
|
|
57
|
+
return y(() => {
|
|
58
|
+
var i;
|
|
59
|
+
o.focused && ((i = n.current) == null || i.focus());
|
|
60
|
+
}, [o.focused]), /* @__PURE__ */ r(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
...l,
|
|
64
|
+
ref: n,
|
|
65
|
+
className: e.dayButton,
|
|
66
|
+
onClick: a,
|
|
67
|
+
onMouseEnter: s,
|
|
68
|
+
onMouseLeave: d,
|
|
69
|
+
type: "button",
|
|
70
|
+
children: /* @__PURE__ */ r("div", { className: `${e.dayContent} ${e.button}`, children: t.date.getDate() })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
},
|
|
74
|
+
PreviousMonthButton: ({
|
|
75
|
+
onClick: t,
|
|
76
|
+
"aria-label": o,
|
|
77
|
+
"aria-disabled": a
|
|
78
|
+
}) => /* @__PURE__ */ r("div", { className: `${e.toggleMonthButtonContainer} `, children: /* @__PURE__ */ r(
|
|
79
|
+
c,
|
|
80
|
+
{
|
|
81
|
+
emphasis: "weak",
|
|
82
|
+
size: "small",
|
|
83
|
+
aspect: "square",
|
|
84
|
+
"aria-label": o,
|
|
85
|
+
"aria-disabled": a,
|
|
86
|
+
onPress: (s) => {
|
|
87
|
+
s && (t == null || t(s));
|
|
88
|
+
},
|
|
89
|
+
children: /* @__PURE__ */ r(f, { size: 16 })
|
|
10
90
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
91
|
+
) }),
|
|
92
|
+
NextMonthButton: ({
|
|
93
|
+
onClick: t,
|
|
94
|
+
"aria-label": o,
|
|
95
|
+
"aria-disabled": a
|
|
96
|
+
}) => /* @__PURE__ */ r("div", { className: `${e.toggleMonthButtonContainer} ${e.nextMonthButtonContainer}`, children: /* @__PURE__ */ r(
|
|
97
|
+
c,
|
|
98
|
+
{
|
|
99
|
+
emphasis: "weak",
|
|
100
|
+
size: "small",
|
|
101
|
+
aspect: "square",
|
|
102
|
+
"aria-label": o,
|
|
103
|
+
"aria-disabled": a,
|
|
104
|
+
onPress: (s) => {
|
|
105
|
+
s && (t == null || t(s));
|
|
106
|
+
},
|
|
107
|
+
children: /* @__PURE__ */ r(m, { size: 16 })
|
|
108
|
+
}
|
|
109
|
+
) })
|
|
110
|
+
});
|
|
13
111
|
export {
|
|
14
|
-
|
|
112
|
+
N as DatePickerCalendar
|
|
15
113
|
};
|
|
16
114
|
//# sourceMappingURL=fondue-components117.js.map
|