@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/main.js
CHANGED
|
@@ -148,6 +148,211 @@ function $62f1c614c0962470$export$c9058316764c140e(...refs) {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
+
const $62f1c614c0962470$var$validDOMProperties = new Set([
|
|
152
|
+
// Common HTML attributes
|
|
153
|
+
"accept",
|
|
154
|
+
"acceptCharset",
|
|
155
|
+
"accessKey",
|
|
156
|
+
"action",
|
|
157
|
+
"allowFullScreen",
|
|
158
|
+
"allowTransparency",
|
|
159
|
+
"alt",
|
|
160
|
+
"async",
|
|
161
|
+
"autoComplete",
|
|
162
|
+
"autoFocus",
|
|
163
|
+
"autoPlay",
|
|
164
|
+
"capture",
|
|
165
|
+
"cellPadding",
|
|
166
|
+
"cellSpacing",
|
|
167
|
+
"challenge",
|
|
168
|
+
"charSet",
|
|
169
|
+
"checked",
|
|
170
|
+
"cite",
|
|
171
|
+
"classID",
|
|
172
|
+
"className",
|
|
173
|
+
"colSpan",
|
|
174
|
+
"cols",
|
|
175
|
+
"content",
|
|
176
|
+
"contentEditable",
|
|
177
|
+
"contextMenu",
|
|
178
|
+
"controls",
|
|
179
|
+
"coords",
|
|
180
|
+
"crossOrigin",
|
|
181
|
+
"data",
|
|
182
|
+
"dateTime",
|
|
183
|
+
"default",
|
|
184
|
+
"defer",
|
|
185
|
+
"dir",
|
|
186
|
+
"disabled",
|
|
187
|
+
"download",
|
|
188
|
+
"draggable",
|
|
189
|
+
"encType",
|
|
190
|
+
"form",
|
|
191
|
+
"formAction",
|
|
192
|
+
"formEncType",
|
|
193
|
+
"formMethod",
|
|
194
|
+
"formNoValidate",
|
|
195
|
+
"formTarget",
|
|
196
|
+
"frameBorder",
|
|
197
|
+
"headers",
|
|
198
|
+
"height",
|
|
199
|
+
"hidden",
|
|
200
|
+
"high",
|
|
201
|
+
"href",
|
|
202
|
+
"hrefLang",
|
|
203
|
+
"htmlFor",
|
|
204
|
+
"httpEquiv",
|
|
205
|
+
"icon",
|
|
206
|
+
"id",
|
|
207
|
+
"inputMode",
|
|
208
|
+
"integrity",
|
|
209
|
+
"is",
|
|
210
|
+
"keyParams",
|
|
211
|
+
"keyType",
|
|
212
|
+
"kind",
|
|
213
|
+
"label",
|
|
214
|
+
"lang",
|
|
215
|
+
"list",
|
|
216
|
+
"loop",
|
|
217
|
+
"low",
|
|
218
|
+
"manifest",
|
|
219
|
+
"marginHeight",
|
|
220
|
+
"marginWidth",
|
|
221
|
+
"max",
|
|
222
|
+
"maxLength",
|
|
223
|
+
"media",
|
|
224
|
+
"mediaGroup",
|
|
225
|
+
"method",
|
|
226
|
+
"min",
|
|
227
|
+
"minLength",
|
|
228
|
+
"multiple",
|
|
229
|
+
"muted",
|
|
230
|
+
"name",
|
|
231
|
+
"noValidate",
|
|
232
|
+
"nonce",
|
|
233
|
+
"open",
|
|
234
|
+
"optimum",
|
|
235
|
+
"pattern",
|
|
236
|
+
"placeholder",
|
|
237
|
+
"poster",
|
|
238
|
+
"preload",
|
|
239
|
+
"profile",
|
|
240
|
+
"radioGroup",
|
|
241
|
+
"readOnly",
|
|
242
|
+
"referrerPolicy",
|
|
243
|
+
"rel",
|
|
244
|
+
"required",
|
|
245
|
+
"reversed",
|
|
246
|
+
"role",
|
|
247
|
+
"rowSpan",
|
|
248
|
+
"rows",
|
|
249
|
+
"sandbox",
|
|
250
|
+
"scope",
|
|
251
|
+
"scoped",
|
|
252
|
+
"scrolling",
|
|
253
|
+
"seamless",
|
|
254
|
+
"selected",
|
|
255
|
+
"shape",
|
|
256
|
+
"size",
|
|
257
|
+
"sizes",
|
|
258
|
+
"span",
|
|
259
|
+
"spellCheck",
|
|
260
|
+
"src",
|
|
261
|
+
"srcDoc",
|
|
262
|
+
"srcLang",
|
|
263
|
+
"srcSet",
|
|
264
|
+
"start",
|
|
265
|
+
"step",
|
|
266
|
+
"style",
|
|
267
|
+
"summary",
|
|
268
|
+
"tabIndex",
|
|
269
|
+
"target",
|
|
270
|
+
"title",
|
|
271
|
+
"type",
|
|
272
|
+
"useMap",
|
|
273
|
+
"value",
|
|
274
|
+
"width",
|
|
275
|
+
"wmode",
|
|
276
|
+
"wrap",
|
|
277
|
+
// Event handlers
|
|
278
|
+
"onCopy",
|
|
279
|
+
"onCut",
|
|
280
|
+
"onPaste",
|
|
281
|
+
"onCompositionEnd",
|
|
282
|
+
"onCompositionStart",
|
|
283
|
+
"onCompositionUpdate",
|
|
284
|
+
"onKeyDown",
|
|
285
|
+
"onKeyPress",
|
|
286
|
+
"onKeyUp",
|
|
287
|
+
"onFocus",
|
|
288
|
+
"onBlur",
|
|
289
|
+
"onChange",
|
|
290
|
+
"onInput",
|
|
291
|
+
"onInvalid",
|
|
292
|
+
"onSubmit",
|
|
293
|
+
"onClick",
|
|
294
|
+
"onContextMenu",
|
|
295
|
+
"onDoubleClick",
|
|
296
|
+
"onDrag",
|
|
297
|
+
"onDragEnd",
|
|
298
|
+
"onDragEnter",
|
|
299
|
+
"onDragExit",
|
|
300
|
+
"onDragLeave",
|
|
301
|
+
"onDragOver",
|
|
302
|
+
"onDragStart",
|
|
303
|
+
"onDrop",
|
|
304
|
+
"onMouseDown",
|
|
305
|
+
"onMouseEnter",
|
|
306
|
+
"onMouseLeave",
|
|
307
|
+
"onMouseMove",
|
|
308
|
+
"onMouseOut",
|
|
309
|
+
"onMouseOver",
|
|
310
|
+
"onMouseUp",
|
|
311
|
+
"onSelect",
|
|
312
|
+
"onTouchCancel",
|
|
313
|
+
"onTouchEnd",
|
|
314
|
+
"onTouchMove",
|
|
315
|
+
"onTouchStart",
|
|
316
|
+
"onScroll",
|
|
317
|
+
"onWheel",
|
|
318
|
+
"onAbort",
|
|
319
|
+
"onCanPlay",
|
|
320
|
+
"onCanPlayThrough",
|
|
321
|
+
"onDurationChange",
|
|
322
|
+
"onEmptied",
|
|
323
|
+
"onEncrypted",
|
|
324
|
+
"onEnded",
|
|
325
|
+
"onError",
|
|
326
|
+
"onLoadedData",
|
|
327
|
+
"onLoadedMetadata",
|
|
328
|
+
"onLoadStart",
|
|
329
|
+
"onPause",
|
|
330
|
+
"onPlay",
|
|
331
|
+
"onPlaying",
|
|
332
|
+
"onProgress",
|
|
333
|
+
"onRateChange",
|
|
334
|
+
"onSeeked",
|
|
335
|
+
"onSeeking",
|
|
336
|
+
"onStalled",
|
|
337
|
+
"onSuspend",
|
|
338
|
+
"onTimeUpdate",
|
|
339
|
+
"onVolumeChange",
|
|
340
|
+
"onWaiting",
|
|
341
|
+
"onLoad",
|
|
342
|
+
"onAnimationStart",
|
|
343
|
+
"onAnimationEnd",
|
|
344
|
+
"onAnimationIteration",
|
|
345
|
+
"onTransitionEnd",
|
|
346
|
+
"onToggle"
|
|
347
|
+
]);
|
|
348
|
+
function $62f1c614c0962470$export$457c3d6518dd4c6f(props) {
|
|
349
|
+
const newProps = {};
|
|
350
|
+
for(const key in props){
|
|
351
|
+
if (!key.startsWith("data-") && !$62f1c614c0962470$var$validDOMProperties.has(key)) continue;
|
|
352
|
+
newProps[key] = props[key];
|
|
353
|
+
}
|
|
354
|
+
return newProps;
|
|
355
|
+
}
|
|
151
356
|
|
|
152
357
|
|
|
153
358
|
const $eb8f27c3596a0e6b$export$23c260ee8e4dfaad = ({ stretchX: stretchX, stretchY: stretchY, stretchXY: stretchXY, children: children, className: className, position: position, as: as = "div", ...props }, ref)=>{
|
|
@@ -295,7 +500,7 @@ const $c3a954a7c0cb5109$export$21ee1313e2afe36c = (props, ref)=>{
|
|
|
295
500
|
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)(className, inline ? "display-inline-flex" : "display-flex", `flex-direction-${flexDirection}`, wrap && `flex-${wrap}`, justify && `flex-justify-${justify}`, align && `flex-align-${align}`, (0, $4af7da5c7dd0b9c2$export$2db1d02db18b2d82)("gap", gap), (0, $4af7da5c7dd0b9c2$export$2db1d02db18b2d82)("column-gap", columnGap), (0, $4af7da5c7dd0b9c2$export$2db1d02db18b2d82)("row-gap", rowGap)),
|
|
296
501
|
// TODO - Fix types here - seems to work just fine though
|
|
297
502
|
ref: ref,
|
|
298
|
-
...otherProps,
|
|
503
|
+
...(0, $62f1c614c0962470$export$457c3d6518dd4c6f)(otherProps),
|
|
299
504
|
children: props.children
|
|
300
505
|
});
|
|
301
506
|
};
|
|
@@ -652,7 +857,7 @@ function $ff6fce0e059b3a1a$export$d2dae087199d2383(object) {
|
|
|
652
857
|
|
|
653
858
|
|
|
654
859
|
const $7f70742e736041ff$var$ButtonGroupContext = /*#__PURE__*/ $8zHUo$react.createContext({});
|
|
655
|
-
function $7f70742e736041ff$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 }) {
|
|
860
|
+
function $7f70742e736041ff$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 }) {
|
|
656
861
|
const cleanProps = (0, $ff6fce0e059b3a1a$export$d2dae087199d2383)({
|
|
657
862
|
color: color,
|
|
658
863
|
variant: variant,
|
|
@@ -667,6 +872,10 @@ function $7f70742e736041ff$export$69b1032f2ecdf404({ color: color, variant: vari
|
|
|
667
872
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($7f70742e736041ff$var$ButtonGroupContext.Provider, {
|
|
668
873
|
value: cleanProps,
|
|
669
874
|
children: /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)((0, $eae337549f49a5a2$export$eef1e68107c58ef2), {
|
|
875
|
+
className: className,
|
|
876
|
+
classNames: classNames,
|
|
877
|
+
style: style,
|
|
878
|
+
styles: styles,
|
|
670
879
|
gap: gap,
|
|
671
880
|
compact: compact,
|
|
672
881
|
children: children
|
|
@@ -719,7 +928,7 @@ const $5a6f28f3fd58ff6e$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
719
928
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)(Comp, {
|
|
720
929
|
style: {
|
|
721
930
|
...style,
|
|
722
|
-
...styles?.
|
|
931
|
+
...styles?.wrapper
|
|
723
932
|
},
|
|
724
933
|
"data-is-toggle": isToggle,
|
|
725
934
|
"data-pressed": isPressed,
|
|
@@ -2833,7 +3042,7 @@ $c5c6f63b49c9056a$export$b5d5cf8927ab7262.displayName = "Switch";
|
|
|
2833
3042
|
|
|
2834
3043
|
|
|
2835
3044
|
|
|
2836
|
-
function $a945a7e4eb75da9e$export$472062a354075cee({ className: className, classNames: classNames, style: style, styles: styles, name: name, size: size = "sm", orientation: orientation = "horizontal", ...props }) {
|
|
3045
|
+
function $a945a7e4eb75da9e$export$472062a354075cee({ className: className, classNames: classNames, style: style, styles: styles, name: name, size: size = "sm", color: color, orientation: orientation = "horizontal", ...props }) {
|
|
2837
3046
|
const trackRef = $8zHUo$react.useRef(null);
|
|
2838
3047
|
const numberFormatter = (0, $8zHUo$reactaria.useNumberFormatter)();
|
|
2839
3048
|
const state = (0, $8zHUo$reactstately.useSliderState)({
|
|
@@ -2846,6 +3055,7 @@ function $a945a7e4eb75da9e$export$472062a354075cee({ className: className, class
|
|
|
2846
3055
|
}, state, trackRef);
|
|
2847
3056
|
const percent = state.getThumbPercent(0);
|
|
2848
3057
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
|
|
3058
|
+
"data-color": color,
|
|
2849
3059
|
"data-size": size,
|
|
2850
3060
|
style: {
|
|
2851
3061
|
...style,
|
|
@@ -2860,15 +3070,20 @@ function $a945a7e4eb75da9e$export$472062a354075cee({ className: className, class
|
|
|
2860
3070
|
children: props.label
|
|
2861
3071
|
}),
|
|
2862
3072
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
|
|
3073
|
+
...trackProps,
|
|
2863
3074
|
ref: trackRef,
|
|
2864
3075
|
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-slider-track", classNames?.track),
|
|
2865
|
-
|
|
3076
|
+
style: {
|
|
3077
|
+
...styles?.track,
|
|
3078
|
+
...trackProps.style
|
|
3079
|
+
},
|
|
2866
3080
|
children: [
|
|
2867
3081
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
2868
3082
|
style: {
|
|
3083
|
+
...styles?.fill,
|
|
2869
3084
|
width: `${percent * 100}%`
|
|
2870
3085
|
},
|
|
2871
|
-
className: "p-slider-track-fill"
|
|
3086
|
+
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-slider-track-fill", classNames?.fill)
|
|
2872
3087
|
}),
|
|
2873
3088
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)($a945a7e4eb75da9e$var$Thumb, {
|
|
2874
3089
|
styles: {
|
|
@@ -2899,14 +3114,15 @@ function $a945a7e4eb75da9e$var$Thumb({ state: state, trackRef: trackRef, index:
|
|
|
2899
3114
|
}, state);
|
|
2900
3115
|
const { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $8zHUo$reactaria.useFocusRing)();
|
|
2901
3116
|
return /*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsxs)("div", {
|
|
3117
|
+
...thumbProps,
|
|
2902
3118
|
"data-dragging": isDragging,
|
|
2903
3119
|
"data-focus-visible": isFocusVisible,
|
|
2904
3120
|
className: (0, $62f1c614c0962470$export$a274e22fb40f762e)("p-slider-thumb", className, classNames?.wrapper),
|
|
2905
3121
|
style: {
|
|
3122
|
+
...thumbProps.style,
|
|
2906
3123
|
...style,
|
|
2907
3124
|
...styles?.wrapper
|
|
2908
3125
|
},
|
|
2909
|
-
...thumbProps,
|
|
2910
3126
|
children: [
|
|
2911
3127
|
/*#__PURE__*/ (0, $8zHUo$reactjsxruntime.jsx)("div", {
|
|
2912
3128
|
style: styles?.inner,
|
|
@@ -3608,7 +3824,7 @@ const $d26053f02b9f370b$export$a79147a60006308c = (0, $8zHUo$reactstately.Item);
|
|
|
3608
3824
|
|
|
3609
3825
|
|
|
3610
3826
|
|
|
3611
|
-
function $b4c448f742efa2a7$export$9feb1bc2e5f1ccb3({ onChange: onChange, color: colorProp }) {
|
|
3827
|
+
function $b4c448f742efa2a7$export$9feb1bc2e5f1ccb3({ onChange: onChange, color: colorProp, styles: styles, classNames: classNames, className: className, style: style }) {
|
|
3612
3828
|
const [colorSpace, setColorSpace] = $8zHUo$react.useState("hex");
|
|
3613
3829
|
const [color, setColor] = (0, $c410efc80bcce413$export$40bfa8c7b0832715)(colorProp, (0, $8zHUo$reactstatelycolor.parseColor)("#BB66CC").toFormat("hsla"), onChange);
|
|
3614
3830
|
function handleChange(color) {
|