@taqwim/solid 0.1.0-beta.4 → 0.1.0-beta.5
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/index.js +16 -7
- package/dist/source/HijriCalendar.jsx +6 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ function b(e) {
|
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/HijriCalendar.tsx
|
|
29
|
-
var x = /*#__PURE__*/ i("<div><div style=position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0><div role=heading aria-level=2>"), S = /*#__PURE__*/ i("<div role=group data-taqwim-calendar-header>"), C = /*#__PURE__*/ i("<div data-taqwim-calendar-heading>"), w = /*#__PURE__*/ i("<button>"), T = /*#__PURE__*/ i("<div tabindex=-1>"), E = /*#__PURE__*/ i("<div aria-hidden=true data-taqwim-calendar-grid-head>"), D = /*#__PURE__*/ i("<div data-taqwim-calendar-grid-body>"), O = /*#__PURE__*/ i("<div role=row data-taqwim-calendar-grid-row>"), k = /*#__PURE__*/ i("<div data-taqwim-calendar-head-cell>"), A = /*#__PURE__*/ i("<div role=gridcell
|
|
29
|
+
var x = /*#__PURE__*/ i("<div><div style=position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0><div role=heading aria-level=2>"), S = /*#__PURE__*/ i("<div role=group data-taqwim-calendar-header>"), C = /*#__PURE__*/ i("<div data-taqwim-calendar-heading>"), w = /*#__PURE__*/ i("<button>"), T = /*#__PURE__*/ i("<div tabindex=-1>"), E = /*#__PURE__*/ i("<div aria-hidden=true data-taqwim-calendar-grid-head>"), D = /*#__PURE__*/ i("<div data-taqwim-calendar-grid-body>"), O = /*#__PURE__*/ i("<div role=row data-taqwim-calendar-grid-row>"), k = /*#__PURE__*/ i("<div data-taqwim-calendar-head-cell>"), A = /*#__PURE__*/ i("<div role=gridcell>");
|
|
30
30
|
function j(e, t) {
|
|
31
31
|
return typeof e == "function" ? c(() => e(t()))() : e;
|
|
32
32
|
}
|
|
@@ -153,23 +153,32 @@ function V(e) {
|
|
|
153
153
|
})();
|
|
154
154
|
}
|
|
155
155
|
function H(e) {
|
|
156
|
-
let
|
|
156
|
+
let { store: i, state: a } = v(), [o, s] = h(e, ["day", "children"]), c = () => (a(), i.getCellProps(o.day));
|
|
157
157
|
return (() => {
|
|
158
158
|
var e = A();
|
|
159
159
|
return r(e, n({
|
|
160
160
|
get "aria-selected"() {
|
|
161
|
-
return
|
|
161
|
+
return o.day.isSelected || void 0;
|
|
162
162
|
},
|
|
163
163
|
get "aria-disabled"() {
|
|
164
|
-
return
|
|
164
|
+
return o.day.isDisabled || o.day.isUnavailable || void 0;
|
|
165
|
+
},
|
|
166
|
+
get "data-taqwim-calendar-cell"() {
|
|
167
|
+
return c()["data-taqwim-calendar-cell"];
|
|
168
|
+
},
|
|
169
|
+
get "data-tooltip"() {
|
|
170
|
+
return c()["data-tooltip"];
|
|
171
|
+
},
|
|
172
|
+
get title() {
|
|
173
|
+
return c()["data-tooltip"];
|
|
165
174
|
},
|
|
166
175
|
get "data-disabled"() {
|
|
167
|
-
return
|
|
176
|
+
return o.day.isDisabled ? "" : void 0;
|
|
168
177
|
},
|
|
169
178
|
get "data-outside-month"() {
|
|
170
|
-
return
|
|
179
|
+
return o.day.isOutsideMonth ? "" : void 0;
|
|
171
180
|
}
|
|
172
|
-
},
|
|
181
|
+
}, s), !1, !0), t(e, () => o.children), e;
|
|
173
182
|
})();
|
|
174
183
|
}
|
|
175
184
|
function U(e) {
|
|
@@ -197,8 +197,13 @@ export function HijriCalendarHeadCell(props) {
|
|
|
197
197
|
</div>);
|
|
198
198
|
}
|
|
199
199
|
export function HijriCalendarCell(props) {
|
|
200
|
+
const { store, state } = useHijriCalendarContext();
|
|
200
201
|
const [local, rest] = splitProps(props, ['day', 'children']);
|
|
201
|
-
|
|
202
|
+
const cellProps = () => {
|
|
203
|
+
void state();
|
|
204
|
+
return store.getCellProps(local.day);
|
|
205
|
+
};
|
|
206
|
+
return (<div role="gridcell" aria-selected={local.day.isSelected || undefined} aria-disabled={local.day.isDisabled || local.day.isUnavailable || undefined} data-taqwim-calendar-cell={cellProps()['data-taqwim-calendar-cell']} data-tooltip={cellProps()['data-tooltip']} title={cellProps()['data-tooltip']} data-disabled={local.day.isDisabled ? '' : undefined} data-outside-month={local.day.isOutsideMonth ? '' : undefined} {...rest}>
|
|
202
207
|
{local.children}
|
|
203
208
|
</div>);
|
|
204
209
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taqwim/solid",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Headless Solid components for Hijri calendars, built on @taqwim/calendar-core",
|
|
6
6
|
"keywords": [
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@taqwim/calendar-core": "0.1.0-beta.
|
|
50
|
-
"@taqwim/core": "0.1.0-beta.
|
|
49
|
+
"@taqwim/calendar-core": "0.1.0-beta.5",
|
|
50
|
+
"@taqwim/core": "0.1.0-beta.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@arethetypeswrong/cli": "^0.18.2",
|