@pisell/materials 6.9.4 → 6.9.5
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 +283 -1
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -20
- package/es/components/PisellFields/index.d.ts +36 -0
- package/es/components/PisellFields/index.js +41 -0
- package/es/components/PisellLayouts/index.d.ts +32 -0
- package/es/components/PisellLayouts/index.js +43 -0
- package/es/components/PisellMetrics/index.d.ts +23 -0
- package/es/components/PisellMetrics/index.js +29 -0
- package/es/components/cardMetricItem/index.d.ts +4 -1
- package/es/components/cardMetricItem/index.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/es/components/page/index.js +4 -121
- package/es/components/pisellCurrency/PisellCurrency.d.ts +39 -0
- package/es/components/pisellCurrency/PisellCurrency.js +67 -0
- package/es/components/pisellCurrency/PisellCurrency.less +43 -0
- package/es/components/pisellCurrency/PisellCurrency.stories.d.ts +56 -0
- package/es/components/pisellCurrency/PisellCurrency.stories.js +426 -0
- package/es/components/pisellCurrency/components/DisabledView.d.ts +11 -0
- package/es/components/pisellCurrency/components/DisabledView.js +51 -0
- package/es/components/pisellCurrency/components/EditView.d.ts +18 -0
- package/es/components/pisellCurrency/components/EditView.js +127 -0
- package/es/components/pisellCurrency/components/ReadOnlyView.d.ts +17 -0
- package/es/components/pisellCurrency/components/ReadOnlyView.js +70 -0
- package/es/components/pisellCurrency/components/index.d.ts +6 -0
- package/es/components/pisellCurrency/components/index.js +7 -0
- package/es/components/pisellCurrency/index.d.ts +6 -0
- package/es/components/pisellCurrency/index.js +7 -0
- package/es/components/pisellCurrency/types.d.ts +56 -0
- package/es/components/pisellCurrency/types.js +1 -0
- package/es/components/pisellCurrency/utils/currencyFormatter.d.ts +31 -0
- package/es/components/pisellCurrency/utils/currencyFormatter.js +50 -0
- package/es/components/pisellCurrency/utils/index.d.ts +5 -0
- package/es/components/pisellCurrency/utils/index.js +5 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.d.ts +35 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +188 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +75 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +176 -0
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +1085 -0
- package/es/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +43 -0
- package/es/components/pisellDateTimeDisplay/components/DateDisplay.js +50 -0
- package/es/components/pisellDateTimeDisplay/components/TimeDisplay.d.ts +42 -0
- package/es/components/pisellDateTimeDisplay/components/TimeDisplay.js +44 -0
- package/es/components/pisellDateTimeDisplay/components/WeekdayDisplay.d.ts +57 -0
- package/es/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +59 -0
- package/es/components/pisellDateTimeDisplay/components/index.d.ts +6 -0
- package/es/components/pisellDateTimeDisplay/components/index.js +3 -0
- package/es/components/pisellDateTimeDisplay/hooks/index.d.ts +2 -0
- package/es/components/pisellDateTimeDisplay/hooks/index.js +1 -0
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +45 -0
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +79 -0
- package/es/components/pisellDateTimeDisplay/index.d.ts +2 -0
- package/es/components/pisellDateTimeDisplay/index.js +1 -0
- package/es/components/pisellDateTimeDisplay/types.d.ts +298 -0
- package/es/components/pisellDateTimeDisplay/types.js +1 -0
- package/es/components/pisellDateTimeDisplay/utils/formatDate.d.ts +21 -0
- package/es/components/pisellDateTimeDisplay/utils/formatDate.js +127 -0
- package/es/components/pisellDateTimeDisplay/utils/formatTime.d.ts +19 -0
- package/es/components/pisellDateTimeDisplay/utils/formatTime.js +44 -0
- package/es/components/pisellDateTimeDisplay/utils/formatWeekday.d.ts +30 -0
- package/es/components/pisellDateTimeDisplay/utils/formatWeekday.js +61 -0
- package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +18 -0
- package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +28 -0
- package/es/components/pisellDateTimeDisplay/utils/index.d.ts +4 -0
- package/es/components/pisellDateTimeDisplay/utils/index.js +4 -0
- package/es/components/pisellEmail/PisellEmail.d.ts +37 -0
- package/es/components/pisellEmail/PisellEmail.js +64 -0
- package/es/components/pisellEmail/PisellEmail.less +50 -0
- package/es/components/pisellEmail/PisellEmail.stories.d.ts +116 -0
- package/es/components/pisellEmail/PisellEmail.stories.js +699 -0
- package/es/components/pisellEmail/components/DisabledView.d.ts +14 -0
- package/es/components/pisellEmail/components/DisabledView.js +21 -0
- package/es/components/pisellEmail/components/EditView.d.ts +15 -0
- package/es/components/pisellEmail/components/EditView.js +146 -0
- package/es/components/pisellEmail/components/ReadOnlyView.d.ts +15 -0
- package/es/components/pisellEmail/components/ReadOnlyView.js +81 -0
- package/es/components/pisellEmail/constants/emailDomains.d.ts +5 -0
- package/es/components/pisellEmail/constants/emailDomains.js +11 -0
- package/es/components/pisellEmail/constants/emailRegex.d.ts +13 -0
- package/es/components/pisellEmail/constants/emailRegex.js +15 -0
- package/es/components/pisellEmail/index.d.ts +5 -0
- package/es/components/pisellEmail/index.js +5 -0
- package/es/components/pisellEmail/types.d.ts +176 -0
- package/es/components/pisellEmail/types.js +1 -0
- package/es/components/pisellEmail/utils/domainSuggestions.d.ts +15 -0
- package/es/components/pisellEmail/utils/domainSuggestions.js +46 -0
- package/es/components/pisellEmail/utils/emailHelper.d.ts +66 -0
- package/es/components/pisellEmail/utils/emailHelper.js +135 -0
- package/es/components/pisellEmail/utils/emailValidator.d.ts +45 -0
- package/es/components/pisellEmail/utils/emailValidator.js +130 -0
- package/es/components/pisellEmail/utils/index.d.ts +6 -0
- package/es/components/pisellEmail/utils/index.js +12 -0
- package/es/components/pisellLayout/index.d.ts +1 -1
- package/es/components/pisellLongText/PisellLongText.d.ts +39 -0
- package/es/components/pisellLongText/PisellLongText.js +66 -0
- package/es/components/pisellLongText/PisellLongText.less +60 -0
- package/es/components/pisellLongText/PisellLongText.stories.d.ts +123 -0
- package/es/components/pisellLongText/PisellLongText.stories.js +589 -0
- package/es/components/pisellLongText/components/DisabledView.d.ts +16 -0
- package/es/components/pisellLongText/components/DisabledView.js +51 -0
- package/es/components/pisellLongText/components/EditView.d.ts +19 -0
- package/es/components/pisellLongText/components/EditView.js +62 -0
- package/es/components/pisellLongText/components/ReadOnlyView.d.ts +18 -0
- package/es/components/pisellLongText/components/ReadOnlyView.js +97 -0
- package/es/components/pisellLongText/index.d.ts +6 -0
- package/es/components/pisellLongText/index.js +7 -0
- package/es/components/pisellLongText/types.d.ts +147 -0
- package/es/components/pisellLongText/types.js +1 -0
- package/es/components/pisellMetricCard/PisellMetricCard.d.ts +35 -0
- package/es/components/pisellMetricCard/PisellMetricCard.js +169 -0
- package/es/components/pisellMetricCard/PisellMetricCard.less +74 -0
- package/es/components/pisellMetricCard/PisellMetricCard.stories.d.ts +17 -0
- package/es/components/pisellMetricCard/PisellMetricCard.stories.js +208 -0
- package/es/components/pisellMetricCard/components/MetricComparison.d.ts +14 -0
- package/es/components/pisellMetricCard/components/MetricComparison.js +72 -0
- package/es/components/pisellMetricCard/components/MetricTitle.d.ts +12 -0
- package/es/components/pisellMetricCard/components/MetricTitle.js +52 -0
- package/es/components/pisellMetricCard/components/MetricValue.d.ts +12 -0
- package/es/components/pisellMetricCard/components/MetricValue.js +29 -0
- package/es/components/pisellMetricCard/components/TrendIcon.d.ts +14 -0
- package/es/components/pisellMetricCard/components/TrendIcon.js +30 -0
- package/es/components/pisellMetricCard/components/index.d.ts +7 -0
- package/es/components/pisellMetricCard/components/index.js +8 -0
- package/es/components/pisellMetricCard/index.d.ts +6 -0
- package/es/components/pisellMetricCard/index.js +7 -0
- package/es/components/pisellMetricCard/types.d.ts +201 -0
- package/es/components/pisellMetricCard/types.js +1 -0
- package/es/components/pisellMetricCard/utils/calculateTrend.d.ts +14 -0
- package/es/components/pisellMetricCard/utils/calculateTrend.js +29 -0
- package/es/components/pisellMetricCard/utils/formatMetricValue.d.ts +34 -0
- package/es/components/pisellMetricCard/utils/formatMetricValue.js +63 -0
- package/es/components/pisellMetricCard/utils/index.d.ts +5 -0
- package/es/components/pisellMetricCard/utils/index.js +6 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +9 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +99 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +231 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.d.ts +70 -0
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +576 -0
- package/es/components/pisellMultipleSelect/components/DisabledView.d.ts +8 -0
- package/es/components/pisellMultipleSelect/components/DisabledView.js +56 -0
- package/es/components/pisellMultipleSelect/components/EditView.d.ts +8 -0
- package/es/components/pisellMultipleSelect/components/EditView.js +176 -0
- package/es/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +8 -0
- package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +57 -0
- package/es/components/pisellMultipleSelect/index.d.ts +6 -0
- package/es/components/pisellMultipleSelect/index.js +7 -0
- package/es/components/pisellMultipleSelect/types.d.ts +160 -0
- package/es/components/pisellMultipleSelect/types.js +1 -0
- package/es/components/pisellNumber/PisellNumber.d.ts +42 -0
- package/es/components/pisellNumber/PisellNumber.js +70 -0
- package/es/components/pisellNumber/PisellNumber.less +30 -0
- package/es/components/pisellNumber/PisellNumber.stories.d.ts +66 -0
- package/es/components/pisellNumber/PisellNumber.stories.js +427 -0
- package/es/components/pisellNumber/components/DisabledView.d.ts +11 -0
- package/es/components/pisellNumber/components/DisabledView.js +50 -0
- package/es/components/pisellNumber/components/EditView.d.ts +18 -0
- package/es/components/pisellNumber/components/EditView.js +87 -0
- package/es/components/pisellNumber/components/ReadOnlyView.d.ts +16 -0
- package/es/components/pisellNumber/components/ReadOnlyView.js +60 -0
- package/es/components/pisellNumber/components/index.d.ts +6 -0
- package/es/components/pisellNumber/components/index.js +7 -0
- package/es/components/pisellNumber/index.d.ts +6 -0
- package/es/components/pisellNumber/index.js +7 -0
- package/es/components/pisellNumber/types.d.ts +168 -0
- package/es/components/pisellNumber/types.js +1 -0
- package/es/components/pisellPercent/PisellPercent.d.ts +38 -0
- package/es/components/pisellPercent/PisellPercent.js +66 -0
- package/es/components/pisellPercent/PisellPercent.less +54 -0
- package/es/components/pisellPercent/PisellPercent.stories.d.ts +52 -0
- package/es/components/pisellPercent/PisellPercent.stories.js +332 -0
- package/es/components/pisellPercent/components/DisabledView.d.ts +11 -0
- package/es/components/pisellPercent/components/DisabledView.js +49 -0
- package/es/components/pisellPercent/components/EditView.d.ts +17 -0
- package/es/components/pisellPercent/components/EditView.js +120 -0
- package/es/components/pisellPercent/components/ReadOnlyView.d.ts +14 -0
- package/es/components/pisellPercent/components/ReadOnlyView.js +94 -0
- package/es/components/pisellPercent/components/index.d.ts +6 -0
- package/es/components/pisellPercent/components/index.js +7 -0
- package/es/components/pisellPercent/index.d.ts +6 -0
- package/es/components/pisellPercent/index.js +7 -0
- package/es/components/pisellPercent/types.d.ts +68 -0
- package/es/components/pisellPercent/types.js +1 -0
- package/es/components/pisellPercent/utils/index.d.ts +6 -0
- package/es/components/pisellPercent/utils/index.js +6 -0
- package/es/components/pisellPercent/utils/percentFormatter.d.ts +27 -0
- package/es/components/pisellPercent/utils/percentFormatter.js +50 -0
- package/es/components/pisellPercent/utils/rangeConverter.d.ts +36 -0
- package/es/components/pisellPercent/utils/rangeConverter.js +87 -0
- package/es/components/pisellPhone/PisellPhone.d.ts +36 -0
- package/es/components/pisellPhone/PisellPhone.js +63 -0
- package/es/components/pisellPhone/PisellPhone.less +85 -0
- package/es/components/pisellPhone/PisellPhone.stories.d.ts +80 -0
- package/es/components/pisellPhone/PisellPhone.stories.js +363 -0
- package/es/components/pisellPhone/components/DisabledView.d.ts +16 -0
- package/es/components/pisellPhone/components/DisabledView.js +53 -0
- package/es/components/pisellPhone/components/EditView.d.ts +19 -0
- package/es/components/pisellPhone/components/EditView.js +116 -0
- package/es/components/pisellPhone/components/ReadOnlyView.d.ts +17 -0
- package/es/components/pisellPhone/components/ReadOnlyView.js +76 -0
- package/es/components/pisellPhone/constants/countryCodes.d.ts +20 -0
- package/es/components/pisellPhone/constants/countryCodes.js +199 -0
- package/es/components/pisellPhone/index.d.ts +7 -0
- package/es/components/pisellPhone/index.js +9 -0
- package/es/components/pisellPhone/types.d.ts +209 -0
- package/es/components/pisellPhone/types.js +1 -0
- package/es/components/pisellPhone/utils/countryCodeHelper.d.ts +35 -0
- package/es/components/pisellPhone/utils/countryCodeHelper.js +87 -0
- package/es/components/pisellPhone/utils/index.d.ts +6 -0
- package/es/components/pisellPhone/utils/index.js +7 -0
- package/es/components/pisellPhone/utils/phoneFormatter.d.ts +39 -0
- package/es/components/pisellPhone/utils/phoneFormatter.js +112 -0
- package/es/components/pisellPhone/utils/phoneValidator.d.ts +11 -0
- package/es/components/pisellPhone/utils/phoneValidator.js +59 -0
- package/es/components/pisellRating/PisellRating.d.ts +31 -0
- package/es/components/pisellRating/PisellRating.js +120 -0
- package/es/components/pisellRating/PisellRating.less +41 -0
- package/es/components/pisellRating/PisellRating.stories.d.ts +53 -0
- package/es/components/pisellRating/PisellRating.stories.js +243 -0
- package/es/components/pisellRating/index.d.ts +6 -0
- package/es/components/pisellRating/index.js +7 -0
- package/es/components/pisellRating/types.d.ts +124 -0
- package/es/components/pisellRating/types.js +1 -0
- package/es/components/pisellRow/index.d.ts +1 -1
- package/es/components/pisellSingleLineText/PisellSingleLineText.d.ts +40 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.js +67 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.less +62 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.stories.d.ts +102 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.stories.js +507 -0
- package/es/components/pisellSingleLineText/components/DisabledView.d.ts +16 -0
- package/es/components/pisellSingleLineText/components/DisabledView.js +51 -0
- package/es/components/pisellSingleLineText/components/EditView.d.ts +19 -0
- package/es/components/pisellSingleLineText/components/EditView.js +59 -0
- package/es/components/pisellSingleLineText/components/ReadOnlyView.d.ts +20 -0
- package/es/components/pisellSingleLineText/components/ReadOnlyView.js +153 -0
- package/es/components/pisellSingleLineText/index.d.ts +6 -0
- package/es/components/pisellSingleLineText/index.js +7 -0
- package/es/components/pisellSingleLineText/types.d.ts +139 -0
- package/es/components/pisellSingleLineText/types.js +1 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.d.ts +9 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.js +70 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.less +159 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.stories.d.ts +66 -0
- package/es/components/pisellSingleSelect/PisellSingleSelect.stories.js +517 -0
- package/es/components/pisellSingleSelect/components/DisabledView.d.ts +8 -0
- package/es/components/pisellSingleSelect/components/DisabledView.js +54 -0
- package/es/components/pisellSingleSelect/components/EditView.d.ts +8 -0
- package/es/components/pisellSingleSelect/components/EditView.js +156 -0
- package/es/components/pisellSingleSelect/components/ReadOnlyView.d.ts +8 -0
- package/es/components/pisellSingleSelect/components/ReadOnlyView.js +37 -0
- package/es/components/pisellSingleSelect/index.d.ts +6 -0
- package/es/components/pisellSingleSelect/index.js +7 -0
- package/es/components/pisellSingleSelect/types.d.ts +92 -0
- package/es/components/pisellSingleSelect/types.js +1 -0
- package/es/components/pisellUrl/PisellUrl.d.ts +37 -0
- package/es/components/pisellUrl/PisellUrl.js +64 -0
- package/es/components/pisellUrl/PisellUrl.less +46 -0
- package/es/components/pisellUrl/PisellUrl.stories.d.ts +108 -0
- package/es/components/pisellUrl/PisellUrl.stories.js +713 -0
- package/es/components/pisellUrl/components/DisabledView.d.ts +14 -0
- package/es/components/pisellUrl/components/DisabledView.js +21 -0
- package/es/components/pisellUrl/components/EditView.d.ts +15 -0
- package/es/components/pisellUrl/components/EditView.js +119 -0
- package/es/components/pisellUrl/components/ReadOnlyView.d.ts +15 -0
- package/es/components/pisellUrl/components/ReadOnlyView.js +90 -0
- package/es/components/pisellUrl/index.d.ts +5 -0
- package/es/components/pisellUrl/index.js +5 -0
- package/es/components/pisellUrl/types.d.ts +160 -0
- package/es/components/pisellUrl/types.js +1 -0
- package/es/components/pisellUrl/utils/index.d.ts +6 -0
- package/es/components/pisellUrl/utils/index.js +12 -0
- package/es/components/pisellUrl/utils/urlFormatter.d.ts +38 -0
- package/es/components/pisellUrl/utils/urlFormatter.js +80 -0
- package/es/components/pisellUrl/utils/urlHelper.d.ts +63 -0
- package/es/components/pisellUrl/utils/urlHelper.js +141 -0
- package/es/components/pisellUrl/utils/urlValidator.d.ts +46 -0
- package/es/components/pisellUrl/utils/urlValidator.js +83 -0
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/index.d.ts +173 -135
- package/es/index.js +214 -118
- package/es/theme/tokens.d.ts +22 -0
- package/es/theme/tokens.js +277 -0
- package/lib/components/PisellFields/index.d.ts +36 -0
- package/lib/components/PisellFields/index.js +49 -0
- package/lib/components/PisellLayouts/index.d.ts +32 -0
- package/lib/components/PisellLayouts/index.js +57 -0
- package/lib/components/PisellMetrics/index.d.ts +23 -0
- package/lib/components/PisellMetrics/index.js +43 -0
- package/lib/components/cardMetricItem/index.d.ts +4 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/lib/components/page/index.js +3 -121
- package/lib/components/pisellCurrency/PisellCurrency.d.ts +39 -0
- package/lib/components/pisellCurrency/PisellCurrency.js +63 -0
- package/lib/components/pisellCurrency/PisellCurrency.less +43 -0
- package/lib/components/pisellCurrency/PisellCurrency.stories.d.ts +56 -0
- package/lib/components/pisellCurrency/PisellCurrency.stories.js +251 -0
- package/lib/components/pisellCurrency/components/DisabledView.d.ts +11 -0
- package/lib/components/pisellCurrency/components/DisabledView.js +77 -0
- package/lib/components/pisellCurrency/components/EditView.d.ts +18 -0
- package/lib/components/pisellCurrency/components/EditView.js +117 -0
- package/lib/components/pisellCurrency/components/ReadOnlyView.d.ts +17 -0
- package/lib/components/pisellCurrency/components/ReadOnlyView.js +79 -0
- package/lib/components/pisellCurrency/components/index.d.ts +6 -0
- package/lib/components/pisellCurrency/components/index.js +45 -0
- package/lib/components/pisellCurrency/index.d.ts +6 -0
- package/lib/components/pisellCurrency/index.js +39 -0
- package/lib/components/pisellCurrency/types.d.ts +56 -0
- package/lib/components/pisellCurrency/types.js +17 -0
- package/lib/components/pisellCurrency/utils/currencyFormatter.d.ts +31 -0
- package/lib/components/pisellCurrency/utils/currencyFormatter.js +56 -0
- package/lib/components/pisellCurrency/utils/index.d.ts +5 -0
- package/lib/components/pisellCurrency/utils/index.js +29 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.d.ts +35 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +178 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +75 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.d.ts +176 -0
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.stories.js +783 -0
- package/lib/components/pisellDateTimeDisplay/components/DateDisplay.d.ts +43 -0
- package/lib/components/pisellDateTimeDisplay/components/DateDisplay.js +67 -0
- package/lib/components/pisellDateTimeDisplay/components/TimeDisplay.d.ts +42 -0
- package/lib/components/pisellDateTimeDisplay/components/TimeDisplay.js +64 -0
- package/lib/components/pisellDateTimeDisplay/components/WeekdayDisplay.d.ts +57 -0
- package/lib/components/pisellDateTimeDisplay/components/WeekdayDisplay.js +64 -0
- package/lib/components/pisellDateTimeDisplay/components/index.d.ts +6 -0
- package/lib/components/pisellDateTimeDisplay/components/index.js +35 -0
- package/lib/components/pisellDateTimeDisplay/hooks/index.d.ts +2 -0
- package/lib/components/pisellDateTimeDisplay/hooks/index.js +29 -0
- package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.d.ts +45 -0
- package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +72 -0
- package/lib/components/pisellDateTimeDisplay/index.d.ts +2 -0
- package/lib/components/pisellDateTimeDisplay/index.js +39 -0
- package/lib/components/pisellDateTimeDisplay/types.d.ts +298 -0
- package/lib/components/pisellDateTimeDisplay/types.js +17 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatDate.d.ts +21 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatDate.js +91 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatTime.d.ts +19 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatTime.js +47 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.d.ts +30 -0
- package/lib/components/pisellDateTimeDisplay/utils/formatWeekday.js +45 -0
- package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +18 -0
- package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.js +35 -0
- package/lib/components/pisellDateTimeDisplay/utils/index.d.ts +4 -0
- package/lib/components/pisellDateTimeDisplay/utils/index.js +38 -0
- package/lib/components/pisellEmail/PisellEmail.d.ts +37 -0
- package/lib/components/pisellEmail/PisellEmail.js +62 -0
- package/lib/components/pisellEmail/PisellEmail.less +50 -0
- package/lib/components/pisellEmail/PisellEmail.stories.d.ts +116 -0
- package/lib/components/pisellEmail/PisellEmail.stories.js +532 -0
- package/lib/components/pisellEmail/components/DisabledView.d.ts +14 -0
- package/lib/components/pisellEmail/components/DisabledView.js +42 -0
- package/lib/components/pisellEmail/components/EditView.d.ts +15 -0
- package/lib/components/pisellEmail/components/EditView.js +123 -0
- package/lib/components/pisellEmail/components/ReadOnlyView.d.ts +15 -0
- package/lib/components/pisellEmail/components/ReadOnlyView.js +99 -0
- package/lib/components/pisellEmail/constants/emailDomains.d.ts +5 -0
- package/lib/components/pisellEmail/constants/emailDomains.js +49 -0
- package/lib/components/pisellEmail/constants/emailRegex.d.ts +13 -0
- package/lib/components/pisellEmail/constants/emailRegex.js +32 -0
- package/lib/components/pisellEmail/index.d.ts +5 -0
- package/lib/components/pisellEmail/index.js +40 -0
- package/lib/components/pisellEmail/types.d.ts +176 -0
- package/lib/components/pisellEmail/types.js +17 -0
- package/lib/components/pisellEmail/utils/domainSuggestions.d.ts +15 -0
- package/lib/components/pisellEmail/utils/domainSuggestions.js +42 -0
- package/lib/components/pisellEmail/utils/emailHelper.d.ts +66 -0
- package/lib/components/pisellEmail/utils/emailHelper.js +89 -0
- package/lib/components/pisellEmail/utils/emailValidator.d.ts +45 -0
- package/lib/components/pisellEmail/utils/emailValidator.js +97 -0
- package/lib/components/pisellEmail/utils/index.d.ts +6 -0
- package/lib/components/pisellEmail/utils/index.js +27 -0
- package/lib/components/pisellLayout/index.d.ts +1 -1
- package/lib/components/pisellLongText/PisellLongText.d.ts +39 -0
- package/lib/components/pisellLongText/PisellLongText.js +62 -0
- package/lib/components/pisellLongText/PisellLongText.less +60 -0
- package/lib/components/pisellLongText/PisellLongText.stories.d.ts +123 -0
- package/lib/components/pisellLongText/PisellLongText.stories.js +492 -0
- package/lib/components/pisellLongText/components/DisabledView.d.ts +16 -0
- package/lib/components/pisellLongText/components/DisabledView.js +51 -0
- package/lib/components/pisellLongText/components/EditView.d.ts +19 -0
- package/lib/components/pisellLongText/components/EditView.js +69 -0
- package/lib/components/pisellLongText/components/ReadOnlyView.d.ts +18 -0
- package/lib/components/pisellLongText/components/ReadOnlyView.js +86 -0
- package/lib/components/pisellLongText/index.d.ts +6 -0
- package/lib/components/pisellLongText/index.js +39 -0
- package/lib/components/pisellLongText/types.d.ts +147 -0
- package/lib/components/pisellLongText/types.js +17 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.d.ts +35 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.js +166 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.less +74 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.stories.d.ts +17 -0
- package/lib/components/pisellMetricCard/PisellMetricCard.stories.js +238 -0
- package/lib/components/pisellMetricCard/components/MetricComparison.d.ts +14 -0
- package/lib/components/pisellMetricCard/components/MetricComparison.js +86 -0
- package/lib/components/pisellMetricCard/components/MetricTitle.d.ts +12 -0
- package/lib/components/pisellMetricCard/components/MetricTitle.js +84 -0
- package/lib/components/pisellMetricCard/components/MetricValue.d.ts +12 -0
- package/lib/components/pisellMetricCard/components/MetricValue.js +56 -0
- package/lib/components/pisellMetricCard/components/TrendIcon.d.ts +14 -0
- package/lib/components/pisellMetricCard/components/TrendIcon.js +50 -0
- package/lib/components/pisellMetricCard/components/index.d.ts +7 -0
- package/lib/components/pisellMetricCard/components/index.js +48 -0
- package/lib/components/pisellMetricCard/index.d.ts +6 -0
- package/lib/components/pisellMetricCard/index.js +41 -0
- package/lib/components/pisellMetricCard/types.d.ts +201 -0
- package/lib/components/pisellMetricCard/types.js +17 -0
- package/lib/components/pisellMetricCard/utils/calculateTrend.d.ts +14 -0
- package/lib/components/pisellMetricCard/utils/calculateTrend.js +38 -0
- package/lib/components/pisellMetricCard/utils/formatMetricValue.d.ts +34 -0
- package/lib/components/pisellMetricCard/utils/formatMetricValue.js +52 -0
- package/lib/components/pisellMetricCard/utils/index.d.ts +5 -0
- package/lib/components/pisellMetricCard/utils/index.js +32 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.d.ts +9 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +97 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +231 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.d.ts +70 -0
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +491 -0
- package/lib/components/pisellMultipleSelect/components/DisabledView.d.ts +8 -0
- package/lib/components/pisellMultipleSelect/components/DisabledView.js +82 -0
- package/lib/components/pisellMultipleSelect/components/EditView.d.ts +8 -0
- package/lib/components/pisellMultipleSelect/components/EditView.js +155 -0
- package/lib/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +8 -0
- package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +80 -0
- package/lib/components/pisellMultipleSelect/index.d.ts +6 -0
- package/lib/components/pisellMultipleSelect/index.js +39 -0
- package/lib/components/pisellMultipleSelect/types.d.ts +160 -0
- package/lib/components/pisellMultipleSelect/types.js +17 -0
- package/lib/components/pisellNumber/PisellNumber.d.ts +42 -0
- package/lib/components/pisellNumber/PisellNumber.js +63 -0
- package/lib/components/pisellNumber/PisellNumber.less +30 -0
- package/lib/components/pisellNumber/PisellNumber.stories.d.ts +66 -0
- package/lib/components/pisellNumber/PisellNumber.stories.js +341 -0
- package/lib/components/pisellNumber/components/DisabledView.d.ts +11 -0
- package/lib/components/pisellNumber/components/DisabledView.js +80 -0
- package/lib/components/pisellNumber/components/EditView.d.ts +18 -0
- package/lib/components/pisellNumber/components/EditView.js +97 -0
- package/lib/components/pisellNumber/components/ReadOnlyView.d.ts +16 -0
- package/lib/components/pisellNumber/components/ReadOnlyView.js +75 -0
- package/lib/components/pisellNumber/components/index.d.ts +6 -0
- package/lib/components/pisellNumber/components/index.js +45 -0
- package/lib/components/pisellNumber/index.d.ts +6 -0
- package/lib/components/pisellNumber/index.js +39 -0
- package/lib/components/pisellNumber/types.d.ts +168 -0
- package/lib/components/pisellNumber/types.js +17 -0
- package/lib/components/pisellPercent/PisellPercent.d.ts +38 -0
- package/lib/components/pisellPercent/PisellPercent.js +63 -0
- package/lib/components/pisellPercent/PisellPercent.less +54 -0
- package/lib/components/pisellPercent/PisellPercent.stories.d.ts +52 -0
- package/lib/components/pisellPercent/PisellPercent.stories.js +217 -0
- package/lib/components/pisellPercent/components/DisabledView.d.ts +11 -0
- package/lib/components/pisellPercent/components/DisabledView.js +74 -0
- package/lib/components/pisellPercent/components/EditView.d.ts +17 -0
- package/lib/components/pisellPercent/components/EditView.js +112 -0
- package/lib/components/pisellPercent/components/ReadOnlyView.d.ts +14 -0
- package/lib/components/pisellPercent/components/ReadOnlyView.js +109 -0
- package/lib/components/pisellPercent/components/index.d.ts +6 -0
- package/lib/components/pisellPercent/components/index.js +45 -0
- package/lib/components/pisellPercent/index.d.ts +6 -0
- package/lib/components/pisellPercent/index.js +39 -0
- package/lib/components/pisellPercent/types.d.ts +68 -0
- package/lib/components/pisellPercent/types.js +17 -0
- package/lib/components/pisellPercent/utils/index.d.ts +6 -0
- package/lib/components/pisellPercent/utils/index.js +34 -0
- package/lib/components/pisellPercent/utils/percentFormatter.d.ts +27 -0
- package/lib/components/pisellPercent/utils/percentFormatter.js +48 -0
- package/lib/components/pisellPercent/utils/rangeConverter.d.ts +36 -0
- package/lib/components/pisellPercent/utils/rangeConverter.js +59 -0
- package/lib/components/pisellPhone/PisellPhone.d.ts +36 -0
- package/lib/components/pisellPhone/PisellPhone.js +62 -0
- package/lib/components/pisellPhone/PisellPhone.less +85 -0
- package/lib/components/pisellPhone/PisellPhone.stories.d.ts +80 -0
- package/lib/components/pisellPhone/PisellPhone.stories.js +290 -0
- package/lib/components/pisellPhone/components/DisabledView.d.ts +16 -0
- package/lib/components/pisellPhone/components/DisabledView.js +51 -0
- package/lib/components/pisellPhone/components/EditView.d.ts +19 -0
- package/lib/components/pisellPhone/components/EditView.js +101 -0
- package/lib/components/pisellPhone/components/ReadOnlyView.d.ts +17 -0
- package/lib/components/pisellPhone/components/ReadOnlyView.js +79 -0
- package/lib/components/pisellPhone/constants/countryCodes.d.ts +20 -0
- package/lib/components/pisellPhone/constants/countryCodes.js +233 -0
- package/lib/components/pisellPhone/index.d.ts +7 -0
- package/lib/components/pisellPhone/index.js +46 -0
- package/lib/components/pisellPhone/types.d.ts +209 -0
- package/lib/components/pisellPhone/types.js +17 -0
- package/lib/components/pisellPhone/utils/countryCodeHelper.d.ts +35 -0
- package/lib/components/pisellPhone/utils/countryCodeHelper.js +64 -0
- package/lib/components/pisellPhone/utils/index.d.ts +6 -0
- package/lib/components/pisellPhone/utils/index.js +49 -0
- package/lib/components/pisellPhone/utils/phoneFormatter.d.ts +39 -0
- package/lib/components/pisellPhone/utils/phoneFormatter.js +103 -0
- package/lib/components/pisellPhone/utils/phoneValidator.d.ts +11 -0
- package/lib/components/pisellPhone/utils/phoneValidator.js +61 -0
- package/lib/components/pisellRating/PisellRating.d.ts +31 -0
- package/lib/components/pisellRating/PisellRating.js +110 -0
- package/lib/components/pisellRating/PisellRating.less +41 -0
- package/lib/components/pisellRating/PisellRating.stories.d.ts +53 -0
- package/lib/components/pisellRating/PisellRating.stories.js +199 -0
- package/lib/components/pisellRating/index.d.ts +6 -0
- package/lib/components/pisellRating/index.js +39 -0
- package/lib/components/pisellRating/types.d.ts +124 -0
- package/lib/components/pisellRating/types.js +17 -0
- package/lib/components/pisellRow/index.d.ts +1 -1
- package/lib/components/pisellSingleLineText/PisellSingleLineText.d.ts +40 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.js +62 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.less +62 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.d.ts +102 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.js +379 -0
- package/lib/components/pisellSingleLineText/components/DisabledView.d.ts +16 -0
- package/lib/components/pisellSingleLineText/components/DisabledView.js +51 -0
- package/lib/components/pisellSingleLineText/components/EditView.d.ts +19 -0
- package/lib/components/pisellSingleLineText/components/EditView.js +69 -0
- package/lib/components/pisellSingleLineText/components/ReadOnlyView.d.ts +20 -0
- package/lib/components/pisellSingleLineText/components/ReadOnlyView.js +164 -0
- package/lib/components/pisellSingleLineText/index.d.ts +6 -0
- package/lib/components/pisellSingleLineText/index.js +39 -0
- package/lib/components/pisellSingleLineText/types.d.ts +139 -0
- package/lib/components/pisellSingleLineText/types.js +17 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.d.ts +9 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.js +78 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.less +159 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.d.ts +66 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.js +444 -0
- package/lib/components/pisellSingleSelect/components/DisabledView.d.ts +8 -0
- package/lib/components/pisellSingleSelect/components/DisabledView.js +81 -0
- package/lib/components/pisellSingleSelect/components/EditView.d.ts +8 -0
- package/lib/components/pisellSingleSelect/components/EditView.js +141 -0
- package/lib/components/pisellSingleSelect/components/ReadOnlyView.d.ts +8 -0
- package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +74 -0
- package/lib/components/pisellSingleSelect/index.d.ts +6 -0
- package/lib/components/pisellSingleSelect/index.js +39 -0
- package/lib/components/pisellSingleSelect/types.d.ts +92 -0
- package/lib/components/pisellSingleSelect/types.js +17 -0
- package/lib/components/pisellUrl/PisellUrl.d.ts +37 -0
- package/lib/components/pisellUrl/PisellUrl.js +62 -0
- package/lib/components/pisellUrl/PisellUrl.less +46 -0
- package/lib/components/pisellUrl/PisellUrl.stories.d.ts +108 -0
- package/lib/components/pisellUrl/PisellUrl.stories.js +506 -0
- package/lib/components/pisellUrl/components/DisabledView.d.ts +14 -0
- package/lib/components/pisellUrl/components/DisabledView.js +42 -0
- package/lib/components/pisellUrl/components/EditView.d.ts +15 -0
- package/lib/components/pisellUrl/components/EditView.js +109 -0
- package/lib/components/pisellUrl/components/ReadOnlyView.d.ts +15 -0
- package/lib/components/pisellUrl/components/ReadOnlyView.js +98 -0
- package/lib/components/pisellUrl/index.d.ts +5 -0
- package/lib/components/pisellUrl/index.js +40 -0
- package/lib/components/pisellUrl/types.d.ts +160 -0
- package/lib/components/pisellUrl/types.js +17 -0
- package/lib/components/pisellUrl/utils/index.d.ts +6 -0
- package/lib/components/pisellUrl/utils/index.js +27 -0
- package/lib/components/pisellUrl/utils/urlFormatter.d.ts +38 -0
- package/lib/components/pisellUrl/utils/urlFormatter.js +66 -0
- package/lib/components/pisellUrl/utils/urlHelper.d.ts +63 -0
- package/lib/components/pisellUrl/utils/urlHelper.js +97 -0
- package/lib/components/pisellUrl/utils/urlValidator.d.ts +46 -0
- package/lib/components/pisellUrl/utils/urlValidator.js +77 -0
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/index.d.ts +173 -135
- package/lib/index.js +163 -117
- package/lib/theme/tokens.d.ts +22 -0
- package/lib/theme/tokens.js +277 -0
- package/lowcode/pisell-currency/index.ts +3 -0
- package/lowcode/pisell-currency/meta.ts +350 -0
- package/lowcode/pisell-currency/snippets.ts +52 -0
- package/lowcode/pisell-datetime-display/index.ts +3 -0
- package/lowcode/pisell-datetime-display/meta.ts +509 -0
- package/lowcode/pisell-datetime-display/snippets.ts +1 -0
- package/lowcode/pisell-email/index.ts +1 -0
- package/lowcode/pisell-email/meta.ts +484 -0
- package/lowcode/pisell-email/snippets.ts +63 -0
- package/lowcode/pisell-long-text/meta.ts +436 -0
- package/lowcode/pisell-long-text/snippets.ts +55 -0
- package/lowcode/pisell-metric-card/meta.ts +493 -0
- package/lowcode/pisell-metric-card/snippets.ts +54 -0
- package/lowcode/pisell-multiple-select/index.ts +3 -0
- package/lowcode/pisell-multiple-select/meta.ts +422 -0
- package/lowcode/pisell-multiple-select/snippets.ts +111 -0
- package/lowcode/pisell-number/index.ts +3 -0
- package/lowcode/pisell-number/meta.ts +497 -0
- package/lowcode/pisell-number/snippets.ts +68 -0
- package/lowcode/pisell-percent/index.ts +3 -0
- package/lowcode/pisell-percent/meta.ts +201 -0
- package/lowcode/pisell-percent/snippets.ts +61 -0
- package/lowcode/pisell-phone/meta.ts +389 -0
- package/lowcode/pisell-phone/snippets.ts +52 -0
- package/lowcode/pisell-rating/index.ts +3 -0
- package/lowcode/pisell-rating/meta.ts +130 -0
- package/lowcode/pisell-rating/snippets.ts +38 -0
- package/lowcode/pisell-single-line-text/meta.ts +525 -0
- package/lowcode/pisell-single-line-text/snippets.ts +41 -0
- package/lowcode/pisell-single-select/index.ts +3 -0
- package/lowcode/pisell-single-select/meta.ts +370 -0
- package/lowcode/pisell-single-select/snippets.ts +70 -0
- package/lowcode/pisell-url/index.ts +1 -0
- package/lowcode/pisell-url/meta.ts +512 -0
- package/lowcode/pisell-url/snippets.ts +75 -0
- package/package.json +4 -3
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellSingleSelect/components/ReadOnlyView.tsx
|
|
30
|
+
var ReadOnlyView_exports = {};
|
|
31
|
+
__export(ReadOnlyView_exports, {
|
|
32
|
+
default: () => ReadOnlyView_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ReadOnlyView_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var ReadOnlyView = (props) => {
|
|
39
|
+
const {
|
|
40
|
+
value,
|
|
41
|
+
options,
|
|
42
|
+
label,
|
|
43
|
+
required,
|
|
44
|
+
className,
|
|
45
|
+
style
|
|
46
|
+
} = props;
|
|
47
|
+
const selectedOption = (0, import_react.useMemo)(
|
|
48
|
+
() => value !== null && value !== void 0 ? (0, import_utils.findOptionByValue)(value, options) : void 0,
|
|
49
|
+
[value, options]
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: (0, import_classnames.default)(
|
|
55
|
+
"pisell-single-select-wrapper",
|
|
56
|
+
"pisell-single-select-readonly",
|
|
57
|
+
className
|
|
58
|
+
),
|
|
59
|
+
style
|
|
60
|
+
},
|
|
61
|
+
label && /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
"label",
|
|
63
|
+
{
|
|
64
|
+
className: (0, import_classnames.default)("pisell-single-select-label", {
|
|
65
|
+
"pisell-single-select-label-required": required
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
label
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-single-select-readonly-display" }, selectedOption ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, selectedOption.icon && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-single-select-readonly-icon" }, selectedOption.icon), /* @__PURE__ */ import_react.default.createElement("span", null, selectedOption.label)) : /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-single-select-readonly-empty" }, "-"))
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
ReadOnlyView.displayName = "PisellSingleSelectReadOnlyView";
|
|
74
|
+
var ReadOnlyView_default = ReadOnlyView;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PisellSingleSelect 组件导出
|
|
3
|
+
*/
|
|
4
|
+
export { default as PisellSingleSelect } from './PisellSingleSelect';
|
|
5
|
+
export type { PisellSingleSelectProps, SingleSelectRef, EditViewProps, DisabledViewProps, ReadOnlyViewProps, } from './types';
|
|
6
|
+
export type { SelectOption, FilterOptionFunc, SortDirection, SelectState, } from './types';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellSingleSelect/index.tsx
|
|
30
|
+
var pisellSingleSelect_exports = {};
|
|
31
|
+
__export(pisellSingleSelect_exports, {
|
|
32
|
+
PisellSingleSelect: () => import_PisellSingleSelect.default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellSingleSelect_exports);
|
|
35
|
+
var import_PisellSingleSelect = __toESM(require("./PisellSingleSelect"));
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
PisellSingleSelect
|
|
39
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { BaseSelectProps, SelectOption } from '@pisell/utils';
|
|
2
|
+
/**
|
|
3
|
+
* PisellSingleSelect 组件 Props 类型定义
|
|
4
|
+
*
|
|
5
|
+
* 继承 BaseSelectProps,添加单选特有的配置
|
|
6
|
+
* @template T 选项值的类型,默认为 string | number
|
|
7
|
+
*/
|
|
8
|
+
export interface PisellSingleSelectProps<T = string | number> extends BaseSelectProps<T> {
|
|
9
|
+
/**
|
|
10
|
+
* 受控模式:当前选中值
|
|
11
|
+
*/
|
|
12
|
+
value?: T | null;
|
|
13
|
+
/**
|
|
14
|
+
* 非受控模式:默认选中值
|
|
15
|
+
*/
|
|
16
|
+
defaultValue?: T;
|
|
17
|
+
/**
|
|
18
|
+
* 值变化回调
|
|
19
|
+
* @param value 新的选中值
|
|
20
|
+
* @param option 选中的选项对象(如果值为 null 则 option 也为 null)
|
|
21
|
+
*/
|
|
22
|
+
onChange?: (value: T | null, option: SelectOption<T> | null) => void;
|
|
23
|
+
/**
|
|
24
|
+
* ARIA 标签
|
|
25
|
+
*/
|
|
26
|
+
'aria-label'?: string;
|
|
27
|
+
/**
|
|
28
|
+
* ARIA 是否必填
|
|
29
|
+
*/
|
|
30
|
+
'aria-required'?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* ARIA 是否无效
|
|
33
|
+
*/
|
|
34
|
+
'aria-invalid'?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* ARIA 描述关联 ID
|
|
37
|
+
*/
|
|
38
|
+
'aria-describedby'?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* PisellSingleSelect 组件 Ref 方法
|
|
42
|
+
* @template T 选项值的类型
|
|
43
|
+
*/
|
|
44
|
+
export interface SingleSelectRef<T = string | number> {
|
|
45
|
+
/**
|
|
46
|
+
* 聚焦到组件
|
|
47
|
+
*/
|
|
48
|
+
focus: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* 失焦
|
|
51
|
+
*/
|
|
52
|
+
blur: () => void;
|
|
53
|
+
/**
|
|
54
|
+
* 获取当前选中值
|
|
55
|
+
*/
|
|
56
|
+
getValue: () => T | null;
|
|
57
|
+
/**
|
|
58
|
+
* 设置选中值
|
|
59
|
+
*/
|
|
60
|
+
setValue: (value: T | null) => void;
|
|
61
|
+
/**
|
|
62
|
+
* 清空选中值
|
|
63
|
+
*/
|
|
64
|
+
clearValue: () => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* EditView 组件 Props
|
|
68
|
+
* @template T 选项值的类型
|
|
69
|
+
*/
|
|
70
|
+
export interface EditViewProps<T = string | number> extends PisellSingleSelectProps<T> {
|
|
71
|
+
/**
|
|
72
|
+
* 内部状态管理对象(从 useSelectState Hook 传入)
|
|
73
|
+
*/
|
|
74
|
+
state?: {
|
|
75
|
+
value: T | null | undefined;
|
|
76
|
+
setValue: (value: T | null) => void;
|
|
77
|
+
clearValue: () => void;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* DisabledView 组件 Props
|
|
82
|
+
* @template T 选项值的类型
|
|
83
|
+
*/
|
|
84
|
+
export interface DisabledViewProps<T = string | number> extends PisellSingleSelectProps<T> {
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* ReadOnlyView 组件 Props
|
|
88
|
+
* @template T 选项值的类型
|
|
89
|
+
*/
|
|
90
|
+
export interface ReadOnlyViewProps<T = string | number> extends PisellSingleSelectProps<T> {
|
|
91
|
+
}
|
|
92
|
+
export type { SelectOption, FilterOptionFunc, SortDirection, SelectState, } from '@pisell/utils';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/pisellSingleSelect/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PisellUrlProps } from './types';
|
|
3
|
+
import './PisellUrl.less';
|
|
4
|
+
/**
|
|
5
|
+
* PisellUrl URL 链接组件
|
|
6
|
+
*
|
|
7
|
+
* URL 链接输入/展示组件,支持只读、编辑、禁用三种状态。
|
|
8
|
+
* 基于 Ant Design Input 组件开发,提供 URL 格式校验、协议自动补全、
|
|
9
|
+
* 链接跳转和协议/路径显示控制功能。
|
|
10
|
+
*
|
|
11
|
+
* @param props 组件 Props
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // 编辑态(URL 输入)
|
|
15
|
+
* <PisellUrl
|
|
16
|
+
* placeholder="请输入网址"
|
|
17
|
+
* required
|
|
18
|
+
* />
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // 只读态(可跳转)
|
|
22
|
+
* <PisellUrl
|
|
23
|
+
* mode="read"
|
|
24
|
+
* value="https://www.example.com"
|
|
25
|
+
* enableLinkClick
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // 协议自动补全
|
|
30
|
+
* <PisellUrl
|
|
31
|
+
* autoCompleteProtocol
|
|
32
|
+
* defaultProtocol="https://"
|
|
33
|
+
* />
|
|
34
|
+
*/
|
|
35
|
+
export declare const PisellUrl: React.FC<PisellUrlProps>;
|
|
36
|
+
declare const _default: React.NamedExoticComponent<PisellUrlProps>;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellUrl/PisellUrl.tsx
|
|
30
|
+
var PisellUrl_exports = {};
|
|
31
|
+
__export(PisellUrl_exports, {
|
|
32
|
+
PisellUrl: () => PisellUrl,
|
|
33
|
+
default: () => PisellUrl_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(PisellUrl_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_ReadOnlyView = __toESM(require("./components/ReadOnlyView"));
|
|
39
|
+
var import_EditView = __toESM(require("./components/EditView"));
|
|
40
|
+
var import_DisabledView = __toESM(require("./components/DisabledView"));
|
|
41
|
+
var import_PisellUrl = require("./PisellUrl.less");
|
|
42
|
+
var PisellUrl = (props) => {
|
|
43
|
+
const { mode = "edit", disabled = false } = props;
|
|
44
|
+
const displayState = (0, import_utils.getDisplayState)(mode, disabled);
|
|
45
|
+
switch (displayState) {
|
|
46
|
+
case "read":
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ReadOnlyView.default, { ...props });
|
|
48
|
+
case "edit":
|
|
49
|
+
return /* @__PURE__ */ import_react.default.createElement(import_EditView.default, { ...props });
|
|
50
|
+
case "disabled":
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(import_DisabledView.default, { ...props });
|
|
52
|
+
default:
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var PisellUrl_default = import_react.default.memo(PisellUrl, (prevProps, nextProps) => {
|
|
57
|
+
return prevProps.value === nextProps.value && prevProps.mode === nextProps.mode && prevProps.disabled === nextProps.disabled && prevProps.autoCompleteProtocol === nextProps.autoCompleteProtocol;
|
|
58
|
+
});
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
PisellUrl
|
|
62
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PisellUrl 组件样式
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
.pisell-url {
|
|
6
|
+
&-edit {
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
// 错误提示样式
|
|
10
|
+
&-error {
|
|
11
|
+
margin-top: 4px;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
color: #ff4d4f;
|
|
14
|
+
line-height: 1.5;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-read {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
|
|
22
|
+
// 链接样式
|
|
23
|
+
.ant-typography-link {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
transition: all 0.3s;
|
|
26
|
+
|
|
27
|
+
&:hover {
|
|
28
|
+
opacity: 0.8;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 链接图标
|
|
33
|
+
.anticon-link {
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-disabled {
|
|
39
|
+
opacity: 0.4;
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
|
|
42
|
+
* {
|
|
43
|
+
cursor: not-allowed !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { PisellUrl } from './PisellUrl';
|
|
3
|
+
/**
|
|
4
|
+
* PisellUrl 是一个 URL 地址输入/展示组件。
|
|
5
|
+
*
|
|
6
|
+
* ## 功能特性
|
|
7
|
+
* - 支持三种状态:只读、编辑、禁用
|
|
8
|
+
* - URL 格式校验
|
|
9
|
+
* - 协议自动补全
|
|
10
|
+
* - 链接跳转(新窗口,安全性保障)
|
|
11
|
+
* - 协议/路径显示控制
|
|
12
|
+
* - 协议白名单限制
|
|
13
|
+
*/
|
|
14
|
+
declare const meta: Meta<typeof PisellUrl>;
|
|
15
|
+
export default meta;
|
|
16
|
+
declare type Story = StoryObj<typeof PisellUrl>;
|
|
17
|
+
/**
|
|
18
|
+
* 基础编辑态
|
|
19
|
+
*/
|
|
20
|
+
export declare const Basic: Story;
|
|
21
|
+
/**
|
|
22
|
+
* 协议自动补全
|
|
23
|
+
*/
|
|
24
|
+
export declare const WithProtocolAutoComplete: Story;
|
|
25
|
+
/**
|
|
26
|
+
* 只读态 - 可跳转
|
|
27
|
+
*/
|
|
28
|
+
export declare const ReadMode: Story;
|
|
29
|
+
/**
|
|
30
|
+
* 只读态 - 隐藏协议
|
|
31
|
+
*/
|
|
32
|
+
export declare const ReadModeHideProtocol: Story;
|
|
33
|
+
/**
|
|
34
|
+
* 只读态 - 仅域名
|
|
35
|
+
*/
|
|
36
|
+
export declare const ReadModeDomainOnly: Story;
|
|
37
|
+
/**
|
|
38
|
+
* 禁用态(编辑)
|
|
39
|
+
*/
|
|
40
|
+
export declare const DisabledEdit: Story;
|
|
41
|
+
/**
|
|
42
|
+
* 禁用态(只读)
|
|
43
|
+
*/
|
|
44
|
+
export declare const DisabledRead: Story;
|
|
45
|
+
/**
|
|
46
|
+
* 必填校验
|
|
47
|
+
*/
|
|
48
|
+
export declare const Required: Story;
|
|
49
|
+
/**
|
|
50
|
+
* 格式校验(实时)
|
|
51
|
+
*/
|
|
52
|
+
export declare const FormatValidation: Story;
|
|
53
|
+
/**
|
|
54
|
+
* 协议限制(仅 HTTPS)
|
|
55
|
+
*/
|
|
56
|
+
export declare const HttpsOnly: Story;
|
|
57
|
+
/**
|
|
58
|
+
* 协议必需
|
|
59
|
+
*/
|
|
60
|
+
export declare const RequireProtocol: Story;
|
|
61
|
+
/**
|
|
62
|
+
* 显示清空按钮
|
|
63
|
+
*/
|
|
64
|
+
export declare const WithClearButton: Story;
|
|
65
|
+
/**
|
|
66
|
+
* 自动聚焦
|
|
67
|
+
*/
|
|
68
|
+
export declare const WithAutoFocus: Story;
|
|
69
|
+
/**
|
|
70
|
+
* 自定义样式(只读态)
|
|
71
|
+
*/
|
|
72
|
+
export declare const CustomStyle: Story;
|
|
73
|
+
/**
|
|
74
|
+
* 显示控制对比
|
|
75
|
+
*/
|
|
76
|
+
export declare const DisplayFormatComparison: Story;
|
|
77
|
+
/**
|
|
78
|
+
* 校验时机对比
|
|
79
|
+
*/
|
|
80
|
+
export declare const ValidateTriggerComparison: Story;
|
|
81
|
+
/**
|
|
82
|
+
* 所有状态展示
|
|
83
|
+
*/
|
|
84
|
+
export declare const AllStates: Story;
|
|
85
|
+
/**
|
|
86
|
+
* 完整功能示例
|
|
87
|
+
*/
|
|
88
|
+
export declare const CompleteExample: Story;
|
|
89
|
+
/**
|
|
90
|
+
* 协议补全演示
|
|
91
|
+
*/
|
|
92
|
+
export declare const ProtocolCompleteDemo: Story;
|
|
93
|
+
/**
|
|
94
|
+
* 链接跳转演示
|
|
95
|
+
*/
|
|
96
|
+
export declare const LinkClickDemo: Story;
|
|
97
|
+
/**
|
|
98
|
+
* 协议限制演示
|
|
99
|
+
*/
|
|
100
|
+
export declare const ProtocolRestrictionDemo: Story;
|
|
101
|
+
/**
|
|
102
|
+
* 完整交互示例
|
|
103
|
+
*/
|
|
104
|
+
export declare const InteractiveExample: Story;
|
|
105
|
+
/**
|
|
106
|
+
* 协议默认值对比
|
|
107
|
+
*/
|
|
108
|
+
export declare const ProtocolDefaultComparison: Story;
|