@namuna-nur/ui-kit 1.4.1 → 1.4.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/lib/shared/Avatar.tokens.js +895 -893
- package/lib/shared/FloorItem.tokens.js +3714 -14666
- package/lib/shared/twMerge.js +27 -22
- package/lib/src/atoms/Select/Select.d.ts +1 -1
- package/lib/src/molecules/DateOfBirth/DateOfBirth.stories.d.ts +3 -5
- package/lib/src/molecules/DateOfBirth/DateOfBirth.types.d.ts +4 -3
- package/lib/src/molecules/DateOfBirth/DateOfBirth.utils.d.ts +5 -0
- package/lib/src/molecules/SelectGroup/SelectGroup.d.ts +1 -1
- package/package.json +1 -1
package/lib/shared/twMerge.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { typographyTokens as K, colorTokens as Ee } from "../tokens/index.js";
|
|
2
|
-
const ke = 6048e5, Ne = 864e5, ue = Symbol.for("constructDateFrom");
|
|
2
|
+
const ke = 6048e5, Ne = 864e5, kr = 6e4, Mr = 36e5, ue = Symbol.for("constructDateFrom");
|
|
3
3
|
function T(e, t) {
|
|
4
4
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && ue in e ? e[ue](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
5
5
|
}
|
|
@@ -69,11 +69,11 @@ function Re(e) {
|
|
|
69
69
|
function qe(e) {
|
|
70
70
|
return !(!Re(e) && typeof e != "number" || isNaN(+M(e)));
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ie(e, t) {
|
|
73
73
|
const r = M(e, t == null ? void 0 : t.in);
|
|
74
74
|
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const je = {
|
|
77
77
|
lessThanXSeconds: {
|
|
78
78
|
one: "less than a second",
|
|
79
79
|
other: "less than {{count}} seconds"
|
|
@@ -137,7 +137,7 @@ const Ie = {
|
|
|
137
137
|
}
|
|
138
138
|
}, Le = (e, t, r) => {
|
|
139
139
|
let n;
|
|
140
|
-
const o =
|
|
140
|
+
const o = je[e];
|
|
141
141
|
return typeof o == "string" ? n = o : t === 1 ? n = o.one : n = o.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
142
142
|
};
|
|
143
143
|
function Z(e) {
|
|
@@ -506,7 +506,7 @@ const st = /^(\d+)(th|st|nd|rd)?/i, it = /\d+/i, ct = {
|
|
|
506
506
|
};
|
|
507
507
|
function xt(e, t) {
|
|
508
508
|
const r = M(e, t == null ? void 0 : t.in);
|
|
509
|
-
return Ae(r,
|
|
509
|
+
return Ae(r, Ie(r)) + 1;
|
|
510
510
|
}
|
|
511
511
|
function vt(e, t) {
|
|
512
512
|
const r = M(e, t == null ? void 0 : t.in), n = +X(r) - +Ge(r);
|
|
@@ -1157,7 +1157,7 @@ function Et(e, t, r) {
|
|
|
1157
1157
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1158
1158
|
}
|
|
1159
1159
|
const Nt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, zt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ft = /^'([^]*?)'?$/, At = /''/g, Gt = /[a-zA-Z]/;
|
|
1160
|
-
function
|
|
1160
|
+
function Pr(e, t, r) {
|
|
1161
1161
|
var f, y, w, v;
|
|
1162
1162
|
const n = B(), o = n.locale ?? wt, a = n.firstWeekContainsDate ?? ((y = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : y.firstWeekContainsDate) ?? 1, i = n.weekStartsOn ?? ((v = (w = n.locale) == null ? void 0 : w.options) == null ? void 0 : v.weekStartsOn) ?? 0, s = M(e, r == null ? void 0 : r.in);
|
|
1163
1163
|
if (!qe(s))
|
|
@@ -1214,7 +1214,7 @@ function qt() {
|
|
|
1214
1214
|
for (var e, t, r = 0, n = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (t = Oe(e)) && (n && (n += " "), n += t);
|
|
1215
1215
|
return n;
|
|
1216
1216
|
}
|
|
1217
|
-
const ne = "-",
|
|
1217
|
+
const ne = "-", It = (e) => {
|
|
1218
1218
|
const t = Lt(e), {
|
|
1219
1219
|
conflictingClassGroups: r,
|
|
1220
1220
|
conflictingClassGroupModifiers: n
|
|
@@ -1222,7 +1222,7 @@ const ne = "-", jt = (e) => {
|
|
|
1222
1222
|
return {
|
|
1223
1223
|
getClassGroupId: (i) => {
|
|
1224
1224
|
const s = i.split(ne);
|
|
1225
|
-
return s[0] === "" && s.length !== 1 && s.shift(), Ce(s, t) ||
|
|
1225
|
+
return s[0] === "" && s.length !== 1 && s.shift(), Ce(s, t) || jt(i);
|
|
1226
1226
|
},
|
|
1227
1227
|
getConflictingClassGroupIds: (i, s) => {
|
|
1228
1228
|
const l = r[i] || [];
|
|
@@ -1242,7 +1242,7 @@ const ne = "-", jt = (e) => {
|
|
|
1242
1242
|
return (i = t.validators.find(({
|
|
1243
1243
|
validator: s
|
|
1244
1244
|
}) => s(a))) == null ? void 0 : i.classGroupId;
|
|
1245
|
-
}, ye = /^\[(.+)\]$/,
|
|
1245
|
+
}, ye = /^\[(.+)\]$/, jt = (e) => {
|
|
1246
1246
|
if (ye.test(e)) {
|
|
1247
1247
|
const t = ye.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
1248
1248
|
if (r)
|
|
@@ -1360,7 +1360,7 @@ const ne = "-", jt = (e) => {
|
|
|
1360
1360
|
}, Vt = (e) => ({
|
|
1361
1361
|
cache: Qt(e.cacheSize),
|
|
1362
1362
|
parseClassName: Xt(e),
|
|
1363
|
-
...
|
|
1363
|
+
...It(e)
|
|
1364
1364
|
}), $t = /\s+/, Jt = (e, t) => {
|
|
1365
1365
|
const {
|
|
1366
1366
|
parseClassName: r,
|
|
@@ -1434,7 +1434,7 @@ function xe(e, ...t) {
|
|
|
1434
1434
|
const g = (e) => {
|
|
1435
1435
|
const t = (r) => r[e] || [];
|
|
1436
1436
|
return t.isThemeGetter = !0, t;
|
|
1437
|
-
}, De = /^\[(?:([a-z-]+):)?(.+)\]$/i, Kt = /^\d+\/\d+$/, Zt = /* @__PURE__ */ new Set(["px", "full", "screen"]), er = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, nr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, or = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, S = (e) => N(e) || Zt.has(e) || Kt.test(e), C = (e) => z(e, "length", fr), N = (e) => !!e && !Number.isNaN(Number(e)), ee = (e) => z(e, "number", N), q = (e) => !!e && Number.isInteger(Number(e)), ar = (e) => e.endsWith("%") && N(e.slice(0, -1)), c = (e) => De.test(e), W = (e) => er.test(e), sr = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ir = (e) => z(e, sr, Ye), cr = (e) => z(e, "position", Ye), lr = /* @__PURE__ */ new Set(["image", "url"]), dr = (e) => z(e, lr, hr), ur = (e) => z(e, "", mr),
|
|
1437
|
+
}, De = /^\[(?:([a-z-]+):)?(.+)\]$/i, Kt = /^\d+\/\d+$/, Zt = /* @__PURE__ */ new Set(["px", "full", "screen"]), er = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rr = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, nr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, or = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, S = (e) => N(e) || Zt.has(e) || Kt.test(e), C = (e) => z(e, "length", fr), N = (e) => !!e && !Number.isNaN(Number(e)), ee = (e) => z(e, "number", N), q = (e) => !!e && Number.isInteger(Number(e)), ar = (e) => e.endsWith("%") && N(e.slice(0, -1)), c = (e) => De.test(e), W = (e) => er.test(e), sr = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ir = (e) => z(e, sr, Ye), cr = (e) => z(e, "position", Ye), lr = /* @__PURE__ */ new Set(["image", "url"]), dr = (e) => z(e, lr, hr), ur = (e) => z(e, "", mr), I = () => !0, z = (e, t, r) => {
|
|
1438
1438
|
const n = De.exec(e);
|
|
1439
1439
|
return n ? n[1] ? typeof t == "string" ? n[1] === t : t.has(n[1]) : r(n[2]) : !1;
|
|
1440
1440
|
}, fr = (e) => (
|
|
@@ -1448,7 +1448,7 @@ const g = (e) => {
|
|
|
1448
1448
|
cacheSize: 500,
|
|
1449
1449
|
separator: ":",
|
|
1450
1450
|
theme: {
|
|
1451
|
-
colors: [
|
|
1451
|
+
colors: [I],
|
|
1452
1452
|
spacing: [S, C],
|
|
1453
1453
|
blur: ["none", "", W, c],
|
|
1454
1454
|
brightness: P(),
|
|
@@ -1745,7 +1745,7 @@ const g = (e) => {
|
|
|
1745
1745
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1746
1746
|
*/
|
|
1747
1747
|
"grid-cols": [{
|
|
1748
|
-
"grid-cols": [
|
|
1748
|
+
"grid-cols": [I]
|
|
1749
1749
|
}],
|
|
1750
1750
|
/**
|
|
1751
1751
|
* Grid Column Start / End
|
|
@@ -1775,7 +1775,7 @@ const g = (e) => {
|
|
|
1775
1775
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1776
1776
|
*/
|
|
1777
1777
|
"grid-rows": [{
|
|
1778
|
-
"grid-rows": [
|
|
1778
|
+
"grid-rows": [I]
|
|
1779
1779
|
}],
|
|
1780
1780
|
/**
|
|
1781
1781
|
* Grid Row Start / End
|
|
@@ -2138,7 +2138,7 @@ const g = (e) => {
|
|
|
2138
2138
|
* @see https://tailwindcss.com/docs/font-family
|
|
2139
2139
|
*/
|
|
2140
2140
|
"font-family": [{
|
|
2141
|
-
font: [
|
|
2141
|
+
font: [I]
|
|
2142
2142
|
}],
|
|
2143
2143
|
/**
|
|
2144
2144
|
* Font Variant Numeric
|
|
@@ -2823,7 +2823,7 @@ const g = (e) => {
|
|
|
2823
2823
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
2824
2824
|
*/
|
|
2825
2825
|
"shadow-color": [{
|
|
2826
|
-
shadow: [
|
|
2826
|
+
shadow: [I]
|
|
2827
2827
|
}],
|
|
2828
2828
|
/**
|
|
2829
2829
|
* Opacity
|
|
@@ -3479,18 +3479,18 @@ const g = (e) => {
|
|
|
3479
3479
|
extend: a = {},
|
|
3480
3480
|
override: i = {}
|
|
3481
3481
|
}) => {
|
|
3482
|
-
|
|
3482
|
+
j(e, "cacheSize", t), j(e, "prefix", r), j(e, "separator", n), j(e, "experimentalParseClassName", o);
|
|
3483
3483
|
for (const s in i)
|
|
3484
3484
|
br(e[s], i[s]);
|
|
3485
3485
|
for (const s in a)
|
|
3486
3486
|
pr(e[s], a[s]);
|
|
3487
3487
|
return e;
|
|
3488
|
-
},
|
|
3488
|
+
}, j = (e, t, r) => {
|
|
3489
3489
|
r !== void 0 && (e[t] = r);
|
|
3490
3490
|
}, br = (e, t) => {
|
|
3491
3491
|
if (t)
|
|
3492
3492
|
for (const r in t)
|
|
3493
|
-
|
|
3493
|
+
j(e, r, t[r]);
|
|
3494
3494
|
}, pr = (e, t) => {
|
|
3495
3495
|
if (t)
|
|
3496
3496
|
for (const r in t) {
|
|
@@ -3526,10 +3526,15 @@ const g = (e) => {
|
|
|
3526
3526
|
"text-color": [wr(Ee)]
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
3529
|
-
}),
|
|
3529
|
+
}), Sr = (...e) => xr(qt(e));
|
|
3530
3530
|
export {
|
|
3531
|
-
|
|
3531
|
+
Sr as a,
|
|
3532
3532
|
qt as b,
|
|
3533
3533
|
te as c,
|
|
3534
|
-
|
|
3534
|
+
T as d,
|
|
3535
|
+
kr as e,
|
|
3536
|
+
Pr as f,
|
|
3537
|
+
qe as i,
|
|
3538
|
+
Mr as m,
|
|
3539
|
+
M as t
|
|
3535
3540
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SelectProps } from '..';
|
|
2
|
-
export declare const Select:
|
|
2
|
+
export declare const Select: ({ classNames, disabled, message, onChange, options, placeholder, value, isDotable, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react';
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
2
2
|
import { DateOfBirth } from './DateOfBirth';
|
|
3
|
-
import { DateOfBirthStory } from '..';
|
|
3
|
+
import { DateOfBirthStory, DateOfBirthProps } from '..';
|
|
4
4
|
declare const meta: Meta<typeof DateOfBirth>;
|
|
5
|
-
export declare const Template:
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Template: StoryFn<DateOfBirthProps>;
|
|
8
6
|
export declare const Default: DateOfBirthStory;
|
|
9
7
|
export declare const Disabled: DateOfBirthStory;
|
|
10
8
|
export default meta;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
3
2
|
import { DateOfBirth } from '..';
|
|
4
3
|
export type DateOfBirthStory = StoryObj<typeof DateOfBirth>;
|
|
5
4
|
export type DateOfBirthProps = {
|
|
6
|
-
value
|
|
7
|
-
setValue:
|
|
5
|
+
value: string | undefined;
|
|
6
|
+
setValue: (val: string | undefined) => void;
|
|
8
7
|
disabled?: boolean;
|
|
9
8
|
label?: string;
|
|
10
9
|
classNames?: {
|
|
11
10
|
label?: string;
|
|
11
|
+
selectTrigger?: string;
|
|
12
|
+
selectSelected?: string;
|
|
12
13
|
};
|
|
13
14
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SelectGroupProps } from '..';
|
|
2
|
-
export declare const SelectGroup:
|
|
2
|
+
export declare const SelectGroup: ({ classNames, label, selectProps, ...props }: SelectGroupProps) => import("react/jsx-runtime").JSX.Element;
|