react-kui 3.2.0 → 3.3.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/ai/kui-components.json +825 -168
- package/es/_virtual/_rolldown/runtime.js +2 -3
- package/es/affix/index.js +73 -185
- package/es/alert/index.js +3 -4
- package/es/anchor/anchor-context.js +2 -3
- package/es/anchor/anchor-link.js +3 -4
- package/es/anchor/anchor.js +195 -398
- package/es/auto-complete/index.js +160 -561
- package/es/avatar/avatar-group-context.js +2 -3
- package/es/avatar/avatar-group.js +32 -124
- package/es/avatar/avatar.js +58 -159
- package/es/back-top/index.js +66 -201
- package/es/badge/index.js +4 -5
- package/es/base/teleport.js +22 -54
- package/es/base/transition-props.js +2 -3
- package/es/base/transition.js +2 -3
- package/es/breadcrumb/breadcrumb-context.js +2 -3
- package/es/breadcrumb/breadcrumb-item.js +19 -102
- package/es/breadcrumb/breadcrumb.js +10 -59
- package/es/button/button-group-context.js +2 -3
- package/es/button/button-group.js +15 -75
- package/es/button/button.js +4 -5
- package/es/calendar/index.js +4 -5
- package/es/card/index.js +4 -5
- package/es/carousel/carousel-context.js +2 -3
- package/es/carousel/carousel-item.js +3 -4
- package/es/carousel/carousel.js +281 -628
- package/es/carousel/drag.js +2 -3
- package/es/cascader/index.js +7 -8
- package/es/check-card/check-card-group.js +53 -179
- package/es/check-card/check-card.js +100 -293
- package/es/check-card/context.js +2 -3
- package/es/checkbox/checkbox-group-context.js +2 -3
- package/es/checkbox/checkbox-group.js +34 -138
- package/es/checkbox/checkbox.js +4 -5
- package/es/checkbox/index.js +2 -3
- package/es/collapse/collapse-panel.js +84 -206
- package/es/collapse/collapse.js +38 -170
- package/es/color-picker/alpha.js +44 -125
- package/es/color-picker/hue.js +39 -108
- package/es/color-picker/index.js +7 -6
- package/es/color-picker/mode.js +76 -159
- package/es/color-picker/paint.js +66 -163
- package/es/color-picker/presets.js +12 -44
- package/es/components.js +37 -32
- package/es/config/config-context.js +2 -3
- package/es/config/context.js +2 -3
- package/es/config/index.js +3 -4
- package/es/config/popup-host.js +3 -4
- package/es/config/size-context.js +2 -3
- package/es/config/use-config-appearance.js +3 -4
- package/es/const/var.js +2 -3
- package/es/date-picker/index.js +8 -9
- package/es/descriptions/descriptions-item.js +3 -4
- package/es/descriptions/descriptions.js +53 -144
- package/es/divider/index.js +2 -3
- package/es/drawer/index.js +171 -465
- package/es/dropdown/dropdown-button.js +25 -128
- package/es/dropdown/dropdown-context.js +2 -3
- package/es/dropdown/dropdown.js +56 -207
- package/es/dropdown/trigger.js +37 -125
- package/es/empty/index.js +34 -111
- package/es/feature-card/index.js +2 -3
- package/es/feedback-panel/index.js +30 -155
- package/es/flame-wrap/index.js +3 -4
- package/es/flame-wrap/types.js +2 -3
- package/es/flex/index.js +2 -3
- package/es/form/field-context.js +3 -4
- package/es/form/form-context.js +2 -3
- package/es/form/form-item.js +4 -5
- package/es/form/form.js +108 -279
- package/es/form/utils.js +2 -3
- package/es/gradient-picker/corners.js +55 -0
- package/es/gradient-picker/index.js +191 -0
- package/es/gradient-picker/stops.js +219 -0
- package/es/gradient-picker/types.js +147 -0
- package/es/grid/grid-item.js +25 -116
- package/es/grid/grid.js +40 -151
- package/es/grid/useBreakpoint.js +3 -4
- package/es/icon/index.js +24 -126
- package/es/image/group.js +3 -4
- package/es/image/image-group-context.js +2 -3
- package/es/image/image.js +5 -6
- package/es/image/instance.js +2 -3
- package/es/image/preview.js +4 -5
- package/es/image/utils.js +2 -3
- package/es/index.js +5 -4
- package/es/input/index.js +2 -3
- package/es/input/input-base.js +4 -5
- package/es/input/input-box.js +2 -3
- package/es/input/input-group.js +4 -5
- package/es/input/input.js +3 -4
- package/es/input/textarea.js +3 -4
- package/es/input-number/drag.js +63 -0
- package/es/input-number/index.js +41 -11
- package/es/input-otp/index.js +3 -4
- package/es/input-tag/index.js +5 -6
- package/es/kanban/index.js +31 -168
- package/es/layout/index.js +43 -215
- package/es/layout/layout-context.js +2 -3
- package/es/list-panel/index.js +47 -185
- package/es/loading/index.js +2 -3
- package/es/loading/loading-bar.js +54 -114
- package/es/locale/de.js +2 -3
- package/es/locale/el.js +2 -3
- package/es/locale/en.js +2 -3
- package/es/locale/fr.js +2 -3
- package/es/locale/it.js +2 -3
- package/es/locale/ja.js +2 -3
- package/es/locale/ko.js +2 -3
- package/es/locale/ru.js +2 -3
- package/es/locale/th.js +2 -3
- package/es/locale/uk.js +2 -3
- package/es/locale/vi.js +2 -3
- package/es/locale/zh-CN.js +2 -3
- package/es/locale/zh-TW.js +2 -3
- package/es/mentions/index.js +214 -581
- package/es/menu/menu-context.js +2 -3
- package/es/menu/menu-divider.js +3 -4
- package/es/menu/menu-group.js +3 -4
- package/es/menu/menu-item.js +2 -3
- package/es/menu/menu-keyboard.js +2 -3
- package/es/menu/menu.js +184 -442
- package/es/menu/recursive-menu.js +3 -4
- package/es/menu/sub-menu.js +5 -6
- package/es/message/index.js +2 -3
- package/es/modal/api.js +2 -3
- package/es/modal/modal.js +263 -599
- package/es/modal/toast.js +63 -179
- package/es/node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js +2 -3
- package/es/notice/container.js +2 -3
- package/es/notice/content.js +4 -5
- package/es/notice/index.js +2 -3
- package/es/notice/instance.js +2 -3
- package/es/page/index.js +4 -5
- package/es/page/responsive.js +2 -3
- package/es/page-header/index.js +3 -4
- package/es/popconfirm/index.js +24 -70
- package/es/poptip/index.js +29 -88
- package/es/popup/index.js +8 -6
- package/es/popup/layers.js +2 -3
- package/es/progress/index.js +95 -229
- package/es/qrcode/index.js +3 -4
- package/es/radio/radio-button.js +37 -131
- package/es/radio/radio-group-context.js +2 -3
- package/es/radio/radio-group.js +69 -223
- package/es/radio/radio.js +3 -4
- package/es/rate/index.js +68 -226
- package/es/rate/star.js +38 -129
- package/es/result/index.js +35 -127
- package/es/ripple/index.js +3 -4
- package/es/ripple/types.js +2 -3
- package/es/row-col/col.js +59 -149
- package/es/row-col/row.js +2 -3
- package/es/segmented/index.js +72 -196
- package/es/select/option.js +23 -116
- package/es/select/select.js +9 -10
- package/es/skeleton/skeleton-avatar.js +2 -3
- package/es/skeleton/skeleton-button.js +2 -3
- package/es/skeleton/skeleton-image.js +28 -108
- package/es/skeleton/skeleton-text.js +17 -93
- package/es/skeleton/skeleton.js +46 -133
- package/es/skeleton/use-skeleton-loading.js +3 -4
- package/es/slider/index.js +92 -286
- package/es/slider/thumb.js +43 -133
- package/es/space/index.js +3 -4
- package/es/spin/index.js +2 -3
- package/es/splitter/splitter-panel.js +3 -4
- package/es/splitter/splitter.js +77 -219
- package/es/stat-card/countup.js +46 -141
- package/es/stat-card/rollup.js +27 -105
- package/es/stat-card/stat-card.js +3 -4
- package/es/stat-card/stat-number.js +26 -113
- package/es/stat-card/utils/countup.js +2 -3
- package/es/stat-card/utils/odometer.js +2 -3
- package/es/stat-card/utils/stat-item-key.js +2 -3
- package/es/steps/index.js +45 -123
- package/es/switch/index.js +4 -5
- package/es/table/column-setting.js +43 -139
- package/es/table/index.js +25 -15
- package/es/table/utils.js +3 -5
- package/es/tabs/tab-panel.js +19 -71
- package/es/tabs/tabs.js +6 -7
- package/es/tag/index.js +4 -5
- package/es/time-line/timeline-item.js +3 -4
- package/es/time-line/timeline.js +8 -44
- package/es/tooltip/index.js +41 -142
- package/es/tour/index.js +138 -356
- package/es/transfer/index.js +184 -487
- package/es/tree/index.js +8 -9
- package/es/tree/utils.js +2 -3
- package/es/tree-select/index.js +8 -9
- package/es/typography/index.js +75 -306
- package/es/upload/file-list.js +95 -119
- package/es/upload/index.js +8 -9
- package/es/upload/picture-sort.js +2 -3
- package/es/upload/selector.js +63 -193
- package/es/utils/checked.js +2 -3
- package/es/utils/color.js +2 -3
- package/es/utils/css.js +2 -3
- package/es/utils/focus.js +2 -3
- package/es/utils/number.js +2 -3
- package/es/utils/overlay-order.js +2 -3
- package/es/utils/overlay-stack.js +3 -4
- package/es/utils/placement.js +16 -4
- package/es/utils/popup-arrow.js +45 -0
- package/es/utils/popup.js +2 -3
- package/es/utils/promise.js +2 -3
- package/es/utils/react-node.js +2 -3
- package/es/utils/selection-tags.js +2 -3
- package/es/utils/share.js +2 -3
- package/es/utils/theme.js +2 -3
- package/es/utils/transition.js +2 -3
- package/es/utils/use-value.js +3 -4
- package/es/virtual-list/index.js +49 -187
- package/es/virtual-list/range.js +2 -3
- package/es/watermark/index.js +149 -289
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +1 -1
- package/lib/locale/el.cjs +1 -1
- package/lib/locale/en.cjs +1 -1
- package/lib/locale/fr.cjs +1 -1
- package/lib/locale/it.cjs +1 -1
- package/lib/locale/ja.cjs +1 -1
- package/lib/locale/ko.cjs +1 -1
- package/lib/locale/ru.cjs +1 -1
- package/lib/locale/th.cjs +1 -1
- package/lib/locale/uk.cjs +1 -1
- package/lib/locale/vi.cjs +1 -1
- package/lib/locale/zh-CN.cjs +1 -1
- package/lib/locale/zh-TW.cjs +1 -1
- package/package.json +24 -24
- package/style/base.css +1 -1
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/theme.css +1 -1
- package/types/affix/index.d.cts +1 -1
- package/types/affix/index.d.ts +1 -1
- package/types/anchor/anchor-link.d.cts +1 -1
- package/types/anchor/anchor-link.d.ts +1 -1
- package/types/anchor/anchor.d.cts +1 -1
- package/types/anchor/anchor.d.ts +1 -1
- package/types/back-top/index.d.cts +1 -1
- package/types/back-top/index.d.ts +1 -1
- package/types/carousel/carousel-item.d.cts +1 -1
- package/types/carousel/carousel-item.d.ts +1 -1
- package/types/cascader/index.d.cts +1 -1
- package/types/cascader/index.d.ts +1 -1
- package/types/color-picker/alpha.d.cts +1 -1
- package/types/color-picker/alpha.d.ts +1 -1
- package/types/color-picker/hue.d.cts +1 -1
- package/types/color-picker/hue.d.ts +1 -1
- package/types/color-picker/index.d.cts +3 -2
- package/types/color-picker/index.d.ts +3 -2
- package/types/color-picker/mode.d.cts +1 -1
- package/types/color-picker/mode.d.ts +1 -1
- package/types/color-picker/paint.d.cts +1 -1
- package/types/color-picker/paint.d.ts +1 -1
- package/types/color-picker/presets.d.cts +1 -1
- package/types/color-picker/presets.d.ts +1 -1
- package/types/components.d.cts +3 -0
- package/types/components.d.ts +3 -0
- package/types/date-picker/index.d.cts +2 -2
- package/types/date-picker/index.d.ts +2 -2
- package/types/feature-card/index.d.cts +1 -1
- package/types/feature-card/index.d.ts +1 -1
- package/types/feedback-panel/index.d.cts +1 -1
- package/types/feedback-panel/index.d.ts +1 -1
- package/types/flame-wrap/index.d.cts +1 -1
- package/types/flame-wrap/index.d.ts +1 -1
- package/types/form/form-item.d.cts +1 -1
- package/types/form/form-item.d.ts +1 -1
- package/types/gradient-picker/corners.d.cts +8 -0
- package/types/gradient-picker/corners.d.ts +8 -0
- package/types/gradient-picker/index.d.cts +25 -0
- package/types/gradient-picker/index.d.ts +25 -0
- package/types/gradient-picker/stops.d.cts +12 -0
- package/types/gradient-picker/stops.d.ts +12 -0
- package/types/gradient-picker/types.d.cts +34 -0
- package/types/gradient-picker/types.d.ts +34 -0
- package/types/grid/grid-item.d.cts +1 -1
- package/types/grid/grid-item.d.ts +1 -1
- package/types/grid/grid.d.cts +1 -1
- package/types/grid/grid.d.ts +1 -1
- package/types/image/group.d.cts +1 -1
- package/types/image/group.d.ts +1 -1
- package/types/input-number/drag.d.cts +9 -0
- package/types/input-number/drag.d.ts +9 -0
- package/types/input-number/index.d.cts +1 -0
- package/types/input-number/index.d.ts +1 -0
- package/types/kanban/index.d.cts +1 -1
- package/types/kanban/index.d.ts +1 -1
- package/types/list-panel/index.d.cts +1 -1
- package/types/list-panel/index.d.ts +1 -1
- package/types/loading/loading-bar.d.cts +1 -1
- package/types/loading/loading-bar.d.ts +1 -1
- package/types/modal/toast.d.cts +1 -1
- package/types/modal/toast.d.ts +1 -1
- package/types/notice/content.d.cts +2 -2
- package/types/notice/content.d.ts +2 -2
- package/types/page-header/index.d.cts +1 -1
- package/types/page-header/index.d.ts +1 -1
- package/types/popconfirm/index.d.cts +1 -0
- package/types/popconfirm/index.d.ts +1 -0
- package/types/poptip/index.d.cts +1 -0
- package/types/poptip/index.d.ts +1 -0
- package/types/popup/index.d.cts +1 -0
- package/types/popup/index.d.ts +1 -0
- package/types/result/index.d.cts +1 -1
- package/types/result/index.d.ts +1 -1
- package/types/ripple/index.d.cts +1 -1
- package/types/ripple/index.d.ts +1 -1
- package/types/segmented/index.d.cts +2 -1
- package/types/segmented/index.d.ts +2 -1
- package/types/slider/index.d.cts +1 -1
- package/types/slider/index.d.ts +1 -1
- package/types/splitter/splitter-panel.d.cts +1 -1
- package/types/splitter/splitter-panel.d.ts +1 -1
- package/types/splitter/splitter.d.cts +1 -1
- package/types/splitter/splitter.d.ts +1 -1
- package/types/stat-card/countup.d.cts +1 -1
- package/types/stat-card/countup.d.ts +1 -1
- package/types/stat-card/rollup.d.cts +1 -1
- package/types/stat-card/rollup.d.ts +1 -1
- package/types/stat-card/stat-card.d.cts +1 -1
- package/types/stat-card/stat-card.d.ts +1 -1
- package/types/stat-card/stat-number.d.cts +1 -1
- package/types/stat-card/stat-number.d.ts +1 -1
- package/types/table/column-setting.d.cts +1 -1
- package/types/table/column-setting.d.ts +1 -1
- package/types/table/index.d.cts +1 -1
- package/types/table/index.d.ts +1 -1
- package/types/time-line/timeline-item.d.cts +1 -1
- package/types/time-line/timeline-item.d.ts +1 -1
- package/types/time-line/timeline.d.cts +1 -1
- package/types/time-line/timeline.d.ts +1 -1
- package/types/tooltip/index.d.cts +1 -0
- package/types/tooltip/index.d.ts +1 -0
- package/types/transfer/index.d.cts +1 -1
- package/types/transfer/index.d.ts +1 -1
- package/types/tree-select/index.d.cts +1 -1
- package/types/tree-select/index.d.ts +1 -1
- package/types/upload/file-list.d.cts +1 -1
- package/types/upload/file-list.d.ts +1 -1
- package/types/upload/selector.d.cts +1 -1
- package/types/upload/selector.d.ts +1 -1
- package/types/utils/placement.d.cts +2 -1
- package/types/utils/placement.d.ts +2 -1
- package/types/utils/popup-arrow.d.cts +5 -0
- package/types/utils/popup-arrow.d.ts +5 -0
- package/types/utils/selection-tags.d.cts +1 -1
- package/types/utils/selection-tags.d.ts +1 -1
- package/types/watermark/index.d.cts +1 -1
- package/types/watermark/index.d.ts +1 -1
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.3.0
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
6
6
|
* Author: Qiu / https://chuchur.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { useValue } from "../utils/use-value.js";
|
|
9
10
|
import { resolvePaintedTheme, useFormAppearance } from "../config/use-config-appearance.js";
|
|
11
|
+
import { createFormFieldComponent } from "../form/field-context.js";
|
|
10
12
|
import { Check } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
11
13
|
import Icon from "../icon/index.js";
|
|
12
|
-
import { useValue } from "../utils/use-value.js";
|
|
13
|
-
import { createFormFieldComponent } from "../form/field-context.js";
|
|
14
14
|
import { CheckCardGroupContext } from "./context.js";
|
|
15
|
-
import { c } from "react/compiler-runtime";
|
|
16
15
|
import clsx from "clsx";
|
|
17
16
|
import React, { useContext, useEffect, useRef } from "react";
|
|
18
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
|
|
18
|
+
// components/check-card/check-card.tsx
|
|
20
19
|
var PAINTED_THEMES = [
|
|
21
20
|
"fill",
|
|
22
21
|
"outline",
|
|
@@ -24,308 +23,120 @@ var PAINTED_THEMES = [
|
|
|
24
23
|
"solid",
|
|
25
24
|
"dashed"
|
|
26
25
|
];
|
|
27
|
-
var CheckCard = React.forwardRef((
|
|
28
|
-
const $ = c(84);
|
|
29
|
-
let checked;
|
|
30
|
-
let checkedSymbol;
|
|
31
|
-
let children;
|
|
32
|
-
let className;
|
|
33
|
-
let description;
|
|
34
|
-
let onChange;
|
|
35
|
-
let rest;
|
|
36
|
-
let shapeProp;
|
|
37
|
-
let sizeProp;
|
|
38
|
-
let symbol;
|
|
39
|
-
let t1;
|
|
40
|
-
let t2;
|
|
41
|
-
let t3;
|
|
42
|
-
let themeProp;
|
|
43
|
-
let title;
|
|
44
|
-
let value;
|
|
45
|
-
if ($[0] !== t0) {
|
|
46
|
-
({checked, value, title, description, symbol, checkedSymbol, showIndicator: t1, disabled: t2, readOnly: t3, theme: themeProp, size: sizeProp, shape: shapeProp, onChange, className, children, ...rest} = t0);
|
|
47
|
-
$[0] = t0;
|
|
48
|
-
$[1] = checked;
|
|
49
|
-
$[2] = checkedSymbol;
|
|
50
|
-
$[3] = children;
|
|
51
|
-
$[4] = className;
|
|
52
|
-
$[5] = description;
|
|
53
|
-
$[6] = onChange;
|
|
54
|
-
$[7] = rest;
|
|
55
|
-
$[8] = shapeProp;
|
|
56
|
-
$[9] = sizeProp;
|
|
57
|
-
$[10] = symbol;
|
|
58
|
-
$[11] = t1;
|
|
59
|
-
$[12] = t2;
|
|
60
|
-
$[13] = t3;
|
|
61
|
-
$[14] = themeProp;
|
|
62
|
-
$[15] = title;
|
|
63
|
-
$[16] = value;
|
|
64
|
-
} else {
|
|
65
|
-
checked = $[1];
|
|
66
|
-
checkedSymbol = $[2];
|
|
67
|
-
children = $[3];
|
|
68
|
-
className = $[4];
|
|
69
|
-
description = $[5];
|
|
70
|
-
onChange = $[6];
|
|
71
|
-
rest = $[7];
|
|
72
|
-
shapeProp = $[8];
|
|
73
|
-
sizeProp = $[9];
|
|
74
|
-
symbol = $[10];
|
|
75
|
-
t1 = $[11];
|
|
76
|
-
t2 = $[12];
|
|
77
|
-
t3 = $[13];
|
|
78
|
-
themeProp = $[14];
|
|
79
|
-
title = $[15];
|
|
80
|
-
value = $[16];
|
|
81
|
-
}
|
|
82
|
-
const showIndicator = t1 === void 0 ? true : t1;
|
|
83
|
-
const disabled = t2 === void 0 ? false : t2;
|
|
84
|
-
const readOnly = t3 === void 0 ? false : t3;
|
|
26
|
+
var CheckCard = React.forwardRef(({ checked, value, title, description, symbol, checkedSymbol, showIndicator = true, disabled = false, readOnly = false, theme: themeProp, size: sizeProp, shape: shapeProp, onChange, className, children, ...rest }, forwardedRef) => {
|
|
85
27
|
const inheritedAppearance = useFormAppearance();
|
|
86
28
|
const size = sizeProp ?? inheritedAppearance.size ?? "medium";
|
|
87
29
|
const shape = shapeProp ?? inheritedAppearance.shape ?? "round";
|
|
88
30
|
const group = useContext(CheckCardGroupContext);
|
|
89
31
|
const rootRef = useRef(null);
|
|
90
|
-
const [localChecked, setLocalChecked] = useValue(checked,
|
|
32
|
+
const [localChecked, setLocalChecked] = useValue(checked, (next) => next ?? false);
|
|
91
33
|
const grouped = !!group && value !== void 0;
|
|
92
34
|
const isChecked = grouped ? group.value === value : localChecked;
|
|
93
35
|
const isDisabled = disabled || !!group?.disabled;
|
|
94
36
|
const isReadOnly = readOnly || !!group?.readOnly;
|
|
95
|
-
|
|
96
|
-
if ($[17] !== group?.theme || $[18] !== inheritedAppearance || $[19] !== themeProp) {
|
|
97
|
-
t4 = resolvePaintedTheme(themeProp ?? group?.theme ?? inheritedAppearance.theme, PAINTED_THEMES) ?? "outline";
|
|
98
|
-
$[17] = group?.theme;
|
|
99
|
-
$[18] = inheritedAppearance;
|
|
100
|
-
$[19] = themeProp;
|
|
101
|
-
$[20] = t4;
|
|
102
|
-
} else t4 = $[20];
|
|
103
|
-
const currentTheme = t4;
|
|
37
|
+
const currentTheme = resolvePaintedTheme(themeProp ?? group?.theme ?? inheritedAppearance.theme, PAINTED_THEMES) ?? "outline";
|
|
104
38
|
const currentSize = sizeProp ?? group?.size ?? size;
|
|
105
39
|
const currentShape = shapeProp ?? group?.shape ?? shape;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
$[27] = t6;
|
|
129
|
-
} else {
|
|
130
|
-
t5 = $[26];
|
|
131
|
-
t6 = $[27];
|
|
132
|
-
}
|
|
133
|
-
useEffect(t5, t6);
|
|
134
|
-
let t7;
|
|
135
|
-
if ($[28] !== forwardedRef) {
|
|
136
|
-
t7 = (element) => {
|
|
137
|
-
rootRef.current = element;
|
|
138
|
-
if (typeof forwardedRef === "function") forwardedRef(element);
|
|
139
|
-
else if (forwardedRef) forwardedRef.current = element;
|
|
140
|
-
};
|
|
141
|
-
$[28] = forwardedRef;
|
|
142
|
-
$[29] = t7;
|
|
143
|
-
} else t7 = $[29];
|
|
144
|
-
const setRefs = t7;
|
|
145
|
-
let t8;
|
|
146
|
-
if ($[30] !== group || $[31] !== grouped || $[32] !== isChecked || $[33] !== isDisabled || $[34] !== isReadOnly || $[35] !== onChange || $[36] !== setLocalChecked || $[37] !== value) {
|
|
147
|
-
t8 = () => {
|
|
148
|
-
if (isDisabled || isReadOnly) return;
|
|
149
|
-
if (grouped && value !== void 0) {
|
|
150
|
-
if (isChecked) return;
|
|
151
|
-
group.select(value);
|
|
152
|
-
onChange?.({
|
|
153
|
-
checked: true,
|
|
154
|
-
value
|
|
155
|
-
});
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
const next_0 = !isChecked;
|
|
159
|
-
setLocalChecked(next_0);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (grouped && value !== void 0 && rootRef.current) {
|
|
42
|
+
group?.register(value, rootRef.current, isDisabled || isReadOnly);
|
|
43
|
+
return () => group.unregister(value);
|
|
44
|
+
}
|
|
45
|
+
}, [
|
|
46
|
+
group,
|
|
47
|
+
grouped,
|
|
48
|
+
isDisabled,
|
|
49
|
+
isReadOnly,
|
|
50
|
+
value
|
|
51
|
+
]);
|
|
52
|
+
const setRefs = (element) => {
|
|
53
|
+
rootRef.current = element;
|
|
54
|
+
if (typeof forwardedRef === "function") forwardedRef(element);
|
|
55
|
+
else if (forwardedRef) forwardedRef.current = element;
|
|
56
|
+
};
|
|
57
|
+
const select = () => {
|
|
58
|
+
if (isDisabled || isReadOnly) return;
|
|
59
|
+
if (grouped && value !== void 0) {
|
|
60
|
+
if (isChecked) return;
|
|
61
|
+
group.select(value);
|
|
160
62
|
onChange?.({
|
|
161
|
-
checked:
|
|
63
|
+
checked: true,
|
|
162
64
|
value
|
|
163
65
|
});
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
].includes(event.key)) {
|
|
192
|
-
event.preventDefault();
|
|
193
|
-
group.selectRelative(value, event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : -1);
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
$[39] = group;
|
|
197
|
-
$[40] = grouped;
|
|
198
|
-
$[41] = isDisabled;
|
|
199
|
-
$[42] = isReadOnly;
|
|
200
|
-
$[43] = select;
|
|
201
|
-
$[44] = value;
|
|
202
|
-
$[45] = t9;
|
|
203
|
-
} else t9 = $[45];
|
|
204
|
-
const handleKeyDown = t9;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const next_0 = !isChecked;
|
|
69
|
+
setLocalChecked(next_0);
|
|
70
|
+
onChange?.({
|
|
71
|
+
checked: next_0,
|
|
72
|
+
value
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
const handleKeyDown = (event) => {
|
|
76
|
+
if (isDisabled || isReadOnly) return;
|
|
77
|
+
if (event.key === " " || event.key === "Enter") {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
select();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (!grouped || value === void 0) return;
|
|
83
|
+
if ([
|
|
84
|
+
"ArrowRight",
|
|
85
|
+
"ArrowDown",
|
|
86
|
+
"ArrowLeft",
|
|
87
|
+
"ArrowUp"
|
|
88
|
+
].includes(event.key)) {
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
group.selectRelative(value, event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : -1);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
205
93
|
const symbolType = isChecked ? checkedSymbol ?? symbol : symbol;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
} else t10 = $[47];
|
|
215
|
-
const symbolNode = t10;
|
|
216
|
-
const t11 = `k-check-card-${currentTheme}`;
|
|
217
|
-
const t12 = `k-check-card-${currentSize}`;
|
|
218
|
-
const t13 = `k-check-card-${currentShape}`;
|
|
219
|
-
const t14 = !!symbolNode;
|
|
220
|
-
let t15;
|
|
221
|
-
if ($[48] !== className || $[49] !== isChecked || $[50] !== isDisabled || $[51] !== isReadOnly || $[52] !== t11 || $[53] !== t12 || $[54] !== t13 || $[55] !== t14) {
|
|
222
|
-
t15 = clsx("k-check-card", t11, t12, t13, {
|
|
94
|
+
const symbolNode = symbolType ? /* @__PURE__ */ jsx(Icon, {
|
|
95
|
+
className: "k-check-card-symbol-icon",
|
|
96
|
+
type: symbolType
|
|
97
|
+
}) : null;
|
|
98
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
99
|
+
...rest,
|
|
100
|
+
ref: setRefs,
|
|
101
|
+
className: clsx("k-check-card", `k-check-card-${currentTheme}`, `k-check-card-${currentSize}`, `k-check-card-${currentShape}`, {
|
|
223
102
|
"is-checked": isChecked,
|
|
224
103
|
"is-disabled": isDisabled,
|
|
225
104
|
"is-readonly": isReadOnly,
|
|
226
|
-
"has-symbol":
|
|
227
|
-
}, className)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
t21 = description !== void 0 ? /* @__PURE__ */ jsx("div", {
|
|
262
|
-
className: "k-check-card-description",
|
|
263
|
-
children: description
|
|
264
|
-
}) : null;
|
|
265
|
-
$[61] = description;
|
|
266
|
-
$[62] = t21;
|
|
267
|
-
} else t21 = $[62];
|
|
268
|
-
let t22;
|
|
269
|
-
if ($[63] !== children || $[64] !== t20 || $[65] !== t21) {
|
|
270
|
-
t22 = /* @__PURE__ */ jsxs("div", {
|
|
271
|
-
className: "k-check-card-content",
|
|
272
|
-
children: [
|
|
273
|
-
t20,
|
|
274
|
-
t21,
|
|
275
|
-
children
|
|
276
|
-
]
|
|
277
|
-
});
|
|
278
|
-
$[63] = children;
|
|
279
|
-
$[64] = t20;
|
|
280
|
-
$[65] = t21;
|
|
281
|
-
$[66] = t22;
|
|
282
|
-
} else t22 = $[66];
|
|
283
|
-
let t23;
|
|
284
|
-
if ($[67] !== isChecked || $[68] !== showIndicator) {
|
|
285
|
-
t23 = showIndicator ? /* @__PURE__ */ jsx("span", {
|
|
286
|
-
className: "k-check-card-indicator",
|
|
287
|
-
"aria-hidden": "true",
|
|
288
|
-
children: isChecked ? /* @__PURE__ */ jsx(Icon, { type: Check }) : null
|
|
289
|
-
}) : null;
|
|
290
|
-
$[67] = isChecked;
|
|
291
|
-
$[68] = showIndicator;
|
|
292
|
-
$[69] = t23;
|
|
293
|
-
} else t23 = $[69];
|
|
294
|
-
let t24;
|
|
295
|
-
if ($[70] !== handleKeyDown || $[71] !== isChecked || $[72] !== isDisabled || $[73] !== rest || $[74] !== select || $[75] !== setRefs || $[76] !== t15 || $[77] !== t16 || $[78] !== t17 || $[79] !== t18 || $[80] !== t19 || $[81] !== t22 || $[82] !== t23) {
|
|
296
|
-
t24 = /* @__PURE__ */ jsxs("div", {
|
|
297
|
-
...rest,
|
|
298
|
-
ref: setRefs,
|
|
299
|
-
className: t15,
|
|
300
|
-
role: t16,
|
|
301
|
-
"aria-checked": isChecked,
|
|
302
|
-
"aria-disabled": isDisabled,
|
|
303
|
-
"aria-readonly": t17,
|
|
304
|
-
tabIndex: t18,
|
|
305
|
-
onClick: select,
|
|
306
|
-
onKeyDown: handleKeyDown,
|
|
307
|
-
children: [
|
|
308
|
-
t19,
|
|
309
|
-
t22,
|
|
310
|
-
t23
|
|
311
|
-
]
|
|
312
|
-
});
|
|
313
|
-
$[70] = handleKeyDown;
|
|
314
|
-
$[71] = isChecked;
|
|
315
|
-
$[72] = isDisabled;
|
|
316
|
-
$[73] = rest;
|
|
317
|
-
$[74] = select;
|
|
318
|
-
$[75] = setRefs;
|
|
319
|
-
$[76] = t15;
|
|
320
|
-
$[77] = t16;
|
|
321
|
-
$[78] = t17;
|
|
322
|
-
$[79] = t18;
|
|
323
|
-
$[80] = t19;
|
|
324
|
-
$[81] = t22;
|
|
325
|
-
$[82] = t23;
|
|
326
|
-
$[83] = t24;
|
|
327
|
-
} else t24 = $[83];
|
|
328
|
-
return t24;
|
|
105
|
+
"has-symbol": !!symbolNode
|
|
106
|
+
}, className),
|
|
107
|
+
role: grouped ? "radio" : "checkbox",
|
|
108
|
+
"aria-checked": isChecked,
|
|
109
|
+
"aria-disabled": isDisabled,
|
|
110
|
+
"aria-readonly": isReadOnly || void 0,
|
|
111
|
+
tabIndex: isDisabled ? -1 : isChecked || !grouped ? 0 : -1,
|
|
112
|
+
onClick: select,
|
|
113
|
+
onKeyDown: handleKeyDown,
|
|
114
|
+
children: [
|
|
115
|
+
symbolNode ? /* @__PURE__ */ jsx("div", {
|
|
116
|
+
className: "k-check-card-symbol",
|
|
117
|
+
children: symbolNode
|
|
118
|
+
}) : null,
|
|
119
|
+
/* @__PURE__ */ jsxs("div", {
|
|
120
|
+
className: "k-check-card-content",
|
|
121
|
+
children: [
|
|
122
|
+
title !== void 0 ? /* @__PURE__ */ jsx("div", {
|
|
123
|
+
className: "k-check-card-title",
|
|
124
|
+
children: title
|
|
125
|
+
}) : null,
|
|
126
|
+
description !== void 0 ? /* @__PURE__ */ jsx("div", {
|
|
127
|
+
className: "k-check-card-description",
|
|
128
|
+
children: description
|
|
129
|
+
}) : null,
|
|
130
|
+
children
|
|
131
|
+
]
|
|
132
|
+
}),
|
|
133
|
+
showIndicator ? /* @__PURE__ */ jsx("span", {
|
|
134
|
+
className: "k-check-card-indicator",
|
|
135
|
+
"aria-hidden": "true",
|
|
136
|
+
children: isChecked ? /* @__PURE__ */ jsx(Icon, { type: Check }) : null
|
|
137
|
+
}) : null
|
|
138
|
+
]
|
|
139
|
+
});
|
|
329
140
|
});
|
|
330
141
|
CheckCard.displayName = "CheckCard";
|
|
331
142
|
var check_card_default = createFormFieldComponent(CheckCard, {
|
|
@@ -333,8 +144,4 @@ var check_card_default = createFormFieldComponent(CheckCard, {
|
|
|
333
144
|
getFieldValue: (value) => value === true || value === 1 || value === "1",
|
|
334
145
|
getChangeValue: (event) => event.checked
|
|
335
146
|
});
|
|
336
|
-
function _temp(next) {
|
|
337
|
-
return next ?? false;
|
|
338
|
-
}
|
|
339
|
-
//#endregion
|
|
340
147
|
export { check_card_default as default };
|
package/es/check-card/context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.3.0
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createContext } from "react";
|
|
10
|
-
|
|
10
|
+
// components/check-card/context.ts
|
|
11
11
|
var CheckCardGroupContext = createContext(null);
|
|
12
|
-
//#endregion
|
|
13
12
|
export { CheckCardGroupContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.3.0
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createContext } from "react";
|
|
10
|
-
|
|
10
|
+
// components/checkbox/checkbox-group-context.ts
|
|
11
11
|
var CheckboxGroupContext = createContext(null);
|
|
12
|
-
//#endregion
|
|
13
12
|
export { CheckboxGroupContext };
|
|
@@ -1,168 +1,64 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.3.0
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
6
6
|
* Author: Qiu / https://chuchur.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { useFormAppearance } from "../config/use-config-appearance.js";
|
|
10
9
|
import { useValue } from "../utils/use-value.js";
|
|
10
|
+
import { useFormAppearance } from "../config/use-config-appearance.js";
|
|
11
11
|
import { createFormFieldComponent } from "../form/field-context.js";
|
|
12
|
-
import { CheckboxGroupContext } from "./checkbox-group-context.js";
|
|
13
12
|
import checkbox_default from "./checkbox.js";
|
|
14
|
-
import {
|
|
13
|
+
import { CheckboxGroupContext } from "./checkbox-group-context.js";
|
|
15
14
|
import clsx from "clsx";
|
|
16
15
|
import "react";
|
|
17
16
|
import { jsx } from "react/jsx-runtime";
|
|
18
|
-
|
|
19
|
-
var CheckboxGroup = (
|
|
20
|
-
const $ = c(41);
|
|
21
|
-
let children;
|
|
22
|
-
let onChange;
|
|
23
|
-
let options;
|
|
24
|
-
let rest;
|
|
25
|
-
let sizeProp;
|
|
26
|
-
let t1;
|
|
27
|
-
let t2;
|
|
28
|
-
let t3;
|
|
29
|
-
let t4;
|
|
30
|
-
let themeProp;
|
|
31
|
-
let value;
|
|
32
|
-
if ($[0] !== t0) {
|
|
33
|
-
({value, theme: themeProp, disabled: t1, readOnly: t2, options, direction: t3, size: sizeProp, onChange, children, className: t4, ...rest} = t0);
|
|
34
|
-
$[0] = t0;
|
|
35
|
-
$[1] = children;
|
|
36
|
-
$[2] = onChange;
|
|
37
|
-
$[3] = options;
|
|
38
|
-
$[4] = rest;
|
|
39
|
-
$[5] = sizeProp;
|
|
40
|
-
$[6] = t1;
|
|
41
|
-
$[7] = t2;
|
|
42
|
-
$[8] = t3;
|
|
43
|
-
$[9] = t4;
|
|
44
|
-
$[10] = themeProp;
|
|
45
|
-
$[11] = value;
|
|
46
|
-
} else {
|
|
47
|
-
children = $[1];
|
|
48
|
-
onChange = $[2];
|
|
49
|
-
options = $[3];
|
|
50
|
-
rest = $[4];
|
|
51
|
-
sizeProp = $[5];
|
|
52
|
-
t1 = $[6];
|
|
53
|
-
t2 = $[7];
|
|
54
|
-
t3 = $[8];
|
|
55
|
-
t4 = $[9];
|
|
56
|
-
themeProp = $[10];
|
|
57
|
-
value = $[11];
|
|
58
|
-
}
|
|
59
|
-
const disabled = t1 === void 0 ? false : t1;
|
|
60
|
-
const readOnly = t2 === void 0 ? false : t2;
|
|
61
|
-
const direction = t3 === void 0 ? "horizontal" : t3;
|
|
62
|
-
const className = t4 === void 0 ? "" : t4;
|
|
17
|
+
// components/checkbox/checkbox-group.tsx
|
|
18
|
+
var CheckboxGroup = ({ value, theme: themeProp, disabled = false, readOnly = false, options, direction = "horizontal", size: sizeProp, onChange, children, className = "", ...rest }) => {
|
|
63
19
|
const inheritedAppearance = useFormAppearance();
|
|
64
20
|
const theme = themeProp ?? inheritedAppearance.theme ?? "fill";
|
|
65
21
|
const size = sizeProp ?? inheritedAppearance.size;
|
|
66
|
-
const [innerValue, setInnerValue] = useValue(value,
|
|
22
|
+
const [innerValue, setInnerValue] = useValue(value, (next) => next ?? []);
|
|
67
23
|
const currentValue = innerValue;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const t6 = direction === "vertical";
|
|
91
|
-
let t7;
|
|
92
|
-
if ($[17] !== className || $[18] !== t6) {
|
|
93
|
-
t7 = clsx("k-checkbox-group", { "k-checkbox-group-vertical": t6 }, className);
|
|
94
|
-
$[17] = className;
|
|
95
|
-
$[18] = t6;
|
|
96
|
-
$[19] = t7;
|
|
97
|
-
} else t7 = $[19];
|
|
98
|
-
const classes = t7;
|
|
99
|
-
let t8;
|
|
100
|
-
if ($[20] !== children || $[21] !== disabled || $[22] !== options || $[23] !== readOnly) {
|
|
101
|
-
t8 = options && options.length > 0 ? options.map((option) => /* @__PURE__ */ jsx(checkbox_default, {
|
|
102
|
-
label: option.label,
|
|
103
|
-
value: option.value,
|
|
104
|
-
disabled: disabled || option.disabled,
|
|
105
|
-
readOnly: readOnly || option.readOnly
|
|
106
|
-
}, option.value)) : children;
|
|
107
|
-
$[20] = children;
|
|
108
|
-
$[21] = disabled;
|
|
109
|
-
$[22] = options;
|
|
110
|
-
$[23] = readOnly;
|
|
111
|
-
$[24] = t8;
|
|
112
|
-
} else t8 = $[24];
|
|
113
|
-
const content = t8;
|
|
114
|
-
let t9;
|
|
115
|
-
if ($[25] !== currentValue || $[26] !== disabled || $[27] !== handleCheckboxChange || $[28] !== readOnly || $[29] !== size || $[30] !== theme) {
|
|
116
|
-
t9 = {
|
|
24
|
+
const handleCheckboxChange = (event) => {
|
|
25
|
+
if (readOnly) return;
|
|
26
|
+
if (event.value === void 0) return;
|
|
27
|
+
const checked = event.checked;
|
|
28
|
+
const val = event.value;
|
|
29
|
+
const nextValue = [...currentValue];
|
|
30
|
+
const index = nextValue.indexOf(val);
|
|
31
|
+
if (checked) {
|
|
32
|
+
if (index === -1) nextValue.push(val);
|
|
33
|
+
} else if (index > -1) nextValue.splice(index, 1);
|
|
34
|
+
setInnerValue(nextValue);
|
|
35
|
+
onChange?.(nextValue);
|
|
36
|
+
};
|
|
37
|
+
const classes = clsx("k-checkbox-group", { "k-checkbox-group-vertical": direction === "vertical" }, className);
|
|
38
|
+
const content = options && options.length > 0 ? options.map((option) => /* @__PURE__ */ jsx(checkbox_default, {
|
|
39
|
+
label: option.label,
|
|
40
|
+
value: option.value,
|
|
41
|
+
disabled: disabled || option.disabled,
|
|
42
|
+
readOnly: readOnly || option.readOnly
|
|
43
|
+
}, option.value)) : children;
|
|
44
|
+
return /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, {
|
|
45
|
+
value: {
|
|
117
46
|
value: currentValue,
|
|
118
47
|
disabled,
|
|
119
48
|
readOnly,
|
|
120
49
|
theme,
|
|
121
50
|
size,
|
|
122
51
|
onChange: handleCheckboxChange
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
$[26] = disabled;
|
|
126
|
-
$[27] = handleCheckboxChange;
|
|
127
|
-
$[28] = readOnly;
|
|
128
|
-
$[29] = size;
|
|
129
|
-
$[30] = theme;
|
|
130
|
-
$[31] = t9;
|
|
131
|
-
} else t9 = $[31];
|
|
132
|
-
const t10 = disabled || void 0;
|
|
133
|
-
const t11 = readOnly || void 0;
|
|
134
|
-
let t12;
|
|
135
|
-
if ($[32] !== classes || $[33] !== content || $[34] !== rest || $[35] !== t10 || $[36] !== t11) {
|
|
136
|
-
t12 = /* @__PURE__ */ jsx("div", {
|
|
52
|
+
},
|
|
53
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
137
54
|
className: classes,
|
|
138
55
|
role: "group",
|
|
139
|
-
"aria-disabled":
|
|
140
|
-
"aria-readonly":
|
|
56
|
+
"aria-disabled": disabled || void 0,
|
|
57
|
+
"aria-readonly": readOnly || void 0,
|
|
141
58
|
...rest,
|
|
142
59
|
children: content
|
|
143
|
-
})
|
|
144
|
-
|
|
145
|
-
$[33] = content;
|
|
146
|
-
$[34] = rest;
|
|
147
|
-
$[35] = t10;
|
|
148
|
-
$[36] = t11;
|
|
149
|
-
$[37] = t12;
|
|
150
|
-
} else t12 = $[37];
|
|
151
|
-
let t13;
|
|
152
|
-
if ($[38] !== t12 || $[39] !== t9) {
|
|
153
|
-
t13 = /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, {
|
|
154
|
-
value: t9,
|
|
155
|
-
children: t12
|
|
156
|
-
});
|
|
157
|
-
$[38] = t12;
|
|
158
|
-
$[39] = t9;
|
|
159
|
-
$[40] = t13;
|
|
160
|
-
} else t13 = $[40];
|
|
161
|
-
return t13;
|
|
60
|
+
})
|
|
61
|
+
});
|
|
162
62
|
};
|
|
163
63
|
var checkbox_group_default = createFormFieldComponent(CheckboxGroup);
|
|
164
|
-
function _temp(next) {
|
|
165
|
-
return next ?? [];
|
|
166
|
-
}
|
|
167
|
-
//#endregion
|
|
168
64
|
export { checkbox_group_default as default };
|