playbook_ui 13.8.0 → 13.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_button/_button.tsx +1 -6
- data/app/pb_kits/playbook/pb_button/docs/_button_reaction.html.erb +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_reaction.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -7
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -0
- data/app/pb_kits/playbook/utilities/validEmojiChecker.ts +6 -0
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/version.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3913dffced512fb212f3b0a4e1037abbf10a28420af5f13f666b62ac4b4a385d
|
|
4
|
+
data.tar.gz: c254328bfcb08db335a4c1a376cfbd83fc7f9eb981749a2041f6fd0394ab3a36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 76ad54d6d06215fcc8ed33cf0186f8c6b23d850b21a2f58e99f5761a8eb33dfb9a8e7280692962134b53a0cb475663eba34fe7029394cdfa9e56b6ea905ddf6c
|
|
7
|
+
data.tar.gz: e897dae13452e396a6efda42c0d2ddeee117413c7bb9c9778fd781a024302c7946f420631c1cd9d01181ed132dc419a949356cc5a9541b6cc540583f4566134b
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
|
4
4
|
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
|
5
|
+
import { isValidEmoji } from '../utilities/validEmojiChecker'
|
|
5
6
|
|
|
6
7
|
import Icon from '../pb_icon/_icon'
|
|
7
8
|
import Caption from "../pb_caption/_caption"
|
|
@@ -38,12 +39,6 @@ type ButtonPropTypes = {
|
|
|
38
39
|
wrapperClass?: string,
|
|
39
40
|
} & GlobalProps
|
|
40
41
|
|
|
41
|
-
const isValidEmoji = (emoji: string) => {
|
|
42
|
-
// Using regular expression to check if the string is a valid emoji/emoji Unicode
|
|
43
|
-
const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
|
|
44
|
-
return emojiRegex.test(emoji);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
42
|
const buttonClassName = (props: ButtonPropTypes) => {
|
|
48
43
|
const {
|
|
49
44
|
disabled = false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= pb_rails("button", props: { count: 153, highlight: false, icon: "🎉", classname: "count", id: "reaction-button-highlight", variant: "reaction" }) %>
|
|
2
|
-
<%= pb_rails("button", props: { count: 5, icon: "
|
|
2
|
+
<%= pb_rails("button", props: { count: 5, icon: "1️⃣", variant: "reaction", margin_left: "lg" }) %>
|
|
3
3
|
<%= pb_rails("button", props: { variant: "reaction", margin_left: "lg" }) %>
|
|
4
4
|
<%= pb_rails("button", props: { icon: "user", variant: "reaction", margin_left: "lg" }) %>
|
|
5
5
|
|
|
@@ -2,6 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
|
4
4
|
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
|
5
|
+
import { isValidEmoji } from '../utilities/validEmojiChecker'
|
|
5
6
|
|
|
6
7
|
export type IconSizes = "lg"
|
|
7
8
|
| "xs"
|
|
@@ -104,13 +105,6 @@ const Icon = (props: IconProps) => {
|
|
|
104
105
|
const ariaProps: {[key: string]: any} = buildAriaProps(aria)
|
|
105
106
|
const dataProps: {[key: string]: any} = buildDataProps(data)
|
|
106
107
|
|
|
107
|
-
const isValidEmoji = (emoji: string) => {
|
|
108
|
-
// Using regular expression to check if the string is a valid emoji/emoji Unicode
|
|
109
|
-
const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
|
|
110
|
-
return emojiRegex.test(emoji);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
|
|
114
108
|
// Add a conditional here to show only the SVG if custom
|
|
115
109
|
const displaySVG = (customIcon: any) => {
|
|
116
110
|
if (customIcon)
|