@ory/elements-react 1.0.0-next.3 → 1.0.0-next.4
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 +0 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -0
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.d.mts +1 -1
- package/dist/theme/default/index.d.ts +1 -1
- package/dist/theme/default/index.js +45 -2
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +45 -2
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +11 -1
- package/test-results/.last-run.json +4 -0
package/README.md
CHANGED
|
@@ -41,10 +41,6 @@ Visit https://ory.sh/docs to see the full Ory documentation.
|
|
|
41
41
|
npm install @ory/elements-react
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
> [!IMPORTANT]<br/>Please take a look at the
|
|
45
|
-
> [local develepmont documentation](https://www.ory.sh/docs/getting-started/local-development)
|
|
46
|
-
> \
|
|
47
|
-
|
|
48
44
|
## Usage
|
|
49
45
|
|
|
50
46
|
Ory Elements provides components that can aggregate flow objects and display
|
package/dist/index.d.mts
CHANGED
|
@@ -121,7 +121,7 @@ type HeadlessFormProps = ComponentPropsWithoutRef<"form"> & {
|
|
|
121
121
|
type HeadlessInputProps = {
|
|
122
122
|
attributes: UiNodeInputAttributes;
|
|
123
123
|
node: UiNode;
|
|
124
|
-
onClick
|
|
124
|
+
onClick?: MouseEventHandler;
|
|
125
125
|
};
|
|
126
126
|
type OryFlowComponents = OryFormComponents & OryCardComponents;
|
|
127
127
|
|
package/dist/index.d.ts
CHANGED
|
@@ -121,7 +121,7 @@ type HeadlessFormProps = ComponentPropsWithoutRef<"form"> & {
|
|
|
121
121
|
type HeadlessInputProps = {
|
|
122
122
|
attributes: UiNodeInputAttributes;
|
|
123
123
|
node: UiNode;
|
|
124
|
-
onClick
|
|
124
|
+
onClick?: MouseEventHandler;
|
|
125
125
|
};
|
|
126
126
|
type OryFlowComponents = OryFormComponents & OryCardComponents;
|
|
127
127
|
|
package/dist/index.js
CHANGED
|
@@ -573,9 +573,11 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
573
573
|
skeleton.replace(DATE_TIME_REGEX, function(match) {
|
|
574
574
|
var len = match.length;
|
|
575
575
|
switch (match[0]) {
|
|
576
|
+
// Era
|
|
576
577
|
case "G":
|
|
577
578
|
result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
|
|
578
579
|
break;
|
|
580
|
+
// Year
|
|
579
581
|
case "y":
|
|
580
582
|
result.year = len === 2 ? "2-digit" : "numeric";
|
|
581
583
|
break;
|
|
@@ -584,13 +586,16 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
584
586
|
case "U":
|
|
585
587
|
case "r":
|
|
586
588
|
throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
|
|
589
|
+
// Quarter
|
|
587
590
|
case "q":
|
|
588
591
|
case "Q":
|
|
589
592
|
throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
593
|
+
// Month
|
|
590
594
|
case "M":
|
|
591
595
|
case "L":
|
|
592
596
|
result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
|
|
593
597
|
break;
|
|
598
|
+
// Week
|
|
594
599
|
case "w":
|
|
595
600
|
case "W":
|
|
596
601
|
throw new RangeError("`w/W` (week) patterns are not supported");
|
|
@@ -601,6 +606,7 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
601
606
|
case "F":
|
|
602
607
|
case "g":
|
|
603
608
|
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
609
|
+
// Weekday
|
|
604
610
|
case "E":
|
|
605
611
|
result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short";
|
|
606
612
|
break;
|
|
@@ -616,12 +622,15 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
616
622
|
}
|
|
617
623
|
result.weekday = ["short", "long", "narrow", "short"][len - 4];
|
|
618
624
|
break;
|
|
625
|
+
// Period
|
|
619
626
|
case "a":
|
|
620
627
|
result.hour12 = true;
|
|
621
628
|
break;
|
|
622
629
|
case "b":
|
|
630
|
+
// am, pm, noon, midnight
|
|
623
631
|
case "B":
|
|
624
632
|
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
633
|
+
// Hour
|
|
625
634
|
case "h":
|
|
626
635
|
result.hourCycle = "h12";
|
|
627
636
|
result.hour = ["numeric", "2-digit"][len - 1];
|
|
@@ -642,23 +651,31 @@ function parseDateTimeSkeleton(skeleton) {
|
|
|
642
651
|
case "J":
|
|
643
652
|
case "C":
|
|
644
653
|
throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
654
|
+
// Minute
|
|
645
655
|
case "m":
|
|
646
656
|
result.minute = ["numeric", "2-digit"][len - 1];
|
|
647
657
|
break;
|
|
658
|
+
// Second
|
|
648
659
|
case "s":
|
|
649
660
|
result.second = ["numeric", "2-digit"][len - 1];
|
|
650
661
|
break;
|
|
651
662
|
case "S":
|
|
652
663
|
case "A":
|
|
653
664
|
throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
665
|
+
// Zone
|
|
654
666
|
case "z":
|
|
655
667
|
result.timeZoneName = len < 4 ? "short" : "long";
|
|
656
668
|
break;
|
|
657
669
|
case "Z":
|
|
670
|
+
// 1..3, 4, 5: The ISO8601 varios formats
|
|
658
671
|
case "O":
|
|
672
|
+
// 1, 4: miliseconds in day short, long
|
|
659
673
|
case "v":
|
|
674
|
+
// 1, 4: generic non-location format
|
|
660
675
|
case "V":
|
|
676
|
+
// 1, 2, 3, 4: time zone ID or city
|
|
661
677
|
case "X":
|
|
678
|
+
// 1, 2, 3, 4: The ISO8601 varios formats
|
|
662
679
|
case "x":
|
|
663
680
|
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
|
|
664
681
|
}
|
|
@@ -856,6 +873,7 @@ function parseNumberSkeleton(tokens) {
|
|
|
856
873
|
case "notation-simple":
|
|
857
874
|
result.notation = "standard";
|
|
858
875
|
continue;
|
|
876
|
+
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
859
877
|
case "unit-width-narrow":
|
|
860
878
|
result.currencyDisplay = "narrowSymbol";
|
|
861
879
|
result.unitDisplay = "narrow";
|
|
@@ -874,6 +892,7 @@ function parseNumberSkeleton(tokens) {
|
|
|
874
892
|
case "scale":
|
|
875
893
|
result.scale = parseFloat(token.options[0]);
|
|
876
894
|
continue;
|
|
895
|
+
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
877
896
|
case "integer-width":
|
|
878
897
|
if (token.options.length > 1) {
|
|
879
898
|
throw new RangeError("integer-width stems only accept a single optional option");
|
|
@@ -2636,6 +2655,7 @@ var Parser = (
|
|
|
2636
2655
|
this.bump();
|
|
2637
2656
|
this.bump();
|
|
2638
2657
|
return "'";
|
|
2658
|
+
// '{', '<', '>', '}'
|
|
2639
2659
|
case 123:
|
|
2640
2660
|
case 60:
|
|
2641
2661
|
case 62:
|
|
@@ -2701,6 +2721,7 @@ var Parser = (
|
|
|
2701
2721
|
return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
|
|
2702
2722
|
}
|
|
2703
2723
|
switch (this.char()) {
|
|
2724
|
+
// Simple argument: `{name}`
|
|
2704
2725
|
case 125: {
|
|
2705
2726
|
this.bump();
|
|
2706
2727
|
return {
|
|
@@ -2713,6 +2734,7 @@ var Parser = (
|
|
|
2713
2734
|
err: null
|
|
2714
2735
|
};
|
|
2715
2736
|
}
|
|
2737
|
+
// Argument with options: `{name, format, ...}`
|
|
2716
2738
|
case 44: {
|
|
2717
2739
|
this.bump();
|
|
2718
2740
|
this.bumpSpace();
|