@konstructio/ui 0.1.2-alpha.103 → 0.1.2-alpha.105
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/README.md +15 -21
- package/dist/{AdditionalOptions-Cj29eeMF.js → AdditionalOptions-D0BAS2HG.js} +1 -1
- package/dist/{AlertDialogTrigger-CgcsW_ta.js → AlertDialogTrigger-BGo_acd5.js} +3 -3
- package/dist/{Checkbox-DzAx7n67.js → Checkbox-B_ngk9Dj.js} +56 -56
- package/dist/{Combination-cjXRJS03.js → Combination-CnMM05mt.js} +51 -45
- package/dist/{CommandInput-BnvRMfLI.js → CommandInput-BLq69pOT.js} +1 -1
- package/dist/Counter-BV680M5r.js +195 -0
- package/dist/DropdownButton-DfNojmCW.js +493 -0
- package/dist/{FlagSelectorList-BoYG-_It.js → FlagSelectorList-CkTR3j6O.js} +222 -218
- package/dist/{HamburgerTrigger-1vOTrm8-.js → HamburgerTrigger-DRylBL2d.js} +1 -1
- package/dist/{ImageUpload-DZTm4SBB.js → ImageUpload-DiwymQcU.js} +1 -1
- package/dist/{Input-CW0VwW2T.js → Input-Cf44DzfE.js} +18 -18
- package/dist/{Loading-fD0Xiyeq.js → Loading-DUh9PMJN.js} +3 -1
- package/dist/Modal-Dyn088X7.js +81 -0
- package/dist/Sidebar.css +1 -1
- package/dist/{Spinner-Lw9mZYhg.js → Spinner-CUwE2bLm.js} +1 -1
- package/dist/{Switch-WBRr8uOJ.js → Switch-aPhL5rNG.js} +4 -4
- package/dist/{Toast-ByH-l4XK.js → Toast-3NEz7LLa.js} +149 -148
- package/dist/Wrapper-CVJSuYWx.js +114 -0
- package/dist/{Wrapper-XeeD3av7.js → Wrapper-DP6Sxngx.js} +185 -180
- package/dist/Wrapper-R8fik3ah.js +182 -0
- package/dist/components/Alert/Alert.js +21 -21
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +14 -10
- package/dist/components/Autocomplete/components/List/List.js +22 -26
- package/dist/components/Autocomplete/components/List/List.variants.js +7 -19
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +39 -38
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -1
- package/dist/components/Badge/Badge.js +37 -36
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +6 -6
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +2 -2
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Command/contexts/Command.provider.js +16 -12
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +57 -58
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +42 -43
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +42 -50
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +61 -79
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +89 -122
- package/dist/components/Datepicker/DatePicker.js +13 -13
- package/dist/components/Drawer/Drawer.js +54 -49
- package/dist/components/Drawer/hooks/useDrawer.js +39 -44
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +23 -22
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +42 -56
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +30 -43
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +36 -49
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
- package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -18
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +31 -45
- package/dist/components/Filter/contexts/filter.provider.js +15 -10
- package/dist/components/Filter/events/index.js +26 -5
- package/dist/components/Filter/hooks/index.js +4 -0
- package/dist/components/Filter/hooks/useFilterDropdownSync.js +26 -0
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.provider.js +26 -19
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +14 -13
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +6 -4
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +16 -16
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PieChart/PieChart.js +33 -32
- package/dist/components/ProgressBar/ProgressBar.js +26 -20
- package/dist/components/Radio/Radio.js +28 -30
- package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.js +24 -24
- package/dist/components/Range/Range.js +15 -13
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/List/List.js +2 -2
- package/dist/components/Select/components/ListItem/ListItem.js +30 -30
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Select/hooks/useSelect.js +28 -39
- package/dist/components/Sidebar/Sidebar.js +21 -18
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +30 -0
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +20 -0
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +14 -10
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +14 -4
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +41 -37
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +4 -5
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +75 -68
- package/dist/components/Sidebar/components/index.js +17 -15
- package/dist/components/Sidebar/contexts/SidebarContext.js +8 -5
- package/dist/components/Slider/Slider.js +17 -15
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Stepper.variants.js +6 -6
- package/dist/components/Stepper/hooks/useStepItemLogic.js +12 -17
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +17 -17
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +12 -11
- package/dist/components/TimePicker/components/HoursList/HoursList.js +34 -38
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +25 -29
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +33 -33
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +91 -99
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +29 -30
- package/dist/components/TimePicker/contexts/time-picker.provider.js +10 -10
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.variants.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +32 -29
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +0 -2
- package/dist/components/VirtualizedTable/components/Body/Body.js +5 -5
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -53
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/VirtualizedTable/events/filters/filters.js +7 -0
- package/dist/components/VirtualizedTable/events/index.js +10 -25
- package/dist/components/VirtualizedTable/events/refresh/refresh.js +7 -0
- package/dist/components/VirtualizedTable/events/row/row.js +22 -0
- package/dist/components/VirtualizedTable/utils/get-table-id.js +4 -0
- package/dist/components/VirtualizedTable/utils/index.js +4 -2
- package/dist/components/index.js +95 -89
- package/dist/{components-BIHlj4yH.js → components-Cf345jTv.js} +45 -41
- package/dist/constants-CxJJRVK3.js +31 -0
- package/dist/{dist-DISvWx7U.js → dist-BUocnzkM.js} +1 -1
- package/dist/{dist-Dse3gSmZ.js → dist-BZNE2Tnx.js} +4 -4
- package/dist/{dist-2bGlmy8N2.js → dist-BaPW7qXd2.js} +27 -26
- package/dist/dist-BdobXn93.js +192 -0
- package/dist/dist-BlPTJNIm.js +118 -0
- package/dist/{dist-BiJrNvNo.js → dist-C3YVLapk.js} +29 -28
- package/dist/dist-C4j75TwZ.js +20 -0
- package/dist/dist-CCdbu9GU.js +46 -0
- package/dist/dist-CzKqHuqJ2.js +427 -0
- package/dist/dist-D-yS0HN8.js +228 -0
- package/dist/dist-D5XYRjmR.js +15 -0
- package/dist/dist-DDck_2lb.js +451 -0
- package/dist/{dist-C2aTw0m62.js → dist-DFCz63oC2.js} +5 -5
- package/dist/dist-DGOjiAnB2.js +14 -0
- package/dist/dist-DKryKPmP.js +193 -0
- package/dist/{dist-CTvBzxW8.js → dist-DX0sBG3Q.js} +1 -1
- package/dist/dist-DYIabsrY.js +17 -0
- package/dist/dist-pWlMx4Fi2.js +36 -0
- package/dist/{dist-CVDFmWf2.js → dist-tGUUcv8n.js} +17 -16
- package/dist/dist-xCbHbMLA.js +116 -0
- package/dist/{es2015-BWf6xQHm.js → es2015-CoHq2g4y.js} +95 -86
- package/dist/es2015-DigR3dar.js +795 -0
- package/dist/events.types-BG1Uh8i6.js +6 -0
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/useClickOutside.js +14 -0
- package/dist/index.js +146 -138
- package/dist/lib/components/Autocomplete/components/List/List.variants.d.ts +0 -1
- package/dist/lib/components/DropdownButton/DropdownButton.d.ts +5 -6
- package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +2 -0
- package/dist/lib/components/Filter/Filter.types.d.ts +2 -0
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
- package/dist/lib/components/Filter/events/index.d.ts +10 -2
- package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/hooks/useFilterDropdownSync.d.ts +2 -0
- package/dist/lib/components/Filter/hooks/useFilterDropdownSync.types.d.ts +5 -0
- package/dist/lib/components/PieChart/PieChart.types.d.ts +4 -4
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +2 -0
- package/dist/lib/components/Select/hooks/useSelect.d.ts +2 -3
- package/dist/lib/components/Sidebar/Sidebar.d.ts +2 -2
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +6 -5
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +4 -0
- package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.d.ts +1 -0
- package/dist/lib/components/Sidebar/components/Logo/Logo.types.d.ts +8 -0
- package/dist/lib/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -1
- package/dist/lib/components/Sidebar/components/index.d.ts +2 -0
- package/dist/lib/components/Sidebar/contexts/SidebarContext.d.ts +12 -0
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/events.types.d.ts +11 -0
- package/dist/lib/components/VirtualizedTable/events/filters/filters.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -14
- package/dist/lib/components/VirtualizedTable/events/refresh/refresh.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/events/refresh/refresh.types.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/events/row/row.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/utils/get-table-id.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
- package/dist/lib/components/index.d.ts +2 -2
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/useClickOutside.d.ts +2 -0
- package/dist/package.json +24 -24
- package/dist/styles.css +1 -1
- package/dist/{table.provider-2sAkE7z_.js → table.provider-B0BafHuU.js} +395 -381
- package/dist/ui/civo-theme.css +4 -0
- package/dist/ui/kubefirst-theme.css +4 -0
- package/package.json +24 -24
- package/dist/Counter-CY0xGnVM.js +0 -208
- package/dist/DropdownButton-DnlwdPmb.js +0 -92
- package/dist/Modal-Bfzggwlr.js +0 -76
- package/dist/Wrapper-ClJ_Mham.js +0 -110
- package/dist/Wrapper-DNEn4fef.js +0 -161
- package/dist/constants-DXrF9vV4.js +0 -31
- package/dist/dist-B-Aoze_D.js +0 -10
- package/dist/dist-BuFiu480.js +0 -13
- package/dist/dist-C2s4VX-42.js +0 -31
- package/dist/dist-CT6d9xe7.js +0 -441
- package/dist/dist-CVy-ulDZ.js +0 -42
- package/dist/dist-D4FePjTS.js +0 -194
- package/dist/dist-Db6UeFo4.js +0 -291
- package/dist/dist-DqKFpce5.js +0 -98
- package/dist/dist-j7FOUrFU.js +0 -206
- package/dist/dist-l-aDnQZC.js +0 -62
- package/dist/dist-ppXKUlVt.js +0 -10
- /package/dist/{x-a_LpoXzG.js → x-a_LpoXzG2.js} +0 -0
|
@@ -117,8 +117,8 @@ var e = t(["flex"], {
|
|
|
117
117
|
"font-semibold"
|
|
118
118
|
],
|
|
119
119
|
lg: [
|
|
120
|
-
"w-
|
|
121
|
-
"h-
|
|
120
|
+
"w-13.5",
|
|
121
|
+
"h-13.5",
|
|
122
122
|
"text-lg",
|
|
123
123
|
"font-semibold"
|
|
124
124
|
]
|
|
@@ -252,7 +252,7 @@ var e = t(["flex"], {
|
|
|
252
252
|
size: "lg",
|
|
253
253
|
class: [
|
|
254
254
|
"h-6",
|
|
255
|
-
"ml-
|
|
255
|
+
"ml-6.5",
|
|
256
256
|
"my-1"
|
|
257
257
|
]
|
|
258
258
|
},
|
|
@@ -293,20 +293,20 @@ var e = t(["flex"], {
|
|
|
293
293
|
size: "sm",
|
|
294
294
|
variant: "inline"
|
|
295
295
|
}
|
|
296
|
-
}),
|
|
296
|
+
}), m = t([
|
|
297
297
|
"flex",
|
|
298
298
|
"items-center",
|
|
299
299
|
"flex-1"
|
|
300
300
|
], {
|
|
301
301
|
variants: { variant: {
|
|
302
302
|
inline: ["mt-2.5"],
|
|
303
|
-
stacked: ["mt-
|
|
303
|
+
stacked: ["mt-6.5"],
|
|
304
304
|
horizontal: ["mt-0"]
|
|
305
305
|
} },
|
|
306
306
|
defaultVariants: { variant: "inline" }
|
|
307
307
|
});
|
|
308
308
|
export {
|
|
309
|
-
|
|
309
|
+
m as horizontalConnectorWrapperVariants,
|
|
310
310
|
c as stepConnectorVariants,
|
|
311
311
|
l as stepContentVariants,
|
|
312
312
|
d as stepDescriptionVariants,
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const i = n.status ?? "pending", l = n.disabled || i === "active", r = !!(n.onClick || e), t = c && !l && r, f = typeof n.label == "string" ? "span" : u, o = s(() => {
|
|
1
|
+
import { t as f } from "../../../dist-xCbHbMLA.js";
|
|
2
|
+
function b({ clickable: s, onClick: e, step: n }) {
|
|
3
|
+
const a = n.status ?? "pending", i = n.disabled || a === "active", c = !!(n.onClick || e), t = s && !i && c, r = typeof n.label == "string" ? "span" : f, l = () => {
|
|
5
4
|
t && (n.onClick ? n.onClick() : e && e());
|
|
6
|
-
}
|
|
7
|
-
t,
|
|
8
|
-
n.onClick,
|
|
9
|
-
e
|
|
10
|
-
]);
|
|
5
|
+
};
|
|
11
6
|
return {
|
|
12
7
|
isClickable: t,
|
|
13
|
-
isDisabled:
|
|
14
|
-
LabelComponent:
|
|
15
|
-
status:
|
|
16
|
-
handleClick:
|
|
17
|
-
handleKeyDown:
|
|
18
|
-
t && (
|
|
19
|
-
}
|
|
8
|
+
isDisabled: i,
|
|
9
|
+
LabelComponent: r,
|
|
10
|
+
status: a,
|
|
11
|
+
handleClick: l,
|
|
12
|
+
handleKeyDown: (o) => {
|
|
13
|
+
t && (o.key === "Enter" || o.key === " ") && (o.preventDefault(), l());
|
|
14
|
+
}
|
|
20
15
|
};
|
|
21
16
|
}
|
|
22
17
|
export {
|
|
23
|
-
|
|
18
|
+
b as useStepItemLogic
|
|
24
19
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as s } from "../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { r as e } from "../../dist-
|
|
2
|
+
import { r as e } from "../../dist-BlPTJNIm.js";
|
|
3
3
|
import { rootVariants as p } from "./Tabs.variants.js";
|
|
4
4
|
import { Content as n } from "./components/Content.js";
|
|
5
5
|
import { List as f } from "./components/List.js";
|
|
@@ -12,7 +12,7 @@ var r = a([""], {
|
|
|
12
12
|
variants: { variant: {
|
|
13
13
|
default: "flex gap-6",
|
|
14
14
|
horizontal: "",
|
|
15
|
-
vertical: "flex-col min-w-
|
|
15
|
+
vertical: "flex-col min-w-33 h-full items-center"
|
|
16
16
|
} },
|
|
17
17
|
defaultVariants: { variant: "default" }
|
|
18
18
|
}), n = a([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as r } from "../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { t as n } from "../../../dist-
|
|
2
|
+
import { t as n } from "../../../dist-BlPTJNIm.js";
|
|
3
3
|
import { contentVariants as m } from "../Tabs.variants.js";
|
|
4
4
|
import { jsx as s } from "react/jsx-runtime";
|
|
5
5
|
var e = ({ children: t, className: o, ...a }) => /* @__PURE__ */ s(n, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as a } from "../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { n } from "../../../dist-
|
|
2
|
+
import { n } from "../../../dist-BlPTJNIm.js";
|
|
3
3
|
import { listVariants as t } from "../Tabs.variants.js";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
var e = ({ children: s, className: i, orientation: m, ...o }) => /* @__PURE__ */ r("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../../../utils-Cx-WzRZF.js";
|
|
2
2
|
import { Typography as m } from "../../Typography/Typography.js";
|
|
3
|
-
import { i as n } from "../../../dist-
|
|
3
|
+
import { i as n } from "../../../dist-BlPTJNIm.js";
|
|
4
4
|
import { triggerVariants as p } from "../Tabs.variants.js";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
6
|
var s = ({ tab: a, label: i, isActive: o, className: t }) => /* @__PURE__ */ r(n, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../../dist-B9GE4SXf.js";
|
|
2
|
-
var
|
|
2
|
+
var a = e([
|
|
3
3
|
"px-2",
|
|
4
4
|
"py-1",
|
|
5
5
|
"rounded-md",
|
|
@@ -11,25 +11,25 @@ var f = e([
|
|
|
11
11
|
"gap-1"
|
|
12
12
|
], {
|
|
13
13
|
variants: { color: {
|
|
14
|
-
gray: ["bg-
|
|
14
|
+
gray: ["bg-zinc-100", "text-zinc-500"],
|
|
15
15
|
"gray-800": ["bg-gray-100", "text-gray-800"],
|
|
16
|
-
cyan: ["bg-
|
|
17
|
-
gold: ["bg-
|
|
18
|
-
green: ["bg-
|
|
19
|
-
"light blue": ["bg-
|
|
20
|
-
lime: ["bg-
|
|
21
|
-
pink: ["bg-
|
|
22
|
-
purple: ["bg-
|
|
23
|
-
emerald: ["bg-
|
|
24
|
-
fuscia: ["bg-
|
|
25
|
-
indigo: ["bg-
|
|
26
|
-
"light-orange": ["bg-
|
|
27
|
-
"dark-sky-blue": ["bg-
|
|
28
|
-
mistery: ["bg-
|
|
29
|
-
default: ["bg-transparent", "text-
|
|
16
|
+
cyan: ["bg-cyan-50", "text-cyan-700"],
|
|
17
|
+
gold: ["bg-yellow-100", "text-yellow-700"],
|
|
18
|
+
green: ["bg-green-100", "text-green-700"],
|
|
19
|
+
"light blue": ["bg-sky-100", "text-sky-700"],
|
|
20
|
+
lime: ["bg-lime-100", "text-lime-700"],
|
|
21
|
+
pink: ["bg-pink-100", "text-pink-700"],
|
|
22
|
+
purple: ["bg-violet-100", "text-violet-700"],
|
|
23
|
+
emerald: ["bg-emerald-50", "text-emerald-700"],
|
|
24
|
+
fuscia: ["bg-fuchsia-50", "text-fuchsia-700"],
|
|
25
|
+
indigo: ["bg-indigo-100", "text-indigo-700"],
|
|
26
|
+
"light-orange": ["bg-amber-100", "text-amber-600"],
|
|
27
|
+
"dark-sky-blue": ["bg-blue-100", "text-blue-700"],
|
|
28
|
+
mistery: ["bg-kubefirst-dark-blue-900", "text-mistery"],
|
|
29
|
+
default: ["bg-transparent", "text-zinc-500"]
|
|
30
30
|
} },
|
|
31
31
|
defaultVariants: { color: "default" }
|
|
32
32
|
});
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
a as tagVariants
|
|
35
35
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as m } from "../../Wrapper-
|
|
2
|
+
import { t as m } from "../../Wrapper-CVJSuYWx.js";
|
|
3
3
|
import { TagSelectProvider as p } from "./contexts/TagSelect.provider.js";
|
|
4
4
|
import { forwardRef as a } from "react";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useClickOutside as o } from "../../../hooks/useClickOutside.js";
|
|
2
|
+
import { useTagSelect as s } from "../contexts/TagSelect.hook.js";
|
|
2
3
|
import { useCallback as l, useEffect as c, useRef as u } from "react";
|
|
3
|
-
var
|
|
4
|
-
const n = u(null), { onOpen: e } =
|
|
5
|
-
return
|
|
4
|
+
var m = () => {
|
|
5
|
+
const n = u(null), { onOpen: e } = s();
|
|
6
|
+
return o(n, l(() => {
|
|
7
|
+
e(!1);
|
|
8
|
+
}, [e])), c(() => {
|
|
6
9
|
const t = new AbortController(), r = (a) => {
|
|
7
10
|
a.key === "Escape" && e(!1);
|
|
8
|
-
}, s = (a) => {
|
|
9
|
-
n.current?.contains(a.target) || e(!1);
|
|
10
11
|
};
|
|
11
|
-
return document.addEventListener("keydown", r, { signal: t.signal }),
|
|
12
|
+
return document.addEventListener("keydown", r, { signal: t.signal }), () => {
|
|
12
13
|
t.abort();
|
|
13
14
|
};
|
|
14
|
-
}, [e
|
|
15
|
+
}, [e]), {
|
|
15
16
|
wrapperRef: n,
|
|
16
|
-
handleOpen:
|
|
17
|
+
handleOpen: (t) => {
|
|
17
18
|
t.target?.closest("[data-value]") || e(!0);
|
|
18
|
-
}
|
|
19
|
+
}
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
+
m as useTagSelect
|
|
23
24
|
};
|
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
import { t as s } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { useTimePickerContext as
|
|
3
|
-
import { buttonVariants as
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
e.currentTarget?.blur(),
|
|
9
|
-
},
|
|
10
|
-
const r =
|
|
2
|
+
import { useTimePickerContext as S } from "../../contexts/time-picker.hook.js";
|
|
3
|
+
import { buttonVariants as d, liVariants as k, ulVariants as H } from "../../TimePicker.variants.js";
|
|
4
|
+
import { useEffect as A, useRef as D } from "react";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
var h = ({ hours: a, scrollBehavior: f }) => {
|
|
7
|
+
const c = D(null), N = D(a), { format: l, isTyping: m, onSelectHour: p } = S(), b = l === "12" && a >= 12 ? a - 12 : a, u = l === "12" ? 12 : 24, y = (e, t) => {
|
|
8
|
+
e.currentTarget?.blur(), p(t);
|
|
9
|
+
}, w = (e, t) => {
|
|
10
|
+
const r = c.current?.querySelectorAll("button");
|
|
11
11
|
if (!r) return;
|
|
12
12
|
let o = t;
|
|
13
13
|
if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey)
|
|
14
|
-
e.preventDefault(), o = (t + 1) %
|
|
14
|
+
e.preventDefault(), o = (t + 1) % u;
|
|
15
15
|
else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey)
|
|
16
|
-
e.preventDefault(), o = (t - 1 +
|
|
16
|
+
e.preventDefault(), o = (t - 1 + u) % u;
|
|
17
17
|
else if (e.key === "Enter") {
|
|
18
18
|
e.preventDefault();
|
|
19
19
|
const n = l === "12" ? t + 1 : t;
|
|
20
|
-
|
|
20
|
+
p(n), document.querySelector('[aria-label="minutes"]')?.querySelector('li[data-active="true"] button')?.focus();
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
o !== t && r[o]?.focus();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
u
|
|
28
|
-
]);
|
|
29
|
-
if (D(() => {
|
|
30
|
-
const e = i.current, t = S.current, r = l === "12" && t >= 12 ? t - 12 : t, o = r === 0 && l === "12" ? 12 : r;
|
|
24
|
+
};
|
|
25
|
+
if (A(() => {
|
|
26
|
+
const e = c.current, t = N.current, r = l === "12" && t >= 12 ? t - 12 : t, o = r === 0 && l === "12" ? 12 : r;
|
|
31
27
|
e && e.querySelector(`[data-value="${`0${o}`.slice(-2)}"]`)?.scrollIntoView({
|
|
32
|
-
behavior:
|
|
28
|
+
behavior: f,
|
|
33
29
|
block: "center"
|
|
34
30
|
});
|
|
35
|
-
}, [l,
|
|
36
|
-
if (!
|
|
37
|
-
const e =
|
|
31
|
+
}, [l, f]), A(() => {
|
|
32
|
+
if (!m) return;
|
|
33
|
+
const e = c.current, t = l === "12" && a >= 12 ? a - 12 : a, r = t === 0 && l === "12" ? 12 : t;
|
|
38
34
|
e && e.querySelector(`[data-value="${`0${r}`.slice(-2)}"]`)?.scrollIntoView({
|
|
39
35
|
behavior: "instant",
|
|
40
36
|
block: "center"
|
|
@@ -42,26 +38,26 @@ var v = ({ hours: a, scrollBehavior: m }) => {
|
|
|
42
38
|
}, [
|
|
43
39
|
a,
|
|
44
40
|
l,
|
|
45
|
-
|
|
41
|
+
m
|
|
46
42
|
]), l === "12") {
|
|
47
43
|
const e = b === 0 ? 12 : b;
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
ref:
|
|
44
|
+
return /* @__PURE__ */ i("ul", {
|
|
45
|
+
ref: c,
|
|
50
46
|
className: s(H()),
|
|
51
47
|
"aria-label": "hours",
|
|
52
48
|
role: "listbox",
|
|
53
49
|
children: Array.from({ length: 12 }, (t, r) => {
|
|
54
50
|
const o = e - 1 === r;
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
className: s(
|
|
51
|
+
return /* @__PURE__ */ i("li", {
|
|
52
|
+
className: s(k()),
|
|
57
53
|
"data-value": `0${r + 1}`.slice(-2),
|
|
58
54
|
"data-active": o,
|
|
59
55
|
role: "presentation",
|
|
60
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ i("button", {
|
|
61
57
|
type: "button",
|
|
62
58
|
role: "option",
|
|
63
59
|
tabIndex: o ? 0 : -1,
|
|
64
|
-
className: s(
|
|
60
|
+
className: s(d()),
|
|
65
61
|
onClick: (n) => y(n, r + 1),
|
|
66
62
|
onKeyDown: (n) => w(n, r),
|
|
67
63
|
children: r + 1
|
|
@@ -70,23 +66,23 @@ var v = ({ hours: a, scrollBehavior: m }) => {
|
|
|
70
66
|
})
|
|
71
67
|
});
|
|
72
68
|
}
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
ref:
|
|
69
|
+
return /* @__PURE__ */ i("ul", {
|
|
70
|
+
ref: c,
|
|
75
71
|
className: s(H()),
|
|
76
72
|
"aria-label": "hours",
|
|
77
73
|
role: "listbox",
|
|
78
74
|
children: Array.from({ length: 24 }, (e, t) => {
|
|
79
75
|
const r = a === t;
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
className: s(
|
|
76
|
+
return /* @__PURE__ */ i("li", {
|
|
77
|
+
className: s(k()),
|
|
82
78
|
"data-value": `0${t}`.slice(-2),
|
|
83
79
|
"data-active": r,
|
|
84
80
|
role: "presentation",
|
|
85
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ i("button", {
|
|
86
82
|
type: "button",
|
|
87
83
|
role: "option",
|
|
88
84
|
tabIndex: r ? 0 : -1,
|
|
89
|
-
className: s(
|
|
85
|
+
className: s(d()),
|
|
90
86
|
onClick: (o) => y(o, t),
|
|
91
87
|
onKeyDown: (o) => w(o, t),
|
|
92
88
|
children: t
|
|
@@ -95,7 +91,7 @@ var v = ({ hours: a, scrollBehavior: m }) => {
|
|
|
95
91
|
})
|
|
96
92
|
});
|
|
97
93
|
};
|
|
98
|
-
|
|
94
|
+
h.displayName = "HoursList";
|
|
99
95
|
export {
|
|
100
|
-
|
|
96
|
+
h as HoursList
|
|
101
97
|
};
|
|
@@ -1,56 +1,52 @@
|
|
|
1
1
|
import { t } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { useTimePickerContext as
|
|
3
|
-
import { buttonVariants as
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as o, jsxs as
|
|
6
|
-
var
|
|
7
|
-
const
|
|
2
|
+
import { useTimePickerContext as w } from "../../contexts/time-picker.hook.js";
|
|
3
|
+
import { buttonVariants as d, liVariants as p } from "../../TimePicker.variants.js";
|
|
4
|
+
import { useRef as N } from "react";
|
|
5
|
+
import { jsx as o, jsxs as D } from "react/jsx-runtime";
|
|
6
|
+
var M = ({ listClassName: b, listItemClassName: n, listItemButtonClassName: s, onClose: y }) => {
|
|
7
|
+
const i = N(null), { format: k, isAM: r, onSelectAM: c, onSelectPM: f } = w(), u = (e, a) => {
|
|
8
8
|
e.currentTarget?.blur(), a();
|
|
9
|
-
},
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
12
|
-
const
|
|
13
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ||
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
]);
|
|
19
|
-
return x === "24" ? null : /* @__PURE__ */ M("ul", {
|
|
20
|
-
ref: u,
|
|
21
|
-
className: t("flex items-center justify-center flex-col", k),
|
|
9
|
+
}, m = (e, a) => {
|
|
10
|
+
const l = i.current?.querySelectorAll("button");
|
|
11
|
+
if (!l) return;
|
|
12
|
+
const x = e.key === "Tab" && !e.shiftKey, h = e.key === "Tab" && e.shiftKey;
|
|
13
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" || x || h ? (e.preventDefault(), a ? l[1]?.focus() : l[0]?.focus()) : e.key === "Enter" && (e.preventDefault(), a ? c() : f(), y?.());
|
|
14
|
+
};
|
|
15
|
+
return k === "24" ? null : /* @__PURE__ */ D("ul", {
|
|
16
|
+
ref: i,
|
|
17
|
+
className: t("flex items-center justify-center flex-col", b),
|
|
22
18
|
"aria-label": "meridian",
|
|
23
19
|
role: "listbox",
|
|
24
20
|
children: [/* @__PURE__ */ o("li", {
|
|
25
|
-
className: t(
|
|
21
|
+
className: t(p({ className: n })),
|
|
26
22
|
"data-active": r,
|
|
27
23
|
role: "presentation",
|
|
28
24
|
children: /* @__PURE__ */ o("button", {
|
|
29
25
|
type: "button",
|
|
30
26
|
role: "option",
|
|
31
27
|
tabIndex: r ? 0 : -1,
|
|
32
|
-
className: t(
|
|
33
|
-
onClick: (e) =>
|
|
34
|
-
onKeyDown: (e) =>
|
|
28
|
+
className: t(d({ className: s }), { "dark:text-slate-50": !r }),
|
|
29
|
+
onClick: (e) => u(e, c),
|
|
30
|
+
onKeyDown: (e) => m(e, !0),
|
|
35
31
|
children: "AM"
|
|
36
32
|
})
|
|
37
33
|
}), /* @__PURE__ */ o("li", {
|
|
38
|
-
className: t(
|
|
34
|
+
className: t(p({ className: n })),
|
|
39
35
|
"data-active": !r,
|
|
40
36
|
role: "presentation",
|
|
41
37
|
children: /* @__PURE__ */ o("button", {
|
|
42
38
|
type: "button",
|
|
43
39
|
role: "option",
|
|
44
40
|
tabIndex: r ? -1 : 0,
|
|
45
|
-
className: t(
|
|
46
|
-
onClick: (e) =>
|
|
47
|
-
onKeyDown: (e) =>
|
|
41
|
+
className: t(d({ className: s }), { "dark:text-slate-50": r }),
|
|
42
|
+
onClick: (e) => u(e, f),
|
|
43
|
+
onKeyDown: (e) => m(e, !1),
|
|
48
44
|
children: "PM"
|
|
49
45
|
})
|
|
50
46
|
})]
|
|
51
47
|
});
|
|
52
48
|
};
|
|
53
|
-
|
|
49
|
+
M.displayName = "MeridianList";
|
|
54
50
|
export {
|
|
55
|
-
|
|
51
|
+
M as MeridianList
|
|
56
52
|
};
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as l } from "../../../../utils-Cx-WzRZF.js";
|
|
2
2
|
import { useTimePickerContext as h } from "../../contexts/time-picker.hook.js";
|
|
3
|
-
import { buttonVariants as
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
const i = m(null), y = m(
|
|
8
|
-
|
|
3
|
+
import { buttonVariants as k, liVariants as d, ulVariants as M } from "../../TimePicker.variants.js";
|
|
4
|
+
import { useEffect as p, useRef as m } from "react";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
var S = ({ minutes: a, scrollBehavior: s, onClose: c }) => {
|
|
7
|
+
const i = m(null), y = m(a), { isTyping: u, onSelectMinute: f } = h();
|
|
8
|
+
p(() => {
|
|
9
9
|
const t = i.current;
|
|
10
10
|
if (t) {
|
|
11
11
|
const e = `0${y.current}`.slice(-2);
|
|
12
12
|
t.querySelector(`[data-value="${e}"]`)?.scrollIntoView({
|
|
13
|
-
behavior:
|
|
13
|
+
behavior: s,
|
|
14
14
|
block: "center"
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
}, [
|
|
18
|
-
if (!
|
|
17
|
+
}, [s]), p(() => {
|
|
18
|
+
if (!u) return;
|
|
19
19
|
const t = i.current;
|
|
20
20
|
if (t) {
|
|
21
|
-
const e = `0${
|
|
21
|
+
const e = `0${a}`.slice(-2);
|
|
22
22
|
t.querySelector(`[data-value="${e}"]`)?.scrollIntoView({
|
|
23
23
|
behavior: "instant",
|
|
24
24
|
block: "center"
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
}, [
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
const
|
|
32
|
-
if (!
|
|
27
|
+
}, [a, u]);
|
|
28
|
+
const b = (t, e) => {
|
|
29
|
+
f(t), e.currentTarget?.blur();
|
|
30
|
+
}, w = (t, e) => {
|
|
31
|
+
const o = i.current?.querySelectorAll("button");
|
|
32
|
+
if (!o) return;
|
|
33
33
|
let r = e;
|
|
34
34
|
if (t.key === "ArrowDown" || t.key === "Tab" && !t.shiftKey)
|
|
35
35
|
t.preventDefault(), r = (e + 1) % 60;
|
|
36
36
|
else if (t.key === "ArrowUp" || t.key === "Tab" && t.shiftKey)
|
|
37
37
|
t.preventDefault(), r = (e - 1 + 60) % 60;
|
|
38
38
|
else if (t.key === "Enter") {
|
|
39
|
-
if (t.preventDefault(),
|
|
40
|
-
|
|
39
|
+
if (t.preventDefault(), f(e), c) {
|
|
40
|
+
c();
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
document.querySelector('[aria-label="meridian"]')?.querySelector('li[data-active="true"] button')?.focus();
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
r !== e &&
|
|
47
|
-
}
|
|
48
|
-
return /* @__PURE__ */
|
|
46
|
+
r !== e && o[r]?.focus();
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ n("ul", {
|
|
49
49
|
ref: i,
|
|
50
|
-
className:
|
|
50
|
+
className: l(M()),
|
|
51
51
|
"aria-label": "minutes",
|
|
52
52
|
role: "listbox",
|
|
53
53
|
children: Array.from({ length: 60 }, (t, e) => {
|
|
54
|
-
const
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
className:
|
|
54
|
+
const o = a === e;
|
|
55
|
+
return /* @__PURE__ */ n("li", {
|
|
56
|
+
className: l(d()),
|
|
57
57
|
"data-value": `0${e}`.slice(-2),
|
|
58
|
-
"data-active":
|
|
58
|
+
"data-active": o,
|
|
59
59
|
role: "presentation",
|
|
60
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ n("button", {
|
|
61
61
|
type: "button",
|
|
62
62
|
role: "option",
|
|
63
|
-
tabIndex:
|
|
64
|
-
className:
|
|
65
|
-
onClick: (r) =>
|
|
63
|
+
tabIndex: o ? 0 : -1,
|
|
64
|
+
className: l(k()),
|
|
65
|
+
onClick: (r) => b(e, r),
|
|
66
66
|
onKeyDown: (r) => w(r, e),
|
|
67
67
|
children: `0${e}`.slice(-2)
|
|
68
68
|
})
|
|
@@ -70,7 +70,7 @@ var D = ({ minutes: o, scrollBehavior: u, onClose: n }) => {
|
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
S.displayName = "MinutesList";
|
|
74
74
|
export {
|
|
75
|
-
|
|
75
|
+
S as MinutesList
|
|
76
76
|
};
|