@sunggang/ui-lib 0.2.98 → 0.2.99
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/BaseCkeditor.esm.js +0 -3
- package/index.esm.js +0 -3
- package/index.esm2.js +47 -53
- package/index.esm3.js +0 -3
- package/package.json +1 -1
- package/src/lib/Form/index.d.ts +0 -3
package/BaseCkeditor.esm.js
CHANGED
|
@@ -18,9 +18,6 @@ import 'react-date-range/dist/locale/index.js';
|
|
|
18
18
|
import 'date-fns/addDays/index.js';
|
|
19
19
|
import 'date-fns/format/index.js';
|
|
20
20
|
import '@emotion/react';
|
|
21
|
-
import '@mui/material/Radio';
|
|
22
|
-
import '@mui/material/RadioGroup';
|
|
23
|
-
import '@mui/material/FormControlLabel';
|
|
24
21
|
import '@tanstack/react-table';
|
|
25
22
|
import '@radix-ui/react-dropdown-menu';
|
|
26
23
|
import '@radix-ui/react-icons';
|
package/index.esm.js
CHANGED
|
@@ -18,9 +18,6 @@ import 'react-date-range/dist/locale/index.js';
|
|
|
18
18
|
import 'date-fns/addDays/index.js';
|
|
19
19
|
import 'date-fns/format/index.js';
|
|
20
20
|
import '@emotion/react';
|
|
21
|
-
import '@mui/material/Radio';
|
|
22
|
-
import '@mui/material/RadioGroup';
|
|
23
|
-
import '@mui/material/FormControlLabel';
|
|
24
21
|
import '@tanstack/react-table';
|
|
25
22
|
import '@radix-ui/react-dropdown-menu';
|
|
26
23
|
import '@radix-ui/react-icons';
|
package/index.esm2.js
CHANGED
|
@@ -18,9 +18,6 @@ import * as locales from 'react-date-range/dist/locale/index.js';
|
|
|
18
18
|
import addDays from 'date-fns/addDays/index.js';
|
|
19
19
|
import format$1 from 'date-fns/format/index.js';
|
|
20
20
|
import { keyframes, jsx as jsx$1, css as css$2 } from '@emotion/react';
|
|
21
|
-
import Radio from '@mui/material/Radio';
|
|
22
|
-
import RadioGroup from '@mui/material/RadioGroup';
|
|
23
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
24
21
|
import { useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, flexRender } from '@tanstack/react-table';
|
|
25
22
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
26
23
|
import { ChevronRightIcon, CheckIcon, DotFilledIcon } from '@radix-ui/react-icons';
|
|
@@ -47280,53 +47277,51 @@ var City = function(param) {
|
|
|
47280
47277
|
// </div>
|
|
47281
47278
|
// );
|
|
47282
47279
|
// };
|
|
47283
|
-
|
|
47284
|
-
|
|
47285
|
-
|
|
47286
|
-
|
|
47287
|
-
|
|
47288
|
-
|
|
47289
|
-
|
|
47290
|
-
|
|
47291
|
-
|
|
47292
|
-
|
|
47293
|
-
|
|
47294
|
-
|
|
47295
|
-
|
|
47296
|
-
|
|
47297
|
-
|
|
47298
|
-
|
|
47299
|
-
|
|
47300
|
-
|
|
47301
|
-
|
|
47302
|
-
|
|
47303
|
-
|
|
47304
|
-
|
|
47305
|
-
|
|
47306
|
-
|
|
47307
|
-
|
|
47308
|
-
|
|
47309
|
-
|
|
47310
|
-
|
|
47311
|
-
|
|
47312
|
-
|
|
47313
|
-
|
|
47314
|
-
|
|
47315
|
-
|
|
47316
|
-
|
|
47317
|
-
|
|
47318
|
-
|
|
47319
|
-
|
|
47320
|
-
|
|
47321
|
-
|
|
47322
|
-
|
|
47323
|
-
|
|
47324
|
-
|
|
47325
|
-
|
|
47326
|
-
|
|
47327
|
-
|
|
47328
|
-
});
|
|
47329
|
-
};
|
|
47280
|
+
// const RadioField = ({ item }) => {
|
|
47281
|
+
// const {
|
|
47282
|
+
// control,
|
|
47283
|
+
// formState: { errors },
|
|
47284
|
+
// } = useFormContext();
|
|
47285
|
+
// return (
|
|
47286
|
+
// <div className={['w-full min-h-[6rem] h-fit', item?.className].join(' ')}>
|
|
47287
|
+
// {/* 顯示標籤 */}
|
|
47288
|
+
// {item?.label && <FieldLabel item={item} />}
|
|
47289
|
+
// {/* 渲染 RadioGroup */}
|
|
47290
|
+
// <Controller
|
|
47291
|
+
// name={item?.name}
|
|
47292
|
+
// control={control}
|
|
47293
|
+
// rules={
|
|
47294
|
+
// item?.validateOption?.required
|
|
47295
|
+
// ? { required: item?.errorText }
|
|
47296
|
+
// : undefined
|
|
47297
|
+
// }
|
|
47298
|
+
// defaultValue={item?.defaultValue}
|
|
47299
|
+
// render={({ field }) => (
|
|
47300
|
+
// <RadioGroup
|
|
47301
|
+
// {...field}
|
|
47302
|
+
// row={item?.direction === 'horizontal'} // 支援水平或垂直方向
|
|
47303
|
+
// aria-labelledby={`${item?.id}-radio-group-label`}
|
|
47304
|
+
// >
|
|
47305
|
+
// {item?.radioOptions?.map((option, index) => (
|
|
47306
|
+
// <FormControlLabel
|
|
47307
|
+
// key={index}
|
|
47308
|
+
// value={option?.value}
|
|
47309
|
+
// control={<Radio {...item?.muiProps} />}
|
|
47310
|
+
// label={option?.label}
|
|
47311
|
+
// disabled={option?.disabled || false}
|
|
47312
|
+
// />
|
|
47313
|
+
// ))}
|
|
47314
|
+
// </RadioGroup>
|
|
47315
|
+
// )}
|
|
47316
|
+
// />
|
|
47317
|
+
// {validateMsg(errors, item) && (
|
|
47318
|
+
// <div className="pt-1 text-xs text-[#EF5533]">
|
|
47319
|
+
// *{validateMsg(errors, item)}
|
|
47320
|
+
// </div>
|
|
47321
|
+
// )}
|
|
47322
|
+
// </div>
|
|
47323
|
+
// );
|
|
47324
|
+
// };
|
|
47330
47325
|
var Textarea = function(param) {
|
|
47331
47326
|
var item = param.item;
|
|
47332
47327
|
var _useFormContext = useFormContext(), register = _useFormContext.register, errors = _useFormContext.formState.errors;
|
|
@@ -47426,8 +47421,8 @@ var Row = function(param) {
|
|
|
47426
47421
|
// case 'checkbox':
|
|
47427
47422
|
// case 'checkboxGroup':
|
|
47428
47423
|
// return <CheckboxField {...baseConfig} />;
|
|
47429
|
-
case
|
|
47430
|
-
|
|
47424
|
+
// case 'radio':
|
|
47425
|
+
// return <RadioField {...baseConfig} />;
|
|
47431
47426
|
case "textarea":
|
|
47432
47427
|
return /*#__PURE__*/ jsx(Textarea, _object_spread$6({}, baseConfig));
|
|
47433
47428
|
case "cityOnly":
|
|
@@ -47448,7 +47443,6 @@ var Form = {
|
|
|
47448
47443
|
SingleSelect: SingleSelect,
|
|
47449
47444
|
MultipleSelect: MultipleSelect,
|
|
47450
47445
|
FieldLabel: FieldLabel,
|
|
47451
|
-
RadioField: RadioField,
|
|
47452
47446
|
Time: Time,
|
|
47453
47447
|
Textarea: Textarea,
|
|
47454
47448
|
City: City,
|
package/index.esm3.js
CHANGED
|
@@ -18,9 +18,6 @@ import 'react-date-range/dist/locale/index.js';
|
|
|
18
18
|
import 'date-fns/addDays/index.js';
|
|
19
19
|
import 'date-fns/format/index.js';
|
|
20
20
|
import '@emotion/react';
|
|
21
|
-
import '@mui/material/Radio';
|
|
22
|
-
import '@mui/material/RadioGroup';
|
|
23
|
-
import '@mui/material/FormControlLabel';
|
|
24
21
|
import '@tanstack/react-table';
|
|
25
22
|
import '@radix-ui/react-dropdown-menu';
|
|
26
23
|
import '@radix-ui/react-icons';
|
package/package.json
CHANGED
package/src/lib/Form/index.d.ts
CHANGED
|
@@ -26,9 +26,6 @@ export declare const Form: {
|
|
|
26
26
|
FieldLabel: ({ item }: {
|
|
27
27
|
item: any;
|
|
28
28
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
RadioField: ({ item }: {
|
|
30
|
-
item: any;
|
|
31
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
29
|
Time: import("react").FC<FormType>;
|
|
33
30
|
Textarea: import("react").FC<FormType>;
|
|
34
31
|
City: import("react").FC<FormType>;
|