@dododog/ui 0.15.0 → 0.17.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/dist/{chunk-L7OYR6U3.js → chunk-2NMA3AXV.js} +37 -8
- package/dist/{chunk-ZZ4EWC53.mjs → chunk-52M2KUC4.mjs} +37 -8
- package/dist/{chunk-BKM5VCUS.mjs → chunk-CPBDDGRX.mjs} +4 -1
- package/dist/{chunk-FLKEMER2.js → chunk-DJTFRMRY.js} +4 -1
- package/dist/chunk-DUCRCDLI.mjs +78 -0
- package/dist/{chunk-HH4X2JYO.js → chunk-EKOGDJUT.js} +32 -4
- package/dist/{chunk-NHB2TI2B.js → chunk-FHAWYXPX.js} +1 -1
- package/dist/{chunk-5UNG2O64.js → chunk-FR46MMNP.js} +7 -1
- package/dist/{chunk-EEIPCJQ2.mjs → chunk-KWQKC5TG.mjs} +1 -1
- package/dist/{chunk-IJIUUBFT.js → chunk-OUN5BU4Z.js} +1 -1
- package/dist/{chunk-QWDKSY6Y.js → chunk-OZ4RJDDZ.js} +46 -2
- package/dist/{chunk-762LQMWP.js → chunk-RAXPJ7VC.js} +66 -8
- package/dist/{chunk-F2BUMJYW.mjs → chunk-RBVTV3LA.mjs} +1 -1
- package/dist/{chunk-B47HQHX3.mjs → chunk-RGZHSI2G.mjs} +1 -1
- package/dist/{chunk-GXKON34B.js → chunk-RTI25IBR.js} +1 -1
- package/dist/{chunk-LJSMPON7.js → chunk-USJDHMKS.js} +1 -1
- package/dist/{chunk-N5ZNXNCO.mjs → chunk-UYOPZZBN.mjs} +32 -4
- package/dist/{chunk-EAATIFYL.mjs → chunk-WNBZXXFA.mjs} +1 -1
- package/dist/{chunk-JWOV5H6G.mjs → chunk-X53C3IQC.mjs} +7 -1
- package/dist/chunk-YGAWCP65.mjs +109 -0
- package/dist/components/Autocomplete/index.js +3 -3
- package/dist/components/Autocomplete/index.mjs +1 -1
- package/dist/components/Checkbox/index.js +2 -2
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/DateRangePicker/index.js +3 -3
- package/dist/components/DateRangePicker/index.mjs +1 -1
- package/dist/components/Input/index.js +3 -3
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Modal/index.d.mts +42 -1
- package/dist/components/Modal/index.d.ts +42 -1
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/RadioGroup/index.js +2 -2
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/SegmentedControl/index.d.mts +16 -0
- package/dist/components/SegmentedControl/index.d.ts +16 -0
- package/dist/components/SegmentedControl/index.js +2 -2
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/Tabs/index.d.mts +21 -0
- package/dist/components/Tabs/index.d.ts +21 -0
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Tabs/index.mjs +1 -1
- package/dist/components/Textarea/index.js +3 -3
- package/dist/components/Textarea/index.mjs +1 -1
- package/dist/index.d.mts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +95 -93
- package/dist/index.mjs +23 -21
- package/package.json +11 -11
- package/dist/chunk-36Y7UU32.mjs +0 -34
- package/dist/chunk-VOZPGXQD.mjs +0 -51
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dododog/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "React UI component library for ToutouTrip — pet-friendly travel platform",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -417,19 +417,25 @@
|
|
|
417
417
|
"main": "./dist/index.js",
|
|
418
418
|
"module": "./dist/index.mjs",
|
|
419
419
|
"types": "./dist/index.d.ts",
|
|
420
|
+
"scripts": {
|
|
421
|
+
"build": "NODE_OPTIONS='--max-old-space-size=8192' tsup",
|
|
422
|
+
"dev": "tsup --watch",
|
|
423
|
+
"lint": "eslint . --max-warnings 0",
|
|
424
|
+
"clean": "rm -rf .turbo node_modules dist"
|
|
425
|
+
},
|
|
420
426
|
"peerDependencies": {
|
|
421
427
|
"react": ">=18",
|
|
422
428
|
"tailwindcss": ">=3"
|
|
423
429
|
},
|
|
424
430
|
"devDependencies": {
|
|
431
|
+
"@toutoutrip/eslint-config": "workspace:*",
|
|
432
|
+
"@toutoutrip/typescript-config": "workspace:*",
|
|
425
433
|
"@types/react": "^18.2.61",
|
|
426
434
|
"@types/react-dom": "^18.2.19",
|
|
427
435
|
"eslint": "^8.57.0",
|
|
428
436
|
"react": "^18.2.0",
|
|
429
437
|
"tsup": "^8.0.2",
|
|
430
|
-
"typescript": "5.5.4"
|
|
431
|
-
"@toutoutrip/eslint-config": "0.0.0",
|
|
432
|
-
"@toutoutrip/typescript-config": "0.0.0"
|
|
438
|
+
"typescript": "5.5.4"
|
|
433
439
|
},
|
|
434
440
|
"publishConfig": {
|
|
435
441
|
"access": "public"
|
|
@@ -439,11 +445,5 @@
|
|
|
439
445
|
"class-variance-authority": "^0.7.1",
|
|
440
446
|
"clsx": "^2.1.1",
|
|
441
447
|
"tailwind-merge": "^2.6.1"
|
|
442
|
-
},
|
|
443
|
-
"scripts": {
|
|
444
|
-
"build": "NODE_OPTIONS='--max-old-space-size=8192' tsup",
|
|
445
|
-
"dev": "tsup --watch",
|
|
446
|
-
"lint": "eslint . --max-warnings 0",
|
|
447
|
-
"clean": "rm -rf .turbo node_modules dist"
|
|
448
448
|
}
|
|
449
|
-
}
|
|
449
|
+
}
|
package/dist/chunk-36Y7UU32.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-IMKLN273.mjs';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var SegmentedControl = React.forwardRef(
|
|
6
|
-
({ options, value, onChange, className }, ref) => {
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
-
"div",
|
|
9
|
-
{
|
|
10
|
-
ref,
|
|
11
|
-
className: cn("flex gap-1 bg-gray-100 rounded-full p-1", className),
|
|
12
|
-
role: "radiogroup",
|
|
13
|
-
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
14
|
-
"button",
|
|
15
|
-
{
|
|
16
|
-
type: "button",
|
|
17
|
-
role: "radio",
|
|
18
|
-
"aria-checked": value === option.value,
|
|
19
|
-
onClick: () => onChange(option.value),
|
|
20
|
-
className: cn(
|
|
21
|
-
"px-3 py-1.5 text-sm rounded-full transition-all",
|
|
22
|
-
value === option.value ? "bg-white text-gray-900 shadow-sm font-medium" : "text-gray-600 hover:text-gray-900"
|
|
23
|
-
),
|
|
24
|
-
children: option.label
|
|
25
|
-
},
|
|
26
|
-
option.value
|
|
27
|
-
))
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
SegmentedControl.displayName = "SegmentedControl";
|
|
33
|
-
|
|
34
|
-
export { SegmentedControl };
|
package/dist/chunk-VOZPGXQD.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-IMKLN273.mjs';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var Tabs = React.forwardRef(
|
|
6
|
-
({ tabs, defaultTab, value, onChange, className }, ref) => {
|
|
7
|
-
const [internalValue, setInternalValue] = React.useState(
|
|
8
|
-
defaultTab || tabs[0]?.key || ""
|
|
9
|
-
);
|
|
10
|
-
const activeKey = value ?? internalValue;
|
|
11
|
-
const handleChange = (key) => {
|
|
12
|
-
if (onChange) {
|
|
13
|
-
onChange(key);
|
|
14
|
-
} else {
|
|
15
|
-
setInternalValue(key);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const activeTab = tabs.find((t) => t.key === activeKey);
|
|
19
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: cn("w-full", className), children: [
|
|
20
|
-
/* @__PURE__ */ jsx(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
role: "tablist",
|
|
24
|
-
className: "flex border-b border-gray-200 gap-1 overflow-x-auto",
|
|
25
|
-
children: tabs.map((tab) => /* @__PURE__ */ jsxs(
|
|
26
|
-
"button",
|
|
27
|
-
{
|
|
28
|
-
role: "tab",
|
|
29
|
-
type: "button",
|
|
30
|
-
"aria-selected": tab.key === activeKey,
|
|
31
|
-
onClick: () => handleChange(tab.key),
|
|
32
|
-
className: cn(
|
|
33
|
-
"flex items-center gap-2 px-4 py-3 text-sm font-medium whitespace-nowrap border-b-2 transition-colors -mb-px",
|
|
34
|
-
tab.key === activeKey ? "border-secondary text-secondary" : "border-transparent text-text-secondary hover:text-primary hover:border-gray-300"
|
|
35
|
-
),
|
|
36
|
-
children: [
|
|
37
|
-
tab.icon && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: tab.icon }),
|
|
38
|
-
tab.label
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
tab.key
|
|
42
|
-
))
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
/* @__PURE__ */ jsx("div", { role: "tabpanel", className: "py-4", children: activeTab?.content })
|
|
46
|
-
] });
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
Tabs.displayName = "Tabs";
|
|
50
|
-
|
|
51
|
-
export { Tabs };
|