@rockshin/tao-ui 0.0.41 → 0.0.43
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 +39 -7
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/component-manifest.json +1352 -24
- package/dist/components/affix/affix.css +11 -0
- package/dist/components/affix/affix.d.ts +21 -0
- package/dist/components/affix/affix.js +140 -0
- package/dist/components/alert/alert.css +1 -0
- package/dist/components/app/app-modals.d.ts +2 -0
- package/dist/components/app/app-modals.js +266 -0
- package/dist/components/app/app-notices.d.ts +6 -0
- package/dist/components/app/app-notices.js +334 -0
- package/dist/components/app/app-types.d.ts +154 -0
- package/dist/components/app/app-types.js +0 -0
- package/dist/components/app/app.css +221 -0
- package/dist/components/app/app.d.ts +7 -0
- package/dist/components/app/app.js +69 -0
- package/dist/components/auto-complete/auto-complete.css +35 -0
- package/dist/components/auto-complete/auto-complete.d.ts +47 -0
- package/dist/components/auto-complete/auto-complete.js +106 -0
- package/dist/components/avatar/avatar.css +95 -0
- package/dist/components/avatar/avatar.d.ts +50 -0
- package/dist/components/avatar/avatar.js +159 -0
- package/dist/components/badge/badge.css +165 -0
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.js +412 -0
- package/dist/components/border-beam/border-beam.css +35 -0
- package/dist/components/border-beam/border-beam.d.ts +27 -0
- package/dist/components/border-beam/border-beam.js +215 -0
- package/dist/components/button/button.css +7 -0
- package/dist/components/calendar/calendar.css +126 -0
- package/dist/components/calendar/calendar.d.ts +56 -0
- package/dist/components/calendar/calendar.js +178 -0
- package/dist/components/card/card-tabs.d.ts +43 -0
- package/dist/components/card/card-tabs.js +455 -0
- package/dist/components/card/card.css +401 -0
- package/dist/components/card/card.d.ts +74 -0
- package/dist/components/card/card.js +362 -0
- package/dist/components/carousel/carousel.css +232 -0
- package/dist/components/carousel/carousel.d.ts +35 -0
- package/dist/components/carousel/carousel.js +248 -0
- package/dist/components/cascader/cascader.css +123 -0
- package/dist/components/cascader/cascader.d.ts +58 -0
- package/dist/components/cascader/cascader.js +132 -0
- package/dist/components/checkbox/checkbox.css +7 -0
- package/dist/components/collapse/collapse-panels.d.ts +4 -0
- package/dist/components/collapse/collapse-panels.js +413 -0
- package/dist/components/collapse/collapse.css +199 -0
- package/dist/components/collapse/collapse.d.ts +77 -0
- package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
- package/dist/components/color-picker/color-picker-types.d.ts +78 -0
- package/dist/components/color-picker/color-picker-types.js +0 -0
- package/dist/components/color-picker/color-picker.css +265 -0
- package/dist/components/color-picker/color-picker.d.ts +5 -0
- package/dist/components/color-picker/color-picker.js +1049 -0
- package/dist/components/color-picker/color.d.ts +35 -0
- package/dist/components/color-picker/color.js +65 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +4 -11
- package/dist/components/date-picker/calendar/calendar-header.js +76 -69
- package/dist/components/date-picker/calendar/month-grid.js +20 -31
- package/dist/components/date-picker/calendar/time-panel.js +46 -41
- package/dist/components/date-picker/date-picker.css +22 -56
- package/dist/components/date-picker/date-picker.d.ts +2 -0
- package/dist/components/date-picker/date-picker.js +14 -9
- package/dist/components/date-picker/presets.js +5 -2
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +16 -13
- package/dist/components/descriptions/descriptions.css +109 -0
- package/dist/components/descriptions/descriptions.d.ts +49 -0
- package/dist/components/descriptions/descriptions.js +189 -0
- package/dist/components/divider/divider.css +71 -0
- package/dist/components/divider/divider.d.ts +31 -0
- package/dist/components/divider/divider.js +83 -0
- package/dist/components/drawer/drawer.js +199 -184
- package/dist/components/empty/empty.css +35 -0
- package/dist/components/empty/empty.d.ts +25 -0
- package/dist/components/empty/empty.js +278 -0
- package/dist/components/float-button/float-button.css +146 -0
- package/dist/components/float-button/float-button.d.ts +67 -0
- package/dist/components/float-button/float-button.js +347 -0
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form-item.js +1 -0
- package/dist/components/form/form.css +15 -0
- package/dist/components/form/form.js +4 -1
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +109 -84
- package/dist/components/image/image-icons.d.ts +16 -0
- package/dist/components/image/image-icons.js +63 -0
- package/dist/components/image/image.css +253 -0
- package/dist/components/image/image.d.ts +75 -0
- package/dist/components/image/image.js +818 -0
- package/dist/components/input/base-input.d.ts +25 -0
- package/dist/components/input/base-input.js +104 -0
- package/dist/components/input/input-shared.css +75 -0
- package/dist/components/input/input-shared.d.ts +59 -0
- package/dist/components/input/input-shared.js +152 -0
- package/dist/components/input/input.css +107 -10
- package/dist/components/input/input.d.ts +12 -16
- package/dist/components/input/input.js +11 -154
- package/dist/components/input/otp.d.ts +29 -0
- package/dist/components/input/otp.js +335 -0
- package/dist/components/input/password.d.ts +12 -0
- package/dist/components/input/password.js +117 -0
- package/dist/components/input/search.d.ts +16 -0
- package/dist/components/input/search.js +99 -0
- package/dist/components/input-number/input-number.d.ts +2 -2
- package/dist/components/input-number/input-number.js +2 -2
- package/dist/components/list/list-pagination.css +127 -0
- package/dist/components/list/list-pagination.d.ts +38 -0
- package/dist/components/list/list-pagination.js +322 -0
- package/dist/components/list/list.css +225 -0
- package/dist/components/list/list.d.ts +77 -0
- package/dist/components/list/list.js +660 -0
- package/dist/components/listy/listy.css +55 -0
- package/dist/components/listy/listy.d.ts +20 -0
- package/dist/components/listy/listy.js +158 -0
- package/dist/components/masonry/masonry.css +13 -0
- package/dist/components/masonry/masonry.d.ts +39 -0
- package/dist/components/masonry/masonry.js +287 -0
- package/dist/components/mentions/mentions.css +179 -0
- package/dist/components/mentions/mentions.d.ts +48 -0
- package/dist/components/mentions/mentions.js +115 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/modal/modal.d.ts +30 -4
- package/dist/components/modal/modal.js +534 -241
- package/dist/components/pagination/pagination.css +10 -0
- package/dist/components/progress/progress.css +187 -0
- package/dist/components/progress/progress.d.ts +66 -0
- package/dist/components/progress/progress.js +567 -0
- package/dist/components/qr-code/qr-code.css +39 -0
- package/dist/components/qr-code/qr-code.d.ts +43 -0
- package/dist/components/qr-code/qr-code.js +286 -0
- package/dist/components/radio/radio.css +7 -0
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +78 -73
- package/dist/components/rate/rate.css +97 -0
- package/dist/components/rate/rate.d.ts +17 -0
- package/dist/components/rate/rate.js +172 -0
- package/dist/components/result/result.css +69 -0
- package/dist/components/result/result.d.ts +33 -0
- package/dist/components/result/result.js +320 -0
- package/dist/components/segmented/segmented.css +134 -0
- package/dist/components/segmented/segmented.d.ts +40 -0
- package/dist/components/segmented/segmented.js +169 -0
- package/dist/components/select/mobile-select.css +1 -16
- package/dist/components/select/mobile-select.d.ts +11 -4
- package/dist/components/select/mobile-select.js +172 -59
- package/dist/components/select/select-tags.js +178 -130
- package/dist/components/select/select-types.d.ts +53 -0
- package/dist/components/select/select.css +86 -8
- package/dist/components/select/select.js +59 -31
- package/dist/components/select/use-select-selection.js +44 -43
- package/dist/components/skeleton/skeleton.css +129 -0
- package/dist/components/skeleton/skeleton.d.ts +78 -0
- package/dist/components/skeleton/skeleton.js +457 -0
- package/dist/components/slider/slider.css +191 -0
- package/dist/components/slider/slider.d.ts +47 -0
- package/dist/components/slider/slider.js +310 -0
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/statistic/statistic.css +34 -0
- package/dist/components/statistic/statistic.d.ts +46 -0
- package/dist/components/statistic/statistic.js +491 -0
- package/dist/components/steps/steps.css +53 -3
- package/dist/components/switch/switch-touch.css +20 -0
- package/dist/components/switch/switch.css +24 -13
- package/dist/components/switch/switch.js +8 -5
- package/dist/components/table/table.css +0 -5
- package/dist/components/table/table.js +21 -22
- package/dist/components/textarea/textarea.css +21 -1
- package/dist/components/textarea/textarea.d.ts +12 -6
- package/dist/components/textarea/textarea.js +120 -219
- package/dist/components/time-picker/time-picker.css +212 -0
- package/dist/components/time-picker/time-picker.d.ts +63 -0
- package/dist/components/time-picker/time-picker.js +356 -0
- package/dist/components/timeline/timeline.css +259 -0
- package/dist/components/timeline/timeline.d.ts +50 -0
- package/dist/components/timeline/timeline.js +140 -0
- package/dist/components/tour/tour.css +151 -0
- package/dist/components/tour/tour.d.ts +45 -0
- package/dist/components/tour/tour.js +575 -0
- package/dist/components/transfer/transfer-list.d.ts +2 -0
- package/dist/components/transfer/transfer-list.js +513 -0
- package/dist/components/transfer/transfer-parts.d.ts +3 -0
- package/dist/components/transfer/transfer-parts.js +163 -0
- package/dist/components/transfer/transfer-types.d.ts +163 -0
- package/dist/components/transfer/transfer-types.js +0 -0
- package/dist/components/transfer/transfer.css +226 -0
- package/dist/components/transfer/transfer.d.ts +13 -0
- package/dist/components/transfer/transfer.js +204 -0
- package/dist/components/tree/tree-check.d.ts +1 -0
- package/dist/components/tree/tree-check.js +36 -0
- package/dist/components/tree/tree.css +245 -0
- package/dist/components/tree/tree.d.ts +46 -0
- package/dist/components/tree/tree.js +388 -0
- package/dist/components/tree-select/select-engine.css +238 -0
- package/dist/components/tree-select/select-engine.d.ts +20 -0
- package/dist/components/tree-select/select-engine.js +46 -0
- package/dist/components/tree-select/tree-select.css +25 -0
- package/dist/components/tree-select/tree-select.d.ts +50 -0
- package/dist/components/tree-select/tree-select.js +130 -0
- package/dist/components/upload/upload-types.d.ts +135 -0
- package/dist/components/upload/upload-types.js +0 -0
- package/dist/components/upload/upload.css +166 -0
- package/dist/components/upload/upload.d.ts +12 -0
- package/dist/components/upload/upload.js +465 -0
- package/dist/components/watermark/watermark-context.d.ts +7 -0
- package/dist/components/watermark/watermark-context.js +20 -0
- package/dist/components/watermark/watermark.css +10 -0
- package/dist/components/watermark/watermark.d.ts +38 -0
- package/dist/components/watermark/watermark.js +436 -0
- package/dist/docs/component-docs.d.ts +35 -29
- package/dist/docs/component-docs.js +75 -3
- package/dist/docs/components/affix.doc.d.ts +14 -0
- package/dist/docs/components/affix.doc.js +22 -0
- package/dist/docs/components/app.doc.d.ts +18 -0
- package/dist/docs/components/app.doc.js +42 -0
- package/dist/docs/components/auto-complete.doc.d.ts +18 -0
- package/dist/docs/components/auto-complete.doc.js +49 -0
- package/dist/docs/components/avatar.doc.d.ts +17 -0
- package/dist/docs/components/avatar.doc.js +36 -0
- package/dist/docs/components/badge.doc.d.ts +17 -0
- package/dist/docs/components/badge.doc.js +34 -0
- package/dist/docs/components/border-beam.doc.d.ts +14 -0
- package/dist/docs/components/border-beam.doc.js +22 -0
- package/dist/docs/components/{collapsible.doc.d.ts → calendar.doc.d.ts} +1 -1
- package/dist/docs/components/calendar.doc.js +45 -0
- package/dist/docs/components/card.doc.d.ts +17 -0
- package/dist/docs/components/card.doc.js +39 -0
- package/dist/docs/components/carousel.doc.d.ts +15 -0
- package/dist/docs/components/carousel.doc.js +26 -0
- package/dist/docs/components/cascader.doc.d.ts +18 -0
- package/dist/docs/components/cascader.doc.js +54 -0
- package/dist/docs/components/collapse.doc.d.ts +18 -0
- package/dist/docs/components/collapse.doc.js +47 -0
- package/dist/docs/components/color-picker.doc.d.ts +18 -0
- package/dist/docs/components/color-picker.doc.js +46 -0
- package/dist/docs/components/descriptions.doc.d.ts +14 -0
- package/dist/docs/components/descriptions.doc.js +26 -0
- package/dist/docs/components/divider.doc.d.ts +17 -0
- package/dist/docs/components/divider.doc.js +34 -0
- package/dist/docs/components/empty.doc.d.ts +18 -0
- package/dist/docs/components/empty.doc.js +40 -0
- package/dist/docs/components/float-button.doc.d.ts +14 -0
- package/dist/docs/components/float-button.doc.js +23 -0
- package/dist/docs/components/form.doc.d.ts +1 -1
- package/dist/docs/components/image.doc.d.ts +15 -0
- package/dist/docs/components/image.doc.js +38 -0
- package/dist/docs/components/input.doc.js +11 -4
- package/dist/docs/components/list.doc.d.ts +18 -0
- package/dist/docs/components/list.doc.js +43 -0
- package/dist/docs/components/listy.doc.d.ts +18 -0
- package/dist/docs/components/listy.doc.js +40 -0
- package/dist/docs/components/masonry.doc.d.ts +14 -0
- package/dist/docs/components/masonry.doc.js +22 -0
- package/dist/docs/components/mentions.doc.d.ts +18 -0
- package/dist/docs/components/mentions.doc.js +43 -0
- package/dist/docs/components/modal.doc.js +3 -0
- package/dist/docs/components/progress.doc.d.ts +18 -0
- package/dist/docs/components/progress.doc.js +41 -0
- package/dist/docs/components/qr-code.doc.d.ts +18 -0
- package/dist/docs/components/qr-code.doc.js +41 -0
- package/dist/docs/components/rate.doc.d.ts +18 -0
- package/dist/docs/components/rate.doc.js +38 -0
- package/dist/docs/components/result.doc.d.ts +18 -0
- package/dist/docs/components/result.doc.js +42 -0
- package/dist/docs/components/segmented.doc.d.ts +14 -0
- package/dist/docs/components/segmented.doc.js +24 -0
- package/dist/docs/components/skeleton.doc.d.ts +18 -0
- package/dist/docs/components/skeleton.doc.js +42 -0
- package/dist/docs/components/slider.doc.d.ts +18 -0
- package/dist/docs/components/slider.doc.js +41 -0
- package/dist/docs/components/statistic.doc.d.ts +14 -0
- package/dist/docs/components/statistic.doc.js +27 -0
- package/dist/docs/components/textarea.doc.js +4 -2
- package/dist/docs/components/time-picker.doc.d.ts +18 -0
- package/dist/docs/components/time-picker.doc.js +45 -0
- package/dist/docs/components/timeline.doc.d.ts +14 -0
- package/dist/docs/components/timeline.doc.js +29 -0
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/docs/components/tour.doc.d.ts +15 -0
- package/dist/docs/components/tour.doc.js +36 -0
- package/dist/docs/components/transfer.doc.d.ts +18 -0
- package/dist/docs/components/transfer.doc.js +48 -0
- package/dist/docs/components/tree-select.doc.d.ts +18 -0
- package/dist/docs/components/tree-select.doc.js +55 -0
- package/dist/docs/components/tree.doc.d.ts +18 -0
- package/dist/docs/components/tree.doc.js +46 -0
- package/dist/docs/components/upload.doc.d.ts +18 -0
- package/dist/docs/components/upload.doc.js +43 -0
- package/dist/docs/components/watermark.doc.d.ts +14 -0
- package/dist/docs/components/watermark.doc.js +22 -0
- package/dist/entries/affix.d.ts +3 -0
- package/dist/entries/{collapsible.js → affix.js} +1 -1
- package/dist/entries/app.d.ts +3 -0
- package/dist/entries/app.js +4 -0
- package/dist/entries/auto-complete.d.ts +4 -0
- package/dist/entries/auto-complete.js +4 -0
- package/dist/entries/avatar.d.ts +3 -0
- package/dist/entries/avatar.js +4 -0
- package/dist/entries/badge.d.ts +3 -0
- package/dist/entries/badge.js +4 -0
- package/dist/entries/border-beam.d.ts +3 -0
- package/dist/entries/border-beam.js +4 -0
- package/dist/entries/calendar.d.ts +3 -0
- package/dist/entries/calendar.js +4 -0
- package/dist/entries/card.d.ts +3 -0
- package/dist/entries/card.js +4 -0
- package/dist/entries/carousel.d.ts +3 -0
- package/dist/entries/carousel.js +4 -0
- package/dist/entries/cascader.d.ts +4 -0
- package/dist/entries/cascader.js +4 -0
- package/dist/entries/collapse.d.ts +3 -0
- package/dist/entries/collapse.js +4 -0
- package/dist/entries/color-picker.d.ts +5 -0
- package/dist/entries/color-picker.js +4 -0
- package/dist/entries/descriptions.d.ts +3 -0
- package/dist/entries/descriptions.js +4 -0
- package/dist/entries/divider.d.ts +3 -0
- package/dist/entries/divider.js +4 -0
- package/dist/entries/empty.d.ts +3 -0
- package/dist/entries/empty.js +4 -0
- package/dist/entries/float-button.d.ts +3 -0
- package/dist/entries/float-button.js +4 -0
- package/dist/entries/image.d.ts +3 -0
- package/dist/entries/image.js +4 -0
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/list.d.ts +3 -0
- package/dist/entries/list.js +4 -0
- package/dist/entries/listy.d.ts +3 -0
- package/dist/entries/listy.js +4 -0
- package/dist/entries/masonry.d.ts +3 -0
- package/dist/entries/masonry.js +4 -0
- package/dist/entries/mentions.d.ts +4 -0
- package/dist/entries/mentions.js +4 -0
- package/dist/entries/progress.d.ts +3 -0
- package/dist/entries/progress.js +4 -0
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/provider.js +1 -1
- package/dist/entries/qr-code.d.ts +4 -0
- package/dist/entries/qr-code.js +4 -0
- package/dist/entries/rate.d.ts +3 -0
- package/dist/entries/rate.js +4 -0
- package/dist/entries/result.d.ts +3 -0
- package/dist/entries/result.js +4 -0
- package/dist/entries/segmented.d.ts +3 -0
- package/dist/entries/segmented.js +4 -0
- package/dist/entries/skeleton.d.ts +3 -0
- package/dist/entries/skeleton.js +4 -0
- package/dist/entries/slider.d.ts +3 -0
- package/dist/entries/slider.js +4 -0
- package/dist/entries/statistic.d.ts +3 -0
- package/dist/entries/statistic.js +4 -0
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/entries/time-picker.d.ts +3 -0
- package/dist/entries/time-picker.js +4 -0
- package/dist/entries/timeline.d.ts +3 -0
- package/dist/entries/timeline.js +4 -0
- package/dist/entries/tour.d.ts +3 -0
- package/dist/entries/tour.js +4 -0
- package/dist/entries/transfer.d.ts +3 -0
- package/dist/entries/transfer.js +4 -0
- package/dist/entries/tree-select.d.ts +4 -0
- package/dist/entries/tree-select.js +4 -0
- package/dist/entries/tree.d.ts +3 -0
- package/dist/entries/tree.js +4 -0
- package/dist/entries/upload.d.ts +4 -0
- package/dist/entries/upload.js +4 -0
- package/dist/entries/util.d.ts +1 -0
- package/dist/entries/util.js +1 -0
- package/dist/entries/watermark.d.ts +3 -0
- package/dist/entries/watermark.js +4 -0
- package/dist/index.d.ts +51 -6
- package/dist/index.js +39 -3
- package/dist/provider/locale.d.ts +65 -0
- package/dist/provider/locale.js +146 -0
- package/dist/provider/tao-provider.d.ts +16 -1
- package/dist/provider/tao-provider.js +105 -87
- package/dist/theme/control.css +12 -2
- package/dist/theme/theme.css +4 -2
- package/dist/theme/tokens.d.ts +2 -2
- package/dist/theme/tokens.js +1 -0
- package/dist/utils/breakpoint.d.ts +2 -2
- package/dist/utils/breakpoint.js +3 -1
- package/dist/utils/field-label.d.ts +4 -0
- package/dist/utils/field-label.js +7 -0
- package/dist/utils/interop-default.d.ts +2 -0
- package/dist/utils/interop-default.js +4 -0
- package/dist/utils/types.d.ts +7 -0
- package/dist/utils/types.js +0 -0
- package/llms.txt +493 -22
- package/package.json +33 -9
- package/dist/components/collapsible/collapsible.css +0 -49
- package/dist/components/collapsible/collapsible.d.ts +0 -39
- package/dist/docs/components/collapsible.doc.js +0 -39
- package/dist/entries/collapsible.d.ts +0 -3
|
@@ -1,152 +1,200 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { Fragment as external_react_Fragment } from "react";
|
|
3
|
+
import { Fragment as external_react_Fragment, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { cx } from "../../utils/semantic.js";
|
|
5
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
5
6
|
import { CloseIcon } from "./select-icons.js";
|
|
6
7
|
function SelectTags(t0) {
|
|
7
|
-
const $ = c(
|
|
8
|
+
const $ = c(45);
|
|
8
9
|
const { options, disabled, maxTagCount, maxTagPlaceholder, maxTagTextLength, removeIcon, tagRender, classNames, styles, onRemove } = t0;
|
|
9
|
-
|
|
10
|
+
const { locale } = useTaoConfig();
|
|
11
|
+
const responsive = "responsive" === maxTagCount;
|
|
12
|
+
const containerRef = useRef(null);
|
|
13
|
+
const restRef = useRef(null);
|
|
14
|
+
const [fitCount, setFitCount] = useState(options.length);
|
|
15
|
+
const count = responsive ? fitCount : "number" == typeof maxTagCount ? maxTagCount : options.length;
|
|
10
16
|
let t1;
|
|
11
|
-
if ($[0] !==
|
|
12
|
-
t1 =
|
|
13
|
-
$[0] =
|
|
17
|
+
if ($[0] !== count || $[1] !== options || $[2] !== responsive) {
|
|
18
|
+
t1 = responsive ? options : options.slice(0, count);
|
|
19
|
+
$[0] = count;
|
|
14
20
|
$[1] = options;
|
|
15
|
-
$[2] =
|
|
16
|
-
|
|
21
|
+
$[2] = responsive;
|
|
22
|
+
$[3] = t1;
|
|
23
|
+
} else t1 = $[3];
|
|
17
24
|
const visible = t1;
|
|
25
|
+
const omitted = options.slice(count);
|
|
18
26
|
let t2;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
+
if ($[4] !== responsive) {
|
|
28
|
+
t2 = ()=>{
|
|
29
|
+
const container = containerRef.current;
|
|
30
|
+
if (!responsive || !container) return;
|
|
31
|
+
const measure = ()=>{
|
|
32
|
+
const items = Array.from(container.querySelectorAll("[data-tao-select-tag-measure]"));
|
|
33
|
+
const gap = Number.parseFloat(getComputedStyle(container).gap) || 0;
|
|
34
|
+
const widths = items.map(_temp);
|
|
35
|
+
const available = container.clientWidth;
|
|
36
|
+
const total = widths.reduce(_temp2, 0) + Math.max(0, widths.length - 1) * gap;
|
|
37
|
+
let fit = widths.length;
|
|
38
|
+
if (total > available) {
|
|
39
|
+
let used = restRef.current?.getBoundingClientRect().width ?? 0;
|
|
40
|
+
fit = 0;
|
|
41
|
+
for (const width_0 of widths){
|
|
42
|
+
if (used + gap + width_0 > available) break;
|
|
43
|
+
used += gap + width_0;
|
|
44
|
+
fit++;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
setFitCount(fit);
|
|
27
48
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
49
|
+
measure();
|
|
50
|
+
const observer = new ResizeObserver(measure);
|
|
51
|
+
observer.observe(container);
|
|
52
|
+
for (const child of container.children)observer.observe(child);
|
|
53
|
+
return ()=>observer.disconnect();
|
|
54
|
+
};
|
|
55
|
+
$[4] = responsive;
|
|
56
|
+
$[5] = t2;
|
|
57
|
+
} else t2 = $[5];
|
|
58
|
+
useLayoutEffect(t2);
|
|
59
|
+
if (0 === options.length) return null;
|
|
60
|
+
let t3;
|
|
61
|
+
if ($[6] !== maxTagTextLength) {
|
|
62
|
+
t3 = (option)=>{
|
|
63
|
+
const text = "string" == typeof option.label ? option.label : String(option.label);
|
|
64
|
+
return null != maxTagTextLength && text.length > maxTagTextLength ? `${text.slice(0, maxTagTextLength)}…` : option.label;
|
|
65
|
+
};
|
|
66
|
+
$[6] = maxTagTextLength;
|
|
67
|
+
$[7] = t3;
|
|
68
|
+
} else t3 = $[7];
|
|
69
|
+
const label = t3;
|
|
70
|
+
let t4;
|
|
71
|
+
if ($[8] !== classNames?.tag || $[9] !== classNames?.tagClose || $[10] !== classNames?.tagLabel || $[11] !== count || $[12] !== disabled || $[13] !== label || $[14] !== locale || $[15] !== onRemove || $[16] !== removeIcon || $[17] !== responsive || $[18] !== styles?.tag || $[19] !== styles?.tagClose || $[20] !== styles?.tagLabel || $[21] !== tagRender || $[22] !== visible) {
|
|
72
|
+
let t5;
|
|
73
|
+
if ($[24] !== classNames?.tag || $[25] !== classNames?.tagClose || $[26] !== classNames?.tagLabel || $[27] !== count || $[28] !== disabled || $[29] !== label || $[30] !== locale || $[31] !== onRemove || $[32] !== removeIcon || $[33] !== responsive || $[34] !== styles?.tag || $[35] !== styles?.tagClose || $[36] !== styles?.tagLabel || $[37] !== tagRender) {
|
|
74
|
+
t5 = (option_0, index)=>{
|
|
75
|
+
const closable = !disabled && !option_0.disabled;
|
|
76
|
+
const tag = tagRender ? tagRender({
|
|
77
|
+
label: label(option_0),
|
|
78
|
+
value: option_0.value,
|
|
79
|
+
closable,
|
|
80
|
+
disabled: !!option_0.disabled,
|
|
81
|
+
onClose: (event)=>onRemove(option_0.value, event)
|
|
82
|
+
}) : /*#__PURE__*/ jsxs("span", {
|
|
83
|
+
"data-tao-select-tag": "",
|
|
84
|
+
"data-tao-disabled": option_0.disabled || void 0,
|
|
85
|
+
className: cx(classNames?.tag),
|
|
86
|
+
style: styles?.tag,
|
|
87
|
+
children: [
|
|
88
|
+
/*#__PURE__*/ jsx("span", {
|
|
89
|
+
"data-tao-select-tag-label": "",
|
|
90
|
+
className: cx(classNames?.tagLabel),
|
|
91
|
+
style: styles?.tagLabel,
|
|
92
|
+
children: label(option_0)
|
|
93
|
+
}),
|
|
94
|
+
closable && /*#__PURE__*/ jsx("span", {
|
|
95
|
+
"data-tao-select-tag-close": "",
|
|
96
|
+
className: cx(classNames?.tagClose),
|
|
97
|
+
style: styles?.tagClose,
|
|
98
|
+
role: "button",
|
|
99
|
+
tabIndex: 0,
|
|
100
|
+
"aria-label": locale.remove("string" == typeof option_0.label ? option_0.label : option_0.value),
|
|
101
|
+
onPointerDown: _temp3,
|
|
102
|
+
onClick: (event_1)=>onRemove(option_0.value, event_1),
|
|
103
|
+
onKeyDown: (event_2)=>{
|
|
104
|
+
if ("Enter" === event_2.key || " " === event_2.key) onRemove(option_0.value, event_2);
|
|
105
|
+
},
|
|
106
|
+
children: removeIcon ?? /*#__PURE__*/ jsx(CloseIcon, {
|
|
107
|
+
small: true
|
|
70
108
|
})
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
$[43] = removeIcon;
|
|
84
|
-
$[44] = styles?.tag;
|
|
85
|
-
$[45] = styles?.tagClose;
|
|
86
|
-
$[46] = styles?.tagLabel;
|
|
87
|
-
$[47] = tagRender;
|
|
88
|
-
$[48] = t5;
|
|
89
|
-
} else t5 = $[48];
|
|
90
|
-
t2 = visible.map(t5);
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
}, option_0.value);
|
|
112
|
+
return responsive ? /*#__PURE__*/ jsx("span", {
|
|
113
|
+
"data-tao-select-tag-measure": "",
|
|
114
|
+
"data-tao-overflow": index >= count || void 0,
|
|
115
|
+
"aria-hidden": index >= count || void 0,
|
|
116
|
+
children: tag
|
|
117
|
+
}, option_0.value) : /*#__PURE__*/ jsx(external_react_Fragment, {
|
|
118
|
+
children: tag
|
|
119
|
+
}, option_0.value);
|
|
120
|
+
};
|
|
91
121
|
$[24] = classNames?.tag;
|
|
92
122
|
$[25] = classNames?.tagClose;
|
|
93
123
|
$[26] = classNames?.tagLabel;
|
|
94
|
-
$[27] =
|
|
95
|
-
$[28] =
|
|
96
|
-
$[29] =
|
|
97
|
-
$[30] =
|
|
98
|
-
$[31] =
|
|
99
|
-
$[32] =
|
|
100
|
-
$[33] =
|
|
101
|
-
$[34] =
|
|
102
|
-
$[35] =
|
|
103
|
-
$[36] =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
let
|
|
136
|
-
if ($[
|
|
137
|
-
|
|
124
|
+
$[27] = count;
|
|
125
|
+
$[28] = disabled;
|
|
126
|
+
$[29] = label;
|
|
127
|
+
$[30] = locale;
|
|
128
|
+
$[31] = onRemove;
|
|
129
|
+
$[32] = removeIcon;
|
|
130
|
+
$[33] = responsive;
|
|
131
|
+
$[34] = styles?.tag;
|
|
132
|
+
$[35] = styles?.tagClose;
|
|
133
|
+
$[36] = styles?.tagLabel;
|
|
134
|
+
$[37] = tagRender;
|
|
135
|
+
$[38] = t5;
|
|
136
|
+
} else t5 = $[38];
|
|
137
|
+
t4 = visible.map(t5);
|
|
138
|
+
$[8] = classNames?.tag;
|
|
139
|
+
$[9] = classNames?.tagClose;
|
|
140
|
+
$[10] = classNames?.tagLabel;
|
|
141
|
+
$[11] = count;
|
|
142
|
+
$[12] = disabled;
|
|
143
|
+
$[13] = label;
|
|
144
|
+
$[14] = locale;
|
|
145
|
+
$[15] = onRemove;
|
|
146
|
+
$[16] = removeIcon;
|
|
147
|
+
$[17] = responsive;
|
|
148
|
+
$[18] = styles?.tag;
|
|
149
|
+
$[19] = styles?.tagClose;
|
|
150
|
+
$[20] = styles?.tagLabel;
|
|
151
|
+
$[21] = tagRender;
|
|
152
|
+
$[22] = visible;
|
|
153
|
+
$[23] = t4;
|
|
154
|
+
} else t4 = $[23];
|
|
155
|
+
const t5 = (responsive || omitted.length > 0) && /*#__PURE__*/ jsx("span", {
|
|
156
|
+
ref: restRef,
|
|
157
|
+
"data-tao-overflow": responsive && 0 === omitted.length || void 0,
|
|
158
|
+
"aria-hidden": responsive && 0 === omitted.length || void 0,
|
|
159
|
+
"data-tao-select-tag": "",
|
|
160
|
+
"data-tao-select-tag-rest": "",
|
|
161
|
+
className: cx(classNames?.tagRest),
|
|
162
|
+
style: styles?.tagRest,
|
|
163
|
+
children: "function" == typeof maxTagPlaceholder ? maxTagPlaceholder(omitted) : maxTagPlaceholder ?? `+${omitted.length}…`
|
|
164
|
+
});
|
|
165
|
+
let t6;
|
|
166
|
+
if ($[39] !== t4 || $[40] !== t5) {
|
|
167
|
+
t6 = /*#__PURE__*/ jsxs(Fragment, {
|
|
138
168
|
children: [
|
|
139
|
-
|
|
140
|
-
|
|
169
|
+
t4,
|
|
170
|
+
t5
|
|
141
171
|
]
|
|
142
172
|
});
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
} else
|
|
147
|
-
|
|
173
|
+
$[39] = t4;
|
|
174
|
+
$[40] = t5;
|
|
175
|
+
$[41] = t6;
|
|
176
|
+
} else t6 = $[41];
|
|
177
|
+
const content = t6;
|
|
178
|
+
let t7;
|
|
179
|
+
if ($[42] !== content || $[43] !== responsive) {
|
|
180
|
+
t7 = responsive ? /*#__PURE__*/ jsx("span", {
|
|
181
|
+
ref: containerRef,
|
|
182
|
+
"data-tao-select-responsive-tags": "",
|
|
183
|
+
children: content
|
|
184
|
+
}) : content;
|
|
185
|
+
$[42] = content;
|
|
186
|
+
$[43] = responsive;
|
|
187
|
+
$[44] = t7;
|
|
188
|
+
} else t7 = $[44];
|
|
189
|
+
return t7;
|
|
148
190
|
}
|
|
149
|
-
function
|
|
191
|
+
function _temp3(event_0) {
|
|
150
192
|
return event_0.stopPropagation();
|
|
151
193
|
}
|
|
194
|
+
function _temp2(sum, width) {
|
|
195
|
+
return sum + width;
|
|
196
|
+
}
|
|
197
|
+
function _temp(item) {
|
|
198
|
+
return item.getBoundingClientRect().width;
|
|
199
|
+
}
|
|
152
200
|
export { SelectTags };
|
|
@@ -24,59 +24,112 @@ export interface SelectRef {
|
|
|
24
24
|
nativeElement: HTMLElement | null;
|
|
25
25
|
}
|
|
26
26
|
export interface SelectProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid' | 'aria-required'> {
|
|
27
|
+
/** Available options; nested options form groups. */
|
|
27
28
|
options: SelectOption[];
|
|
29
|
+
/** Controlled selection. Use an array for multiple or tags mode. */
|
|
28
30
|
value?: string | string[];
|
|
31
|
+
/** Initial selection for an uncontrolled Select. */
|
|
29
32
|
defaultValue?: string | string[];
|
|
33
|
+
/** Called with the new selection and its matching option or options. */
|
|
30
34
|
onChange?: (value: string | string[], option?: SelectOption | SelectOption[]) => void;
|
|
35
|
+
/** Called when an option is selected. */
|
|
31
36
|
onSelect?: (value: string, option: SelectOption) => void;
|
|
37
|
+
/** Called when a selected option is removed. */
|
|
32
38
|
onDeselect?: (value: string, option: SelectOption) => void;
|
|
39
|
+
/** Called when the selection is cleared. */
|
|
33
40
|
onClear?: () => void;
|
|
41
|
+
/** Multiple selection or free-form tags. Omit for single selection. */
|
|
34
42
|
mode?: 'multiple' | 'tags';
|
|
43
|
+
/** Hint displayed when no value is selected. */
|
|
35
44
|
placeholder?: string;
|
|
45
|
+
/** Control and desktop popup size; inherits from TaoProvider when omitted. */
|
|
36
46
|
size?: TaoSize;
|
|
47
|
+
/** Control appearance; inherits from TaoProvider when omitted. */
|
|
37
48
|
variant?: TaoVariant;
|
|
49
|
+
/** Disable interaction; inherits from TaoProvider when omitted. */
|
|
38
50
|
disabled?: boolean;
|
|
51
|
+
/** Validation appearance: error or warning. */
|
|
39
52
|
status?: TaoStatus;
|
|
53
|
+
/** Enable searching the option list. */
|
|
40
54
|
showSearch?: boolean;
|
|
55
|
+
/** Custom search predicate receiving the query and option. */
|
|
41
56
|
filterOption?: (input: string, option: SelectOption) => boolean;
|
|
57
|
+
/** Controlled search input text. */
|
|
42
58
|
searchValue?: string;
|
|
59
|
+
/** Called when the search text changes. */
|
|
43
60
|
onSearch?: (value: string) => void;
|
|
61
|
+
/** Show a clear action, optionally with a custom icon. */
|
|
44
62
|
allowClear?: boolean | {
|
|
45
63
|
clearIcon?: ReactNode;
|
|
46
64
|
};
|
|
65
|
+
/** Show the loading indicator. */
|
|
47
66
|
loading?: boolean;
|
|
67
|
+
/** Replace the default loading indicator. */
|
|
48
68
|
loadingIcon?: ReactNode;
|
|
69
|
+
/** Content shown when there are no matching options. Defaults to No results. */
|
|
49
70
|
notFoundContent?: ReactNode;
|
|
71
|
+
/** Content before the selected value. */
|
|
50
72
|
prefix?: ReactNode;
|
|
73
|
+
/** Replace the dropdown indicator. */
|
|
51
74
|
suffixIcon?: ReactNode;
|
|
75
|
+
/** Replace the remove icon on selected tags. */
|
|
52
76
|
removeIcon?: ReactNode;
|
|
77
|
+
/** Focus the control when it mounts. */
|
|
53
78
|
autoFocus?: boolean;
|
|
79
|
+
/** Identifier for the control and its associated label. */
|
|
54
80
|
id?: string;
|
|
81
|
+
/** Name used for form submission. */
|
|
55
82
|
name?: string;
|
|
83
|
+
/** Controlled popup visibility. */
|
|
56
84
|
open?: boolean;
|
|
85
|
+
/** Initial popup visibility. */
|
|
57
86
|
defaultOpen?: boolean;
|
|
87
|
+
/** Called when popup visibility changes. */
|
|
58
88
|
onOpenChange?: (open: boolean) => void;
|
|
89
|
+
/** Desktop popup position. Defaults to bottomLeft. */
|
|
59
90
|
placement?: SelectPlacement;
|
|
91
|
+
/** Desktop popup width: match the trigger, use intrinsic width, or specify pixels. Defaults to true. */
|
|
60
92
|
popupMatchSelectWidth?: boolean | number;
|
|
93
|
+
/** Desktop option-list height in pixels. Defaults to 256. */
|
|
61
94
|
listHeight?: number;
|
|
95
|
+
/** Choose the desktop popup portal container; mobile drawers portal to document.body. */
|
|
62
96
|
getPopupContainer?: (trigger: HTMLElement) => HTMLElement;
|
|
97
|
+
/** Customize each option's content. */
|
|
63
98
|
optionRender?: (option: SelectOption, info: {
|
|
64
99
|
index: number;
|
|
65
100
|
}) => ReactNode;
|
|
101
|
+
/** Customize the selected option's label. */
|
|
66
102
|
labelRender?: (option: SelectOption) => ReactNode;
|
|
103
|
+
/** Wrap or extend the desktop menu or mobile drawer content. */
|
|
67
104
|
popupRender?: (menu: ReactNode) => ReactNode;
|
|
105
|
+
/** Customize a selected tag, including its remove action. */
|
|
68
106
|
tagRender?: (props: TagRenderProps) => ReactNode;
|
|
107
|
+
/** Maximum visible tags, or fit tags to the available width with 'responsive'. */
|
|
69
108
|
maxTagCount?: number | 'responsive';
|
|
109
|
+
/** Content representing selected tags hidden by maxTagCount. */
|
|
70
110
|
maxTagPlaceholder?: ReactNode | ((omittedValues: SelectOption[]) => ReactNode);
|
|
111
|
+
/** Maximum displayed character count for each tag label. */
|
|
71
112
|
maxTagTextLength?: number;
|
|
113
|
+
/** Maximum number of selected values in multiple or tags mode. */
|
|
72
114
|
maxCount?: number;
|
|
115
|
+
/** Clear the search after selecting an option. Defaults to true. */
|
|
73
116
|
autoClearSearchValue?: boolean;
|
|
117
|
+
/** Characters that split entered text into selections in multiple or tags mode. */
|
|
74
118
|
tokenSeparators?: string[];
|
|
119
|
+
/** Hide already selected options from the list. */
|
|
75
120
|
hideSelected?: boolean;
|
|
121
|
+
/** Force mobile or desktop. Otherwise use viewport <576px; an open popup keeps its presentation until closed. */
|
|
76
122
|
mobile?: boolean;
|
|
123
|
+
/** Mobile drawer title. Defaults to the Form.Item/FormField label, then locale text. */
|
|
124
|
+
mobileTitle?: ReactNode;
|
|
125
|
+
/** CSS class on the root element. */
|
|
77
126
|
className?: string;
|
|
127
|
+
/** Inline styles on the root element. */
|
|
78
128
|
style?: CSSProperties;
|
|
129
|
+
/** CSS classes keyed by typed semantic parts. */
|
|
79
130
|
classNames?: SemanticClassNames<SelectSemanticPart>;
|
|
131
|
+
/** Inline styles keyed by typed semantic parts. */
|
|
80
132
|
styles?: SemanticStyles<SelectSemanticPart>;
|
|
133
|
+
/** Access focus, blur, and the native control element. */
|
|
81
134
|
ref?: Ref<SelectRef>;
|
|
82
135
|
}
|
|
@@ -156,12 +156,27 @@ button[data-tao-select-clear] {
|
|
|
156
156
|
padding: 0;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
[data-tao-select
|
|
159
|
+
[data-tao-select-icons][data-tao-clearable] [data-tao-select-icon]:not([data-tao-select-loading-slot]) {
|
|
160
160
|
display: none;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
@media (hover: hover) and (pointer: fine) {
|
|
164
|
+
[data-tao-select-icons][data-tao-clearable] {
|
|
165
|
+
display: grid;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[data-tao-select-icons][data-tao-clearable] > * {
|
|
169
|
+
grid-area: 1 / 1;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
[data-tao-select]:not(:hover) [data-tao-select-clear]:not(:focus-visible) {
|
|
173
|
+
opacity: 0;
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[data-tao-select]:not(:hover) [data-tao-select-icons][data-tao-clearable]:not(:has(:focus-visible)) [data-tao-select-icon] {
|
|
178
|
+
display: flex;
|
|
179
|
+
}
|
|
165
180
|
}
|
|
166
181
|
|
|
167
182
|
[data-tao-select-icon] {
|
|
@@ -216,6 +231,9 @@ button[data-tao-select-clear] {
|
|
|
216
231
|
}
|
|
217
232
|
|
|
218
233
|
[data-tao-select-content] {
|
|
234
|
+
--tao-select-height: var(--tao-control-height);
|
|
235
|
+
--tao-select-font-size: var(--tao-font-size-base);
|
|
236
|
+
font-size: var(--tao-select-font-size);
|
|
219
237
|
background: var(--tao-color-bg-elevated);
|
|
220
238
|
border: var(--tao-line-width) solid var(--tao-color-border);
|
|
221
239
|
border-radius: var(--tao-radius-lg);
|
|
@@ -231,6 +249,16 @@ button[data-tao-select-clear] {
|
|
|
231
249
|
animation-name: tao-select-in;
|
|
232
250
|
}
|
|
233
251
|
|
|
252
|
+
[data-tao-select-content][data-tao-size="small"] {
|
|
253
|
+
--tao-select-height: var(--tao-control-height-sm);
|
|
254
|
+
--tao-select-font-size: var(--tao-font-size-sm);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
[data-tao-select-content][data-tao-size="large"] {
|
|
258
|
+
--tao-select-height: var(--tao-control-height-lg);
|
|
259
|
+
--tao-select-font-size: var(--tao-font-size-lg);
|
|
260
|
+
}
|
|
261
|
+
|
|
234
262
|
[data-tao-select-content][data-tao-popup-width="content"] {
|
|
235
263
|
min-width: max-content;
|
|
236
264
|
}
|
|
@@ -250,7 +278,7 @@ button[data-tao-select-clear] {
|
|
|
250
278
|
[data-tao-select-search] {
|
|
251
279
|
align-items: center;
|
|
252
280
|
gap: var(--tao-padding-xs);
|
|
253
|
-
min-height: var(--tao-
|
|
281
|
+
min-height: var(--tao-select-height);
|
|
254
282
|
padding: var(--tao-padding-xs) var(--tao-padding-sm);
|
|
255
283
|
border-block-end: var(--tao-line-width) solid
|
|
256
284
|
var(--tao-color-border-secondary);
|
|
@@ -260,9 +288,9 @@ button[data-tao-select-clear] {
|
|
|
260
288
|
}
|
|
261
289
|
|
|
262
290
|
[data-tao-select-search-input] {
|
|
263
|
-
height: calc(var(--tao-
|
|
291
|
+
height: calc(var(--tao-select-height) - var(--tao-padding-xs) * 2);
|
|
264
292
|
font-family: var(--tao-font-family);
|
|
265
|
-
font-size: var(--tao-font-size
|
|
293
|
+
font-size: var(--tao-select-font-size);
|
|
266
294
|
color: var(--tao-color-text);
|
|
267
295
|
background: none;
|
|
268
296
|
border: none;
|
|
@@ -309,9 +337,9 @@ legend[data-tao-select-group-label] {
|
|
|
309
337
|
[data-tao-select-item] {
|
|
310
338
|
box-sizing: border-box;
|
|
311
339
|
width: 100%;
|
|
312
|
-
min-height: var(--tao-
|
|
340
|
+
min-height: var(--tao-select-height);
|
|
313
341
|
padding-inline: var(--tao-padding-sm);
|
|
314
|
-
font-size: var(--tao-font-size
|
|
342
|
+
font-size: var(--tao-select-font-size);
|
|
315
343
|
font-family: var(--tao-font-family);
|
|
316
344
|
color: var(--tao-color-text);
|
|
317
345
|
text-align: start;
|
|
@@ -484,3 +512,53 @@ legend[data-tao-select-group-label] {
|
|
|
484
512
|
font-weight: var(--tao-font-weight-medium);
|
|
485
513
|
}
|
|
486
514
|
|
|
515
|
+
[data-tao-select-responsive-tags] {
|
|
516
|
+
flex: 1;
|
|
517
|
+
align-items: center;
|
|
518
|
+
gap: 4px;
|
|
519
|
+
min-width: 0;
|
|
520
|
+
display: flex;
|
|
521
|
+
position: relative;
|
|
522
|
+
overflow: hidden;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
[data-tao-select][data-tao-inline-search][data-tao-multiple] [data-tao-select-values]:has([data-tao-select-responsive-tags]) > [data-tao-select-trigger-input] {
|
|
526
|
+
flex: 0 0 4ch;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
[data-tao-select-tag-measure] {
|
|
530
|
+
flex: none;
|
|
531
|
+
display: inline-flex;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
[data-tao-select-responsive-tags] [data-tao-select-tag-rest] {
|
|
535
|
+
box-sizing: border-box;
|
|
536
|
+
flex: none;
|
|
537
|
+
max-width: 100%;
|
|
538
|
+
overflow: hidden;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
[data-tao-select-responsive-tags] [data-tao-overflow] {
|
|
542
|
+
visibility: hidden;
|
|
543
|
+
pointer-events: none;
|
|
544
|
+
white-space: nowrap;
|
|
545
|
+
position: absolute;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
@media (pointer: coarse) {
|
|
549
|
+
[data-tao-select] [data-tao-select-clear] {
|
|
550
|
+
min-width: 44px;
|
|
551
|
+
min-height: 44px;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
[data-tao-select] [data-tao-select-tag] {
|
|
555
|
+
height: 44px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
[data-tao-select] [data-tao-select-tag-close] {
|
|
559
|
+
width: 44px;
|
|
560
|
+
height: 44px;
|
|
561
|
+
margin-inline: 0;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|