@parrot-co/parrot-ui 0.1.9 → 0.1.10
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/dist/main.js +224 -8
- package/dist/main.js.map +1 -1
- package/dist/module.js +224 -8
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +13 -14
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
package/dist/module.js
CHANGED
|
@@ -83,6 +83,211 @@ function $cce662c1d2ec881b$export$c9058316764c140e(...refs) {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
+
const $cce662c1d2ec881b$var$validDOMProperties = new Set([
|
|
87
|
+
// Common HTML attributes
|
|
88
|
+
"accept",
|
|
89
|
+
"acceptCharset",
|
|
90
|
+
"accessKey",
|
|
91
|
+
"action",
|
|
92
|
+
"allowFullScreen",
|
|
93
|
+
"allowTransparency",
|
|
94
|
+
"alt",
|
|
95
|
+
"async",
|
|
96
|
+
"autoComplete",
|
|
97
|
+
"autoFocus",
|
|
98
|
+
"autoPlay",
|
|
99
|
+
"capture",
|
|
100
|
+
"cellPadding",
|
|
101
|
+
"cellSpacing",
|
|
102
|
+
"challenge",
|
|
103
|
+
"charSet",
|
|
104
|
+
"checked",
|
|
105
|
+
"cite",
|
|
106
|
+
"classID",
|
|
107
|
+
"className",
|
|
108
|
+
"colSpan",
|
|
109
|
+
"cols",
|
|
110
|
+
"content",
|
|
111
|
+
"contentEditable",
|
|
112
|
+
"contextMenu",
|
|
113
|
+
"controls",
|
|
114
|
+
"coords",
|
|
115
|
+
"crossOrigin",
|
|
116
|
+
"data",
|
|
117
|
+
"dateTime",
|
|
118
|
+
"default",
|
|
119
|
+
"defer",
|
|
120
|
+
"dir",
|
|
121
|
+
"disabled",
|
|
122
|
+
"download",
|
|
123
|
+
"draggable",
|
|
124
|
+
"encType",
|
|
125
|
+
"form",
|
|
126
|
+
"formAction",
|
|
127
|
+
"formEncType",
|
|
128
|
+
"formMethod",
|
|
129
|
+
"formNoValidate",
|
|
130
|
+
"formTarget",
|
|
131
|
+
"frameBorder",
|
|
132
|
+
"headers",
|
|
133
|
+
"height",
|
|
134
|
+
"hidden",
|
|
135
|
+
"high",
|
|
136
|
+
"href",
|
|
137
|
+
"hrefLang",
|
|
138
|
+
"htmlFor",
|
|
139
|
+
"httpEquiv",
|
|
140
|
+
"icon",
|
|
141
|
+
"id",
|
|
142
|
+
"inputMode",
|
|
143
|
+
"integrity",
|
|
144
|
+
"is",
|
|
145
|
+
"keyParams",
|
|
146
|
+
"keyType",
|
|
147
|
+
"kind",
|
|
148
|
+
"label",
|
|
149
|
+
"lang",
|
|
150
|
+
"list",
|
|
151
|
+
"loop",
|
|
152
|
+
"low",
|
|
153
|
+
"manifest",
|
|
154
|
+
"marginHeight",
|
|
155
|
+
"marginWidth",
|
|
156
|
+
"max",
|
|
157
|
+
"maxLength",
|
|
158
|
+
"media",
|
|
159
|
+
"mediaGroup",
|
|
160
|
+
"method",
|
|
161
|
+
"min",
|
|
162
|
+
"minLength",
|
|
163
|
+
"multiple",
|
|
164
|
+
"muted",
|
|
165
|
+
"name",
|
|
166
|
+
"noValidate",
|
|
167
|
+
"nonce",
|
|
168
|
+
"open",
|
|
169
|
+
"optimum",
|
|
170
|
+
"pattern",
|
|
171
|
+
"placeholder",
|
|
172
|
+
"poster",
|
|
173
|
+
"preload",
|
|
174
|
+
"profile",
|
|
175
|
+
"radioGroup",
|
|
176
|
+
"readOnly",
|
|
177
|
+
"referrerPolicy",
|
|
178
|
+
"rel",
|
|
179
|
+
"required",
|
|
180
|
+
"reversed",
|
|
181
|
+
"role",
|
|
182
|
+
"rowSpan",
|
|
183
|
+
"rows",
|
|
184
|
+
"sandbox",
|
|
185
|
+
"scope",
|
|
186
|
+
"scoped",
|
|
187
|
+
"scrolling",
|
|
188
|
+
"seamless",
|
|
189
|
+
"selected",
|
|
190
|
+
"shape",
|
|
191
|
+
"size",
|
|
192
|
+
"sizes",
|
|
193
|
+
"span",
|
|
194
|
+
"spellCheck",
|
|
195
|
+
"src",
|
|
196
|
+
"srcDoc",
|
|
197
|
+
"srcLang",
|
|
198
|
+
"srcSet",
|
|
199
|
+
"start",
|
|
200
|
+
"step",
|
|
201
|
+
"style",
|
|
202
|
+
"summary",
|
|
203
|
+
"tabIndex",
|
|
204
|
+
"target",
|
|
205
|
+
"title",
|
|
206
|
+
"type",
|
|
207
|
+
"useMap",
|
|
208
|
+
"value",
|
|
209
|
+
"width",
|
|
210
|
+
"wmode",
|
|
211
|
+
"wrap",
|
|
212
|
+
// Event handlers
|
|
213
|
+
"onCopy",
|
|
214
|
+
"onCut",
|
|
215
|
+
"onPaste",
|
|
216
|
+
"onCompositionEnd",
|
|
217
|
+
"onCompositionStart",
|
|
218
|
+
"onCompositionUpdate",
|
|
219
|
+
"onKeyDown",
|
|
220
|
+
"onKeyPress",
|
|
221
|
+
"onKeyUp",
|
|
222
|
+
"onFocus",
|
|
223
|
+
"onBlur",
|
|
224
|
+
"onChange",
|
|
225
|
+
"onInput",
|
|
226
|
+
"onInvalid",
|
|
227
|
+
"onSubmit",
|
|
228
|
+
"onClick",
|
|
229
|
+
"onContextMenu",
|
|
230
|
+
"onDoubleClick",
|
|
231
|
+
"onDrag",
|
|
232
|
+
"onDragEnd",
|
|
233
|
+
"onDragEnter",
|
|
234
|
+
"onDragExit",
|
|
235
|
+
"onDragLeave",
|
|
236
|
+
"onDragOver",
|
|
237
|
+
"onDragStart",
|
|
238
|
+
"onDrop",
|
|
239
|
+
"onMouseDown",
|
|
240
|
+
"onMouseEnter",
|
|
241
|
+
"onMouseLeave",
|
|
242
|
+
"onMouseMove",
|
|
243
|
+
"onMouseOut",
|
|
244
|
+
"onMouseOver",
|
|
245
|
+
"onMouseUp",
|
|
246
|
+
"onSelect",
|
|
247
|
+
"onTouchCancel",
|
|
248
|
+
"onTouchEnd",
|
|
249
|
+
"onTouchMove",
|
|
250
|
+
"onTouchStart",
|
|
251
|
+
"onScroll",
|
|
252
|
+
"onWheel",
|
|
253
|
+
"onAbort",
|
|
254
|
+
"onCanPlay",
|
|
255
|
+
"onCanPlayThrough",
|
|
256
|
+
"onDurationChange",
|
|
257
|
+
"onEmptied",
|
|
258
|
+
"onEncrypted",
|
|
259
|
+
"onEnded",
|
|
260
|
+
"onError",
|
|
261
|
+
"onLoadedData",
|
|
262
|
+
"onLoadedMetadata",
|
|
263
|
+
"onLoadStart",
|
|
264
|
+
"onPause",
|
|
265
|
+
"onPlay",
|
|
266
|
+
"onPlaying",
|
|
267
|
+
"onProgress",
|
|
268
|
+
"onRateChange",
|
|
269
|
+
"onSeeked",
|
|
270
|
+
"onSeeking",
|
|
271
|
+
"onStalled",
|
|
272
|
+
"onSuspend",
|
|
273
|
+
"onTimeUpdate",
|
|
274
|
+
"onVolumeChange",
|
|
275
|
+
"onWaiting",
|
|
276
|
+
"onLoad",
|
|
277
|
+
"onAnimationStart",
|
|
278
|
+
"onAnimationEnd",
|
|
279
|
+
"onAnimationIteration",
|
|
280
|
+
"onTransitionEnd",
|
|
281
|
+
"onToggle"
|
|
282
|
+
]);
|
|
283
|
+
function $cce662c1d2ec881b$export$457c3d6518dd4c6f(props) {
|
|
284
|
+
const newProps = {};
|
|
285
|
+
for(const key in props){
|
|
286
|
+
if (!key.startsWith("data-") && !$cce662c1d2ec881b$var$validDOMProperties.has(key)) continue;
|
|
287
|
+
newProps[key] = props[key];
|
|
288
|
+
}
|
|
289
|
+
return newProps;
|
|
290
|
+
}
|
|
86
291
|
|
|
87
292
|
|
|
88
293
|
const $ee0105641360f1c1$export$23c260ee8e4dfaad = ({ stretchX: stretchX, stretchY: stretchY, stretchXY: stretchXY, children: children, className: className, position: position, as: as = "div", ...props }, ref)=>{
|
|
@@ -230,7 +435,7 @@ const $e2f278d76a00796a$export$21ee1313e2afe36c = (props, ref)=>{
|
|
|
230
435
|
className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)(className, inline ? "display-inline-flex" : "display-flex", `flex-direction-${flexDirection}`, wrap && `flex-${wrap}`, justify && `flex-justify-${justify}`, align && `flex-align-${align}`, (0, $0ad0bc75b5eb16a6$export$2db1d02db18b2d82)("gap", gap), (0, $0ad0bc75b5eb16a6$export$2db1d02db18b2d82)("column-gap", columnGap), (0, $0ad0bc75b5eb16a6$export$2db1d02db18b2d82)("row-gap", rowGap)),
|
|
231
436
|
// TODO - Fix types here - seems to work just fine though
|
|
232
437
|
ref: ref,
|
|
233
|
-
...otherProps,
|
|
438
|
+
...(0, $cce662c1d2ec881b$export$457c3d6518dd4c6f)(otherProps),
|
|
234
439
|
children: props.children
|
|
235
440
|
});
|
|
236
441
|
};
|
|
@@ -587,7 +792,7 @@ function $b35ea695a7e1feb7$export$d2dae087199d2383(object) {
|
|
|
587
792
|
|
|
588
793
|
|
|
589
794
|
const $9230e224c5c26d9c$var$ButtonGroupContext = /*#__PURE__*/ $hgUW1$createContext({});
|
|
590
|
-
function $9230e224c5c26d9c$export$69b1032f2ecdf404({ color: color, variant: variant, size: size, compact: compact, radius: radius, gap: gap, children: children, idleColor: idleColor, activeColor: activeColor, idleVariant: idleVariant, activeVariant: activeVariant, isToggle: isToggle }) {
|
|
795
|
+
function $9230e224c5c26d9c$export$69b1032f2ecdf404({ color: color, variant: variant, size: size, compact: compact, radius: radius, gap: gap, children: children, idleColor: idleColor, activeColor: activeColor, idleVariant: idleVariant, activeVariant: activeVariant, isToggle: isToggle, className: className, classNames: classNames, style: style, styles: styles }) {
|
|
591
796
|
const cleanProps = (0, $b35ea695a7e1feb7$export$d2dae087199d2383)({
|
|
592
797
|
color: color,
|
|
593
798
|
variant: variant,
|
|
@@ -602,6 +807,10 @@ function $9230e224c5c26d9c$export$69b1032f2ecdf404({ color: color, variant: vari
|
|
|
602
807
|
return /*#__PURE__*/ (0, $hgUW1$jsx)($9230e224c5c26d9c$var$ButtonGroupContext.Provider, {
|
|
603
808
|
value: cleanProps,
|
|
604
809
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $41cc567ab0625f8f$export$eef1e68107c58ef2), {
|
|
810
|
+
className: className,
|
|
811
|
+
classNames: classNames,
|
|
812
|
+
style: style,
|
|
813
|
+
styles: styles,
|
|
605
814
|
gap: gap,
|
|
606
815
|
compact: compact,
|
|
607
816
|
children: children
|
|
@@ -654,7 +863,7 @@ const $d95a2216d3ccf702$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $hgUW1$react
|
|
|
654
863
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)(Comp, {
|
|
655
864
|
style: {
|
|
656
865
|
...style,
|
|
657
|
-
...styles?.
|
|
866
|
+
...styles?.wrapper
|
|
658
867
|
},
|
|
659
868
|
"data-is-toggle": isToggle,
|
|
660
869
|
"data-pressed": isPressed,
|
|
@@ -2768,7 +2977,7 @@ $fac55dfefd316398$export$b5d5cf8927ab7262.displayName = "Switch";
|
|
|
2768
2977
|
|
|
2769
2978
|
|
|
2770
2979
|
|
|
2771
|
-
function $17f80f062b7f107f$export$472062a354075cee({ className: className, classNames: classNames, style: style, styles: styles, name: name, size: size = "sm", orientation: orientation = "horizontal", ...props }) {
|
|
2980
|
+
function $17f80f062b7f107f$export$472062a354075cee({ className: className, classNames: classNames, style: style, styles: styles, name: name, size: size = "sm", color: color, orientation: orientation = "horizontal", ...props }) {
|
|
2772
2981
|
const trackRef = $hgUW1$useRef(null);
|
|
2773
2982
|
const numberFormatter = (0, $hgUW1$useNumberFormatter)();
|
|
2774
2983
|
const state = (0, $hgUW1$useSliderState)({
|
|
@@ -2781,6 +2990,7 @@ function $17f80f062b7f107f$export$472062a354075cee({ className: className, class
|
|
|
2781
2990
|
}, state, trackRef);
|
|
2782
2991
|
const percent = state.getThumbPercent(0);
|
|
2783
2992
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2993
|
+
"data-color": color,
|
|
2784
2994
|
"data-size": size,
|
|
2785
2995
|
style: {
|
|
2786
2996
|
...style,
|
|
@@ -2795,15 +3005,20 @@ function $17f80f062b7f107f$export$472062a354075cee({ className: className, class
|
|
|
2795
3005
|
children: props.label
|
|
2796
3006
|
}),
|
|
2797
3007
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3008
|
+
...trackProps,
|
|
2798
3009
|
ref: trackRef,
|
|
2799
3010
|
className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)("p-slider-track", classNames?.track),
|
|
2800
|
-
|
|
3011
|
+
style: {
|
|
3012
|
+
...styles?.track,
|
|
3013
|
+
...trackProps.style
|
|
3014
|
+
},
|
|
2801
3015
|
children: [
|
|
2802
3016
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2803
3017
|
style: {
|
|
3018
|
+
...styles?.fill,
|
|
2804
3019
|
width: `${percent * 100}%`
|
|
2805
3020
|
},
|
|
2806
|
-
className: "p-slider-track-fill"
|
|
3021
|
+
className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)("p-slider-track-fill", classNames?.fill)
|
|
2807
3022
|
}),
|
|
2808
3023
|
/*#__PURE__*/ (0, $hgUW1$jsx)($17f80f062b7f107f$var$Thumb, {
|
|
2809
3024
|
styles: {
|
|
@@ -2834,14 +3049,15 @@ function $17f80f062b7f107f$var$Thumb({ state: state, trackRef: trackRef, index:
|
|
|
2834
3049
|
}, state);
|
|
2835
3050
|
const { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $hgUW1$useFocusRing)();
|
|
2836
3051
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3052
|
+
...thumbProps,
|
|
2837
3053
|
"data-dragging": isDragging,
|
|
2838
3054
|
"data-focus-visible": isFocusVisible,
|
|
2839
3055
|
className: (0, $cce662c1d2ec881b$export$a274e22fb40f762e)("p-slider-thumb", className, classNames?.wrapper),
|
|
2840
3056
|
style: {
|
|
3057
|
+
...thumbProps.style,
|
|
2841
3058
|
...style,
|
|
2842
3059
|
...styles?.wrapper
|
|
2843
3060
|
},
|
|
2844
|
-
...thumbProps,
|
|
2845
3061
|
children: [
|
|
2846
3062
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2847
3063
|
style: styles?.inner,
|
|
@@ -3543,7 +3759,7 @@ const $31aad62a65b342bc$export$a79147a60006308c = (0, $hgUW1$Item);
|
|
|
3543
3759
|
|
|
3544
3760
|
|
|
3545
3761
|
|
|
3546
|
-
function $b925f0cf89a3187d$export$9feb1bc2e5f1ccb3({ onChange: onChange, color: colorProp }) {
|
|
3762
|
+
function $b925f0cf89a3187d$export$9feb1bc2e5f1ccb3({ onChange: onChange, color: colorProp, styles: styles, classNames: classNames, className: className, style: style }) {
|
|
3547
3763
|
const [colorSpace, setColorSpace] = $hgUW1$useState("hex");
|
|
3548
3764
|
const [color, setColor] = (0, $fda09bbc0161c751$export$40bfa8c7b0832715)(colorProp, (0, $hgUW1$parseColor)("#BB66CC").toFormat("hsla"), onChange);
|
|
3549
3765
|
function handleChange(color) {
|