@kanso-labs/react-native-kanso-ui 0.10.0 → 0.11.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.
Files changed (46) hide show
  1. package/dist/collection/index.js +107 -80
  2. package/dist/collection/index.js.map +1 -1
  3. package/dist/components/chip/index.d.ts +4 -1
  4. package/dist/components/chip/index.js +229 -161
  5. package/dist/components/chip/index.js.map +1 -1
  6. package/dist/components/dialog/index.d.ts +5 -5
  7. package/dist/components/dialog/index.js +5 -5
  8. package/dist/components/dialog/index.js.map +1 -1
  9. package/dist/components/drop-zone/index.d.ts +3 -3
  10. package/dist/components/drop-zone/index.js +2 -2
  11. package/dist/components/drop-zone/index.js.map +1 -1
  12. package/dist/components/menu/index.d.ts +3 -3
  13. package/dist/components/menu/index.js +3 -3
  14. package/dist/components/menu/index.js.map +1 -1
  15. package/dist/components/popover/index.d.ts +2 -2
  16. package/dist/components/popover/index.js +2 -2
  17. package/dist/components/popover/index.js.map +1 -1
  18. package/dist/components/search-view/index.d.ts +3 -2
  19. package/dist/components/search-view/index.js +3 -2
  20. package/dist/components/search-view/index.js.map +1 -1
  21. package/dist/components/sheet/index.d.ts +16 -7
  22. package/dist/components/sheet/index.js +157 -152
  23. package/dist/components/sheet/index.js.map +1 -1
  24. package/dist/components/table/index.d.ts +391 -0
  25. package/dist/components/table/index.js +1708 -0
  26. package/dist/components/table/index.js.map +1 -0
  27. package/dist/components/token-field/index.d.ts +105 -0
  28. package/dist/components/token-field/index.js +574 -0
  29. package/dist/components/token-field/index.js.map +1 -0
  30. package/dist/components/tooltip/index.d.ts +2 -1
  31. package/dist/components/tooltip/index.js.map +1 -1
  32. package/dist/field/index.js +50 -1
  33. package/dist/field/index.js.map +1 -1
  34. package/dist/field/styles.js +9 -1
  35. package/dist/field/styles.js.map +1 -1
  36. package/dist/glyphs/index.js +37 -1
  37. package/dist/glyphs/index.js.map +1 -1
  38. package/dist/i18n/index.js +17 -1
  39. package/dist/i18n/index.js.map +1 -1
  40. package/dist/i18n/messages.js +340 -0
  41. package/dist/i18n/messages.js.map +1 -1
  42. package/dist/index.d.ts +4 -2
  43. package/dist/index.js +4 -2
  44. package/dist/slider/index.js +1 -1
  45. package/dist/slider/index.js.map +1 -1
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["StyleSheet","withOpacity","themedStyles","OUTLINE_REACH","fieldStylesOf","colors","radii","spacing","stateLayerOpacity","create","affixLine","alignItems","flexDirection","flexGrow","gap","xxs","box","backgroundColor","surfaceContainerHighest","borderTopEndRadius","xs","borderTopStartRadius","lg","paddingHorizontal","paddingVertical","sm","boxDisabled","onSurface","disabledContainer","boxLeading","paddingStart","md","boxOutlined","boxTrailing","paddingEnd","boxTrigger","outlineStyle","outlineWidth","column","flexShrink","justifyContent","minWidth","copied","copy","opacity","pointerEvents","counter","fontVariant","marginStart","icon","alignSelf","indicator","bottom","end","position","start","input","margin","padding","inputMultiline","textAlignVertical","inputOverCopy","overflow","top","label","labelOutlined","labelTextOutlined","messageLine","marginTop","messageLineCollapsed","notchMeasure","outline","left","right","outlineEnd","outlineEndBox","borderRadius","outlineNotch","outlineNotchBox","outlineStart","outlineStartBox","segments"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import { StyleSheet } from 'react-native'\n\nimport { withOpacity } from '../theme/color'\nimport { themedStyles } from '../theme/styles'\n\n// The chrome's styles, apart from ./index.tsx so that file holds components\n// alone. What follows the device's text size, the box's height and the\n// label's places, is worked out where it renders, since a stylesheet is built\n// once per theme and the text size can change under it.\n//\n// The box is a row: an icon slot at either end, if the field has one, with the\n// label and the control in a column between them. The page gives the icons\n// 24dp, 12dp from the box's edge and 16dp from the text, centred in the box's\n// height, which the slot is with the box's padding the same above and below.\n\n/**\n * How far an outline piece's own box reaches past the piece that clips it, so\n * the borders and corners on that side fall outside it. A corner's radius and\n * the thickest border are enough; this is that, with room to spare.\n */\nconst OUTLINE_REACH = 8\n\nconst fieldStylesOf = themedStyles(\n ({ colors, radii, spacing, stateLayerOpacity }) =>\n StyleSheet.create({\n // The control's line, holding the affixes beside it. The 2dp is\n // Compose's padding between the two, since the page gives none.\n affixLine: {\n alignItems: 'baseline',\n flexDirection: 'row',\n flexGrow: 1,\n gap: spacing.xxs,\n },\n // The filled box: surface container highest, the page's 4dp corners at\n // the top and square at the bottom, where the indicator runs the full\n // width. 8dp above the label and below the value, and 16dp at either\n // end, or 12dp beside an icon.\n box: {\n backgroundColor: colors.surfaceContainerHighest,\n borderTopEndRadius: radii.xs,\n borderTopStartRadius: radii.xs,\n flexDirection: 'row',\n gap: spacing.lg,\n paddingHorizontal: spacing.lg,\n paddingVertical: spacing.sm,\n },\n boxDisabled: {\n backgroundColor: withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContainer,\n ),\n },\n boxLeading: {\n paddingStart: spacing.md,\n },\n // The outlined box: no fill, and 16dp above and below the value, which\n // centres it, since the label sits on the outline rather than over it.\n boxOutlined: {\n backgroundColor: 'transparent',\n paddingVertical: spacing.lg,\n },\n boxTrailing: {\n paddingEnd: spacing.md,\n },\n // A box that is itself the control draws its focus with its indicator,\n // as a box around a control does, so a browser's own ring would be a\n // second treatment for one focus: solid and no width, as the control's.\n boxTrigger: {\n outlineStyle: 'solid',\n outlineWidth: 0,\n },\n // The label and the control's column, which the label is placed\n // against, so it moves past a leading icon with the text.\n column: {\n flexGrow: 1,\n flexShrink: 1,\n justifyContent: 'flex-start',\n minWidth: 0,\n },\n // A multi-line control growing under React Native Web, over the copy\n // of its text that gives it its height.\n copied: {\n flexGrow: 1,\n flexShrink: 1,\n minWidth: 0,\n },\n // The copy: the control's type and wrapping, drawn in nothing.\n copy: {\n opacity: 0,\n pointerEvents: 'none',\n },\n // The count of characters, at the end of the message line in tabular\n // figures so it does not jitter as it counts.\n counter: {\n flexShrink: 0,\n fontVariant: ['tabular-nums'],\n marginStart: 'auto',\n },\n // An icon slot, centred in the box's height whatever it holds: the\n // page's 24dp icon, or an icon button around one.\n icon: {\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n },\n // The filled box's active indicator: a rule across the bottom, laid\n // over the box so it thickening on focus moves nothing. A border\n // rather than a fill, since a forced palette on the web keeps a\n // border and paints over a background.\n indicator: {\n bottom: 0,\n end: 0,\n position: 'absolute',\n start: 0,\n },\n input: {\n flexGrow: 1,\n flexShrink: 1,\n margin: 0,\n minWidth: 0,\n // The box draws the focus, so a ring around the control inside it\n // would be two treatments for one focus. Solid as well as no width:\n // a browser's own ring is the `auto` style, which ignores the width.\n outlineStyle: 'solid',\n outlineWidth: 0,\n padding: 0,\n },\n // A text area's text starts at the top of its lines, where Android\n // would centre it in them.\n inputMultiline: {\n textAlignVertical: 'top',\n },\n // The growing control, laid over the copy that sizes it.\n inputOverCopy: {\n bottom: 0,\n end: 0,\n overflow: 'hidden',\n position: 'absolute',\n start: 0,\n top: 0,\n },\n // The label's place: the column's width at its top, the label at its\n // start as wide as its text, so it sits at the right end of a\n // right-to-left field whatever script it is in. One line, cut short\n // with an ellipsis where the column ends, which is before an icon at\n // either end. It takes no touches, so a press on it lands on the\n // control or the box under it.\n label: {\n alignItems: 'flex-start',\n end: 0,\n pointerEvents: 'none',\n position: 'absolute',\n start: 0,\n top: 0,\n },\n // Outlined, the label has the page's 4dp either side, which the notch\n // has too, so the two line up and the label's text starts where the\n // value does.\n labelOutlined: {\n end: -spacing.xs,\n start: -spacing.xs,\n },\n labelTextOutlined: {\n paddingHorizontal: spacing.xs,\n },\n // The line under the box: the message at the start, the counter at the\n // end, the page's 4dp under the box and 16dp between the two, indented\n // to the box's own padding so the message starts where the value does.\n messageLine: {\n flexDirection: 'row',\n gap: spacing.lg,\n marginTop: spacing.xs,\n paddingHorizontal: spacing.lg,\n },\n // The line with nothing to show: out of the flow, so the field ends at\n // its box, and still there for the live region inside it, which has to\n // be in place before the error it announces arrives.\n messageLineCollapsed: {\n marginTop: 0,\n position: 'absolute',\n },\n // The label's text in its floated type, out of sight, which is what\n // the notch takes its width from. In the outlined label's own place, so\n // a label with no room is cut short where the label is.\n notchMeasure: {\n opacity: 0,\n },\n // The outline: three pieces in a row over the whole box, the stretch\n // before the label, the notch under it and the stretch after it. Each\n // piece clips a whole outlined box of its own to the part of the\n // outline it draws, so the width and the colour are one shorthand\n // that eases, and the corners turn over with the row in a\n // right-to-left layout.\n outline: {\n bottom: 0,\n flexDirection: 'row',\n left: 0,\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n outlineEnd: {\n flexGrow: 1,\n overflow: 'hidden',\n },\n outlineEndBox: {\n borderRadius: radii.xs,\n bottom: 0,\n end: 0,\n position: 'absolute',\n start: -OUTLINE_REACH,\n top: 0,\n },\n // The notch draws only the bottom of the outline, its box reaching past\n // the top and both sides.\n outlineNotch: {\n flexShrink: 1,\n overflow: 'hidden',\n },\n outlineNotchBox: {\n bottom: 0,\n end: -OUTLINE_REACH,\n position: 'absolute',\n start: -OUTLINE_REACH,\n top: -OUTLINE_REACH,\n },\n outlineStart: {\n flexShrink: 0,\n overflow: 'hidden',\n },\n outlineStartBox: {\n borderRadius: radii.xs,\n bottom: 0,\n end: -OUTLINE_REACH,\n position: 'absolute',\n start: 0,\n top: 0,\n },\n // A date or a time's segments on the value's line, in a row. Clipped\n // at the box rather than wrapped, since every segment on the line is\n // somewhere to type, so none of it can be drawn as though it were not\n // there.\n segments: {\n alignItems: 'center',\n flexDirection: 'row',\n overflow: 'hidden',\n },\n }),\n)\n\nexport { fieldStylesOf, OUTLINE_REACH }\n"],"mappings":";;;;AAsBA,MAAMI,gBAAgBF,cACnB,EAAEG,QAAQC,OAAOC,SAASC,wBACzBR,WAAWS,OAAO;CAGhBC,WAAW;EACTC,YAAY;EACZC,eAAe;EACfC,UAAU;EACVC,KAAKP,QAAQQ;CACf;CAKAC,KAAK;EACHC,iBAAiBZ,OAAOa;EACxBC,oBAAoBb,MAAMc;EAC1BC,sBAAsBf,MAAMc;EAC5BR,eAAe;EACfE,KAAKP,Q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G,mBAAmBhB,QAAQe;CAC7B;CAIA+C,sBAAsB;EACpBD,WAAW;EACXd,UAAU;CACZ;CAIAgB,cAAc,EACZ1B,SAAS,EACX;CAOA2B,SAAS;EACPnB,QAAQ;EACRxC,eAAe;EACf4D,MAAM;EACN3B,eAAe;EACfS,UAAU;EACVmB,OAAO;EACPV,KAAK;CACP;CACAW,YAAY;EACV7D,UAAU;EACViD,UAAU;CACZ;CACAa,eAAe;EACbC,cAActE,MAAMc;EACpBgC,QAAQ;EACRC,KAAK;EACLC,UAAU;EACVC,OAAO;EACPQ,KAAK;CACP;CAGAc,cAAc;EACZtC,YAAY;EACZuB,UAAU;CACZ;CACAgB,iBAAiB;EACf1B,QAAQ;EACRC,KAAK;EACLC,UAAU;EACVC,OAAO;EACPQ,KAAK;CACP;CACAgB,cAAc;EACZxC,YAAY;EACZuB,UAAU;CACZ;CACAkB,iBAAiB;EACfJ,cAActE,MAAMc;EACpBgC,QAAQ;EACRC,KAAK;EACLC,UAAU;EACVC,OAAO;EACPQ,KAAK;CACP;CAKAkB,UAAU;EACRtE,YAAY;EACZC,eAAe;EACfkD,UAAU;CACZ;AACF,CAAC,CACL"}
1
+ {"version":3,"file":"styles.js","names":["StyleSheet","withOpacity","themedStyles","OUTLINE_REACH","fieldStylesOf","colors","radii","sizing","spacing","stateLayerOpacity","create","affixLine","alignItems","flexDirection","flexGrow","gap","xxs","box","backgroundColor","surfaceContainerHighest","borderTopEndRadius","xs","borderTopStartRadius","lg","paddingHorizontal","paddingVertical","sm","boxDisabled","onSurface","disabledContainer","boxLeading","paddingStart","md","boxOutlined","boxTrailing","paddingEnd","boxTrigger","outlineStyle","outlineWidth","column","flexShrink","justifyContent","minWidth","copied","copy","opacity","pointerEvents","counter","fontVariant","marginStart","icon","alignSelf","indicator","bottom","end","position","start","input","margin","padding","inputMultiline","textAlignVertical","inputOverCopy","overflow","top","label","labelOutlined","labelTextOutlined","messageLine","marginTop","messageLineCollapsed","notchMeasure","outline","left","right","outlineEnd","outlineEndBox","borderRadius","outlineNotch","outlineNotchBox","outlineStart","outlineStartBox","segments","wrap","columnGap","flexWrap","minHeight","controlXs","rowGap"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import { StyleSheet } from 'react-native'\n\nimport { withOpacity } from '../theme/color'\nimport { themedStyles } from '../theme/styles'\n\n// The chrome's styles, apart from ./index.tsx so that file holds components\n// alone. What follows the device's text size, the box's height and the\n// label's places, is worked out where it renders, since a stylesheet is built\n// once per theme and the text size can change under it.\n//\n// The box is a row: an icon slot at either end, if the field has one, with the\n// label and the control in a column between them. The page gives the icons\n// 24dp, 12dp from the box's edge and 16dp from the text, centred in the box's\n// height, which the slot is with the box's padding the same above and below.\n\n/**\n * How far an outline piece's own box reaches past the piece that clips it, so\n * the borders and corners on that side fall outside it. A corner's radius and\n * the thickest border are enough; this is that, with room to spare.\n */\nconst OUTLINE_REACH = 8\n\nconst fieldStylesOf = themedStyles(\n ({ colors, radii, sizing, spacing, stateLayerOpacity }) =>\n StyleSheet.create({\n // The control's line, holding the affixes beside it. The 2dp is\n // Compose's padding between the two, since the page gives none.\n affixLine: {\n alignItems: 'baseline',\n flexDirection: 'row',\n flexGrow: 1,\n gap: spacing.xxs,\n },\n // The filled box: surface container highest, the page's 4dp corners at\n // the top and square at the bottom, where the indicator runs the full\n // width. 8dp above the label and below the value, and 16dp at either\n // end, or 12dp beside an icon.\n box: {\n backgroundColor: colors.surfaceContainerHighest,\n borderTopEndRadius: radii.xs,\n borderTopStartRadius: radii.xs,\n flexDirection: 'row',\n gap: spacing.lg,\n paddingHorizontal: spacing.lg,\n paddingVertical: spacing.sm,\n },\n boxDisabled: {\n backgroundColor: withOpacity(\n colors.onSurface,\n stateLayerOpacity.disabledContainer,\n ),\n },\n boxLeading: {\n paddingStart: spacing.md,\n },\n // The outlined box: no fill, and 16dp above and below the value, which\n // centres it, since the label sits on the outline rather than over it.\n boxOutlined: {\n backgroundColor: 'transparent',\n paddingVertical: spacing.lg,\n },\n boxTrailing: {\n paddingEnd: spacing.md,\n },\n // A box that is itself the control draws its focus with its indicator,\n // as a box around a control does, so a browser's own ring would be a\n // second treatment for one focus: solid and no width, as the control's.\n boxTrigger: {\n outlineStyle: 'solid',\n outlineWidth: 0,\n },\n // The label and the control's column, which the label is placed\n // against, so it moves past a leading icon with the text.\n column: {\n flexGrow: 1,\n flexShrink: 1,\n justifyContent: 'flex-start',\n minWidth: 0,\n },\n // A multi-line control growing under React Native Web, over the copy\n // of its text that gives it its height.\n copied: {\n flexGrow: 1,\n flexShrink: 1,\n minWidth: 0,\n },\n // The copy: the control's type and wrapping, drawn in nothing.\n copy: {\n opacity: 0,\n pointerEvents: 'none',\n },\n // The count of characters, at the end of the message line in tabular\n // figures so it does not jitter as it counts.\n counter: {\n flexShrink: 0,\n fontVariant: ['tabular-nums'],\n marginStart: 'auto',\n },\n // An icon slot, centred in the box's height whatever it holds: the\n // page's 24dp icon, or an icon button around one.\n icon: {\n alignItems: 'center',\n alignSelf: 'center',\n justifyContent: 'center',\n },\n // The filled box's active indicator: a rule across the bottom, laid\n // over the box so it thickening on focus moves nothing. A border\n // rather than a fill, since a forced palette on the web keeps a\n // border and paints over a background.\n indicator: {\n bottom: 0,\n end: 0,\n position: 'absolute',\n start: 0,\n },\n input: {\n flexGrow: 1,\n flexShrink: 1,\n margin: 0,\n minWidth: 0,\n // The box draws the focus, so a ring around the control inside it\n // would be two treatments for one focus. Solid as well as no width:\n // a browser's own ring is the `auto` style, which ignores the width.\n outlineStyle: 'solid',\n outlineWidth: 0,\n padding: 0,\n },\n // A text area's text starts at the top of its lines, where Android\n // would centre it in them.\n inputMultiline: {\n textAlignVertical: 'top',\n },\n // The growing control, laid over the copy that sizes it.\n inputOverCopy: {\n bottom: 0,\n end: 0,\n overflow: 'hidden',\n position: 'absolute',\n start: 0,\n top: 0,\n },\n // The label's place: the column's width at its top, the label at its\n // start as wide as its text, so it sits at the right end of a\n // right-to-left field whatever script it is in. One line, cut short\n // with an ellipsis where the column ends, which is before an icon at\n // either end. It takes no touches, so a press on it lands on the\n // control or the box under it.\n label: {\n alignItems: 'flex-start',\n end: 0,\n pointerEvents: 'none',\n position: 'absolute',\n start: 0,\n top: 0,\n },\n // Outlined, the label has the page's 4dp either side, which the notch\n // has too, so the two line up and the label's text starts where the\n // value does.\n labelOutlined: {\n end: -spacing.xs,\n start: -spacing.xs,\n },\n labelTextOutlined: {\n paddingHorizontal: spacing.xs,\n },\n // The line under the box: the message at the start, the counter at the\n // end, the page's 4dp under the box and 16dp between the two, indented\n // to the box's own padding so the message starts where the value does.\n messageLine: {\n flexDirection: 'row',\n gap: spacing.lg,\n marginTop: spacing.xs,\n paddingHorizontal: spacing.lg,\n },\n // The line with nothing to show: out of the flow, so the field ends at\n // its box, and still there for the live region inside it, which has to\n // be in place before the error it announces arrives.\n messageLineCollapsed: {\n marginTop: 0,\n position: 'absolute',\n },\n // The label's text in its floated type, out of sight, which is what\n // the notch takes its width from. In the outlined label's own place, so\n // a label with no room is cut short where the label is.\n notchMeasure: {\n opacity: 0,\n },\n // The outline: three pieces in a row over the whole box, the stretch\n // before the label, the notch under it and the stretch after it. Each\n // piece clips a whole outlined box of its own to the part of the\n // outline it draws, so the width and the colour are one shorthand\n // that eases, and the corners turn over with the row in a\n // right-to-left layout.\n outline: {\n bottom: 0,\n flexDirection: 'row',\n left: 0,\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n },\n outlineEnd: {\n flexGrow: 1,\n overflow: 'hidden',\n },\n outlineEndBox: {\n borderRadius: radii.xs,\n bottom: 0,\n end: 0,\n position: 'absolute',\n start: -OUTLINE_REACH,\n top: 0,\n },\n // The notch draws only the bottom of the outline, its box reaching past\n // the top and both sides.\n outlineNotch: {\n flexShrink: 1,\n overflow: 'hidden',\n },\n outlineNotchBox: {\n bottom: 0,\n end: -OUTLINE_REACH,\n position: 'absolute',\n start: -OUTLINE_REACH,\n top: -OUTLINE_REACH,\n },\n outlineStart: {\n flexShrink: 0,\n overflow: 'hidden',\n },\n outlineStartBox: {\n borderRadius: radii.xs,\n bottom: 0,\n end: -OUTLINE_REACH,\n position: 'absolute',\n start: 0,\n top: 0,\n },\n // A date or a time's segments on the value's line, in a row. Clipped\n // at the box rather than wrapped, since every segment on the line is\n // somewhere to type, so none of it can be drawn as though it were not\n // there.\n segments: {\n alignItems: 'center',\n flexDirection: 'row',\n overflow: 'hidden',\n },\n // A token field's pills and its control on the value's line, in a row\n // that wraps. A line is a pill's height at the least, as web's line is,\n // so the control after the pills sits on their line rather than above\n // its middle. 4dp between two on a line, where web has a space, and the\n // chips' 8dp between lines, which their targets reach halfway into.\n wrap: {\n alignItems: 'center',\n columnGap: spacing.xs,\n flexDirection: 'row',\n flexWrap: 'wrap',\n minHeight: sizing.controlXs,\n rowGap: spacing.sm,\n },\n }),\n)\n\nexport { fieldStylesOf, OUTLINE_REACH }\n"],"mappings":";;;;AAsBA,MAAMI,gBAAgBF,cACnB,EAAEG,QAAQC,OAAOC,QAAQC,SAASC,wBACjCT,WAAWU,OAAO;CAGhBC,WAAW;EACTC,YAAY;EACZC,eAAe;EACfC,UAAU;EACVC,KAAKP,QAAQQ;CACf;CAKAC,KAAK;EACHC,iBAAiBb,OAAOc;EACxBC,oBAAoBd,MAAMe;EAC1BC,sBAAsBhB,MAAMe;EAC5BR,eAAe;EACfE,KAAKP,QAAQe;EACbC,mBAAmBhB,QAAQe;EAC3BE,iBAAiBjB,QAAQkB;CAC3B;CACAC,aAAa,EACXT,iBAAiBjB,YACfI,OAAOuB,WACPnB,kBAAkBoB,iBACpB,EACF;CACAC,YAAY,EACVC,cAAcvB,QAAQwB,GACxB;CAGAC,aAAa;EACXf,iBAAiB;EACjBO,iBAAiBjB,QAAQe;CAC3B;CACAW,aAAa,EACXC,YAAY3B,QAAQwB,GACtB;CAIAI,YAAY;EACVC,cAAc;EACdC,cAAc;CAChB;CAGAC,QAAQ;EACNzB,UAAU;EACV0B,YAAY;EACZC,gBAAgB;EAChBC,UAAU;CACZ;CAGAC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U;CACZ;CACAgB,iBAAiB;EACf1B,QAAQ;EACRC,KAAK;EACLC,UAAU;EACVC,OAAO;EACPQ,KAAK;CACP;CACAgB,cAAc;EACZxC,YAAY;EACZuB,UAAU;CACZ;CACAkB,iBAAiB;EACfJ,cAAcvE,MAAMe;EACpBgC,QAAQ;EACRC,KAAK;EACLC,UAAU;EACVC,OAAO;EACPQ,KAAK;CACP;CAKAkB,UAAU;EACRtE,YAAY;EACZC,eAAe;EACfkD,UAAU;CACZ;CAMAoB,MAAM;EACJvE,YAAY;EACZwE,WAAW5E,QAAQa;EACnBR,eAAe;EACfwE,UAAU;EACVC,WAAW/E,OAAOgF;EAClBC,QAAQhF,QAAQkB;CAClB;AACF,CAAC,CACL"}
@@ -25,6 +25,24 @@ function ArrowBackGlyph(props) {
25
25
  } else t1 = $[2];
26
26
  return t1;
27
27
  }
28
+ function ArrowDownwardGlyph(props) {
29
+ const $ = c(3);
30
+ let t0;
31
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
32
+ t0 = /* @__PURE__ */ jsx(Path, { d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z" });
33
+ $[0] = t0;
34
+ } else t0 = $[0];
35
+ let t1;
36
+ if ($[1] !== props) {
37
+ t1 = /* @__PURE__ */ jsx(Glyph, {
38
+ ...props,
39
+ children: t0
40
+ });
41
+ $[1] = props;
42
+ $[2] = t1;
43
+ } else t1 = $[2];
44
+ return t1;
45
+ }
28
46
  function ArrowDropDownGlyph(props) {
29
47
  const $ = c(3);
30
48
  let t0;
@@ -43,6 +61,24 @@ function ArrowDropDownGlyph(props) {
43
61
  } else t1 = $[2];
44
62
  return t1;
45
63
  }
64
+ function ArrowUpwardGlyph(props) {
65
+ const $ = c(3);
66
+ let t0;
67
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
68
+ t0 = /* @__PURE__ */ jsx(Path, { d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" });
69
+ $[0] = t0;
70
+ } else t0 = $[0];
71
+ let t1;
72
+ if ($[1] !== props) {
73
+ t1 = /* @__PURE__ */ jsx(Glyph, {
74
+ ...props,
75
+ children: t0
76
+ });
77
+ $[1] = props;
78
+ $[2] = t1;
79
+ } else t1 = $[2];
80
+ return t1;
81
+ }
46
82
  function CalendarGlyph(props) {
47
83
  const $ = c(3);
48
84
  let t0;
@@ -287,6 +323,6 @@ function SearchGlyph(props) {
287
323
  return t1;
288
324
  }
289
325
  //#endregion
290
- export { ArrowBackGlyph, ArrowDropDownGlyph, CalendarGlyph, CheckGlyph, ChevronDownGlyph, ChevronEndGlyph, ClockGlyph, CloseGlyph, IndeterminateGlyph, KeyboardGlyph, MinusGlyph, PersonGlyph, PlusGlyph, SearchGlyph };
326
+ export { ArrowBackGlyph, ArrowDownwardGlyph, ArrowDropDownGlyph, ArrowUpwardGlyph, CalendarGlyph, CheckGlyph, ChevronDownGlyph, ChevronEndGlyph, ClockGlyph, CloseGlyph, IndeterminateGlyph, KeyboardGlyph, MinusGlyph, PersonGlyph, PlusGlyph, SearchGlyph };
291
327
 
292
328
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","ColorValue","StyleProp","ViewStyle","I18nManager","StyleSheet","Svg","Path","HIDDEN","useIconStyle","glyphStyles","GlyphProps","color","size","style","testID","ArrowBackGlyph","props","$","_c","t0","Symbol","for","t1","ArrowDownwardGlyph","ArrowDropDownGlyph","ArrowUpwardGlyph","CalendarGlyph","CheckGlyph","ChevronDownGlyph","ChevronEndGlyph","ClockGlyph","CloseGlyph","Glyph","children","mirrored","undefined","slot","side","t2","t3","compose","isRTL","t4","KeyboardGlyph","MinusGlyph","IndeterminateGlyph","PersonGlyph","PlusGlyph","SearchGlyph","_c"],"sources":["../../src/glyphs/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { ColorValue, StyleProp, ViewStyle } from 'react-native'\n\nimport { I18nManager, StyleSheet } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\n\nimport { HIDDEN } from './hidden'\nimport { useIconStyle } from './icon-style'\nimport { glyphStyles } from './styles'\n\n// The glyphs the library's own controls draw, the same set kanso-ui draws on\n// web: the check and the dash a checkbox shows, the plus and minus a number\n// field's steppers show, the magnifier and cross a search field shows, and the\n// rest named beside each one. Private to the library, as on web: a call site\n// with icons of its own passes them to the slots that take a node, and reads\n// the slot's colour and size through `useIconStyle()`.\n//\n// The paths are kanso-ui's, unchanged: Material Symbols on their 24-unit grid,\n// which is what the checkbox page draws at 18dp, the icon buttons page at 20\n// and the search, menus, date picker and time picker pages at 24.\n\ntype GlyphProps = {\n /** The fill. Defaults to the colour of the slot the glyph sits in. */\n readonly color?: ColorValue\n /** The square's side in dp. Defaults to the size of the slot. */\n readonly size?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\n// What a search view's back button draws, pointing at the page it returns to.\n// It says \"back\" rather than \"to the left\", so it mirrors under a right-to-left\n// layout.\nfunction ArrowBackGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\" />\n </Glyph>\n )\n}\n\n// Which way a sorted column is ordered. Up is ascending and down is\n// descending. Neither mirrors under a right-to-left layout: they say \"up\" and\n// \"down\" rather than \"onward\", and those do not flip.\nfunction ArrowDownwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\" />\n </Glyph>\n )\n}\n\n// What a menu button draws after its label, pointing at the list it opens.\n// Down is down in either writing direction, so it does not mirror.\nfunction ArrowDropDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M7 10l5 5 5-5z\" />\n </Glyph>\n )\n}\n\nfunction ArrowUpwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\" />\n </Glyph>\n )\n}\n\n// What the date picker's trigger draws: the calendar a date is picked from.\nfunction CalendarGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z\" />\n </Glyph>\n )\n}\n\nfunction CheckGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\" />\n </Glyph>\n )\n}\n\n// Points down at the menu a split button's second half opens, and at the\n// list a select opens.\nfunction ChevronDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\" />\n </Glyph>\n )\n}\n\n// Points at the submenu a menu item opens. It says \"further in\" rather than\n// \"to the right\", so it mirrors under a right-to-left layout.\nfunction ChevronEndGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </Glyph>\n )\n}\n\n// What the time picker's trigger draws, and the button that takes its keyboard\n// entry back to the dial: the clock a time is picked from.\nfunction ClockGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z\" />\n </Glyph>\n )\n}\n\nfunction CloseGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" />\n </Glyph>\n )\n}\n\n/**\n * The svg every glyph draws: the 24-unit grid its path is on, a square of the\n * slot's size filled in the slot's colour, and nothing a screen reader\n * announces, since the control around a glyph carries the name. A glyph whose\n * direction means \"onward\" or \"back\" passes `mirrored`, which turns it over\n * under a right-to-left layout as `:dir(rtl)` does on web.\n */\nfunction Glyph({\n children,\n color,\n mirrored = false,\n size,\n style,\n testID,\n}: GlyphProps & { readonly children: ReactNode; readonly mirrored?: boolean }) {\n const slot = useIconStyle()\n const side = size ?? slot.size\n return (\n <Svg\n {...HIDDEN}\n color={color ?? slot.color}\n fill=\"currentColor\"\n height={side}\n style={StyleSheet.compose(\n mirrored && I18nManager.isRTL ? glyphStyles.mirrored : undefined,\n style,\n )}\n testID={testID}\n viewBox=\"0 0 24 24\"\n width={side}\n >\n {children}\n </Svg>\n )\n}\n\n// What the time picker's dial draws on the button that switches it to typed\n// entry.\nfunction KeyboardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H4V7h16v10zm-9-9h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-3 0h2v2H5zm0-3h2v2H5zm3 6h8v2H8zm6-3h2v2h-2zm0-3h2v2h-2zm3 3h2v2h-2zm0-3h2v2h-2z\" />\n </Glyph>\n )\n}\n\n// The same rule stands for a partly selected checkbox and for a stepper's\n// decrement; the two names say which is meant at the call site.\nfunction MinusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13H5v-2h14v2z\" />\n </Glyph>\n )\n}\n\nconst IndeterminateGlyph = MinusGlyph\n\n// What an avatar with no name to take initials from draws: Material Design's\n// anonymous person, a head over shoulders.\nfunction PersonGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" />\n </Glyph>\n )\n}\n\nfunction PlusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" />\n </Glyph>\n )\n}\n\nfunction SearchGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" />\n </Glyph>\n )\n}\n\nexport {\n ArrowBackGlyph,\n ArrowDownwardGlyph,\n ArrowDropDownGlyph,\n ArrowUpwardGlyph,\n CalendarGlyph,\n CheckGlyph,\n ChevronDownGlyph,\n ChevronEndGlyph,\n ClockGlyph,\n CloseGlyph,\n IndeterminateGlyph,\n KeyboardGlyph,\n MinusGlyph,\n PersonGlyph,\n PlusGlyph,\n SearchGlyph,\n}\nexport type { GlyphProps }\n"],"mappings":";;;;;;;;AAiCA,SAAAgB,eAAAC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,GAAA;EAGMF,KAAA,oBAAC,MAAD,EAAQ,GAAA,+DAA8D,CAAA;EAAGF,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EAD3EM,KAAA,oBAAC,OAAD;GAAM,GAAKN;GAAO,UAAA;GAChBG,UAAAA;EADI,CAAA;EAEEF,EAAA,KAAAD;EAAAC,EAAA,K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EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFRK;AAEQ"}
1
+ {"version":3,"file":"index.js","names":["ReactNode","ColorValue","StyleProp","ViewStyle","I18nManager","StyleSheet","Svg","Path","HIDDEN","useIconStyle","glyphStyles","GlyphProps","color","size","style","testID","ArrowBackGlyph","props","$","_c","t0","Symbol","for","t1","ArrowDownwardGlyph","ArrowDropDownGlyph","ArrowUpwardGlyph","CalendarGlyph","CheckGlyph","ChevronDownGlyph","ChevronEndGlyph","ClockGlyph","CloseGlyph","Glyph","children","mirrored","undefined","slot","side","t2","t3","compose","isRTL","t4","KeyboardGlyph","MinusGlyph","IndeterminateGlyph","PersonGlyph","PlusGlyph","SearchGlyph","_c"],"sources":["../../src/glyphs/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { ColorValue, StyleProp, ViewStyle } from 'react-native'\n\nimport { I18nManager, StyleSheet } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\n\nimport { HIDDEN } from './hidden'\nimport { useIconStyle } from './icon-style'\nimport { glyphStyles } from './styles'\n\n// The glyphs the library's own controls draw, the same set kanso-ui draws on\n// web: the check and the dash a checkbox shows, the plus and minus a number\n// field's steppers show, the magnifier and cross a search field shows, and the\n// rest named beside each one. Private to the library, as on web: a call site\n// with icons of its own passes them to the slots that take a node, and reads\n// the slot's colour and size through `useIconStyle()`.\n//\n// The paths are kanso-ui's, unchanged: Material Symbols on their 24-unit grid,\n// which is what the checkbox page draws at 18dp, the icon buttons page at 20\n// and the search, menus, date picker and time picker pages at 24.\n\ntype GlyphProps = {\n /** The fill. Defaults to the colour of the slot the glyph sits in. */\n readonly color?: ColorValue\n /** The square's side in dp. Defaults to the size of the slot. */\n readonly size?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\n// What a search view's back button draws, pointing at the page it returns to.\n// It says \"back\" rather than \"to the left\", so it mirrors under a right-to-left\n// layout.\nfunction ArrowBackGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\" />\n </Glyph>\n )\n}\n\n// Which way a sorted column is ordered. Up is ascending and down is\n// descending. Neither mirrors under a right-to-left layout: they say \"up\" and\n// \"down\" rather than \"onward\", and those do not flip.\nfunction ArrowDownwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\" />\n </Glyph>\n )\n}\n\n// What a menu button draws after its label, pointing at the list it opens.\n// Down is down in either writing direction, so it does not mirror.\nfunction ArrowDropDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M7 10l5 5 5-5z\" />\n </Glyph>\n )\n}\n\nfunction ArrowUpwardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\" />\n </Glyph>\n )\n}\n\n// What the date picker's trigger draws: the calendar a date is picked from.\nfunction CalendarGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z\" />\n </Glyph>\n )\n}\n\nfunction CheckGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\" />\n </Glyph>\n )\n}\n\n// Points down at the menu a split button's second half opens, and at the\n// list a select opens.\nfunction ChevronDownGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\" />\n </Glyph>\n )\n}\n\n// Points at the submenu a menu item opens. It says \"further in\" rather than\n// \"to the right\", so it mirrors under a right-to-left layout.\nfunction ChevronEndGlyph(props: GlyphProps) {\n return (\n <Glyph {...props} mirrored>\n <Path d=\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </Glyph>\n )\n}\n\n// What the time picker's trigger draws, and the button that takes its keyboard\n// entry back to the dial: the clock a time is picked from.\nfunction ClockGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z\" />\n </Glyph>\n )\n}\n\nfunction CloseGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\" />\n </Glyph>\n )\n}\n\n/**\n * The svg every glyph draws: the 24-unit grid its path is on, a square of the\n * slot's size filled in the slot's colour, and nothing a screen reader\n * announces, since the control around a glyph carries the name. A glyph whose\n * direction means \"onward\" or \"back\" passes `mirrored`, which turns it over\n * under a right-to-left layout as `:dir(rtl)` does on web.\n */\nfunction Glyph({\n children,\n color,\n mirrored = false,\n size,\n style,\n testID,\n}: GlyphProps & { readonly children: ReactNode; readonly mirrored?: boolean }) {\n const slot = useIconStyle()\n const side = size ?? slot.size\n return (\n <Svg\n {...HIDDEN}\n color={color ?? slot.color}\n fill=\"currentColor\"\n height={side}\n style={StyleSheet.compose(\n mirrored && I18nManager.isRTL ? glyphStyles.mirrored : undefined,\n style,\n )}\n testID={testID}\n viewBox=\"0 0 24 24\"\n width={side}\n >\n {children}\n </Svg>\n )\n}\n\n// What the time picker's dial draws on the button that switches it to typed\n// entry.\nfunction KeyboardGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H4V7h16v10zm-9-9h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-3 0h2v2H5zm0-3h2v2H5zm3 6h8v2H8zm6-3h2v2h-2zm0-3h2v2h-2zm3 3h2v2h-2zm0-3h2v2h-2z\" />\n </Glyph>\n )\n}\n\n// The same rule stands for a partly selected checkbox and for a stepper's\n// decrement; the two names say which is meant at the call site.\nfunction MinusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13H5v-2h14v2z\" />\n </Glyph>\n )\n}\n\nconst IndeterminateGlyph = MinusGlyph\n\n// What an avatar with no name to take initials from draws: Material Design's\n// anonymous person, a head over shoulders.\nfunction PersonGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" />\n </Glyph>\n )\n}\n\nfunction PlusGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" />\n </Glyph>\n )\n}\n\nfunction SearchGlyph(props: GlyphProps) {\n return (\n <Glyph {...props}>\n <Path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" />\n </Glyph>\n )\n}\n\nexport {\n ArrowBackGlyph,\n ArrowDownwardGlyph,\n ArrowDropDownGlyph,\n ArrowUpwardGlyph,\n CalendarGlyph,\n CheckGlyph,\n ChevronDown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,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAD,OAAA;EADzNM,KAAA,oBAAC,OAAD;GAAM,GAAKN;GACTG,UAAAA;EADI,CAAA;EAEEF,EAAA,KAAAD;EAAAC,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFRK;AAEQ"}
@@ -5,6 +5,14 @@ import { MESSAGES } from "./messages.js";
5
5
  const TABLE = new Map(Object.entries(MESSAGES));
6
6
  const cache = /* @__PURE__ */ new Map();
7
7
  /**
8
+ * A column's width as its resize handle reads it, "120 pixels" in English,
9
+ * in `locale` or the device's, with the width in the locale's digits.
10
+ */
11
+ function columnSizeFor(value, locale) {
12
+ const resolved = localeOf(locale);
13
+ return messagesFor(resolved).table.columnSize.replace("{value}", formatCount(value, resolved));
14
+ }
15
+ /**
8
16
  * A field's character limit in words, in `locale` or the device's, for a
9
17
  * screen reader: the limit in the locale's digits, in the plural form its
10
18
  * rules give it.
@@ -62,7 +70,15 @@ function slideLabelFor(index, count, locale) {
62
70
  const resolved = localeOf(locale);
63
71
  return messagesFor(resolved).slideLabel.replace("{index}", formatCount(index, resolved)).replace("{count}", formatCount(count, resolved));
64
72
  }
73
+ /**
74
+ * What a table says once its rows are sorted, "sorted by column Label in
75
+ * ascending order" in English, in `locale` or the device's.
76
+ */
77
+ function sortedFor(direction, columnName, locale) {
78
+ const { table } = messagesFor(locale);
79
+ return (direction === "ascending" ? table.ascendingSort : table.descendingSort).replace("{columnName}", columnName);
80
+ }
65
81
  //#endregion
66
- export { limitFor, listFor, messagesFor, resultsFor, slideLabelFor };
82
+ export { columnSizeFor, limitFor, listFor, messagesFor, resultsFor, slideLabelFor, sortedFor };
67
83
 
68
84
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["LibraryMessages","formatCount","localeOf","MESSAGES","TABLE","Map","Object","entries","cache","limitFor","count","locale","resolved","forms","messagesFor","characterLimit","form","pluralOf","other","replace","listFor","values","Intl","ListFormat","type","format","join","lookUp","tag","split","language","get","find","key","startsWith","cached","undefined","messages","set","PluralRules","select","resultsFor","noResults","results","one","NumberFormat","slideLabelFor","index","slideLabel"],"sources":["../../src/i18n/index.ts"],"sourcesContent":["import type { LibraryMessages } from './messages'\n\nimport { formatCount } from '../number/count'\nimport { localeOf } from '../number/locale'\nimport { MESSAGES } from './messages'\n\n// The words the library writes itself, in the locale a component is given or\n// the device's. A component asks through `useMessages` in ./provider.tsx,\n// which gives it the `I18nProvider`'s locale, as web reads them through React\n// Aria's dictionary in its provider's. This falls back the way that dictionary\n// does: the table's entry for the locale, then the first for its language,\n// then English, so `fr-CA` reads French and a locale the table lacks reads\n// English.\n\nconst TABLE = new Map(Object.entries(MESSAGES))\n\n// One set per locale an app renders in, looked up the first time a component\n// asks for it.\nconst cache = new Map<string, LibraryMessages>()\n\n/**\n * A field's character limit in words, in `locale` or the device's, for a\n * screen reader: the limit in the locale's digits, in the plural form its\n * rules give it.\n */\nfunction limitFor(count: number, locale?: string): string {\n const resolved = localeOf(locale)\n const forms = messagesFor(resolved).characterLimit\n const form = forms[pluralOf(resolved, count)] ?? forms.other\n\n return form.replace('{count}', formatCount(count, resolved))\n}\n\n// A device's locale can carry a Unicode extension, `pt-PT-u-nu-latn`, which\n// says how numbers are written rather than which words; it is set aside, or\n// `pt-PT` would match no entry and read the first Portuguese one, Brazil's.\n/**\n * Several values written as one list in the locale's words, \"First item and\n * Second item\" in English, as a field holding several chosen options shows\n * them. Hermes may lack `Intl.ListFormat`, and a comma between them is the\n * list there.\n */\nfunction listFor(values: readonly string[], locale?: string): string {\n if (typeof Intl.ListFormat === 'function') {\n return new Intl.ListFormat(localeOf(locale), {\n type: 'conjunction',\n }).format(values)\n }\n\n return values.join(', ')\n}\n\nfunction lookUp(locale: string): LibraryMessages {\n const tag = locale.split('-u-')[0]\n const language = tag.split('-')[0]\n\n return (\n TABLE.get(tag) ??\n [...TABLE].find(([key]) => key.startsWith(`${language}-`))?.[1] ??\n MESSAGES['en-US']\n )\n}\n\n/** The library's words in `locale`, or in the device's when given none. */\nfunction messagesFor(locale?: string): LibraryMessages {\n const resolved = localeOf(locale)\n const cached = cache.get(resolved)\n\n if (cached !== undefined) {\n return cached\n }\n\n const messages = lookUp(resolved)\n cache.set(resolved, messages)\n return messages\n}\n\n// The plural form a count takes in `locale`. Hermes has not always shipped\n// `Intl.PluralRules`, and where it is missing a count of one takes the\n// singular and any other the plural, which is English's rule.\nfunction pluralOf(locale: string, count: number) {\n // oxlint-disable-next-line typescript/no-unnecessary-condition -- typed as always there, which a runtime without it is not\n if (Intl.PluralRules === undefined) {\n return count === 1 ? 'one' : 'other'\n }\n\n return new Intl.PluralRules(locale).select(count)\n}\n\n/**\n * How many rows a search leaves, in `locale` or the device's, for a screen\n * reader: the count in the locale's plural form, or the empty row's words\n * when it is none.\n */\nfunction resultsFor(count: number, locale?: string): string {\n const resolved = localeOf(locale)\n const messages = messagesFor(resolved)\n\n if (count === 0) {\n return messages.noResults\n }\n\n const form =\n pluralOf(resolved, count) === 'one'\n ? messages.results.one\n : messages.results.other\n\n return form.replace('{count}', new Intl.NumberFormat(resolved).format(count))\n}\n\n/**\n * What a carousel's item is called, \"2 of 6\" in English, in `locale` or the\n * device's: its place and how many items there are, both in the locale's\n * digits, as web's carousel writes them.\n */\nfunction slideLabelFor(index: number, count: number, locale?: string): string {\n const resolved = localeOf(locale)\n\n return messagesFor(resolved)\n .slideLabel.replace('{index}', formatCount(index, resolved))\n .replace('{count}', formatCount(count, resolved))\n}\n\nexport { limitFor, listFor, messagesFor, resultsFor, slideLabelFor }\nexport type { LibraryMessages }\n"],"mappings":";;;;AAcA,MAAMI,QAAQ,IAAIC,IAAIC,OAAOC,QAAQJ,QAAQ,CAAC;AAI9C,MAAMK,wBAAQ,IAAIH,IAA6B;;;;;;AAO/C,SAASI,SAASC,OAAeC,QAAyB;CACxD,MAAMC,WAAWV,SAASS,MAAM;CAChC,MAAME,QAA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UAAU,GACZ,OAAO2B,SAASK;CAQlB,QAJEzB,SAASL,UAAUF,KAAK,MAAM,QAC1B2B,SAASM,QAAQC,MACjBP,SAASM,QAAQzB,MAAAA,CAEXC,QAAQ,WAAW,IAAIG,KAAKuB,aAAajC,QAAQ,CAAC,CAACa,OAAOf,KAAK,CAAC;AAC9E;;;;;;AAOA,SAASoC,cAAcC,OAAerC,OAAeC,QAAyB;CAC5E,MAAMC,WAAWV,SAASS,MAAM;CAEhC,OAAOG,YAAYF,QAAQ,CAAC,CACzBoC,WAAW7B,QAAQ,WAAWlB,YAAY8C,OAAOnC,QAAQ,CAAC,CAAC,CAC3DO,QAAQ,WAAWlB,YAAYS,OAAOE,QAAQ,CAAC;AACpD"}
1
+ {"version":3,"file":"index.js","names":["LibraryMessages","formatCount","localeOf","MESSAGES","TABLE","Map","Object","entries","cache","columnSizeFor","value","locale","resolved","messagesFor","table","columnSize","replace","limitFor","count","forms","characterLimit","form","pluralOf","other","listFor","values","Intl","ListFormat","type","format","join","lookUp","tag","split","language","get","find","key","startsWith","cached","undefined","messages","set","PluralRules","select","resultsFor","noResults","results","one","NumberFormat","slideLabelFor","index","slideLabel","sortedFor","direction","columnName","message","ascendingSort","descendingSort"],"sources":["../../src/i18n/index.ts"],"sourcesContent":["import type { LibraryMessages } from './messages'\n\nimport { formatCount } from '../number/count'\nimport { localeOf } from '../number/locale'\nimport { MESSAGES } from './messages'\n\n// The words the library writes itself, in the locale a component is given or\n// the device's. A component asks through `useMessages` in ./provider.tsx,\n// which gives it the `I18nProvider`'s locale, as web reads them through React\n// Aria's dictionary in its provider's. This falls back the way that dictionary\n// does: the table's entry for the locale, then the first for its language,\n// then English, so `fr-CA` reads French and a locale the table lacks reads\n// English.\n\nconst TABLE = new Map(Object.entries(MESSAGES))\n\n// One set per locale an app renders in, looked up the first time a component\n// asks for it.\nconst cache = new Map<string, LibraryMessages>()\n\n/**\n * A column's width as its resize handle reads it, \"120 pixels\" in English,\n * in `locale` or the device's, with the width in the locale's digits.\n */\nfunction columnSizeFor(value: number, locale?: string): string {\n const resolved = localeOf(locale)\n\n return messagesFor(resolved).table.columnSize.replace(\n '{value}',\n formatCount(value, resolved),\n )\n}\n\n/**\n * A field's character limit in words, in `locale` or the device's, for a\n * screen reader: the limit in the locale's digits, in the plural form its\n * rules give it.\n */\nfunction limitFor(count: number, locale?: string): string {\n const resolved = localeOf(locale)\n const forms = messagesFor(resolved).characterLimit\n const form = forms[pluralOf(resolved, count)] ?? forms.other\n\n return form.replace('{count}', formatCount(count, resolved))\n}\n\n// A device's locale can carry a Unicode extension, `pt-PT-u-nu-latn`, which\n// says how numbers are written rather than which words; it is set aside, or\n// `pt-PT` would match no entry and read the first Portuguese one, Brazil's.\n/**\n * Several values written as one list in the locale's words, \"First item and\n * Second item\" in English, as a field holding several chosen options shows\n * them. Hermes may lack `Intl.ListFormat`, and a comma between them is the\n * list there.\n */\nfunction listFor(values: readonly string[], locale?: string): string {\n if (typeof Intl.ListFormat === 'function') {\n return new Intl.ListFormat(localeOf(locale), {\n type: 'conjunction',\n }).format(values)\n }\n\n return values.join(', ')\n}\n\nfunction lookUp(locale: string): LibraryMessages {\n const tag = locale.split('-u-')[0]\n const language = tag.split('-')[0]\n\n return (\n TABLE.get(tag) ??\n [...TABLE].find(([key]) => key.startsWith(`${language}-`))?.[1] ??\n MESSAGES['en-US']\n )\n}\n\n/** The library's words in `locale`, or in the device's when given none. */\nfunction messagesFor(locale?: string): LibraryMessages {\n const resolved = localeOf(locale)\n const cached = cache.get(resolved)\n\n if (cached !== undefined) {\n return cached\n }\n\n const messages = lookUp(resolved)\n cache.set(resolved, messages)\n return messages\n}\n\n// The plural form a count takes in `locale`. Hermes has not always shipped\n// `Intl.PluralRules`, and where it is missing a count of one takes the\n// singular and any other the plural, which is English's rule.\nfunction pluralOf(locale: string, count: number) {\n // oxlint-disable-next-line typescript/no-unnecessary-condition -- typed as always there, which a runtime without it is not\n if (Intl.PluralRules === undefined) {\n return count === 1 ? 'one' : 'other'\n }\n\n return new Intl.PluralRules(locale).select(count)\n}\n\n/**\n * How many rows a search leaves, in `locale` or the device's, for a screen\n * reader: the count in the locale's plural form, or the empty row's words\n * when it is none.\n */\nfunction resultsFor(count: number, locale?: string): string {\n const resolved = localeOf(locale)\n const messages = messagesFor(resolved)\n\n if (count === 0) {\n return messages.noResults\n }\n\n const form =\n pluralOf(resolved, count) === 'one'\n ? messages.results.one\n : messages.results.other\n\n return form.replace('{count}', new Intl.NumberFormat(resolved).format(count))\n}\n\n/**\n * What a carousel's item is called, \"2 of 6\" in English, in `locale` or the\n * device's: its place and how many items there are, both in the locale's\n * digits, as web's carousel writes them.\n */\nfunction slideLabelFor(index: number, count: number, locale?: string): string {\n const resolved = localeOf(locale)\n\n return messagesFor(resolved)\n .slideLabel.replace('{index}', formatCount(index, resolved))\n .replace('{count}', formatCount(count, resolved))\n}\n\n/**\n * What a table says once its rows are sorted, \"sorted by column Label in\n * ascending order\" in English, in `locale` or the device's.\n */\nfunction sortedFor(\n direction: 'ascending' | 'descending',\n columnName: string,\n locale?: string,\n): string {\n const { table } = messagesFor(locale)\n const message =\n direction === 'ascending' ? table.ascendingSort : table.descendingSort\n\n return message.replace('{columnName}', columnName)\n}\n\nexport {\n columnSizeFor,\n limitFor,\n listFor,\n messagesFor,\n resultsFor,\n slideLabelFor,\n sortedFor,\n}\nexport type { LibraryMessages }\n"],"mappings":";;;;AAcA,MAAMI,QAAQ,IAAIC,IAAIC,OAAOC,QAAQJ,QAAQ,CAAC;AAI9C,MAAMK,wBAAQ,IAAIH,IAA6B;;;;;AAM/C,SAASI,cAAcC,OAAeC,QAAyB;CAC7D,MAAMC,WAAWV,SAASS,MAAM;CAEhC,OAAOE,YAAYD,QAAQ,CAAC,CAACE,MAAMC,WAAWC,QAC5C,WACAf,YAAYS,OAAOE,QAAQ,CAC7B;AACF;;;;;;AAOA,SAASK,SAASC,OAAeP,QAAyB;CACxD,MAAMC,WAAWV,SAASS,MAAM;CAChC,MAAMQ,Q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