@wrdagency/blockout 0.1.2 → 0.1.3
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/Circle.es-B6Ug9Tpf.js +30 -0
- package/dist/IconBase.es-rM5tt24D.js +48 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/components/controls/base-control/index.js +33 -23
- package/dist/components/controls/choice-control/choice.js +65 -31
- package/dist/components/controls/password-control/index.js +1 -1
- package/dist/components/controls/recurrence-control/index.js +70 -94
- package/dist/components/controls/select-control/component.js +491 -483
- package/dist/components/filesystem/icon.js +120 -163
- package/dist/components/menu/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,45 +1,21 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
2
|
-
import { useObjectState as
|
|
3
|
-
import { Weekday as
|
|
1
|
+
import { jsxs as m, jsx as t, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useObjectState as w } from "../../../hooks/state.js";
|
|
3
|
+
import { Weekday as p, Frequency as s, createRRule as C } from "../../../types/date.js";
|
|
4
4
|
import { getOrdinalSuffix as d } from "../../../utils/date.js";
|
|
5
|
-
import { noop as
|
|
5
|
+
import { noop as M } from "../../../utils/noop.js";
|
|
6
6
|
import * as e from "react";
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import { w as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useMemo as E } from "react";
|
|
8
|
+
import { w as g } from "../../../SSRBase.es-BUXS72ra.js";
|
|
9
|
+
import { t as k } from "../../../Circle.es-B6Ug9Tpf.js";
|
|
10
|
+
import { useBaseControlProps as q } from "../base-control/props.js";
|
|
11
|
+
import { BasePopoverControl as S } from "../base-popover-control/index.js";
|
|
11
12
|
import { NumberControl as h } from "../number-control/index.js";
|
|
12
|
-
import '../../../assets/style.css';import '../../../assets/
|
|
13
|
-
import { SelectControl as
|
|
14
|
-
import { f as
|
|
15
|
-
import { ToggleGroupControl as
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
"bold",
|
|
19
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z" }))
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
"duotone",
|
|
23
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z" }))
|
|
24
|
-
],
|
|
25
|
-
[
|
|
26
|
-
"fill",
|
|
27
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z" }))
|
|
28
|
-
],
|
|
29
|
-
[
|
|
30
|
-
"light",
|
|
31
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z" }))
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
"regular",
|
|
35
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z" }))
|
|
36
|
-
],
|
|
37
|
-
[
|
|
38
|
-
"thin",
|
|
39
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z" }))
|
|
40
|
-
]
|
|
41
|
-
]), Z = e.forwardRef((o, n) => /* @__PURE__ */ e.createElement(A, { ref: n, ...o, weights: P }));
|
|
42
|
-
Z.displayName = "CircleIcon";
|
|
13
|
+
import '../../../assets/style.css';import '../../../assets/index16.css';/* empty css */
|
|
14
|
+
import { SelectControl as y } from "../select-control/component.js";
|
|
15
|
+
import { f as B, w as F, a as x } from "../../../options-Cfoqhxw2.js";
|
|
16
|
+
import { ToggleGroupControl as P } from "../toggle-group-control/index.js";
|
|
17
|
+
const A = e.forwardRef((l, a) => /* @__PURE__ */ e.createElement(g, { ref: a, ...l, weights: k }));
|
|
18
|
+
A.displayName = "CircleIcon";
|
|
43
19
|
const _ = /* @__PURE__ */ new Map([
|
|
44
20
|
[
|
|
45
21
|
"bold",
|
|
@@ -65,81 +41,81 @@ const _ = /* @__PURE__ */ new Map([
|
|
|
65
41
|
"thin",
|
|
66
42
|
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm0-144a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,96a44,44,0,1,1,44-44A44.05,44.05,0,0,1,128,172Z" }))
|
|
67
43
|
]
|
|
68
|
-
]),
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
const { baseProps:
|
|
44
|
+
]), Z = e.forwardRef((l, a) => /* @__PURE__ */ e.createElement(g, { ref: a, ...l, weights: _ }));
|
|
45
|
+
Z.displayName = "RadioButtonIcon";
|
|
46
|
+
const K = (l) => {
|
|
47
|
+
const { baseProps: a, controlProps: i } = q(l, {
|
|
72
48
|
className: "component-recurrence-control"
|
|
73
|
-
}), { onChangeValue: c =
|
|
49
|
+
}), { onChangeValue: c = M, ...u } = i, [r, o] = w({
|
|
74
50
|
interval: 1,
|
|
75
|
-
frequency:
|
|
51
|
+
frequency: s.Weekly,
|
|
76
52
|
frequencySubtype: "byweekday",
|
|
77
|
-
weeklyByWeekday: [
|
|
53
|
+
weeklyByWeekday: [p.Monday],
|
|
78
54
|
monthlyByMonthDay: 1,
|
|
79
55
|
monthlySetPos: "first",
|
|
80
|
-
monthlyByWeekday:
|
|
81
|
-
}),
|
|
56
|
+
monthlyByWeekday: p.Monday
|
|
57
|
+
}), b = E(() => C(r).toText(), [r]);
|
|
82
58
|
return /* @__PURE__ */ m(
|
|
83
|
-
|
|
59
|
+
S,
|
|
84
60
|
{
|
|
85
|
-
...
|
|
86
|
-
placeholder:
|
|
87
|
-
inputProps:
|
|
61
|
+
...a,
|
|
62
|
+
placeholder: b,
|
|
63
|
+
inputProps: u,
|
|
88
64
|
children: [
|
|
89
65
|
/* @__PURE__ */ m("div", { className: "component-recurrence-control__row", children: [
|
|
90
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ t(
|
|
91
67
|
h,
|
|
92
68
|
{
|
|
93
|
-
value:
|
|
94
|
-
onChangeValue: (
|
|
95
|
-
suffix: d(
|
|
69
|
+
value: r.interval,
|
|
70
|
+
onChangeValue: (n) => o({ interval: n || 1 }),
|
|
71
|
+
suffix: d(r.interval),
|
|
96
72
|
min: 1,
|
|
97
73
|
"aria-label": "Recurrence frequency"
|
|
98
74
|
}
|
|
99
75
|
),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
76
|
+
/* @__PURE__ */ t(
|
|
77
|
+
y,
|
|
102
78
|
{
|
|
103
79
|
"aria-label": "Recurrence period",
|
|
104
|
-
value:
|
|
105
|
-
onChangeValue: (
|
|
106
|
-
options:
|
|
80
|
+
value: r.frequency,
|
|
81
|
+
onChangeValue: (n) => o({ frequency: n }),
|
|
82
|
+
options: B
|
|
107
83
|
}
|
|
108
84
|
)
|
|
109
85
|
] }),
|
|
110
|
-
|
|
111
|
-
|
|
86
|
+
r.frequency === s.Weekly && /* @__PURE__ */ t("div", { style: { marginTop: "1rem" }, children: /* @__PURE__ */ t(
|
|
87
|
+
P,
|
|
112
88
|
{
|
|
113
|
-
value:
|
|
114
|
-
onChangeValue: (
|
|
89
|
+
value: r.weeklyByWeekday,
|
|
90
|
+
onChangeValue: (n) => o({ weeklyByWeekday: n }),
|
|
115
91
|
label: "On every",
|
|
116
|
-
options:
|
|
92
|
+
options: F,
|
|
117
93
|
multiple: !0
|
|
118
94
|
}
|
|
119
95
|
) }),
|
|
120
|
-
|
|
121
|
-
/* @__PURE__ */
|
|
96
|
+
r.frequency === s.Monthly && /* @__PURE__ */ m(v, { children: [
|
|
97
|
+
/* @__PURE__ */ t(
|
|
122
98
|
f,
|
|
123
99
|
{
|
|
124
100
|
type: "bymonthday",
|
|
125
|
-
parsed:
|
|
126
|
-
setParsed:
|
|
127
|
-
children: /* @__PURE__ */
|
|
101
|
+
parsed: r,
|
|
102
|
+
setParsed: o,
|
|
103
|
+
children: /* @__PURE__ */ t(
|
|
128
104
|
h,
|
|
129
105
|
{
|
|
130
106
|
prefix: "On the",
|
|
131
|
-
suffix: d(
|
|
132
|
-
value:
|
|
133
|
-
onChangeValue: (
|
|
107
|
+
suffix: d(r.monthlyByMonthDay) + " of the month",
|
|
108
|
+
value: r.monthlyByMonthDay,
|
|
109
|
+
onChangeValue: (n) => o({ monthlyByMonthDay: n || 1 }),
|
|
134
110
|
min: 1,
|
|
135
111
|
max: 31
|
|
136
112
|
}
|
|
137
113
|
)
|
|
138
114
|
}
|
|
139
115
|
),
|
|
140
|
-
/* @__PURE__ */ m(f, { type: "byweekday", parsed:
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
116
|
+
/* @__PURE__ */ m(f, { type: "byweekday", parsed: r, setParsed: o, children: [
|
|
117
|
+
/* @__PURE__ */ t(
|
|
118
|
+
y,
|
|
143
119
|
{
|
|
144
120
|
prefix: "On the",
|
|
145
121
|
options: [
|
|
@@ -164,16 +140,16 @@ const J = (o) => {
|
|
|
164
140
|
label: "Last"
|
|
165
141
|
}
|
|
166
142
|
],
|
|
167
|
-
value:
|
|
168
|
-
onChangeValue: (
|
|
143
|
+
value: r.monthlySetPos,
|
|
144
|
+
onChangeValue: (n) => o({ monthlySetPos: n })
|
|
169
145
|
}
|
|
170
146
|
),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
|
|
147
|
+
/* @__PURE__ */ t(
|
|
148
|
+
y,
|
|
173
149
|
{
|
|
174
|
-
options:
|
|
175
|
-
value:
|
|
176
|
-
onChangeValue: (
|
|
150
|
+
options: x,
|
|
151
|
+
value: r.monthlyByWeekday,
|
|
152
|
+
onChangeValue: (n) => o({ monthlyByWeekday: n })
|
|
177
153
|
}
|
|
178
154
|
)
|
|
179
155
|
] })
|
|
@@ -181,28 +157,28 @@ const J = (o) => {
|
|
|
181
157
|
]
|
|
182
158
|
}
|
|
183
159
|
);
|
|
184
|
-
}, f = (
|
|
185
|
-
const { type:
|
|
160
|
+
}, f = (l) => {
|
|
161
|
+
const { type: a, children: i, parsed: c, setParsed: u } = l;
|
|
186
162
|
return /* @__PURE__ */ m("div", { className: "component-recurrence-control__frequency_type", children: [
|
|
187
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ t(
|
|
188
164
|
"button",
|
|
189
165
|
{
|
|
190
166
|
className: "component-recurrence-control__radio",
|
|
191
|
-
"aria-pressed": c.frequencySubtype ===
|
|
192
|
-
onClick: () =>
|
|
193
|
-
children: c.frequencySubtype ===
|
|
167
|
+
"aria-pressed": c.frequencySubtype === a,
|
|
168
|
+
onClick: () => u({ frequencySubtype: a }),
|
|
169
|
+
children: c.frequencySubtype === a ? /* @__PURE__ */ t(Z, { weight: "fill" }) : /* @__PURE__ */ t(A, {})
|
|
194
170
|
}
|
|
195
171
|
),
|
|
196
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ t(
|
|
197
173
|
"fieldset",
|
|
198
174
|
{
|
|
199
175
|
className: "component-recurrence-control__row",
|
|
200
|
-
disabled: c.frequencySubtype !==
|
|
201
|
-
children:
|
|
176
|
+
disabled: c.frequencySubtype !== a,
|
|
177
|
+
children: i
|
|
202
178
|
}
|
|
203
179
|
)
|
|
204
180
|
] });
|
|
205
181
|
};
|
|
206
182
|
export {
|
|
207
|
-
|
|
183
|
+
K as RecurrenceControl
|
|
208
184
|
};
|