playbook_ui 13.8.0.pre.alpha.play845allkitsbytypes1258 → 13.9.0.pre.alpha.play845allkitsbytypes1260
Sign up to get free protection for your applications and to get access to all the features.
- 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: e47bda24af6edbc23255faea9e74418ea82ec02ecafbcce245aca51ead067eb8
|
4
|
+
data.tar.gz: 7a6417c7fded6d9f5117ed28bcb7207a7d9d286611140aa9d82db0879f91cec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a40703a2cbcc0e1fc98ee91a0ba73d219ce1f8172975022c722c3ca425d005a8a05bd3f7290c3bf558a036a53b82a32ea89bad388e5338af9424c66c4ff07ce
|
7
|
+
data.tar.gz: f0275c462194c5c2db72f027a0e7347cf423e72e50e1004b6e65fe2b10962b993c3cc88e534e87a4ebeee7778f20abace8b3c2ec42e8dcfbdabd1e5512f0ce24
|
@@ -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)
|