tdesign-vue-next 1.11.1-alpha.1 → 1.11.1
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/CHANGELOG.md +7 -0
- package/cjs/_chunks/{dep-4f98aa34.js → dep-787dcec7.js} +1 -1
- package/cjs/_chunks/{dep-227da1bf.js.map → dep-787dcec7.js.map} +1 -1
- package/cjs/cascader/utils/className.d.ts +10 -4
- package/cjs/dialog/dialog-card.js +9 -5
- package/cjs/dialog/dialog-card.js.map +1 -1
- package/cjs/dialog/dialog.d.ts +1 -1
- package/cjs/dialog/dialog.js +23 -36
- package/cjs/dialog/dialog.js.map +1 -1
- package/cjs/dialog/index.d.ts +3 -3
- package/cjs/index-lib.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/list/list.js +7 -2
- package/cjs/list/list.js.map +1 -1
- package/cjs/table/hooks/useEditableRow.d.ts +1 -1
- package/cjs/table/hooks/useHoverKeyboardEvent.js +1 -1
- package/cjs/table/hooks/useHoverKeyboardEvent.js.map +1 -1
- package/cjs/tree/hooks/useDragHandle.js.map +1 -1
- package/cjs/tree/tree-types.d.ts +6 -6
- package/dist/tdesign.js +20 -24
- package/dist/tdesign.js.map +1 -1
- package/dist/tdesign.min.js +1 -1
- package/dist/tdesign.min.js.map +1 -1
- package/es/_chunks/{dep-1567ec4a.mjs → dep-2895d202.mjs} +3 -3
- package/es/_chunks/{dep-1567ec4a.mjs.map → dep-2895d202.mjs.map} +1 -1
- package/es/_chunks/{dep-bbcf24bb.mjs → dep-433c4f57.mjs} +1 -1
- package/es/_chunks/{dep-26bcc863.mjs.map → dep-433c4f57.mjs.map} +1 -1
- package/es/_chunks/{dep-29a2c03e.mjs → dep-686a19de.mjs} +2 -2
- package/es/_chunks/{dep-29a2c03e.mjs.map → dep-686a19de.mjs.map} +1 -1
- package/es/_chunks/{dep-33cea8ad.mjs → dep-6c869011.mjs} +1 -1
- package/es/_chunks/{dep-33cea8ad.mjs.map → dep-6c869011.mjs.map} +1 -1
- package/es/_chunks/{dep-c0e626d4.mjs → dep-bd25d49f.mjs} +3 -3
- package/es/_chunks/{dep-fadf8798.mjs.map → dep-bd25d49f.mjs.map} +1 -1
- package/es/_chunks/dep-c3b9ffc0.mjs +8 -0
- package/es/_chunks/dep-c3b9ffc0.mjs.map +1 -0
- package/es/_chunks/{dep-4b50299a.mjs → dep-f5421cfa.mjs} +2 -2
- package/es/_chunks/{dep-10752142.mjs.map → dep-f5421cfa.mjs.map} +1 -1
- package/es/_chunks/{dep-4bc1fa53.mjs → dep-f9079916.mjs} +1 -1
- package/es/_chunks/{dep-4bc1fa53.mjs.map → dep-f9079916.mjs.map} +1 -1
- package/es/affix/affix.mjs +3 -3
- package/es/affix/index.mjs +3 -3
- package/es/alert/alert.mjs +3 -3
- package/es/alert/index.mjs +3 -3
- package/es/anchor/anchor-item.mjs +3 -3
- package/es/anchor/anchor-target.mjs +4 -4
- package/es/anchor/anchor.mjs +3 -3
- package/es/anchor/index.mjs +4 -4
- package/es/auto-complete/auto-complete.mjs +3 -3
- package/es/auto-complete/highlight-option.mjs +3 -3
- package/es/auto-complete/index.mjs +3 -3
- package/es/auto-complete/option-list.mjs +3 -3
- package/es/avatar/avatar.mjs +3 -3
- package/es/avatar/group.mjs +3 -3
- package/es/avatar/index.mjs +3 -3
- package/es/back-top/back-top.mjs +3 -3
- package/es/back-top/index.mjs +3 -3
- package/es/badge/badge.mjs +3 -3
- package/es/badge/index.mjs +3 -3
- package/es/breadcrumb/breadcrumb-item.mjs +3 -3
- package/es/breadcrumb/breadcrumb.mjs +3 -3
- package/es/breadcrumb/index.mjs +3 -3
- package/es/button/button.mjs +4 -4
- package/es/button/index.mjs +4 -4
- package/es/calendar/calendar-cell.mjs +3 -3
- package/es/calendar/calendar.mjs +4 -4
- package/es/calendar/hooks/index.mjs +3 -3
- package/es/calendar/hooks/useCalendarClass.mjs +3 -3
- package/es/calendar/hooks/useColHeaders.mjs +3 -3
- package/es/calendar/hooks/useController.mjs +3 -3
- package/es/calendar/hooks/useState.mjs +3 -3
- package/es/calendar/index.mjs +4 -4
- package/es/calendar/utils/index.mjs +1 -1
- package/es/card/card.mjs +4 -4
- package/es/card/index.mjs +4 -4
- package/es/cascader/cascader-panel.mjs +4 -4
- package/es/cascader/cascader.mjs +4 -4
- package/es/cascader/components/Item.mjs +4 -4
- package/es/cascader/components/Panel.mjs +4 -4
- package/es/cascader/index.mjs +4 -4
- package/es/cascader/utils/className.d.ts +10 -4
- package/es/checkbox/checkbox.mjs +3 -3
- package/es/checkbox/group.mjs +3 -3
- package/es/checkbox/index.mjs +3 -3
- package/es/collapse/collapse-panel.mjs +3 -3
- package/es/collapse/collapse.mjs +3 -3
- package/es/collapse/index.mjs +3 -3
- package/es/color-picker/color-picker-panel.mjs +4 -4
- package/es/color-picker/color-picker.mjs +4 -4
- package/es/color-picker/hooks/index.mjs +3 -3
- package/es/color-picker/index.mjs +4 -4
- package/es/color-picker/panel/alpha.mjs +3 -3
- package/es/color-picker/panel/format/index.mjs +4 -4
- package/es/color-picker/panel/format/inputs.mjs +4 -4
- package/es/color-picker/panel/header.mjs +3 -3
- package/es/color-picker/panel/hue.mjs +3 -3
- package/es/color-picker/panel/index.mjs +4 -4
- package/es/color-picker/panel/linear-gradient.mjs +4 -4
- package/es/color-picker/panel/saturation.mjs +3 -3
- package/es/color-picker/panel/slider.mjs +3 -3
- package/es/color-picker/panel/swatches.mjs +3 -3
- package/es/color-picker/trigger.mjs +3 -3
- package/es/color-picker/utils/click-outsider.mjs +3 -3
- package/es/comment/comment.mjs +4 -4
- package/es/comment/index.mjs +4 -4
- package/es/common-components/fake-arrow.mjs +3 -3
- package/es/components.mjs +7 -7
- package/es/config-provider/config-provider.mjs +3 -3
- package/es/config-provider/context.mjs +3 -3
- package/es/config-provider/index.mjs +3 -3
- package/es/config-provider/useConfig.mjs +3 -3
- package/es/date-picker/DatePicker.mjs +7 -7
- package/es/date-picker/DatePickerPanel.mjs +7 -7
- package/es/date-picker/DateRangePicker.mjs +7 -7
- package/es/date-picker/DateRangePickerPanel.mjs +7 -7
- package/es/date-picker/base/Cell.mjs +5 -5
- package/es/date-picker/base/Footer.mjs +4 -4
- package/es/date-picker/base/Header.mjs +4 -4
- package/es/date-picker/base/Table.mjs +5 -5
- package/es/date-picker/hooks/useDisableDate.mjs +1 -1
- package/es/date-picker/hooks/useRange.mjs +4 -4
- package/es/date-picker/hooks/useRangeValue.mjs +2 -2
- package/es/date-picker/hooks/useSingle.mjs +4 -4
- package/es/date-picker/hooks/useSingleValue.mjs +2 -2
- package/es/date-picker/hooks/useTableData.mjs +5 -5
- package/es/date-picker/index.mjs +7 -7
- package/es/date-picker/panel/ExtraContent.mjs +4 -4
- package/es/date-picker/panel/PanelContent.mjs +7 -7
- package/es/date-picker/panel/RangePanel.mjs +7 -7
- package/es/date-picker/panel/SinglePanel.mjs +7 -7
- package/es/descriptions/descriptions-row.mjs +3 -3
- package/es/descriptions/descriptions.mjs +3 -3
- package/es/descriptions/index.mjs +3 -3
- package/es/dialog/dialog-card.mjs +14 -10
- package/es/dialog/dialog-card.mjs.map +1 -1
- package/es/dialog/dialog.d.ts +1 -1
- package/es/dialog/dialog.mjs +9 -22
- package/es/dialog/dialog.mjs.map +1 -1
- package/es/dialog/hooks.mjs +4 -4
- package/es/dialog/index.d.ts +3 -3
- package/es/dialog/index.mjs +4 -4
- package/es/dialog/plugin.mjs +4 -4
- package/es/divider/divider.mjs +3 -3
- package/es/divider/index.mjs +3 -3
- package/es/drawer/drawer.mjs +4 -4
- package/es/drawer/index.mjs +4 -4
- package/es/dropdown/dropdown-item.mjs +3 -3
- package/es/dropdown/dropdown-menu.mjs +3 -3
- package/es/dropdown/dropdown.mjs +3 -3
- package/es/dropdown/index.mjs +3 -3
- package/es/empty/empty.mjs +3 -3
- package/es/empty/index.mjs +3 -3
- package/es/form/const.mjs +3 -3
- package/es/form/form-item.mjs +3 -3
- package/es/form/form.mjs +3 -3
- package/es/form/index.mjs +3 -3
- package/es/grid/col.mjs +3 -3
- package/es/grid/index.mjs +3 -3
- package/es/grid/row.mjs +3 -3
- package/es/guide/guide.mjs +4 -4
- package/es/guide/index.mjs +4 -4
- package/es/hooks/index.mjs +3 -3
- package/es/hooks/useCommonClassName.mjs +3 -3
- package/es/hooks/useConfig.mjs +3 -3
- package/es/hooks/useGlobalIcon.mjs +3 -3
- package/es/hooks/useKeepAnimation.mjs +3 -3
- package/es/hooks/useRipple.mjs +3 -3
- package/es/image/image.mjs +3 -3
- package/es/image/index.mjs +3 -3
- package/es/image-viewer/base/ImageItem.mjs +3 -3
- package/es/image-viewer/base/ImageModalIcon.mjs +3 -3
- package/es/image-viewer/base/ImageViewerModal.mjs +4 -4
- package/es/image-viewer/base/ImageViewerUtils.mjs +3 -3
- package/es/image-viewer/image-viewer.mjs +4 -4
- package/es/image-viewer/index.mjs +4 -4
- package/es/index.mjs +8 -8
- package/es/input/index.mjs +3 -3
- package/es/input/input-group.mjs +3 -3
- package/es/input/input.mjs +3 -3
- package/es/input/useInput.mjs +3 -3
- package/es/input/useInputEventHandler.mjs +3 -3
- package/es/input-adornment/index.mjs +3 -3
- package/es/input-adornment/input-adornment.mjs +3 -3
- package/es/input-number/hooks/useInputNumber.mjs +3 -3
- package/es/input-number/index.mjs +4 -4
- package/es/input-number/input-number.mjs +4 -4
- package/es/layout/aside.mjs +3 -3
- package/es/layout/content.mjs +3 -3
- package/es/layout/footer.mjs +3 -3
- package/es/layout/header.mjs +3 -3
- package/es/layout/index.mjs +3 -3
- package/es/layout/layout.mjs +3 -3
- package/es/link/index.mjs +3 -3
- package/es/link/link.mjs +3 -3
- package/es/list/index.mjs +4 -4
- package/es/list/list-item-meta.mjs +3 -3
- package/es/list/list-item.mjs +3 -3
- package/es/list/list.mjs +11 -6
- package/es/list/list.mjs.map +1 -1
- package/es/loading/directive.mjs +4 -4
- package/es/loading/icon/gradient.mjs +3 -3
- package/es/loading/index.mjs +4 -4
- package/es/loading/loading.mjs +4 -4
- package/es/loading/plugin.mjs +4 -4
- package/es/locale/ar_KW.mjs +2 -2
- package/es/locale/it_IT.mjs +2 -2
- package/es/locale/ja_JP.mjs +2 -2
- package/es/locale/ko_KR.mjs +2 -2
- package/es/locale/ru_RU.mjs +2 -2
- package/es/locale/zh_CN.mjs +4 -4
- package/es/locale/zh_TW.mjs +2 -2
- package/es/menu/head-menu.mjs +3 -3
- package/es/menu/index.mjs +3 -3
- package/es/menu/menu-group.mjs +3 -3
- package/es/menu/menu-item.mjs +3 -3
- package/es/menu/menu.mjs +3 -3
- package/es/menu/submenu.mjs +3 -3
- package/es/message/index.mjs +4 -4
- package/es/message/message-list.mjs +4 -4
- package/es/message/message.mjs +4 -4
- package/es/message/plugin.mjs +4 -4
- package/es/notification/index.mjs +3 -3
- package/es/notification/notification-list.mjs +3 -3
- package/es/notification/notification.mjs +3 -3
- package/es/notification/plugin.mjs +3 -3
- package/es/pagination/hooks/index.mjs +3 -3
- package/es/pagination/hooks/usePaginationClasses.mjs +3 -3
- package/es/pagination/index.mjs +4 -4
- package/es/pagination/pagination-mini.mjs +4 -4
- package/es/pagination/pagination.mjs +4 -4
- package/es/plugins.mjs +4 -4
- package/es/popconfirm/index.mjs +4 -4
- package/es/popconfirm/popconfirm.mjs +4 -4
- package/es/popup/index.mjs +3 -3
- package/es/popup/popup.mjs +3 -3
- package/es/progress/index.mjs +3 -3
- package/es/progress/progress.mjs +3 -3
- package/es/radio/group.mjs +3 -3
- package/es/radio/index.mjs +3 -3
- package/es/radio/radio-button.mjs +3 -3
- package/es/radio/radio.mjs +3 -3
- package/es/range-input/index.mjs +3 -3
- package/es/range-input/range-input-popup.mjs +3 -3
- package/es/range-input/range-input.mjs +3 -3
- package/es/rate/index.mjs +3 -3
- package/es/rate/rate.mjs +3 -3
- package/es/select/hooks/index.mjs +3 -3
- package/es/select/hooks/useKeyboardControl.mjs +3 -3
- package/es/select/index.mjs +4 -4
- package/es/select/option-group.mjs +3 -3
- package/es/select/option.mjs +3 -3
- package/es/select/select-panel.mjs +3 -3
- package/es/select/select.mjs +4 -4
- package/es/select-input/index.mjs +4 -4
- package/es/select-input/select-input.mjs +4 -4
- package/es/select-input/useMultiple.mjs +4 -4
- package/es/select-input/useSingle.mjs +4 -4
- package/es/skeleton/index.mjs +3 -3
- package/es/skeleton/skeleton.mjs +3 -3
- package/es/slider/hooks/index.mjs +4 -4
- package/es/slider/hooks/useSliderInput.mjs +4 -4
- package/es/slider/hooks/useSliderMark.mjs +3 -3
- package/es/slider/hooks/useSliderTooltip.mjs +3 -3
- package/es/slider/index.mjs +4 -4
- package/es/slider/slider-button.mjs +3 -3
- package/es/slider/slider-mark.mjs +3 -3
- package/es/slider/slider.mjs +4 -4
- package/es/space/index.mjs +3 -3
- package/es/space/space.mjs +3 -3
- package/es/statistic/index.mjs +3 -3
- package/es/statistic/statistic.mjs +3 -3
- package/es/steps/index.mjs +3 -3
- package/es/steps/step-item.mjs +3 -3
- package/es/steps/steps.mjs +3 -3
- package/es/sticky-tool/index.mjs +3 -3
- package/es/sticky-tool/sticky-item.mjs +3 -3
- package/es/sticky-tool/sticky-tool.mjs +3 -3
- package/es/swiper/index.mjs +3 -3
- package/es/swiper/swiper-item.mjs +3 -3
- package/es/swiper/swiper.mjs +3 -3
- package/es/switch/index.mjs +4 -4
- package/es/switch/switch.mjs +4 -4
- package/es/table/base-table.mjs +4 -4
- package/es/table/column-checkbox-group.mjs +3 -3
- package/es/table/editable-cell.mjs +3 -3
- package/es/table/ellipsis.mjs +3 -3
- package/es/table/enhanced-table.mjs +4 -4
- package/es/table/filter-controller.mjs +4 -4
- package/es/table/hooks/useAsyncLoading.mjs +4 -4
- package/es/table/hooks/useClassName.mjs +3 -3
- package/es/table/hooks/useColumnController.mjs +4 -4
- package/es/table/hooks/useDragSort.mjs +3 -3
- package/es/table/hooks/useEditableRow.d.ts +1 -1
- package/es/table/hooks/useFilter.mjs +4 -4
- package/es/table/hooks/useHoverKeyboardEvent.mjs +1 -1
- package/es/table/hooks/useHoverKeyboardEvent.mjs.map +1 -1
- package/es/table/hooks/usePagination.mjs +4 -4
- package/es/table/hooks/useRowExpand.mjs +3 -3
- package/es/table/hooks/useRowSelect.mjs +3 -3
- package/es/table/hooks/useSorter.mjs +3 -3
- package/es/table/hooks/useStyle.mjs +3 -3
- package/es/table/hooks/useTableHeader.mjs +3 -3
- package/es/table/hooks/useTreeData.mjs +3 -3
- package/es/table/index.mjs +4 -4
- package/es/table/primary-table.mjs +4 -4
- package/es/table/sorter-button.mjs +3 -3
- package/es/table/tbody.mjs +3 -3
- package/es/table/tfoot.mjs +3 -3
- package/es/table/thead.mjs +3 -3
- package/es/table/tr.mjs +3 -3
- package/es/tabs/index.mjs +3 -3
- package/es/tabs/tab-nav-bar.mjs +3 -3
- package/es/tabs/tab-nav-item.mjs +3 -3
- package/es/tabs/tab-nav.mjs +3 -3
- package/es/tabs/tab-panel.mjs +3 -3
- package/es/tabs/tabs.mjs +3 -3
- package/es/tag/check-tag-group.mjs +3 -3
- package/es/tag/check-tag.mjs +3 -3
- package/es/tag/index.mjs +3 -3
- package/es/tag/tag.mjs +3 -3
- package/es/tag-input/hooks/index.mjs +3 -3
- package/es/tag-input/hooks/useTagList.mjs +3 -3
- package/es/tag-input/index.mjs +3 -3
- package/es/tag-input/tag-input.mjs +3 -3
- package/es/textarea/index.mjs +3 -3
- package/es/textarea/textarea.mjs +3 -3
- package/es/time-picker/index.mjs +5 -5
- package/es/time-picker/panel/single-panel.mjs +4 -4
- package/es/time-picker/panel/time-picker-panel.mjs +5 -5
- package/es/time-picker/time-picker.mjs +5 -5
- package/es/time-picker/time-range-picker.mjs +5 -5
- package/es/timeline/index.mjs +4 -4
- package/es/timeline/timeline-item.mjs +4 -4
- package/es/timeline/timeline.mjs +4 -4
- package/es/tooltip/index.mjs +3 -3
- package/es/tooltip/tooltip.mjs +3 -3
- package/es/transfer/components/transfer-list.mjs +4 -4
- package/es/transfer/components/transfer-operations.mjs +4 -4
- package/es/transfer/components/transfer-search.mjs +3 -3
- package/es/transfer/index.mjs +4 -4
- package/es/transfer/transfer.mjs +4 -4
- package/es/tree/adapt.mjs +4 -4
- package/es/tree/hooks/useDragHandle.mjs +4 -4
- package/es/tree/hooks/useDragHandle.mjs.map +1 -1
- package/es/tree/hooks/useDraggable.mjs +4 -4
- package/es/tree/hooks/useItemEvents.mjs +4 -4
- package/es/tree/hooks/useItemState.mjs +4 -4
- package/es/tree/hooks/useRenderIcon.mjs +4 -4
- package/es/tree/hooks/useRenderLabel.mjs +4 -4
- package/es/tree/hooks/useRenderLine.mjs +4 -4
- package/es/tree/hooks/useRenderOperations.mjs +4 -4
- package/es/tree/hooks/useTreeAction.mjs +4 -4
- package/es/tree/hooks/useTreeEvents.mjs +4 -4
- package/es/tree/hooks/useTreeItem.mjs +4 -4
- package/es/tree/hooks/useTreeNodes.mjs +4 -4
- package/es/tree/hooks/useTreeScroll.mjs +4 -4
- package/es/tree/hooks/useTreeState.mjs +4 -4
- package/es/tree/hooks/useTreeStore.mjs +4 -4
- package/es/tree/hooks/useTreeStyles.mjs +4 -4
- package/es/tree/index.mjs +4 -4
- package/es/tree/tree-item.mjs +4 -4
- package/es/tree/tree-types.d.ts +6 -6
- package/es/tree/tree.mjs +4 -4
- package/es/tree/util.mjs +4 -4
- package/es/tree-select/index.mjs +4 -4
- package/es/tree-select/tree-select.mjs +4 -4
- package/es/typography/ellipsis.mjs +3 -3
- package/es/typography/index.mjs +4 -4
- package/es/typography/paragraph.mjs +3 -3
- package/es/typography/text.mjs +4 -4
- package/es/typography/title.mjs +3 -3
- package/es/typography/typography.mjs +4 -4
- package/es/upload/hooks/useUpload.mjs +3 -3
- package/es/upload/index.mjs +4 -4
- package/es/upload/themes/dragger-file.mjs +4 -4
- package/es/upload/themes/image-card.mjs +4 -4
- package/es/upload/themes/multiple-flow-list.mjs +4 -4
- package/es/upload/themes/normal-file.mjs +4 -4
- package/es/upload/upload.mjs +4 -4
- package/es/watermark/index.mjs +3 -3
- package/es/watermark/watermark.mjs +3 -3
- package/esm/_chunks/{dep-cf09e57b.js → dep-9b589d8f.js} +1 -1
- package/{lib/_chunks/dep-115113b9.js.map → esm/_chunks/dep-9b589d8f.js.map} +1 -1
- package/esm/cascader/utils/className.d.ts +10 -4
- package/esm/dialog/dialog-card.js +10 -6
- package/esm/dialog/dialog-card.js.map +1 -1
- package/esm/dialog/dialog.d.ts +1 -1
- package/esm/dialog/dialog.js +5 -18
- package/esm/dialog/dialog.js.map +1 -1
- package/esm/dialog/index.d.ts +3 -3
- package/esm/index.js +1 -1
- package/esm/list/list.js +7 -2
- package/esm/list/list.js.map +1 -1
- package/esm/table/hooks/useEditableRow.d.ts +1 -1
- package/esm/table/hooks/useHoverKeyboardEvent.js +1 -1
- package/esm/table/hooks/useHoverKeyboardEvent.js.map +1 -1
- package/esm/tree/hooks/useDragHandle.js.map +1 -1
- package/esm/tree/tree-types.d.ts +6 -6
- package/lib/_chunks/{dep-115113b9.js → dep-a976f99c.js} +1 -1
- package/lib/_chunks/{dep-5e92d7ce.js.map → dep-a976f99c.js.map} +1 -1
- package/lib/cascader/utils/className.d.ts +10 -4
- package/lib/dialog/dialog-card.js +10 -6
- package/lib/dialog/dialog-card.js.map +1 -1
- package/lib/dialog/dialog.d.ts +1 -1
- package/lib/dialog/dialog.js +5 -18
- package/lib/dialog/dialog.js.map +1 -1
- package/lib/dialog/index.d.ts +3 -3
- package/lib/index-lib.js +1 -1
- package/lib/index.js +1 -1
- package/lib/list/list.js +7 -2
- package/lib/list/list.js.map +1 -1
- package/lib/table/hooks/useEditableRow.d.ts +1 -1
- package/lib/table/hooks/useHoverKeyboardEvent.js +1 -1
- package/lib/table/hooks/useHoverKeyboardEvent.js.map +1 -1
- package/lib/tree/hooks/useDragHandle.js.map +1 -1
- package/lib/tree/tree-types.d.ts +6 -6
- package/package.json +1 -1
- package/cjs/_chunks/dep-07c5645c.js +0 -590
- package/cjs/_chunks/dep-07c5645c.js.map +0 -1
- package/cjs/_chunks/dep-0abfbcda.js +0 -46
- package/cjs/_chunks/dep-0abfbcda.js.map +0 -1
- package/cjs/_chunks/dep-0d14bc3b.js +0 -174
- package/cjs/_chunks/dep-0d14bc3b.js.map +0 -1
- package/cjs/_chunks/dep-0e61f173.js +0 -158
- package/cjs/_chunks/dep-0e61f173.js.map +0 -1
- package/cjs/_chunks/dep-13a9cdb5.js +0 -77
- package/cjs/_chunks/dep-13a9cdb5.js.map +0 -1
- package/cjs/_chunks/dep-14d5ecd4.js +0 -602
- package/cjs/_chunks/dep-14d5ecd4.js.map +0 -1
- package/cjs/_chunks/dep-16ee2633.js +0 -213
- package/cjs/_chunks/dep-16ee2633.js.map +0 -1
- package/cjs/_chunks/dep-17029c24.js +0 -91
- package/cjs/_chunks/dep-17029c24.js.map +0 -1
- package/cjs/_chunks/dep-19c4a206.js +0 -449
- package/cjs/_chunks/dep-19c4a206.js.map +0 -1
- package/cjs/_chunks/dep-1a1f199d.js +0 -44
- package/cjs/_chunks/dep-1a1f199d.js.map +0 -1
- package/cjs/_chunks/dep-1a5c1851.js +0 -37
- package/cjs/_chunks/dep-1a5c1851.js.map +0 -1
- package/cjs/_chunks/dep-1df76403.js +0 -97
- package/cjs/_chunks/dep-1df76403.js.map +0 -1
- package/cjs/_chunks/dep-204cbc92.js +0 -565
- package/cjs/_chunks/dep-204cbc92.js.map +0 -1
- package/cjs/_chunks/dep-2072a8c7.js +0 -196
- package/cjs/_chunks/dep-2072a8c7.js.map +0 -1
- package/cjs/_chunks/dep-21ff2231.js +0 -93
- package/cjs/_chunks/dep-21ff2231.js.map +0 -1
- package/cjs/_chunks/dep-227da1bf.js +0 -218
- package/cjs/_chunks/dep-2bc4bf80.js +0 -52
- package/cjs/_chunks/dep-2bc4bf80.js.map +0 -1
- package/cjs/_chunks/dep-3362fdab.js +0 -375
- package/cjs/_chunks/dep-3362fdab.js.map +0 -1
- package/cjs/_chunks/dep-37af9a40.js +0 -85
- package/cjs/_chunks/dep-37af9a40.js.map +0 -1
- package/cjs/_chunks/dep-4405f5d6.js +0 -437
- package/cjs/_chunks/dep-4405f5d6.js.map +0 -1
- package/cjs/_chunks/dep-4424827e.js +0 -211
- package/cjs/_chunks/dep-4424827e.js.map +0 -1
- package/cjs/_chunks/dep-4a49f733.js +0 -204
- package/cjs/_chunks/dep-4a49f733.js.map +0 -1
- package/cjs/_chunks/dep-4d06a892.js +0 -30
- package/cjs/_chunks/dep-4d06a892.js.map +0 -1
- package/cjs/_chunks/dep-4f98aa34.js.map +0 -1
- package/cjs/_chunks/dep-51d205f9.js +0 -691
- package/cjs/_chunks/dep-51d205f9.js.map +0 -1
- package/cjs/_chunks/dep-52d76f64.js +0 -29
- package/cjs/_chunks/dep-52d76f64.js.map +0 -1
- package/cjs/_chunks/dep-530433a3.js +0 -103
- package/cjs/_chunks/dep-530433a3.js.map +0 -1
- package/cjs/_chunks/dep-55ff02cb.js +0 -38
- package/cjs/_chunks/dep-55ff02cb.js.map +0 -1
- package/cjs/_chunks/dep-56b3da3f.js +0 -38
- package/cjs/_chunks/dep-56b3da3f.js.map +0 -1
- package/cjs/_chunks/dep-56b7cacc.js +0 -57
- package/cjs/_chunks/dep-56b7cacc.js.map +0 -1
- package/cjs/_chunks/dep-57589961.js +0 -17
- package/cjs/_chunks/dep-57589961.js.map +0 -1
- package/cjs/_chunks/dep-5a29e633.js +0 -26
- package/cjs/_chunks/dep-5a29e633.js.map +0 -1
- package/cjs/_chunks/dep-5d06f46a.js +0 -129
- package/cjs/_chunks/dep-5d06f46a.js.map +0 -1
- package/cjs/_chunks/dep-5d704dfd.js +0 -148
- package/cjs/_chunks/dep-5d704dfd.js.map +0 -1
- package/cjs/_chunks/dep-5e249dc1.js +0 -23
- package/cjs/_chunks/dep-5e249dc1.js.map +0 -1
- package/cjs/_chunks/dep-5ec1ae32.js +0 -128
- package/cjs/_chunks/dep-5ec1ae32.js.map +0 -1
- package/cjs/_chunks/dep-6058ae1a.js +0 -61
- package/cjs/_chunks/dep-6058ae1a.js.map +0 -1
- package/cjs/_chunks/dep-624e7386.js +0 -46
- package/cjs/_chunks/dep-624e7386.js.map +0 -1
- package/cjs/_chunks/dep-66537895.js +0 -431
- package/cjs/_chunks/dep-66537895.js.map +0 -1
- package/cjs/_chunks/dep-6765b099.js +0 -112
- package/cjs/_chunks/dep-6765b099.js.map +0 -1
- package/cjs/_chunks/dep-6ab5cc58.js +0 -107
- package/cjs/_chunks/dep-6ab5cc58.js.map +0 -1
- package/cjs/_chunks/dep-6acbfee2.js +0 -197
- package/cjs/_chunks/dep-6acbfee2.js.map +0 -1
- package/cjs/_chunks/dep-6feae1a0.js +0 -420
- package/cjs/_chunks/dep-6feae1a0.js.map +0 -1
- package/cjs/_chunks/dep-72ef32f5.js +0 -31
- package/cjs/_chunks/dep-72ef32f5.js.map +0 -1
- package/cjs/_chunks/dep-7412331b.js +0 -32
- package/cjs/_chunks/dep-7412331b.js.map +0 -1
- package/cjs/_chunks/dep-79f64f6b.js +0 -115
- package/cjs/_chunks/dep-79f64f6b.js.map +0 -1
- package/cjs/_chunks/dep-7bee6805.js +0 -874
- package/cjs/_chunks/dep-7bee6805.js.map +0 -1
- package/cjs/_chunks/dep-8251b616.js +0 -17
- package/cjs/_chunks/dep-8251b616.js.map +0 -1
- package/cjs/_chunks/dep-8602ec79.js +0 -31
- package/cjs/_chunks/dep-8602ec79.js.map +0 -1
- package/cjs/_chunks/dep-8af3f825.js +0 -86
- package/cjs/_chunks/dep-8af3f825.js.map +0 -1
- package/cjs/_chunks/dep-8f798522.js +0 -84
- package/cjs/_chunks/dep-8f798522.js.map +0 -1
- package/cjs/_chunks/dep-94c54f7c.js +0 -85
- package/cjs/_chunks/dep-94c54f7c.js.map +0 -1
- package/cjs/_chunks/dep-96b5c26f.js +0 -44
- package/cjs/_chunks/dep-96b5c26f.js.map +0 -1
- package/cjs/_chunks/dep-97065c1c.js +0 -70
- package/cjs/_chunks/dep-97065c1c.js.map +0 -1
- package/cjs/_chunks/dep-984586e6.js +0 -342
- package/cjs/_chunks/dep-984586e6.js.map +0 -1
- package/cjs/_chunks/dep-9a074873.js +0 -665
- package/cjs/_chunks/dep-9a074873.js.map +0 -1
- package/cjs/_chunks/dep-9dadd8df.js +0 -42
- package/cjs/_chunks/dep-9dadd8df.js.map +0 -1
- package/cjs/_chunks/dep-a61cd56e.js +0 -77
- package/cjs/_chunks/dep-a61cd56e.js.map +0 -1
- package/cjs/_chunks/dep-ada1f4e0.js +0 -38
- package/cjs/_chunks/dep-ada1f4e0.js.map +0 -1
- package/cjs/_chunks/dep-aea3dbd0.js +0 -34
- package/cjs/_chunks/dep-aea3dbd0.js.map +0 -1
- package/cjs/_chunks/dep-af6c30f6.js +0 -17
- package/cjs/_chunks/dep-af6c30f6.js.map +0 -1
- package/cjs/_chunks/dep-afdb2fbc.js +0 -42
- package/cjs/_chunks/dep-afdb2fbc.js.map +0 -1
- package/cjs/_chunks/dep-b2781aa8.js +0 -35
- package/cjs/_chunks/dep-b2781aa8.js.map +0 -1
- package/cjs/_chunks/dep-b4134f97.js +0 -294
- package/cjs/_chunks/dep-b4134f97.js.map +0 -1
- package/cjs/_chunks/dep-b4c6c30b.js +0 -101
- package/cjs/_chunks/dep-b4c6c30b.js.map +0 -1
- package/cjs/_chunks/dep-bf8248bb.js +0 -36
- package/cjs/_chunks/dep-bf8248bb.js.map +0 -1
- package/cjs/_chunks/dep-c34c5c1f.js +0 -95
- package/cjs/_chunks/dep-c34c5c1f.js.map +0 -1
- package/cjs/_chunks/dep-c627348d.js +0 -52
- package/cjs/_chunks/dep-c627348d.js.map +0 -1
- package/cjs/_chunks/dep-c97b1c6a.js +0 -32
- package/cjs/_chunks/dep-c97b1c6a.js.map +0 -1
- package/cjs/_chunks/dep-cad2a2ef.js +0 -33
- package/cjs/_chunks/dep-cad2a2ef.js.map +0 -1
- package/cjs/_chunks/dep-cc8ce69b.js +0 -1306
- package/cjs/_chunks/dep-cc8ce69b.js.map +0 -1
- package/cjs/_chunks/dep-d08cc1d1.js +0 -107
- package/cjs/_chunks/dep-d08cc1d1.js.map +0 -1
- package/cjs/_chunks/dep-d62f492a.js +0 -46
- package/cjs/_chunks/dep-d62f492a.js.map +0 -1
- package/cjs/_chunks/dep-d67951b9.js +0 -36
- package/cjs/_chunks/dep-d67951b9.js.map +0 -1
- package/cjs/_chunks/dep-dfcd37b6.js +0 -38
- package/cjs/_chunks/dep-dfcd37b6.js.map +0 -1
- package/cjs/_chunks/dep-e0bac7d4.js +0 -38
- package/cjs/_chunks/dep-e0bac7d4.js.map +0 -1
- package/cjs/_chunks/dep-e4b7f506.js +0 -320
- package/cjs/_chunks/dep-e4b7f506.js.map +0 -1
- package/cjs/_chunks/dep-e54fb6dd.js +0 -117
- package/cjs/_chunks/dep-e54fb6dd.js.map +0 -1
- package/cjs/_chunks/dep-e68f489b.js +0 -418
- package/cjs/_chunks/dep-e68f489b.js.map +0 -1
- package/cjs/_chunks/dep-e7980901.js +0 -76
- package/cjs/_chunks/dep-e7980901.js.map +0 -1
- package/cjs/_chunks/dep-f4b8ac37.js +0 -81
- package/cjs/_chunks/dep-f4b8ac37.js.map +0 -1
- package/cjs/_chunks/dep-f7aeaf5b.js +0 -69
- package/cjs/_chunks/dep-f7aeaf5b.js.map +0 -1
- package/cjs/_chunks/dep-f91c958b.js +0 -89
- package/cjs/_chunks/dep-f91c958b.js.map +0 -1
- package/cjs/_chunks/dep-fde35a8e.js +0 -319
- package/cjs/_chunks/dep-fde35a8e.js.map +0 -1
- package/cjs/_chunks/dep-ffd032a6.js +0 -21
- package/cjs/_chunks/dep-ffd032a6.js.map +0 -1
- package/es/_chunks/dep-021ea54e.mjs +0 -26
- package/es/_chunks/dep-021ea54e.mjs.map +0 -1
- package/es/_chunks/dep-0676b537.mjs +0 -22
- package/es/_chunks/dep-0676b537.mjs.map +0 -1
- package/es/_chunks/dep-0ccb0e90.mjs +0 -362
- package/es/_chunks/dep-0ccb0e90.mjs.map +0 -1
- package/es/_chunks/dep-0d2353b1.mjs +0 -184
- package/es/_chunks/dep-0d2353b1.mjs.map +0 -1
- package/es/_chunks/dep-10752142.mjs +0 -335
- package/es/_chunks/dep-1906af4e.mjs +0 -175
- package/es/_chunks/dep-1906af4e.mjs.map +0 -1
- package/es/_chunks/dep-1d3bf6eb.mjs +0 -15
- package/es/_chunks/dep-1d3bf6eb.mjs.map +0 -1
- package/es/_chunks/dep-1f70d334.mjs +0 -35
- package/es/_chunks/dep-1f70d334.mjs.map +0 -1
- package/es/_chunks/dep-23fc38d4.mjs +0 -31
- package/es/_chunks/dep-23fc38d4.mjs.map +0 -1
- package/es/_chunks/dep-26bcc863.mjs +0 -214
- package/es/_chunks/dep-3b56169a.mjs +0 -117
- package/es/_chunks/dep-3b56169a.mjs.map +0 -1
- package/es/_chunks/dep-443605d7.mjs +0 -18
- package/es/_chunks/dep-443605d7.mjs.map +0 -1
- package/es/_chunks/dep-47930b05.mjs +0 -189
- package/es/_chunks/dep-47930b05.mjs.map +0 -1
- package/es/_chunks/dep-4b50299a.mjs.map +0 -1
- package/es/_chunks/dep-4b571b5a.mjs +0 -285
- package/es/_chunks/dep-4b571b5a.mjs.map +0 -1
- package/es/_chunks/dep-62351e6b.mjs +0 -27
- package/es/_chunks/dep-62351e6b.mjs.map +0 -1
- package/es/_chunks/dep-641cbd66.mjs +0 -216
- package/es/_chunks/dep-641cbd66.mjs.map +0 -1
- package/es/_chunks/dep-69ff158a.mjs +0 -41
- package/es/_chunks/dep-69ff158a.mjs.map +0 -1
- package/es/_chunks/dep-78c396a6.mjs +0 -863
- package/es/_chunks/dep-78c396a6.mjs.map +0 -1
- package/es/_chunks/dep-7b647caf.mjs +0 -35
- package/es/_chunks/dep-7b647caf.mjs.map +0 -1
- package/es/_chunks/dep-7df6feda.mjs +0 -621
- package/es/_chunks/dep-7df6feda.mjs.map +0 -1
- package/es/_chunks/dep-869c6696.mjs +0 -388
- package/es/_chunks/dep-869c6696.mjs.map +0 -1
- package/es/_chunks/dep-878d3af2.mjs +0 -22
- package/es/_chunks/dep-878d3af2.mjs.map +0 -1
- package/es/_chunks/dep-93662255.mjs +0 -34
- package/es/_chunks/dep-93662255.mjs.map +0 -1
- package/es/_chunks/dep-bbcf24bb.mjs.map +0 -1
- package/es/_chunks/dep-bc8731a1.mjs +0 -315
- package/es/_chunks/dep-bc8731a1.mjs.map +0 -1
- package/es/_chunks/dep-c04c275d.mjs +0 -8
- package/es/_chunks/dep-c04c275d.mjs.map +0 -1
- package/es/_chunks/dep-c0e626d4.mjs.map +0 -1
- package/es/_chunks/dep-c2edc49f.mjs +0 -267
- package/es/_chunks/dep-c2edc49f.mjs.map +0 -1
- package/es/_chunks/dep-c8799214.mjs +0 -8
- package/es/_chunks/dep-c8799214.mjs.map +0 -1
- package/es/_chunks/dep-cb6c95d4.mjs +0 -33
- package/es/_chunks/dep-cb6c95d4.mjs.map +0 -1
- package/es/_chunks/dep-cf6674ff.mjs +0 -1187
- package/es/_chunks/dep-cf6674ff.mjs.map +0 -1
- package/es/_chunks/dep-d312ff3a.mjs +0 -26
- package/es/_chunks/dep-d312ff3a.mjs.map +0 -1
- package/es/_chunks/dep-dadad5df.mjs +0 -381
- package/es/_chunks/dep-dadad5df.mjs.map +0 -1
- package/es/_chunks/dep-e4663ee9.mjs +0 -109
- package/es/_chunks/dep-e4663ee9.mjs.map +0 -1
- package/es/_chunks/dep-ed0938c1.mjs +0 -50
- package/es/_chunks/dep-ed0938c1.mjs.map +0 -1
- package/es/_chunks/dep-f3aebe98.mjs +0 -16
- package/es/_chunks/dep-f3aebe98.mjs.map +0 -1
- package/es/_chunks/dep-f5bee267.mjs +0 -1260
- package/es/_chunks/dep-f5bee267.mjs.map +0 -1
- package/es/_chunks/dep-f8e0dd67.mjs +0 -30
- package/es/_chunks/dep-f8e0dd67.mjs.map +0 -1
- package/es/_chunks/dep-f8fe5b10.mjs +0 -8
- package/es/_chunks/dep-f8fe5b10.mjs.map +0 -1
- package/es/_chunks/dep-fadf8798.mjs +0 -616
- package/esm/_chunks/dep-00a292aa.js +0 -109
- package/esm/_chunks/dep-00a292aa.js.map +0 -1
- package/esm/_chunks/dep-00c8c190.js +0 -285
- package/esm/_chunks/dep-00c8c190.js.map +0 -1
- package/esm/_chunks/dep-05119a03.js +0 -622
- package/esm/_chunks/dep-05119a03.js.map +0 -1
- package/esm/_chunks/dep-17b10395.js +0 -35
- package/esm/_chunks/dep-17b10395.js.map +0 -1
- package/esm/_chunks/dep-1dddb66a.js +0 -604
- package/esm/_chunks/dep-1dddb66a.js.map +0 -1
- package/esm/_chunks/dep-32db49c8.js +0 -864
- package/esm/_chunks/dep-32db49c8.js.map +0 -1
- package/esm/_chunks/dep-398a7f15.js +0 -214
- package/esm/_chunks/dep-398a7f15.js.map +0 -1
- package/esm/_chunks/dep-3e88a3f0.js +0 -189
- package/esm/_chunks/dep-3e88a3f0.js.map +0 -1
- package/esm/_chunks/dep-45dfbbca.js +0 -34
- package/esm/_chunks/dep-45dfbbca.js.map +0 -1
- package/esm/_chunks/dep-528cd424.js +0 -184
- package/esm/_chunks/dep-528cd424.js.map +0 -1
- package/esm/_chunks/dep-5729c962.js +0 -362
- package/esm/_chunks/dep-5729c962.js.map +0 -1
- package/esm/_chunks/dep-641d0e9c.js +0 -117
- package/esm/_chunks/dep-641d0e9c.js.map +0 -1
- package/esm/_chunks/dep-7c0f1bec.js +0 -22
- package/esm/_chunks/dep-7c0f1bec.js.map +0 -1
- package/esm/_chunks/dep-90464f69.js +0 -27
- package/esm/_chunks/dep-90464f69.js.map +0 -1
- package/esm/_chunks/dep-a33fc3ba.js +0 -31
- package/esm/_chunks/dep-a33fc3ba.js.map +0 -1
- package/esm/_chunks/dep-b2545267.js +0 -8
- package/esm/_chunks/dep-b2545267.js.map +0 -1
- package/esm/_chunks/dep-b659e3d2.js +0 -33
- package/esm/_chunks/dep-b659e3d2.js.map +0 -1
- package/esm/_chunks/dep-bf2518e0.js +0 -315
- package/esm/_chunks/dep-bf2518e0.js.map +0 -1
- package/esm/_chunks/dep-ca78c1e6.js +0 -175
- package/esm/_chunks/dep-ca78c1e6.js.map +0 -1
- package/esm/_chunks/dep-cb67199a.js +0 -267
- package/esm/_chunks/dep-cb67199a.js.map +0 -1
- package/esm/_chunks/dep-ccd7efc3.js +0 -1262
- package/esm/_chunks/dep-ccd7efc3.js.map +0 -1
- package/esm/_chunks/dep-cf09e57b.js.map +0 -1
- package/esm/_chunks/dep-e4b98947.js +0 -15
- package/esm/_chunks/dep-e4b98947.js.map +0 -1
- package/esm/_chunks/dep-e92ab21c.js +0 -335
- package/esm/_chunks/dep-e92ab21c.js.map +0 -1
- package/esm/_chunks/dep-ec878321.js +0 -216
- package/esm/_chunks/dep-ec878321.js.map +0 -1
- package/esm/_chunks/dep-ed7479b3.js +0 -8
- package/esm/_chunks/dep-ed7479b3.js.map +0 -1
- package/esm/_chunks/dep-ff98880f.js +0 -41
- package/esm/_chunks/dep-ff98880f.js.map +0 -1
- package/lib/_chunks/dep-0c20b611.js +0 -130
- package/lib/_chunks/dep-0c20b611.js.map +0 -1
- package/lib/_chunks/dep-29c11d69.js +0 -14
- package/lib/_chunks/dep-29c11d69.js.map +0 -1
- package/lib/_chunks/dep-2a866704.js +0 -87
- package/lib/_chunks/dep-2a866704.js.map +0 -1
- package/lib/_chunks/dep-2b1a9fb8.js +0 -282
- package/lib/_chunks/dep-2b1a9fb8.js.map +0 -1
- package/lib/_chunks/dep-2d34ae01.js +0 -30
- package/lib/_chunks/dep-2d34ae01.js.map +0 -1
- package/lib/_chunks/dep-45dfbbca.js +0 -34
- package/lib/_chunks/dep-45dfbbca.js.map +0 -1
- package/lib/_chunks/dep-4eab0242.js +0 -537
- package/lib/_chunks/dep-4eab0242.js.map +0 -1
- package/lib/_chunks/dep-513e4d0f.js +0 -77
- package/lib/_chunks/dep-513e4d0f.js.map +0 -1
- package/lib/_chunks/dep-5729c962.js +0 -362
- package/lib/_chunks/dep-5729c962.js.map +0 -1
- package/lib/_chunks/dep-5d67c4a6.js +0 -20
- package/lib/_chunks/dep-5d67c4a6.js.map +0 -1
- package/lib/_chunks/dep-5e92d7ce.js +0 -216
- package/lib/_chunks/dep-6b0d634f.js +0 -622
- package/lib/_chunks/dep-6b0d634f.js.map +0 -1
- package/lib/_chunks/dep-6d3c48b4.js +0 -112
- package/lib/_chunks/dep-6d3c48b4.js.map +0 -1
- package/lib/_chunks/dep-6f8a807d.js +0 -183
- package/lib/_chunks/dep-6f8a807d.js.map +0 -1
- package/lib/_chunks/dep-7c0f1bec.js +0 -22
- package/lib/_chunks/dep-7c0f1bec.js.map +0 -1
- package/lib/_chunks/dep-908681f3.js +0 -312
- package/lib/_chunks/dep-908681f3.js.map +0 -1
- package/lib/_chunks/dep-94b2bc8e.js +0 -265
- package/lib/_chunks/dep-94b2bc8e.js.map +0 -1
- package/lib/_chunks/dep-adb25597.js +0 -333
- package/lib/_chunks/dep-adb25597.js.map +0 -1
- package/lib/_chunks/dep-b659e3d2.js +0 -33
- package/lib/_chunks/dep-b659e3d2.js.map +0 -1
- package/lib/_chunks/dep-c1632d17.js +0 -670
- package/lib/_chunks/dep-c1632d17.js.map +0 -1
- package/lib/_chunks/dep-cb311d34.js +0 -160
- package/lib/_chunks/dep-cb311d34.js.map +0 -1
- package/lib/_chunks/dep-e0a80a1f.js +0 -861
- package/lib/_chunks/dep-e0a80a1f.js.map +0 -1
- package/lib/_chunks/dep-e4b98947.js +0 -15
- package/lib/_chunks/dep-e4b98947.js.map +0 -1
- package/lib/_chunks/dep-e9d3ac8e.js +0 -204
- package/lib/_chunks/dep-e9d3ac8e.js.map +0 -1
- package/lib/_chunks/dep-ea95073d.js +0 -35
- package/lib/_chunks/dep-ea95073d.js.map +0 -1
- package/lib/_chunks/dep-ee4f5a40.js +0 -1261
- package/lib/_chunks/dep-ee4f5a40.js.map +0 -1
|
@@ -1,1187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* tdesign v1.10.7
|
|
3
|
-
* (c) 2025 tdesign
|
|
4
|
-
* @license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// This file is autogenerated. It's used to publish ESM to npm.
|
|
8
|
-
function _typeof(obj) {
|
|
9
|
-
"@babel/helpers - typeof";
|
|
10
|
-
|
|
11
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
12
|
-
return typeof obj;
|
|
13
|
-
} : function (obj) {
|
|
14
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
15
|
-
}, _typeof(obj);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// https://github.com/bgrins/TinyColor
|
|
19
|
-
// Brian Grinstead, MIT License
|
|
20
|
-
|
|
21
|
-
var trimLeft = /^\s+/;
|
|
22
|
-
var trimRight = /\s+$/;
|
|
23
|
-
function tinycolor(color, opts) {
|
|
24
|
-
color = color ? color : "";
|
|
25
|
-
opts = opts || {};
|
|
26
|
-
|
|
27
|
-
// If input is already a tinycolor, return itself
|
|
28
|
-
if (color instanceof tinycolor) {
|
|
29
|
-
return color;
|
|
30
|
-
}
|
|
31
|
-
// If we are called as a function, call using new instead
|
|
32
|
-
if (!(this instanceof tinycolor)) {
|
|
33
|
-
return new tinycolor(color, opts);
|
|
34
|
-
}
|
|
35
|
-
var rgb = inputToRGB(color);
|
|
36
|
-
this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
|
|
37
|
-
this._gradientType = opts.gradientType;
|
|
38
|
-
|
|
39
|
-
// Don't let the range of [0,255] come back in [0,1].
|
|
40
|
-
// Potentially lose a little bit of precision here, but will fix issues where
|
|
41
|
-
// .5 gets interpreted as half of the total, instead of half of 1
|
|
42
|
-
// If it was supposed to be 128, this was already taken care of by `inputToRgb`
|
|
43
|
-
if (this._r < 1) this._r = Math.round(this._r);
|
|
44
|
-
if (this._g < 1) this._g = Math.round(this._g);
|
|
45
|
-
if (this._b < 1) this._b = Math.round(this._b);
|
|
46
|
-
this._ok = rgb.ok;
|
|
47
|
-
}
|
|
48
|
-
tinycolor.prototype = {
|
|
49
|
-
isDark: function isDark() {
|
|
50
|
-
return this.getBrightness() < 128;
|
|
51
|
-
},
|
|
52
|
-
isLight: function isLight() {
|
|
53
|
-
return !this.isDark();
|
|
54
|
-
},
|
|
55
|
-
isValid: function isValid() {
|
|
56
|
-
return this._ok;
|
|
57
|
-
},
|
|
58
|
-
getOriginalInput: function getOriginalInput() {
|
|
59
|
-
return this._originalInput;
|
|
60
|
-
},
|
|
61
|
-
getFormat: function getFormat() {
|
|
62
|
-
return this._format;
|
|
63
|
-
},
|
|
64
|
-
getAlpha: function getAlpha() {
|
|
65
|
-
return this._a;
|
|
66
|
-
},
|
|
67
|
-
getBrightness: function getBrightness() {
|
|
68
|
-
//http://www.w3.org/TR/AERT#color-contrast
|
|
69
|
-
var rgb = this.toRgb();
|
|
70
|
-
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
|
|
71
|
-
},
|
|
72
|
-
getLuminance: function getLuminance() {
|
|
73
|
-
//http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
74
|
-
var rgb = this.toRgb();
|
|
75
|
-
var RsRGB, GsRGB, BsRGB, R, G, B;
|
|
76
|
-
RsRGB = rgb.r / 255;
|
|
77
|
-
GsRGB = rgb.g / 255;
|
|
78
|
-
BsRGB = rgb.b / 255;
|
|
79
|
-
if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
|
|
80
|
-
if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
|
|
81
|
-
if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
|
|
82
|
-
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
83
|
-
},
|
|
84
|
-
setAlpha: function setAlpha(value) {
|
|
85
|
-
this._a = boundAlpha(value);
|
|
86
|
-
this._roundA = Math.round(100 * this._a) / 100;
|
|
87
|
-
return this;
|
|
88
|
-
},
|
|
89
|
-
toHsv: function toHsv() {
|
|
90
|
-
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
91
|
-
return {
|
|
92
|
-
h: hsv.h * 360,
|
|
93
|
-
s: hsv.s,
|
|
94
|
-
v: hsv.v,
|
|
95
|
-
a: this._a
|
|
96
|
-
};
|
|
97
|
-
},
|
|
98
|
-
toHsvString: function toHsvString() {
|
|
99
|
-
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
100
|
-
var h = Math.round(hsv.h * 360),
|
|
101
|
-
s = Math.round(hsv.s * 100),
|
|
102
|
-
v = Math.round(hsv.v * 100);
|
|
103
|
-
return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
|
|
104
|
-
},
|
|
105
|
-
toHsl: function toHsl() {
|
|
106
|
-
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
107
|
-
return {
|
|
108
|
-
h: hsl.h * 360,
|
|
109
|
-
s: hsl.s,
|
|
110
|
-
l: hsl.l,
|
|
111
|
-
a: this._a
|
|
112
|
-
};
|
|
113
|
-
},
|
|
114
|
-
toHslString: function toHslString() {
|
|
115
|
-
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
116
|
-
var h = Math.round(hsl.h * 360),
|
|
117
|
-
s = Math.round(hsl.s * 100),
|
|
118
|
-
l = Math.round(hsl.l * 100);
|
|
119
|
-
return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
|
|
120
|
-
},
|
|
121
|
-
toHex: function toHex(allow3Char) {
|
|
122
|
-
return rgbToHex(this._r, this._g, this._b, allow3Char);
|
|
123
|
-
},
|
|
124
|
-
toHexString: function toHexString(allow3Char) {
|
|
125
|
-
return "#" + this.toHex(allow3Char);
|
|
126
|
-
},
|
|
127
|
-
toHex8: function toHex8(allow4Char) {
|
|
128
|
-
return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
|
|
129
|
-
},
|
|
130
|
-
toHex8String: function toHex8String(allow4Char) {
|
|
131
|
-
return "#" + this.toHex8(allow4Char);
|
|
132
|
-
},
|
|
133
|
-
toRgb: function toRgb() {
|
|
134
|
-
return {
|
|
135
|
-
r: Math.round(this._r),
|
|
136
|
-
g: Math.round(this._g),
|
|
137
|
-
b: Math.round(this._b),
|
|
138
|
-
a: this._a
|
|
139
|
-
};
|
|
140
|
-
},
|
|
141
|
-
toRgbString: function toRgbString() {
|
|
142
|
-
return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
|
|
143
|
-
},
|
|
144
|
-
toPercentageRgb: function toPercentageRgb() {
|
|
145
|
-
return {
|
|
146
|
-
r: Math.round(bound01(this._r, 255) * 100) + "%",
|
|
147
|
-
g: Math.round(bound01(this._g, 255) * 100) + "%",
|
|
148
|
-
b: Math.round(bound01(this._b, 255) * 100) + "%",
|
|
149
|
-
a: this._a
|
|
150
|
-
};
|
|
151
|
-
},
|
|
152
|
-
toPercentageRgbString: function toPercentageRgbString() {
|
|
153
|
-
return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
154
|
-
},
|
|
155
|
-
toName: function toName() {
|
|
156
|
-
if (this._a === 0) {
|
|
157
|
-
return "transparent";
|
|
158
|
-
}
|
|
159
|
-
if (this._a < 1) {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
|
|
163
|
-
},
|
|
164
|
-
toFilter: function toFilter(secondColor) {
|
|
165
|
-
var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
|
|
166
|
-
var secondHex8String = hex8String;
|
|
167
|
-
var gradientType = this._gradientType ? "GradientType = 1, " : "";
|
|
168
|
-
if (secondColor) {
|
|
169
|
-
var s = tinycolor(secondColor);
|
|
170
|
-
secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
|
|
171
|
-
}
|
|
172
|
-
return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
|
|
173
|
-
},
|
|
174
|
-
toString: function toString(format) {
|
|
175
|
-
var formatSet = !!format;
|
|
176
|
-
format = format || this._format;
|
|
177
|
-
var formattedString = false;
|
|
178
|
-
var hasAlpha = this._a < 1 && this._a >= 0;
|
|
179
|
-
var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
|
|
180
|
-
if (needsAlphaFormat) {
|
|
181
|
-
// Special case for "transparent", all other non-alpha formats
|
|
182
|
-
// will return rgba when there is transparency.
|
|
183
|
-
if (format === "name" && this._a === 0) {
|
|
184
|
-
return this.toName();
|
|
185
|
-
}
|
|
186
|
-
return this.toRgbString();
|
|
187
|
-
}
|
|
188
|
-
if (format === "rgb") {
|
|
189
|
-
formattedString = this.toRgbString();
|
|
190
|
-
}
|
|
191
|
-
if (format === "prgb") {
|
|
192
|
-
formattedString = this.toPercentageRgbString();
|
|
193
|
-
}
|
|
194
|
-
if (format === "hex" || format === "hex6") {
|
|
195
|
-
formattedString = this.toHexString();
|
|
196
|
-
}
|
|
197
|
-
if (format === "hex3") {
|
|
198
|
-
formattedString = this.toHexString(true);
|
|
199
|
-
}
|
|
200
|
-
if (format === "hex4") {
|
|
201
|
-
formattedString = this.toHex8String(true);
|
|
202
|
-
}
|
|
203
|
-
if (format === "hex8") {
|
|
204
|
-
formattedString = this.toHex8String();
|
|
205
|
-
}
|
|
206
|
-
if (format === "name") {
|
|
207
|
-
formattedString = this.toName();
|
|
208
|
-
}
|
|
209
|
-
if (format === "hsl") {
|
|
210
|
-
formattedString = this.toHslString();
|
|
211
|
-
}
|
|
212
|
-
if (format === "hsv") {
|
|
213
|
-
formattedString = this.toHsvString();
|
|
214
|
-
}
|
|
215
|
-
return formattedString || this.toHexString();
|
|
216
|
-
},
|
|
217
|
-
clone: function clone() {
|
|
218
|
-
return tinycolor(this.toString());
|
|
219
|
-
},
|
|
220
|
-
_applyModification: function _applyModification(fn, args) {
|
|
221
|
-
var color = fn.apply(null, [this].concat([].slice.call(args)));
|
|
222
|
-
this._r = color._r;
|
|
223
|
-
this._g = color._g;
|
|
224
|
-
this._b = color._b;
|
|
225
|
-
this.setAlpha(color._a);
|
|
226
|
-
return this;
|
|
227
|
-
},
|
|
228
|
-
lighten: function lighten() {
|
|
229
|
-
return this._applyModification(_lighten, arguments);
|
|
230
|
-
},
|
|
231
|
-
brighten: function brighten() {
|
|
232
|
-
return this._applyModification(_brighten, arguments);
|
|
233
|
-
},
|
|
234
|
-
darken: function darken() {
|
|
235
|
-
return this._applyModification(_darken, arguments);
|
|
236
|
-
},
|
|
237
|
-
desaturate: function desaturate() {
|
|
238
|
-
return this._applyModification(_desaturate, arguments);
|
|
239
|
-
},
|
|
240
|
-
saturate: function saturate() {
|
|
241
|
-
return this._applyModification(_saturate, arguments);
|
|
242
|
-
},
|
|
243
|
-
greyscale: function greyscale() {
|
|
244
|
-
return this._applyModification(_greyscale, arguments);
|
|
245
|
-
},
|
|
246
|
-
spin: function spin() {
|
|
247
|
-
return this._applyModification(_spin, arguments);
|
|
248
|
-
},
|
|
249
|
-
_applyCombination: function _applyCombination(fn, args) {
|
|
250
|
-
return fn.apply(null, [this].concat([].slice.call(args)));
|
|
251
|
-
},
|
|
252
|
-
analogous: function analogous() {
|
|
253
|
-
return this._applyCombination(_analogous, arguments);
|
|
254
|
-
},
|
|
255
|
-
complement: function complement() {
|
|
256
|
-
return this._applyCombination(_complement, arguments);
|
|
257
|
-
},
|
|
258
|
-
monochromatic: function monochromatic() {
|
|
259
|
-
return this._applyCombination(_monochromatic, arguments);
|
|
260
|
-
},
|
|
261
|
-
splitcomplement: function splitcomplement() {
|
|
262
|
-
return this._applyCombination(_splitcomplement, arguments);
|
|
263
|
-
},
|
|
264
|
-
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
265
|
-
// polyad: function (number) {
|
|
266
|
-
// return this._applyCombination(polyad, [number]);
|
|
267
|
-
// },
|
|
268
|
-
triad: function triad() {
|
|
269
|
-
return this._applyCombination(polyad, [3]);
|
|
270
|
-
},
|
|
271
|
-
tetrad: function tetrad() {
|
|
272
|
-
return this._applyCombination(polyad, [4]);
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
// If input is an object, force 1 into "1.0" to handle ratios properly
|
|
277
|
-
// String input requires "1.0" as input, so 1 will be treated as 1
|
|
278
|
-
tinycolor.fromRatio = function (color, opts) {
|
|
279
|
-
if (_typeof(color) == "object") {
|
|
280
|
-
var newColor = {};
|
|
281
|
-
for (var i in color) {
|
|
282
|
-
if (color.hasOwnProperty(i)) {
|
|
283
|
-
if (i === "a") {
|
|
284
|
-
newColor[i] = color[i];
|
|
285
|
-
} else {
|
|
286
|
-
newColor[i] = convertToPercentage(color[i]);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
color = newColor;
|
|
291
|
-
}
|
|
292
|
-
return tinycolor(color, opts);
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
// Given a string or object, convert that input to RGB
|
|
296
|
-
// Possible string inputs:
|
|
297
|
-
//
|
|
298
|
-
// "red"
|
|
299
|
-
// "#f00" or "f00"
|
|
300
|
-
// "#ff0000" or "ff0000"
|
|
301
|
-
// "#ff000000" or "ff000000"
|
|
302
|
-
// "rgb 255 0 0" or "rgb (255, 0, 0)"
|
|
303
|
-
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
|
|
304
|
-
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
|
|
305
|
-
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
|
|
306
|
-
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
|
|
307
|
-
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
|
|
308
|
-
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
|
|
309
|
-
//
|
|
310
|
-
function inputToRGB(color) {
|
|
311
|
-
var rgb = {
|
|
312
|
-
r: 0,
|
|
313
|
-
g: 0,
|
|
314
|
-
b: 0
|
|
315
|
-
};
|
|
316
|
-
var a = 1;
|
|
317
|
-
var s = null;
|
|
318
|
-
var v = null;
|
|
319
|
-
var l = null;
|
|
320
|
-
var ok = false;
|
|
321
|
-
var format = false;
|
|
322
|
-
if (typeof color == "string") {
|
|
323
|
-
color = stringInputToObject(color);
|
|
324
|
-
}
|
|
325
|
-
if (_typeof(color) == "object") {
|
|
326
|
-
if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
|
|
327
|
-
rgb = rgbToRgb(color.r, color.g, color.b);
|
|
328
|
-
ok = true;
|
|
329
|
-
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
|
330
|
-
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
|
|
331
|
-
s = convertToPercentage(color.s);
|
|
332
|
-
v = convertToPercentage(color.v);
|
|
333
|
-
rgb = hsvToRgb(color.h, s, v);
|
|
334
|
-
ok = true;
|
|
335
|
-
format = "hsv";
|
|
336
|
-
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
|
|
337
|
-
s = convertToPercentage(color.s);
|
|
338
|
-
l = convertToPercentage(color.l);
|
|
339
|
-
rgb = hslToRgb(color.h, s, l);
|
|
340
|
-
ok = true;
|
|
341
|
-
format = "hsl";
|
|
342
|
-
}
|
|
343
|
-
if (color.hasOwnProperty("a")) {
|
|
344
|
-
a = color.a;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
a = boundAlpha(a);
|
|
348
|
-
return {
|
|
349
|
-
ok: ok,
|
|
350
|
-
format: color.format || format,
|
|
351
|
-
r: Math.min(255, Math.max(rgb.r, 0)),
|
|
352
|
-
g: Math.min(255, Math.max(rgb.g, 0)),
|
|
353
|
-
b: Math.min(255, Math.max(rgb.b, 0)),
|
|
354
|
-
a: a
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// Conversion Functions
|
|
359
|
-
// --------------------
|
|
360
|
-
|
|
361
|
-
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
|
|
362
|
-
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
|
|
363
|
-
|
|
364
|
-
// `rgbToRgb`
|
|
365
|
-
// Handle bounds / percentage checking to conform to CSS color spec
|
|
366
|
-
// <http://www.w3.org/TR/css3-color/>
|
|
367
|
-
// *Assumes:* r, g, b in [0, 255] or [0, 1]
|
|
368
|
-
// *Returns:* { r, g, b } in [0, 255]
|
|
369
|
-
function rgbToRgb(r, g, b) {
|
|
370
|
-
return {
|
|
371
|
-
r: bound01(r, 255) * 255,
|
|
372
|
-
g: bound01(g, 255) * 255,
|
|
373
|
-
b: bound01(b, 255) * 255
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
// `rgbToHsl`
|
|
378
|
-
// Converts an RGB color value to HSL.
|
|
379
|
-
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
|
|
380
|
-
// *Returns:* { h, s, l } in [0,1]
|
|
381
|
-
function rgbToHsl(r, g, b) {
|
|
382
|
-
r = bound01(r, 255);
|
|
383
|
-
g = bound01(g, 255);
|
|
384
|
-
b = bound01(b, 255);
|
|
385
|
-
var max = Math.max(r, g, b),
|
|
386
|
-
min = Math.min(r, g, b);
|
|
387
|
-
var h,
|
|
388
|
-
s,
|
|
389
|
-
l = (max + min) / 2;
|
|
390
|
-
if (max == min) {
|
|
391
|
-
h = s = 0; // achromatic
|
|
392
|
-
} else {
|
|
393
|
-
var d = max - min;
|
|
394
|
-
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
395
|
-
switch (max) {
|
|
396
|
-
case r:
|
|
397
|
-
h = (g - b) / d + (g < b ? 6 : 0);
|
|
398
|
-
break;
|
|
399
|
-
case g:
|
|
400
|
-
h = (b - r) / d + 2;
|
|
401
|
-
break;
|
|
402
|
-
case b:
|
|
403
|
-
h = (r - g) / d + 4;
|
|
404
|
-
break;
|
|
405
|
-
}
|
|
406
|
-
h /= 6;
|
|
407
|
-
}
|
|
408
|
-
return {
|
|
409
|
-
h: h,
|
|
410
|
-
s: s,
|
|
411
|
-
l: l
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// `hslToRgb`
|
|
416
|
-
// Converts an HSL color value to RGB.
|
|
417
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
|
|
418
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
419
|
-
function hslToRgb(h, s, l) {
|
|
420
|
-
var r, g, b;
|
|
421
|
-
h = bound01(h, 360);
|
|
422
|
-
s = bound01(s, 100);
|
|
423
|
-
l = bound01(l, 100);
|
|
424
|
-
function hue2rgb(p, q, t) {
|
|
425
|
-
if (t < 0) t += 1;
|
|
426
|
-
if (t > 1) t -= 1;
|
|
427
|
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
428
|
-
if (t < 1 / 2) return q;
|
|
429
|
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
430
|
-
return p;
|
|
431
|
-
}
|
|
432
|
-
if (s === 0) {
|
|
433
|
-
r = g = b = l; // achromatic
|
|
434
|
-
} else {
|
|
435
|
-
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
436
|
-
var p = 2 * l - q;
|
|
437
|
-
r = hue2rgb(p, q, h + 1 / 3);
|
|
438
|
-
g = hue2rgb(p, q, h);
|
|
439
|
-
b = hue2rgb(p, q, h - 1 / 3);
|
|
440
|
-
}
|
|
441
|
-
return {
|
|
442
|
-
r: r * 255,
|
|
443
|
-
g: g * 255,
|
|
444
|
-
b: b * 255
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
// `rgbToHsv`
|
|
449
|
-
// Converts an RGB color value to HSV
|
|
450
|
-
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
|
451
|
-
// *Returns:* { h, s, v } in [0,1]
|
|
452
|
-
function rgbToHsv(r, g, b) {
|
|
453
|
-
r = bound01(r, 255);
|
|
454
|
-
g = bound01(g, 255);
|
|
455
|
-
b = bound01(b, 255);
|
|
456
|
-
var max = Math.max(r, g, b),
|
|
457
|
-
min = Math.min(r, g, b);
|
|
458
|
-
var h,
|
|
459
|
-
s,
|
|
460
|
-
v = max;
|
|
461
|
-
var d = max - min;
|
|
462
|
-
s = max === 0 ? 0 : d / max;
|
|
463
|
-
if (max == min) {
|
|
464
|
-
h = 0; // achromatic
|
|
465
|
-
} else {
|
|
466
|
-
switch (max) {
|
|
467
|
-
case r:
|
|
468
|
-
h = (g - b) / d + (g < b ? 6 : 0);
|
|
469
|
-
break;
|
|
470
|
-
case g:
|
|
471
|
-
h = (b - r) / d + 2;
|
|
472
|
-
break;
|
|
473
|
-
case b:
|
|
474
|
-
h = (r - g) / d + 4;
|
|
475
|
-
break;
|
|
476
|
-
}
|
|
477
|
-
h /= 6;
|
|
478
|
-
}
|
|
479
|
-
return {
|
|
480
|
-
h: h,
|
|
481
|
-
s: s,
|
|
482
|
-
v: v
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
// `hsvToRgb`
|
|
487
|
-
// Converts an HSV color value to RGB.
|
|
488
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
|
489
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
490
|
-
function hsvToRgb(h, s, v) {
|
|
491
|
-
h = bound01(h, 360) * 6;
|
|
492
|
-
s = bound01(s, 100);
|
|
493
|
-
v = bound01(v, 100);
|
|
494
|
-
var i = Math.floor(h),
|
|
495
|
-
f = h - i,
|
|
496
|
-
p = v * (1 - s),
|
|
497
|
-
q = v * (1 - f * s),
|
|
498
|
-
t = v * (1 - (1 - f) * s),
|
|
499
|
-
mod = i % 6,
|
|
500
|
-
r = [v, q, p, p, t, v][mod],
|
|
501
|
-
g = [t, v, v, q, p, p][mod],
|
|
502
|
-
b = [p, p, t, v, v, q][mod];
|
|
503
|
-
return {
|
|
504
|
-
r: r * 255,
|
|
505
|
-
g: g * 255,
|
|
506
|
-
b: b * 255
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// `rgbToHex`
|
|
511
|
-
// Converts an RGB color to hex
|
|
512
|
-
// Assumes r, g, and b are contained in the set [0, 255]
|
|
513
|
-
// Returns a 3 or 6 character hex
|
|
514
|
-
function rgbToHex(r, g, b, allow3Char) {
|
|
515
|
-
var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
|
|
516
|
-
|
|
517
|
-
// Return a 3 character hex if possible
|
|
518
|
-
if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
|
|
519
|
-
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
|
520
|
-
}
|
|
521
|
-
return hex.join("");
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// `rgbaToHex`
|
|
525
|
-
// Converts an RGBA color plus alpha transparency to hex
|
|
526
|
-
// Assumes r, g, b are contained in the set [0, 255] and
|
|
527
|
-
// a in [0, 1]. Returns a 4 or 8 character rgba hex
|
|
528
|
-
function rgbaToHex(r, g, b, a, allow4Char) {
|
|
529
|
-
var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
|
|
530
|
-
|
|
531
|
-
// Return a 4 character hex if possible
|
|
532
|
-
if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
|
|
533
|
-
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
|
|
534
|
-
}
|
|
535
|
-
return hex.join("");
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
// `rgbaToArgbHex`
|
|
539
|
-
// Converts an RGBA color to an ARGB Hex8 string
|
|
540
|
-
// Rarely used, but required for "toFilter()"
|
|
541
|
-
function rgbaToArgbHex(r, g, b, a) {
|
|
542
|
-
var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
|
|
543
|
-
return hex.join("");
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
// `equals`
|
|
547
|
-
// Can be called with any tinycolor input
|
|
548
|
-
tinycolor.equals = function (color1, color2) {
|
|
549
|
-
if (!color1 || !color2) return false;
|
|
550
|
-
return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
|
|
551
|
-
};
|
|
552
|
-
tinycolor.random = function () {
|
|
553
|
-
return tinycolor.fromRatio({
|
|
554
|
-
r: Math.random(),
|
|
555
|
-
g: Math.random(),
|
|
556
|
-
b: Math.random()
|
|
557
|
-
});
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
// Modification Functions
|
|
561
|
-
// ----------------------
|
|
562
|
-
// Thanks to less.js for some of the basics here
|
|
563
|
-
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
|
|
564
|
-
|
|
565
|
-
function _desaturate(color, amount) {
|
|
566
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
567
|
-
var hsl = tinycolor(color).toHsl();
|
|
568
|
-
hsl.s -= amount / 100;
|
|
569
|
-
hsl.s = clamp01(hsl.s);
|
|
570
|
-
return tinycolor(hsl);
|
|
571
|
-
}
|
|
572
|
-
function _saturate(color, amount) {
|
|
573
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
574
|
-
var hsl = tinycolor(color).toHsl();
|
|
575
|
-
hsl.s += amount / 100;
|
|
576
|
-
hsl.s = clamp01(hsl.s);
|
|
577
|
-
return tinycolor(hsl);
|
|
578
|
-
}
|
|
579
|
-
function _greyscale(color) {
|
|
580
|
-
return tinycolor(color).desaturate(100);
|
|
581
|
-
}
|
|
582
|
-
function _lighten(color, amount) {
|
|
583
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
584
|
-
var hsl = tinycolor(color).toHsl();
|
|
585
|
-
hsl.l += amount / 100;
|
|
586
|
-
hsl.l = clamp01(hsl.l);
|
|
587
|
-
return tinycolor(hsl);
|
|
588
|
-
}
|
|
589
|
-
function _brighten(color, amount) {
|
|
590
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
591
|
-
var rgb = tinycolor(color).toRgb();
|
|
592
|
-
rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
|
|
593
|
-
rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
|
|
594
|
-
rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
|
|
595
|
-
return tinycolor(rgb);
|
|
596
|
-
}
|
|
597
|
-
function _darken(color, amount) {
|
|
598
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
599
|
-
var hsl = tinycolor(color).toHsl();
|
|
600
|
-
hsl.l -= amount / 100;
|
|
601
|
-
hsl.l = clamp01(hsl.l);
|
|
602
|
-
return tinycolor(hsl);
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
606
|
-
// Values outside of this range will be wrapped into this range.
|
|
607
|
-
function _spin(color, amount) {
|
|
608
|
-
var hsl = tinycolor(color).toHsl();
|
|
609
|
-
var hue = (hsl.h + amount) % 360;
|
|
610
|
-
hsl.h = hue < 0 ? 360 + hue : hue;
|
|
611
|
-
return tinycolor(hsl);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
// Combination Functions
|
|
615
|
-
// ---------------------
|
|
616
|
-
// Thanks to jQuery xColor for some of the ideas behind these
|
|
617
|
-
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
|
|
618
|
-
|
|
619
|
-
function _complement(color) {
|
|
620
|
-
var hsl = tinycolor(color).toHsl();
|
|
621
|
-
hsl.h = (hsl.h + 180) % 360;
|
|
622
|
-
return tinycolor(hsl);
|
|
623
|
-
}
|
|
624
|
-
function polyad(color, number) {
|
|
625
|
-
if (isNaN(number) || number <= 0) {
|
|
626
|
-
throw new Error("Argument to polyad must be a positive number");
|
|
627
|
-
}
|
|
628
|
-
var hsl = tinycolor(color).toHsl();
|
|
629
|
-
var result = [tinycolor(color)];
|
|
630
|
-
var step = 360 / number;
|
|
631
|
-
for (var i = 1; i < number; i++) {
|
|
632
|
-
result.push(tinycolor({
|
|
633
|
-
h: (hsl.h + i * step) % 360,
|
|
634
|
-
s: hsl.s,
|
|
635
|
-
l: hsl.l
|
|
636
|
-
}));
|
|
637
|
-
}
|
|
638
|
-
return result;
|
|
639
|
-
}
|
|
640
|
-
function _splitcomplement(color) {
|
|
641
|
-
var hsl = tinycolor(color).toHsl();
|
|
642
|
-
var h = hsl.h;
|
|
643
|
-
return [tinycolor(color), tinycolor({
|
|
644
|
-
h: (h + 72) % 360,
|
|
645
|
-
s: hsl.s,
|
|
646
|
-
l: hsl.l
|
|
647
|
-
}), tinycolor({
|
|
648
|
-
h: (h + 216) % 360,
|
|
649
|
-
s: hsl.s,
|
|
650
|
-
l: hsl.l
|
|
651
|
-
})];
|
|
652
|
-
}
|
|
653
|
-
function _analogous(color, results, slices) {
|
|
654
|
-
results = results || 6;
|
|
655
|
-
slices = slices || 30;
|
|
656
|
-
var hsl = tinycolor(color).toHsl();
|
|
657
|
-
var part = 360 / slices;
|
|
658
|
-
var ret = [tinycolor(color)];
|
|
659
|
-
for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
|
|
660
|
-
hsl.h = (hsl.h + part) % 360;
|
|
661
|
-
ret.push(tinycolor(hsl));
|
|
662
|
-
}
|
|
663
|
-
return ret;
|
|
664
|
-
}
|
|
665
|
-
function _monochromatic(color, results) {
|
|
666
|
-
results = results || 6;
|
|
667
|
-
var hsv = tinycolor(color).toHsv();
|
|
668
|
-
var h = hsv.h,
|
|
669
|
-
s = hsv.s,
|
|
670
|
-
v = hsv.v;
|
|
671
|
-
var ret = [];
|
|
672
|
-
var modification = 1 / results;
|
|
673
|
-
while (results--) {
|
|
674
|
-
ret.push(tinycolor({
|
|
675
|
-
h: h,
|
|
676
|
-
s: s,
|
|
677
|
-
v: v
|
|
678
|
-
}));
|
|
679
|
-
v = (v + modification) % 1;
|
|
680
|
-
}
|
|
681
|
-
return ret;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
// Utility Functions
|
|
685
|
-
// ---------------------
|
|
686
|
-
|
|
687
|
-
tinycolor.mix = function (color1, color2, amount) {
|
|
688
|
-
amount = amount === 0 ? 0 : amount || 50;
|
|
689
|
-
var rgb1 = tinycolor(color1).toRgb();
|
|
690
|
-
var rgb2 = tinycolor(color2).toRgb();
|
|
691
|
-
var p = amount / 100;
|
|
692
|
-
var rgba = {
|
|
693
|
-
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
694
|
-
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
695
|
-
b: (rgb2.b - rgb1.b) * p + rgb1.b,
|
|
696
|
-
a: (rgb2.a - rgb1.a) * p + rgb1.a
|
|
697
|
-
};
|
|
698
|
-
return tinycolor(rgba);
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
// Readability Functions
|
|
702
|
-
// ---------------------
|
|
703
|
-
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
704
|
-
|
|
705
|
-
// `contrast`
|
|
706
|
-
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
707
|
-
tinycolor.readability = function (color1, color2) {
|
|
708
|
-
var c1 = tinycolor(color1);
|
|
709
|
-
var c2 = tinycolor(color2);
|
|
710
|
-
return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
// `isReadable`
|
|
714
|
-
// Ensure that foreground and background color combinations meet WCAG2 guidelines.
|
|
715
|
-
// The third argument is an optional Object.
|
|
716
|
-
// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
|
|
717
|
-
// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
|
|
718
|
-
// If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
|
|
719
|
-
|
|
720
|
-
// *Example*
|
|
721
|
-
// tinycolor.isReadable("#000", "#111") => false
|
|
722
|
-
// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
|
|
723
|
-
tinycolor.isReadable = function (color1, color2, wcag2) {
|
|
724
|
-
var readability = tinycolor.readability(color1, color2);
|
|
725
|
-
var wcag2Parms, out;
|
|
726
|
-
out = false;
|
|
727
|
-
wcag2Parms = validateWCAG2Parms(wcag2);
|
|
728
|
-
switch (wcag2Parms.level + wcag2Parms.size) {
|
|
729
|
-
case "AAsmall":
|
|
730
|
-
case "AAAlarge":
|
|
731
|
-
out = readability >= 4.5;
|
|
732
|
-
break;
|
|
733
|
-
case "AAlarge":
|
|
734
|
-
out = readability >= 3;
|
|
735
|
-
break;
|
|
736
|
-
case "AAAsmall":
|
|
737
|
-
out = readability >= 7;
|
|
738
|
-
break;
|
|
739
|
-
}
|
|
740
|
-
return out;
|
|
741
|
-
};
|
|
742
|
-
|
|
743
|
-
// `mostReadable`
|
|
744
|
-
// Given a base color and a list of possible foreground or background
|
|
745
|
-
// colors for that base, returns the most readable color.
|
|
746
|
-
// Optionally returns Black or White if the most readable color is unreadable.
|
|
747
|
-
// *Example*
|
|
748
|
-
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
|
|
749
|
-
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
|
|
750
|
-
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
|
|
751
|
-
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
|
|
752
|
-
tinycolor.mostReadable = function (baseColor, colorList, args) {
|
|
753
|
-
var bestColor = null;
|
|
754
|
-
var bestScore = 0;
|
|
755
|
-
var readability;
|
|
756
|
-
var includeFallbackColors, level, size;
|
|
757
|
-
args = args || {};
|
|
758
|
-
includeFallbackColors = args.includeFallbackColors;
|
|
759
|
-
level = args.level;
|
|
760
|
-
size = args.size;
|
|
761
|
-
for (var i = 0; i < colorList.length; i++) {
|
|
762
|
-
readability = tinycolor.readability(baseColor, colorList[i]);
|
|
763
|
-
if (readability > bestScore) {
|
|
764
|
-
bestScore = readability;
|
|
765
|
-
bestColor = tinycolor(colorList[i]);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
if (tinycolor.isReadable(baseColor, bestColor, {
|
|
769
|
-
level: level,
|
|
770
|
-
size: size
|
|
771
|
-
}) || !includeFallbackColors) {
|
|
772
|
-
return bestColor;
|
|
773
|
-
} else {
|
|
774
|
-
args.includeFallbackColors = false;
|
|
775
|
-
return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
|
|
776
|
-
}
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
// Big List of Colors
|
|
780
|
-
// ------------------
|
|
781
|
-
// <https://www.w3.org/TR/css-color-4/#named-colors>
|
|
782
|
-
var names = tinycolor.names = {
|
|
783
|
-
aliceblue: "f0f8ff",
|
|
784
|
-
antiquewhite: "faebd7",
|
|
785
|
-
aqua: "0ff",
|
|
786
|
-
aquamarine: "7fffd4",
|
|
787
|
-
azure: "f0ffff",
|
|
788
|
-
beige: "f5f5dc",
|
|
789
|
-
bisque: "ffe4c4",
|
|
790
|
-
black: "000",
|
|
791
|
-
blanchedalmond: "ffebcd",
|
|
792
|
-
blue: "00f",
|
|
793
|
-
blueviolet: "8a2be2",
|
|
794
|
-
brown: "a52a2a",
|
|
795
|
-
burlywood: "deb887",
|
|
796
|
-
burntsienna: "ea7e5d",
|
|
797
|
-
cadetblue: "5f9ea0",
|
|
798
|
-
chartreuse: "7fff00",
|
|
799
|
-
chocolate: "d2691e",
|
|
800
|
-
coral: "ff7f50",
|
|
801
|
-
cornflowerblue: "6495ed",
|
|
802
|
-
cornsilk: "fff8dc",
|
|
803
|
-
crimson: "dc143c",
|
|
804
|
-
cyan: "0ff",
|
|
805
|
-
darkblue: "00008b",
|
|
806
|
-
darkcyan: "008b8b",
|
|
807
|
-
darkgoldenrod: "b8860b",
|
|
808
|
-
darkgray: "a9a9a9",
|
|
809
|
-
darkgreen: "006400",
|
|
810
|
-
darkgrey: "a9a9a9",
|
|
811
|
-
darkkhaki: "bdb76b",
|
|
812
|
-
darkmagenta: "8b008b",
|
|
813
|
-
darkolivegreen: "556b2f",
|
|
814
|
-
darkorange: "ff8c00",
|
|
815
|
-
darkorchid: "9932cc",
|
|
816
|
-
darkred: "8b0000",
|
|
817
|
-
darksalmon: "e9967a",
|
|
818
|
-
darkseagreen: "8fbc8f",
|
|
819
|
-
darkslateblue: "483d8b",
|
|
820
|
-
darkslategray: "2f4f4f",
|
|
821
|
-
darkslategrey: "2f4f4f",
|
|
822
|
-
darkturquoise: "00ced1",
|
|
823
|
-
darkviolet: "9400d3",
|
|
824
|
-
deeppink: "ff1493",
|
|
825
|
-
deepskyblue: "00bfff",
|
|
826
|
-
dimgray: "696969",
|
|
827
|
-
dimgrey: "696969",
|
|
828
|
-
dodgerblue: "1e90ff",
|
|
829
|
-
firebrick: "b22222",
|
|
830
|
-
floralwhite: "fffaf0",
|
|
831
|
-
forestgreen: "228b22",
|
|
832
|
-
fuchsia: "f0f",
|
|
833
|
-
gainsboro: "dcdcdc",
|
|
834
|
-
ghostwhite: "f8f8ff",
|
|
835
|
-
gold: "ffd700",
|
|
836
|
-
goldenrod: "daa520",
|
|
837
|
-
gray: "808080",
|
|
838
|
-
green: "008000",
|
|
839
|
-
greenyellow: "adff2f",
|
|
840
|
-
grey: "808080",
|
|
841
|
-
honeydew: "f0fff0",
|
|
842
|
-
hotpink: "ff69b4",
|
|
843
|
-
indianred: "cd5c5c",
|
|
844
|
-
indigo: "4b0082",
|
|
845
|
-
ivory: "fffff0",
|
|
846
|
-
khaki: "f0e68c",
|
|
847
|
-
lavender: "e6e6fa",
|
|
848
|
-
lavenderblush: "fff0f5",
|
|
849
|
-
lawngreen: "7cfc00",
|
|
850
|
-
lemonchiffon: "fffacd",
|
|
851
|
-
lightblue: "add8e6",
|
|
852
|
-
lightcoral: "f08080",
|
|
853
|
-
lightcyan: "e0ffff",
|
|
854
|
-
lightgoldenrodyellow: "fafad2",
|
|
855
|
-
lightgray: "d3d3d3",
|
|
856
|
-
lightgreen: "90ee90",
|
|
857
|
-
lightgrey: "d3d3d3",
|
|
858
|
-
lightpink: "ffb6c1",
|
|
859
|
-
lightsalmon: "ffa07a",
|
|
860
|
-
lightseagreen: "20b2aa",
|
|
861
|
-
lightskyblue: "87cefa",
|
|
862
|
-
lightslategray: "789",
|
|
863
|
-
lightslategrey: "789",
|
|
864
|
-
lightsteelblue: "b0c4de",
|
|
865
|
-
lightyellow: "ffffe0",
|
|
866
|
-
lime: "0f0",
|
|
867
|
-
limegreen: "32cd32",
|
|
868
|
-
linen: "faf0e6",
|
|
869
|
-
magenta: "f0f",
|
|
870
|
-
maroon: "800000",
|
|
871
|
-
mediumaquamarine: "66cdaa",
|
|
872
|
-
mediumblue: "0000cd",
|
|
873
|
-
mediumorchid: "ba55d3",
|
|
874
|
-
mediumpurple: "9370db",
|
|
875
|
-
mediumseagreen: "3cb371",
|
|
876
|
-
mediumslateblue: "7b68ee",
|
|
877
|
-
mediumspringgreen: "00fa9a",
|
|
878
|
-
mediumturquoise: "48d1cc",
|
|
879
|
-
mediumvioletred: "c71585",
|
|
880
|
-
midnightblue: "191970",
|
|
881
|
-
mintcream: "f5fffa",
|
|
882
|
-
mistyrose: "ffe4e1",
|
|
883
|
-
moccasin: "ffe4b5",
|
|
884
|
-
navajowhite: "ffdead",
|
|
885
|
-
navy: "000080",
|
|
886
|
-
oldlace: "fdf5e6",
|
|
887
|
-
olive: "808000",
|
|
888
|
-
olivedrab: "6b8e23",
|
|
889
|
-
orange: "ffa500",
|
|
890
|
-
orangered: "ff4500",
|
|
891
|
-
orchid: "da70d6",
|
|
892
|
-
palegoldenrod: "eee8aa",
|
|
893
|
-
palegreen: "98fb98",
|
|
894
|
-
paleturquoise: "afeeee",
|
|
895
|
-
palevioletred: "db7093",
|
|
896
|
-
papayawhip: "ffefd5",
|
|
897
|
-
peachpuff: "ffdab9",
|
|
898
|
-
peru: "cd853f",
|
|
899
|
-
pink: "ffc0cb",
|
|
900
|
-
plum: "dda0dd",
|
|
901
|
-
powderblue: "b0e0e6",
|
|
902
|
-
purple: "800080",
|
|
903
|
-
rebeccapurple: "663399",
|
|
904
|
-
red: "f00",
|
|
905
|
-
rosybrown: "bc8f8f",
|
|
906
|
-
royalblue: "4169e1",
|
|
907
|
-
saddlebrown: "8b4513",
|
|
908
|
-
salmon: "fa8072",
|
|
909
|
-
sandybrown: "f4a460",
|
|
910
|
-
seagreen: "2e8b57",
|
|
911
|
-
seashell: "fff5ee",
|
|
912
|
-
sienna: "a0522d",
|
|
913
|
-
silver: "c0c0c0",
|
|
914
|
-
skyblue: "87ceeb",
|
|
915
|
-
slateblue: "6a5acd",
|
|
916
|
-
slategray: "708090",
|
|
917
|
-
slategrey: "708090",
|
|
918
|
-
snow: "fffafa",
|
|
919
|
-
springgreen: "00ff7f",
|
|
920
|
-
steelblue: "4682b4",
|
|
921
|
-
tan: "d2b48c",
|
|
922
|
-
teal: "008080",
|
|
923
|
-
thistle: "d8bfd8",
|
|
924
|
-
tomato: "ff6347",
|
|
925
|
-
turquoise: "40e0d0",
|
|
926
|
-
violet: "ee82ee",
|
|
927
|
-
wheat: "f5deb3",
|
|
928
|
-
white: "fff",
|
|
929
|
-
whitesmoke: "f5f5f5",
|
|
930
|
-
yellow: "ff0",
|
|
931
|
-
yellowgreen: "9acd32"
|
|
932
|
-
};
|
|
933
|
-
|
|
934
|
-
// Make it easy to access colors via `hexNames[hex]`
|
|
935
|
-
var hexNames = tinycolor.hexNames = flip(names);
|
|
936
|
-
|
|
937
|
-
// Utilities
|
|
938
|
-
// ---------
|
|
939
|
-
|
|
940
|
-
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
|
|
941
|
-
function flip(o) {
|
|
942
|
-
var flipped = {};
|
|
943
|
-
for (var i in o) {
|
|
944
|
-
if (o.hasOwnProperty(i)) {
|
|
945
|
-
flipped[o[i]] = i;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
return flipped;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
// Return a valid alpha value [0,1] with all invalid values being set to 1
|
|
952
|
-
function boundAlpha(a) {
|
|
953
|
-
a = parseFloat(a);
|
|
954
|
-
if (isNaN(a) || a < 0 || a > 1) {
|
|
955
|
-
a = 1;
|
|
956
|
-
}
|
|
957
|
-
return a;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
// Take input from [0, n] and return it as [0, 1]
|
|
961
|
-
function bound01(n, max) {
|
|
962
|
-
if (isOnePointZero(n)) n = "100%";
|
|
963
|
-
var processPercent = isPercentage(n);
|
|
964
|
-
n = Math.min(max, Math.max(0, parseFloat(n)));
|
|
965
|
-
|
|
966
|
-
// Automatically convert percentage into number
|
|
967
|
-
if (processPercent) {
|
|
968
|
-
n = parseInt(n * max, 10) / 100;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
// Handle floating point rounding errors
|
|
972
|
-
if (Math.abs(n - max) < 0.000001) {
|
|
973
|
-
return 1;
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
// Convert into [0, 1] range if it isn't already
|
|
977
|
-
return n % max / parseFloat(max);
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
// Force a number between 0 and 1
|
|
981
|
-
function clamp01(val) {
|
|
982
|
-
return Math.min(1, Math.max(0, val));
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
// Parse a base-16 hex value into a base-10 integer
|
|
986
|
-
function parseIntFromHex(val) {
|
|
987
|
-
return parseInt(val, 16);
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
|
991
|
-
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
|
992
|
-
function isOnePointZero(n) {
|
|
993
|
-
return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
// Check to see if string passed in is a percentage
|
|
997
|
-
function isPercentage(n) {
|
|
998
|
-
return typeof n === "string" && n.indexOf("%") != -1;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
// Force a hex value to have 2 characters
|
|
1002
|
-
function pad2(c) {
|
|
1003
|
-
return c.length == 1 ? "0" + c : "" + c;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
// Replace a decimal with it's percentage value
|
|
1007
|
-
function convertToPercentage(n) {
|
|
1008
|
-
if (n <= 1) {
|
|
1009
|
-
n = n * 100 + "%";
|
|
1010
|
-
}
|
|
1011
|
-
return n;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
// Converts a decimal to a hex value
|
|
1015
|
-
function convertDecimalToHex(d) {
|
|
1016
|
-
return Math.round(parseFloat(d) * 255).toString(16);
|
|
1017
|
-
}
|
|
1018
|
-
// Converts a hex value to a decimal
|
|
1019
|
-
function convertHexToDecimal(h) {
|
|
1020
|
-
return parseIntFromHex(h) / 255;
|
|
1021
|
-
}
|
|
1022
|
-
var matchers = function () {
|
|
1023
|
-
// <http://www.w3.org/TR/css3-values/#integers>
|
|
1024
|
-
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
|
1025
|
-
|
|
1026
|
-
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
1027
|
-
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
|
|
1028
|
-
|
|
1029
|
-
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
1030
|
-
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
1031
|
-
|
|
1032
|
-
// Actual matching.
|
|
1033
|
-
// Parentheses and commas are optional, but not required.
|
|
1034
|
-
// Whitespace can take the place of commas or opening paren
|
|
1035
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
1036
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
|
1037
|
-
return {
|
|
1038
|
-
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
1039
|
-
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
|
1040
|
-
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
|
1041
|
-
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
|
1042
|
-
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
|
1043
|
-
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
|
1044
|
-
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
|
1045
|
-
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1046
|
-
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1047
|
-
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1048
|
-
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1049
|
-
};
|
|
1050
|
-
}();
|
|
1051
|
-
|
|
1052
|
-
// `isValidCSSUnit`
|
|
1053
|
-
// Take in a single string / number and check to see if it looks like a CSS unit
|
|
1054
|
-
// (see `matchers` above for definition).
|
|
1055
|
-
function isValidCSSUnit(color) {
|
|
1056
|
-
return !!matchers.CSS_UNIT.exec(color);
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
// `stringInputToObject`
|
|
1060
|
-
// Permissive string parsing. Take in a number of formats, and output an object
|
|
1061
|
-
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
|
|
1062
|
-
function stringInputToObject(color) {
|
|
1063
|
-
color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
|
|
1064
|
-
var named = false;
|
|
1065
|
-
if (names[color]) {
|
|
1066
|
-
color = names[color];
|
|
1067
|
-
named = true;
|
|
1068
|
-
} else if (color == "transparent") {
|
|
1069
|
-
return {
|
|
1070
|
-
r: 0,
|
|
1071
|
-
g: 0,
|
|
1072
|
-
b: 0,
|
|
1073
|
-
a: 0,
|
|
1074
|
-
format: "name"
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
// Try to match string input using regular expressions.
|
|
1079
|
-
// Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
|
|
1080
|
-
// Just return an object and let the conversion functions handle that.
|
|
1081
|
-
// This way the result will be the same whether the tinycolor is initialized with string or object.
|
|
1082
|
-
var match;
|
|
1083
|
-
if (match = matchers.rgb.exec(color)) {
|
|
1084
|
-
return {
|
|
1085
|
-
r: match[1],
|
|
1086
|
-
g: match[2],
|
|
1087
|
-
b: match[3]
|
|
1088
|
-
};
|
|
1089
|
-
}
|
|
1090
|
-
if (match = matchers.rgba.exec(color)) {
|
|
1091
|
-
return {
|
|
1092
|
-
r: match[1],
|
|
1093
|
-
g: match[2],
|
|
1094
|
-
b: match[3],
|
|
1095
|
-
a: match[4]
|
|
1096
|
-
};
|
|
1097
|
-
}
|
|
1098
|
-
if (match = matchers.hsl.exec(color)) {
|
|
1099
|
-
return {
|
|
1100
|
-
h: match[1],
|
|
1101
|
-
s: match[2],
|
|
1102
|
-
l: match[3]
|
|
1103
|
-
};
|
|
1104
|
-
}
|
|
1105
|
-
if (match = matchers.hsla.exec(color)) {
|
|
1106
|
-
return {
|
|
1107
|
-
h: match[1],
|
|
1108
|
-
s: match[2],
|
|
1109
|
-
l: match[3],
|
|
1110
|
-
a: match[4]
|
|
1111
|
-
};
|
|
1112
|
-
}
|
|
1113
|
-
if (match = matchers.hsv.exec(color)) {
|
|
1114
|
-
return {
|
|
1115
|
-
h: match[1],
|
|
1116
|
-
s: match[2],
|
|
1117
|
-
v: match[3]
|
|
1118
|
-
};
|
|
1119
|
-
}
|
|
1120
|
-
if (match = matchers.hsva.exec(color)) {
|
|
1121
|
-
return {
|
|
1122
|
-
h: match[1],
|
|
1123
|
-
s: match[2],
|
|
1124
|
-
v: match[3],
|
|
1125
|
-
a: match[4]
|
|
1126
|
-
};
|
|
1127
|
-
}
|
|
1128
|
-
if (match = matchers.hex8.exec(color)) {
|
|
1129
|
-
return {
|
|
1130
|
-
r: parseIntFromHex(match[1]),
|
|
1131
|
-
g: parseIntFromHex(match[2]),
|
|
1132
|
-
b: parseIntFromHex(match[3]),
|
|
1133
|
-
a: convertHexToDecimal(match[4]),
|
|
1134
|
-
format: named ? "name" : "hex8"
|
|
1135
|
-
};
|
|
1136
|
-
}
|
|
1137
|
-
if (match = matchers.hex6.exec(color)) {
|
|
1138
|
-
return {
|
|
1139
|
-
r: parseIntFromHex(match[1]),
|
|
1140
|
-
g: parseIntFromHex(match[2]),
|
|
1141
|
-
b: parseIntFromHex(match[3]),
|
|
1142
|
-
format: named ? "name" : "hex"
|
|
1143
|
-
};
|
|
1144
|
-
}
|
|
1145
|
-
if (match = matchers.hex4.exec(color)) {
|
|
1146
|
-
return {
|
|
1147
|
-
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1148
|
-
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1149
|
-
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1150
|
-
a: convertHexToDecimal(match[4] + "" + match[4]),
|
|
1151
|
-
format: named ? "name" : "hex8"
|
|
1152
|
-
};
|
|
1153
|
-
}
|
|
1154
|
-
if (match = matchers.hex3.exec(color)) {
|
|
1155
|
-
return {
|
|
1156
|
-
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1157
|
-
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1158
|
-
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1159
|
-
format: named ? "name" : "hex"
|
|
1160
|
-
};
|
|
1161
|
-
}
|
|
1162
|
-
return false;
|
|
1163
|
-
}
|
|
1164
|
-
function validateWCAG2Parms(parms) {
|
|
1165
|
-
// return valid WCAG2 parms for isReadable.
|
|
1166
|
-
// If input parms are invalid, return {"level":"AA", "size":"small"}
|
|
1167
|
-
var level, size;
|
|
1168
|
-
parms = parms || {
|
|
1169
|
-
level: "AA",
|
|
1170
|
-
size: "small"
|
|
1171
|
-
};
|
|
1172
|
-
level = (parms.level || "AA").toUpperCase();
|
|
1173
|
-
size = (parms.size || "small").toLowerCase();
|
|
1174
|
-
if (level !== "AA" && level !== "AAA") {
|
|
1175
|
-
level = "AA";
|
|
1176
|
-
}
|
|
1177
|
-
if (size !== "small" && size !== "large") {
|
|
1178
|
-
size = "small";
|
|
1179
|
-
}
|
|
1180
|
-
return {
|
|
1181
|
-
level: level,
|
|
1182
|
-
size: size
|
|
1183
|
-
};
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
export { tinycolor as t };
|
|
1187
|
-
//# sourceMappingURL=dep-cf6674ff.mjs.map
|